Documentation for vtkTextMapper

vtkTextMapper - 2D text annotation

Super Class: vtkMapper2D

Description:

vtkTextMapper provides 2D text annotation support for vtk. It is a vtkMapper2D that can be associated with a vtkActor2D and placed into a vtkRenderer or vtkImager. To use vtkTextMapper, specify an input text string, a font size, a font name, and whether to turn on bold or shadows (shadows make the font more visible when on top of other objects). You'll also need to create a vtkActor2D and add it to the renderer or imager.

 

See Also:

vtkMapper2D vtkActor2D

 

Methods:

void vtkTextMapper ()
void vtkTextMapper ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
static vtkTextMapper *New ()
void Render (vtkViewport * ,vtkActor2D *)
void SetInput (char *)
void SetFontSize (int )
int GetFontSize ()
void SetBold (int )
int GetBold ()
void BoldOn ()
void BoldOff ()
void SetItalic (int )
int GetItalic ()
void ItalicOn ()
void ItalicOff ()
void SetShadow (int )
int GetShadow ()
void ShadowOn ()
void ShadowOff ()
void SetFontFamily (int )
int GetFontFamily ()
void SetFontFamilyToArial ()
void SetFontFamilyToCourier ()
void SetFontFamilyToTimes ()

 

Detailed Method Descriptions:

Creates a new text mapper with Font size 12, bold off, italic off, and Arial font

static vtkTextMapper *New ()

Draw the text to the screen. This function is implemented in the device dependent subclasses.

void Render (vtkViewport * ,vtkActor2D *)

Set the input text string to the mapper. The mapper doesn't parse the string for carriage returns or line feeds.

void SetInput (char *)

Set the font size used by the mapper. The subclasses can override this function since all font sizes may not be available (especially in X).

void SetFontSize (int )

Return the font size actually in use by the mapper. This value may not match the value specified in the last SetFontSize if the last size was unavailable.

int GetFontSize ()

Enable/disable text bolding.

void SetBold (int )
int GetBold ()
void BoldOn ()
void BoldOff ()

Enable/disable text italic.

void SetItalic (int )
int GetItalic ()
void ItalicOn ()
void ItalicOff ()

Enable/disable text shadows.

void SetShadow (int )
int GetShadow ()
void ShadowOn ()
void ShadowOff ()

Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES).

void SetFontFamily (int )
int GetFontFamily ()
void SetFontFamilyToArial ()
void SetFontFamilyToCourier ()
void SetFontFamilyToTimes ()