Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
vtkTextMapper Class Reference
2D text annotation.
More...
#include <vtkTextMapper.h>
Inheritance diagram for vtkTextMapper:
[legend]Collaboration diagram for vtkTextMapper:
[legend]List of all members.
Detailed Description
2D text annotation.
-
Date:
-
2000/12/10 20:09:14
-
Revision:
-
1.33
-
Thanks:
-
Thanks to Matt Turek who developed this class.
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. 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.
-
See also:
-
vtkMapper2D vtkActor2D
-
Examples:
-
vtkTextMapper (examples)
Definition at line 87 of file vtkTextMapper.h.
Constructor & Destructor Documentation
vtkTextMapper::vtkTextMapper |
( |
|
) |
[protected] |
|
vtkTextMapper::~vtkTextMapper |
( |
|
) |
[protected] |
|
vtkTextMapper::vtkTextMapper |
( |
const vtkTextMapper & |
|
) |
[inline, protected] |
|
Member Function Documentation
virtual const char* vtkTextMapper::GetClassName |
( |
|
) |
[virtual] |
|
int vtkTextMapper::IsTypeOf |
( |
const char * |
type |
) |
[static] |
|
virtual int vtkTextMapper::IsA |
( |
const char * |
type |
) |
[virtual] |
|
vtkTextMapper* vtkTextMapper::SafeDownCast |
( |
vtkObject * |
o |
) |
[static] |
|
void vtkTextMapper::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
[virtual] |
|
|
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. |
vtkTextMapper* vtkTextMapper::New |
( |
|
) |
[static] |
|
virtual void vtkTextMapper::GetSize |
( |
vtkViewport * |
viewport, |
|
|
int |
size[2] |
|
) |
[inline, virtual] |
|
void vtkTextMapper::SetInput |
( |
const char * |
inputString |
) |
|
|
|
Set the input text string to the mapper. The mapper recognizes "
" as a carriage return/linefeed (line separator). |
virtual char* vtkTextMapper::GetInput |
( |
|
) |
[virtual] |
|
virtual void vtkTextMapper::SetFontSize |
( |
int |
size |
) |
[virtual] |
|
|
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. |
virtual int vtkTextMapper::GetFontSize |
( |
|
) |
[virtual] |
|
|
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. |
void vtkTextMapper::SetBold |
( |
int |
val |
) |
|
|
|
Enable/disable text bolding. |
virtual int vtkTextMapper::GetBold |
( |
|
) |
[virtual] |
|
virtual void vtkTextMapper::BoldOn |
( |
|
) |
[virtual] |
|
virtual void vtkTextMapper::BoldOff |
( |
|
) |
[virtual] |
|
void vtkTextMapper::SetItalic |
( |
int |
val |
) |
|
|
|
Enable/disable text italic. |
virtual int vtkTextMapper::GetItalic |
( |
|
) |
[virtual] |
|
virtual void vtkTextMapper::ItalicOn |
( |
|
) |
[virtual] |
|
virtual void vtkTextMapper::ItalicOff |
( |
|
) |
[virtual] |
|
void vtkTextMapper::SetShadow |
( |
int |
val |
) |
|
|
|
Enable/disable text shadows. |
virtual int vtkTextMapper::GetShadow |
( |
|
) |
[virtual] |
|
virtual void vtkTextMapper::ShadowOn |
( |
|
) |
[virtual] |
|
virtual void vtkTextMapper::ShadowOff |
( |
|
) |
[virtual] |
|
void vtkTextMapper::SetFontFamily |
( |
int |
val |
) |
|
|
|
Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). |
virtual int vtkTextMapper::GetFontFamily |
( |
|
) |
[virtual] |
|
void vtkTextMapper::SetFontFamilyToArial |
( |
|
) |
[inline] |
|
void vtkTextMapper::SetFontFamilyToCourier |
( |
|
) |
[inline] |
|
void vtkTextMapper::SetFontFamilyToTimes |
( |
|
) |
[inline] |
|
virtual void vtkTextMapper::SetJustification |
( |
int |
|
) |
[virtual] |
|
|
Set/Get the horizontal justification to left (default), centered, or right. |
virtual int vtkTextMapper::GetJustification |
( |
|
) |
[virtual] |
|
void vtkTextMapper::SetJustificationToLeft |
( |
|
) |
[inline] |
|
void vtkTextMapper::SetJustificationToCentered |
( |
|
) |
[inline] |
|
void vtkTextMapper::SetJustificationToRight |
( |
|
) |
[inline] |
|
virtual void vtkTextMapper::SetVerticalJustification |
( |
int |
|
) |
[virtual] |
|
|
Set/Get the vertical justification to bottom (default), middle, or top. |
virtual int vtkTextMapper::GetVerticalJustification |
( |
|
) |
[virtual] |
|
void vtkTextMapper::SetVerticalJustificationToBottom |
( |
|
) |
[inline] |
|
void vtkTextMapper::SetVerticalJustificationToCentered |
( |
|
) |
[inline] |
|
void vtkTextMapper::SetVerticalJustificationToTop |
( |
|
) |
[inline] |
|
virtual void vtkTextMapper::SetLineOffset |
( |
float |
|
) |
[virtual] |
|
|
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. |
virtual float vtkTextMapper::GetLineOffset |
( |
|
) |
[virtual] |
|
virtual void vtkTextMapper::SetLineSpacing |
( |
float |
|
) |
[virtual] |
|
virtual float vtkTextMapper::GetLineSpacing |
( |
|
) |
[virtual] |
|
virtual int vtkTextMapper::GetNumberOfLines |
( |
|
) |
[virtual] |
|
void vtkTextMapper::ShallowCopy |
( |
vtkTextMapper * |
tm |
) |
|
|
|
Shallow copy of an actor. |
int vtkTextMapper::GetNumberOfLines |
( |
const char * |
input |
) |
|
|
|
Determine the number of lines in the Input string (delimited by "
"). |
void vtkTextMapper::operator= |
( |
const vtkTextMapper & |
|
) |
[inline, protected] |
|
char* vtkTextMapper::NextLine |
( |
const char * |
input, |
|
|
int |
lineNum |
|
) |
[protected] |
|
void vtkTextMapper::GetMultiLineSize |
( |
vtkViewport * |
viewport, |
|
|
int |
size[2] |
|
) |
[protected] |
|
void vtkTextMapper::RenderOverlayMultipleLines |
( |
vtkViewport * |
viewport, |
|
|
vtkActor2D * |
actor |
|
) |
[protected] |
|
void vtkTextMapper::RenderOpaqueGeometryMultipleLines |
( |
vtkViewport * |
viewport, |
|
|
vtkActor2D * |
actor |
|
) |
[protected] |
|
Member Data Documentation
int vtkTextMapper::Italic [protected]
|
|
int vtkTextMapper::Bold [protected]
|
|
int vtkTextMapper::Shadow [protected]
|
|
int vtkTextMapper::FontSize [protected]
|
|
int vtkTextMapper::FontFamily [protected]
|
|
char* vtkTextMapper::Input [protected]
|
|
int vtkTextMapper::Justification [protected]
|
|
int vtkTextMapper::VerticalJustification [protected]
|
|
int vtkTextMapper::LineSize [protected]
|
|
float vtkTextMapper::LineOffset [protected]
|
|
float vtkTextMapper::LineSpacing [protected]
|
|
int vtkTextMapper::NumberOfLines [protected]
|
|
int vtkTextMapper::NumberOfLinesAllocated [protected]
|
|
vtkTextMapper** vtkTextMapper::TextLines [protected]
|
|
The documentation for this class was generated from the following file:
Generated on Wed Nov 21 13:00:47 2001 for VTK by
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001