#include <vtkTextMapper.h>
Inheritance diagram for vtkTextMapper:
Public Methods | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | GetSize (vtkViewport *, int size[2]) |
int | GetWidth (vtkViewport *) |
int | GetHeight (vtkViewport *) |
void | SetInput (const char *inputString) |
virtual char * | GetInput () |
virtual void | SetFontSize (int size) |
virtual int | GetFontSize () |
void | SetBold (int val) |
virtual int | GetBold () |
virtual void | BoldOn () |
virtual void | BoldOff () |
void | SetItalic (int val) |
virtual int | GetItalic () |
virtual void | ItalicOn () |
virtual void | ItalicOff () |
void | SetShadow (int val) |
virtual int | GetShadow () |
virtual void | ShadowOn () |
virtual void | ShadowOff () |
void | SetFontFamily (int val) |
virtual int | GetFontFamily () |
void | SetFontFamilyToArial () |
void | SetFontFamilyToCourier () |
void | SetFontFamilyToTimes () |
virtual void | SetJustification (int) |
virtual int | GetJustification () |
void | SetJustificationToLeft () |
void | SetJustificationToCentered () |
void | SetJustificationToRight () |
virtual void | SetVerticalJustification (int) |
virtual int | GetVerticalJustification () |
void | SetVerticalJustificationToBottom () |
void | SetVerticalJustificationToCentered () |
void | SetVerticalJustificationToTop () |
virtual void | SetLineOffset (float) |
virtual float | GetLineOffset () |
virtual void | SetLineSpacing (float) |
virtual float | GetLineSpacing () |
virtual int | GetNumberOfLines () |
void | ShallowCopy (vtkTextMapper *tm) |
int | GetNumberOfLines (const char *input) |
Static Public Methods | |
int | IsTypeOf (const char *type) |
vtkTextMapper * | SafeDownCast (vtkObject *o) |
vtkTextMapper * | New () |
Protected Methods | |
vtkTextMapper () | |
~vtkTextMapper () | |
vtkTextMapper (const vtkTextMapper &) | |
void | operator= (const vtkTextMapper &) |
char * | NextLine (const char *input, int lineNum) |
void | GetMultiLineSize (vtkViewport *viewport, int size[2]) |
void | RenderOverlayMultipleLines (vtkViewport *viewport, vtkActor2D *actor) |
void | RenderOpaqueGeometryMultipleLines (vtkViewport *viewport, vtkActor2D *actor) |
Protected Attributes | |
int | Italic |
int | Bold |
int | Shadow |
int | FontSize |
int | FontFamily |
char * | Input |
int | Justification |
int | VerticalJustification |
vtkTimeStamp | FontMTime |
int | LineSize |
float | LineOffset |
float | LineSpacing |
int | NumberOfLines |
int | NumberOfLinesAllocated |
vtkTextMapper ** | TextLines |
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. You can create multiple lines by embedding "
" in the Input string.
The position of the text can be controlled by setting the justification to right, centered, or left. If you have specified multiple lines, all lines will be justified the same way.
|
Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkMapper2D. Reimplemented in vtkWin32OpenGLTextMapper. |
|
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. |
|
Determine the number of lines in the Input string (delimited by " |
|
Return the size[2]/width/height of the rectangle required to draw this mapper (in pixels). Reimplemented in vtkWin32TextMapper. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkMapper2D. Reimplemented in vtkWin32OpenGLTextMapper. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkMapper2D. Reimplemented in vtkWin32OpenGLTextMapper. |
|
Creates a new text mapper with Font size 12, bold off, italic off, and Arial font. Reimplemented from vtkMapper2D. Reimplemented in vtkWin32OpenGLTextMapper. |
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkMapper2D. |
|
Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkMapper2D. Reimplemented in vtkWin32OpenGLTextMapper. |
|
Enable/disable text bolding. |
|
Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). |
|
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). Reimplemented in vtkXTextMapper. |
|
Set the input text string to the mapper. The mapper recognizes " |
|
Enable/disable text italic. |
|
Set/Get the horizontal justification to left (default), centered, or right. |
|
These methods can be used to control the spacing and placement of text (in the vertical direction). LineOffset is a vertical offset (measured in lines); LineSpacing is the spacing between lines. |
|
Enable/disable text shadows. |
|
Set/Get the vertical justification to bottom (default), middle, or top. |
|
Shallow copy of an actor. |