VTK-m  2.0
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
vtkm::rendering::TextAnnotation Class Referenceabstract

#include <TextAnnotation.h>

Inheritance diagram for vtkm::rendering::TextAnnotation:
vtkm::rendering::TextAnnotationBillboard vtkm::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 vtkm::rendering::Color &color, vtkm::Float32 scalar)
 
virtual ~TextAnnotation ()
 
void SetText (const std::string &text)
 
const std::string & GetText () const
 
void SetRawAnchor (const vtkm::Vec2f_32 &anchor)
 Set the anchor point relative to the box containing the text. More...
 
void SetRawAnchor (vtkm::Float32 h, vtkm::Float32 v)
 
void SetAlignment (HorizontalAlignment h, VerticalAlignment v)
 
void SetScale (vtkm::Float32 scale)
 
virtual void Render (const vtkm::rendering::Camera &camera, const vtkm::rendering::WorldAnnotator &worldAnnotator, vtkm::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
 
vtkm::Float32 Scale
 
vtkm::Vec2f_32 Anchor
 

Member Enumeration Documentation

◆ HorizontalAlignment

Enumerator
Left 
HCenter 
Right 

◆ VerticalAlignment

Enumerator
Bottom 
VCenter 
Top 

Constructor & Destructor Documentation

◆ TextAnnotation()

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

◆ ~TextAnnotation()

virtual vtkm::rendering::TextAnnotation::~TextAnnotation ( )
virtual

Member Function Documentation

◆ GetText()

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

◆ Render()

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

◆ SetAlignment()

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

◆ SetRawAnchor() [1/2]

void vtkm::rendering::TextAnnotation::SetRawAnchor ( const vtkm::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 vtkm::rendering::TextAnnotation::SetRawAnchor ( vtkm::Float32  h,
vtkm::Float32  v 
)

◆ SetScale()

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

◆ SetText()

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

Member Data Documentation

◆ Anchor

vtkm::Vec2f_32 vtkm::rendering::TextAnnotation::Anchor
protected

◆ Bottom

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

◆ HCenter

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

◆ Left

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

◆ Right

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

◆ Scale

vtkm::Float32 vtkm::rendering::TextAnnotation::Scale
protected

◆ Text

std::string vtkm::rendering::TextAnnotation::Text
protected

◆ TextColor

Color vtkm::rendering::TextAnnotation::TextColor
protected

◆ Top

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

◆ VCenter

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

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