Viskores  1.0
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
viskores::rendering::TextAnnotation Class Referenceabstract

#include <TextAnnotation.h>

Inheritance diagram for viskores::rendering::TextAnnotation:
viskores::rendering::TextAnnotationBillboard viskores::rendering::TextAnnotationScreen

Public Types

enum  HorizontalAlignment { HorizontalAlignment::Left, HorizontalAlignment::HCenter, HorizontalAlignment::Right }
 
enum  VerticalAlignment { VerticalAlignment::Bottom, VerticalAlignment::VCenter, VerticalAlignment::Top }
 

Public Member Functions

 TextAnnotation (const std::string &text, const viskores::rendering::Color &color, viskores::Float32 scalar)
 
virtual ~TextAnnotation ()
 
void SetText (const std::string &text)
 
const std::string & GetText () const
 
void SetRawAnchor (const viskores::Vec2f_32 &anchor)
 Set the anchor point relative to the box containing the text. More...
 
void SetRawAnchor (viskores::Float32 h, viskores::Float32 v)
 
void SetAlignment (HorizontalAlignment h, VerticalAlignment v)
 
void SetScale (viskores::Float32 scale)
 
virtual void Render (const viskores::rendering::Camera &camera, const viskores::rendering::WorldAnnotator &worldAnnotator, viskores::rendering::Canvas &canvas) const =0
 

Static Public Attributes

static constexpr HorizontalAlignment Left = HorizontalAlignment::Left
 
static constexpr HorizontalAlignment HCenter = HorizontalAlignment::HCenter
 
static constexpr HorizontalAlignment Right = HorizontalAlignment::Right
 
static constexpr VerticalAlignment Bottom = VerticalAlignment::Bottom
 
static constexpr VerticalAlignment VCenter = VerticalAlignment::VCenter
 
static constexpr VerticalAlignment Top = VerticalAlignment::Top
 

Protected Attributes

std::string Text
 
Color TextColor
 
viskores::Float32 Scale
 
viskores::Vec2f_32 Anchor
 

Member Enumeration Documentation

◆ HorizontalAlignment

Enumerator
Left 
HCenter 
Right 

◆ VerticalAlignment

Enumerator
Bottom 
VCenter 
Top 

Constructor & Destructor Documentation

◆ TextAnnotation()

viskores::rendering::TextAnnotation::TextAnnotation ( const std::string &  text,
const viskores::rendering::Color color,
viskores::Float32  scalar 
)

◆ ~TextAnnotation()

virtual viskores::rendering::TextAnnotation::~TextAnnotation ( )
virtual

Member Function Documentation

◆ GetText()

const std::string& viskores::rendering::TextAnnotation::GetText ( ) const

◆ Render()

virtual void viskores::rendering::TextAnnotation::Render ( const viskores::rendering::Camera camera,
const viskores::rendering::WorldAnnotator worldAnnotator,
viskores::rendering::Canvas canvas 
) const
pure virtual

◆ SetAlignment()

void viskores::rendering::TextAnnotation::SetAlignment ( HorizontalAlignment  h,
VerticalAlignment  v 
)

◆ SetRawAnchor() [1/2]

void viskores::rendering::TextAnnotation::SetRawAnchor ( const viskores::Vec2f_32 anchor)

Set the anchor point relative to the box containing the text.

The anchor is scaled in both directions to the range [-1,1] with -1 at the lower left and 1 at the upper right.

◆ SetRawAnchor() [2/2]

void viskores::rendering::TextAnnotation::SetRawAnchor ( viskores::Float32  h,
viskores::Float32  v 
)

◆ SetScale()

void viskores::rendering::TextAnnotation::SetScale ( viskores::Float32  scale)

◆ SetText()

void viskores::rendering::TextAnnotation::SetText ( const std::string &  text)

Member Data Documentation

◆ Anchor

viskores::Vec2f_32 viskores::rendering::TextAnnotation::Anchor
protected

◆ Bottom

constexpr VerticalAlignment viskores::rendering::TextAnnotation::Bottom = VerticalAlignment::Bottom
staticconstexpr

◆ HCenter

constexpr HorizontalAlignment viskores::rendering::TextAnnotation::HCenter = HorizontalAlignment::HCenter
staticconstexpr

◆ Left

constexpr HorizontalAlignment viskores::rendering::TextAnnotation::Left = HorizontalAlignment::Left
staticconstexpr

◆ Right

constexpr HorizontalAlignment viskores::rendering::TextAnnotation::Right = HorizontalAlignment::Right
staticconstexpr

◆ Scale

viskores::Float32 viskores::rendering::TextAnnotation::Scale
protected

◆ Text

std::string viskores::rendering::TextAnnotation::Text
protected

◆ TextColor

Color viskores::rendering::TextAnnotation::TextColor
protected

◆ Top

constexpr VerticalAlignment viskores::rendering::TextAnnotation::Top = VerticalAlignment::Top
staticconstexpr

◆ VCenter

constexpr VerticalAlignment viskores::rendering::TextAnnotation::VCenter = VerticalAlignment::VCenter
staticconstexpr

The documentation for this class was generated from the following file: