VTK
|
2D text annotation More...
#include <vtkTextMapper.h>
Public Types | |
typedef vtkMapper2D | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkTextMapper * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | ShallowCopy (vtkTextMapper *tm) |
int | GetNumberOfLines (const char *input) |
int | GetNumberOfLines () |
virtual int | GetSystemFontSize (int size) |
void | RenderOverlay (vtkViewport *, vtkActor2D *) |
void | ReleaseGraphicsResources (vtkWindow *) |
unsigned long | GetMTime () |
virtual void | GetSize (vtkViewport *, int size[2]) |
virtual int | GetWidth (vtkViewport *v) |
virtual int | GetHeight (vtkViewport *v) |
virtual void | SetInput (const char *) |
virtual char * | GetInput () |
virtual void | SetTextProperty (vtkTextProperty *p) |
virtual vtkTextProperty * | GetTextProperty () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkTextMapper * | SafeDownCast (vtkObjectBase *o) |
static vtkTextMapper * | New () |
static int | SetMultipleConstrainedFontSize (vtkViewport *, int targetWidth, int targetHeight, vtkTextMapper **mappers, int nbOfMappers, int *maxResultingSize) |
static int | SetRelativeFontSize (vtkTextMapper *, vtkViewport *, int *winSize, int *stringSize, float sizeFactor=0.0) |
static int | SetMultipleRelativeFontSize (vtkViewport *viewport, vtkTextMapper **textMappers, int nbOfMappers, int *winSize, int *stringSize, float sizeFactor) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkTextMapper () | |
~vtkTextMapper () | |
Protected Attributes | |
char * | Input |
vtkTextProperty * | TextProperty |
static int | SetConstrainedFontSize (vtkTextMapper *, vtkViewport *, int targetWidth, int targetHeight) |
virtual int | SetConstrainedFontSize (vtkViewport *, int targetWidth, int targetHeight) |
2D text annotation
vtkTextMapper provides 2D text annotation support for VTK. It is a vtkMapper2D that can be associated with a vtkActor2D and placed into a vtkRenderer.
To use vtkTextMapper, specify an input text string.
Definition at line 59 of file vtkTextMapper.h.
typedef vtkMapper2D vtkTextMapper::Superclass |
Reimplemented from vtkMapper2D.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
Definition at line 62 of file vtkTextMapper.h.
vtkTextMapper::vtkTextMapper | ( | ) | [protected] |
vtkTextMapper::~vtkTextMapper | ( | ) | [protected] |
static int vtkTextMapper::IsTypeOf | ( | const char * | name | ) | [static] |
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 vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
virtual int vtkTextMapper::IsA | ( | const char * | name | ) | [virtual] |
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 vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
static vtkTextMapper* vtkTextMapper::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkMapper2D.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
virtual vtkObjectBase* vtkTextMapper::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkMapper2D.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
vtkTextMapper* vtkTextMapper::NewInstance | ( | ) | const |
Reimplemented from vtkMapper2D.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
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.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
static vtkTextMapper* vtkTextMapper::New | ( | ) | [static] |
Creates a new text mapper.
Reimplemented from vtkAlgorithm.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
virtual void vtkTextMapper::GetSize | ( | vtkViewport * | , |
int | size[2] | ||
) | [virtual] |
Return the size[2]/width/height of the rectangle required to draw this mapper (in pixels).
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
virtual int vtkTextMapper::GetWidth | ( | vtkViewport * | v | ) | [virtual] |
Return the size[2]/width/height of the rectangle required to draw this mapper (in pixels).
virtual int vtkTextMapper::GetHeight | ( | vtkViewport * | v | ) | [virtual] |
Return the size[2]/width/height of the rectangle required to draw this mapper (in pixels).
virtual void vtkTextMapper::SetInput | ( | const char * | ) | [virtual] |
The input text string to the mapper.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
virtual char* vtkTextMapper::GetInput | ( | ) | [virtual] |
The input text string to the mapper.
virtual void vtkTextMapper::SetTextProperty | ( | vtkTextProperty * | p | ) | [virtual] |
Set/Get the text property.
virtual vtkTextProperty* vtkTextMapper::GetTextProperty | ( | ) | [virtual] |
Set/Get the text property.
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.
Get the number of lines in this mapper's input.
virtual int vtkTextMapper::SetConstrainedFontSize | ( | vtkViewport * | , |
int | targetWidth, | ||
int | targetHeight | ||
) | [virtual] |
Set and return the font size (in points) required to make this mapper fit in a given target rectangle (width x height, in pixels). A static version of the method is also available for convenience to other classes (e.g., widgets).
static int vtkTextMapper::SetConstrainedFontSize | ( | vtkTextMapper * | , |
vtkViewport * | , | ||
int | targetWidth, | ||
int | targetHeight | ||
) | [static] |
Set and return the font size (in points) required to make this mapper fit in a given target rectangle (width x height, in pixels). A static version of the method is also available for convenience to other classes (e.g., widgets).
static int vtkTextMapper::SetMultipleConstrainedFontSize | ( | vtkViewport * | , |
int | targetWidth, | ||
int | targetHeight, | ||
vtkTextMapper ** | mappers, | ||
int | nbOfMappers, | ||
int * | maxResultingSize | ||
) | [static] |
Set and return the font size (in points) required to make each element of an array of mappers fit in a given rectangle (width x height, in pixels). This font size is the smallest size that was required to fit the largest mapper in this constraint.
static int vtkTextMapper::SetRelativeFontSize | ( | vtkTextMapper * | , |
vtkViewport * | , | ||
int * | winSize, | ||
int * | stringSize, | ||
float | sizeFactor = 0.0 |
||
) | [static] |
Use these methods when setting font size relative to the renderer's size. These methods are static so that external classes (e.g., widgets) can easily use them.
static int vtkTextMapper::SetMultipleRelativeFontSize | ( | vtkViewport * | viewport, |
vtkTextMapper ** | textMappers, | ||
int | nbOfMappers, | ||
int * | winSize, | ||
int * | stringSize, | ||
float | sizeFactor | ||
) | [static] |
Use these methods when setting font size relative to the renderer's size. These methods are static so that external classes (e.g., widgets) can easily use them.
int vtkTextMapper::GetSystemFontSize | ( | int | size | ) | [inline, virtual] |
Get the available system font size matching a font size.
Definition at line 170 of file vtkTextMapper.h.
void vtkTextMapper::RenderOverlay | ( | vtkViewport * | , |
vtkActor2D * | |||
) | [virtual] |
Reimplemented from vtkMapper2D.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
void vtkTextMapper::ReleaseGraphicsResources | ( | vtkWindow * | ) | [virtual] |
Release any graphics resources that are being consumed by this mapper. The parameter window could be used to determine which graphic resources to release.
Reimplemented from vtkAbstractMapper.
Reimplemented in vtkOpenGLFreeTypeTextMapper, and vtkOpenGLFreeTypeTextMapper.
unsigned long vtkTextMapper::GetMTime | ( | ) | [virtual] |
Override Modifiedtime as we have added Clipping planes
Reimplemented from vtkAbstractMapper.
char* vtkTextMapper::Input [protected] |
Definition at line 147 of file vtkTextMapper.h.
vtkTextProperty* vtkTextMapper::TextProperty [protected] |
Definition at line 148 of file vtkTextMapper.h.