Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkTextActor Class Reference

#include <vtkTextActor.h>

Inheritance diagram for vtkTextActor:

Inheritance graph
[legend]
Collaboration diagram for vtkTextActor:

Collaboration graph
[legend]
List of all members.

Detailed Description

An actor that displays text. Scaled or unscaled.

vtkTextActor can be used to place text annotation into a window. When ScaledText is false, the text is fixed font and operation is the same as a vtkTextMapper/vtkActor2D pair. When ScaledText is true, the font resizes such that the text fits inside the box defined by the position 1 & 2 coordinates. This class replaces the deprecated vtkScaledTextActor and acts as a convenient wrapper for a vtkTextMapper/vtkActor2D pair. Set the text property/attributes through the vtkTextProperty associated to this actor.

See also:
vtkActor2D vtkTextMapper vtkTextProperty
Created by:
  • Biddiscombe, John
CVS contributions (if > 5%):
  • Biddiscombe, John (54%)
  • Barre, Sebastien (39%)
CVS logs (CVSweb):
  • .h (/Rendering/vtkTextActor.h)
  • .cxx (/Rendering/vtkTextActor.cxx)
Examples:
vtkTextActor (Examples)

Definition at line 57 of file vtkTextActor.h.

Public Types

typedef vtkActor2D Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void ShallowCopy (vtkProp *prop)
void SetMapper (vtkTextMapper *mapper)
virtual void SetNonLinearFontScale (double exponent, int target)
virtual void ReleaseGraphicsResources (vtkWindow *)
void SetInput (const char *inputString)
char * GetInput ()
virtual void SetMinimumSize (int, int)
void SetMinimumSize (int[2])
virtual int * GetMinimumSize ()
virtual void GetMinimumSize (int &, int &)
virtual void GetMinimumSize (int[2])
virtual void SetMaximumLineHeight (float)
virtual float GetMaximumLineHeight ()
virtual void SetScaledText (int)
virtual int GetScaledText ()
virtual void ScaledTextOn ()
virtual void ScaledTextOff ()
virtual void SetAlignmentPoint (int)
virtual int GetAlignmentPoint ()
vtkCoordinateGetActualPositionCoordinate (void)
virtual void SetTextProperty (vtkTextProperty *p)
virtual vtkTextPropertyGetTextProperty ()
int RenderOpaqueGeometry (vtkViewport *viewport)
int RenderTranslucentGeometry (vtkViewport *)
int RenderOverlay (vtkViewport *viewport)

Static Public Member Functions

int IsTypeOf (const char *type)
vtkTextActorSafeDownCast (vtkObject *o)
vtkTextActorNew ()

Protected Member Functions

void SetMapper (vtkMapper2D *mapper)
 vtkTextActor ()
 ~vtkTextActor ()

Protected Attributes

int MinimumSize [2]
float MaximumLineHeight
double FontScaleExponent
double FontScaleTarget
int ScaledText
int AlignmentPoint
vtkCoordinateAdjustedPositionCoordinate
vtkTextPropertyTextProperty
vtkTimeStamp BuildTime
int LastSize [2]
int LastOrigin [2]


Member Typedef Documentation

typedef vtkActor2D vtkTextActor::Superclass
 

Reimplemented from vtkActor2D.

Reimplemented in vtkScaledTextActor.

Definition at line 60 of file vtkTextActor.h.


Constructor & Destructor Documentation

vtkTextActor::vtkTextActor  )  [protected]
 

vtkTextActor::~vtkTextActor  )  [protected]
 


Member Function Documentation

virtual const char* vtkTextActor::GetClassName  )  [virtual]
 

Reimplemented from vtkActor2D.

Reimplemented in vtkScaledTextActor.

int vtkTextActor::IsTypeOf const char *  type  )  [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

Reimplemented in vtkScaledTextActor.

virtual int vtkTextActor::IsA const char *  type  )  [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

Reimplemented in vtkScaledTextActor.

vtkTextActor* vtkTextActor::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkActor2D.

Reimplemented in vtkScaledTextActor.

void vtkTextActor::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 vtkActor2D.

Reimplemented in vtkScaledTextActor.

vtkTextActor* vtkTextActor::New  )  [static]
 

Instantiate object with a rectangle in normaled view coordinates of (0.2,0.85, 0.8, 0.95).

Reimplemented from vtkActor2D.

Reimplemented in vtkScaledTextActor.

void vtkTextActor::ShallowCopy vtkProp prop  )  [virtual]
 

Shallow copy of this text actor. Overloads the virtual vtkProp method.

Reimplemented from vtkActor2D.

void vtkTextActor::SetMapper vtkTextMapper mapper  ) 
 

Override the vtkTextMapper that defines the text to be drawn. One will be created by default if none is supplied

void vtkTextActor::SetInput const char *  inputString  ) 
 

Set the text string to be displayed. "\n" is recognized as a carriage return/linefeed (line separator). Convenience method to the underlying mapper

char* vtkTextActor::GetInput  ) 
 

Set the text string to be displayed. "\n" is recognized as a carriage return/linefeed (line separator). Convenience method to the underlying mapper

virtual void vtkTextActor::SetMinimumSize int  ,
int 
[virtual]
 

Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Not valid when ScaledText = false

void vtkTextActor::SetMinimumSize int  [2]  ) 
 

Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Not valid when ScaledText = false

virtual int* vtkTextActor::GetMinimumSize  )  [virtual]
 

Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Not valid when ScaledText = false

virtual void vtkTextActor::GetMinimumSize int &  ,
int & 
[virtual]
 

Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Not valid when ScaledText = false

virtual void vtkTextActor::GetMinimumSize int  [2]  )  [virtual]
 

Set/Get the minimum size in pixels for this actor. Defaults to 10,10. Not valid when ScaledText = false

virtual void vtkTextActor::SetMaximumLineHeight float   )  [virtual]
 

Set/Get the maximum height of a line of text as a percentage of the vertical area allocated to this scaled text actor. Defaults to 1.0. Not valid when ScaledText = false

virtual float vtkTextActor::GetMaximumLineHeight  )  [virtual]
 

Set/Get the maximum height of a line of text as a percentage of the vertical area allocated to this scaled text actor. Defaults to 1.0. Not valid when ScaledText = false

virtual void vtkTextActor::SetScaledText int   )  [virtual]
 

Turn on or off the ScaledText option. When text is scaled, the bounding rectangle is used to fit the text When ScaledText is off, the text is rendered at a fixed font size

virtual int vtkTextActor::GetScaledText  )  [virtual]
 

Turn on or off the ScaledText option. When text is scaled, the bounding rectangle is used to fit the text When ScaledText is off, the text is rendered at a fixed font size

virtual void vtkTextActor::ScaledTextOn  )  [virtual]
 

Turn on or off the ScaledText option. When text is scaled, the bounding rectangle is used to fit the text When ScaledText is off, the text is rendered at a fixed font size

virtual void vtkTextActor::ScaledTextOff  )  [virtual]
 

Turn on or off the ScaledText option. When text is scaled, the bounding rectangle is used to fit the text When ScaledText is off, the text is rendered at a fixed font size

virtual void vtkTextActor::SetAlignmentPoint int   )  [virtual]
 

Set/Get the Alignment point for unscaled (fixed fontsize) text if zero (default), the text aligns itself to the bottom left corner (which is defined by the PositionCoordinate) otherwise the text aligns itself to corner/midpoint or centre 6 7 8 of the box defined by the position 1 & 2 coordinates 3 4 5 according to the diagram on the left. 0 1 2

virtual int vtkTextActor::GetAlignmentPoint  )  [virtual]
 

Set/Get the Alignment point for unscaled (fixed fontsize) text if zero (default), the text aligns itself to the bottom left corner (which is defined by the PositionCoordinate) otherwise the text aligns itself to corner/midpoint or centre 6 7 8 of the box defined by the position 1 & 2 coordinates 3 4 5 according to the diagram on the left. 0 1 2

vtkCoordinate* vtkTextActor::GetActualPositionCoordinate void   )  [inline, virtual]
 

Return the actual vtkCoordinate reference that the mapper should use to position the actor. This is used internally by the mappers and should be overridden in specialized subclasses and otherwise ignored.

Reimplemented from vtkActor2D.

Definition at line 122 of file vtkTextActor.h.

virtual void vtkTextActor::SetTextProperty vtkTextProperty p  )  [virtual]
 

Set/Get the text property.

virtual vtkTextProperty* vtkTextActor::GetTextProperty  )  [virtual]
 

Set/Get the text property.

virtual void vtkTextActor::SetNonLinearFontScale double  exponent,
int  target
[virtual]
 

Enable non-linear scaling of font sizes. This is useful in combination with scaled text. With small windows you want to use the entire scaled text area. With larger windows you want to reduce the font size some so that the entire area is not used. These values modify the computed font size as follows: newFontSize = pow(FontSize,exponent)*pow(target,1.0 - exponent) typically exponent should be around 0.7 and target should be around 10

virtual void vtkTextActor::ReleaseGraphicsResources vtkWindow  )  [virtual]
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

Reimplemented from vtkActor2D.

int vtkTextActor::RenderOpaqueGeometry vtkViewport viewport  )  [virtual]
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. Draw the text actor to the screen.

Reimplemented from vtkActor2D.

int vtkTextActor::RenderTranslucentGeometry vtkViewport  )  [inline, virtual]
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. Draw the text actor to the screen.

Reimplemented from vtkActor2D.

Definition at line 153 of file vtkTextActor.h.

int vtkTextActor::RenderOverlay vtkViewport viewport  )  [virtual]
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. Draw the text actor to the screen.

Reimplemented from vtkActor2D.

void vtkTextActor::SetMapper vtkMapper2D mapper  )  [protected, virtual]
 

Hide access methods which use superclass vtkMapper2D and not vtkTextMapper

Reimplemented from vtkActor2D.


Member Data Documentation

int vtkTextActor::MinimumSize[2] [protected]
 

Definition at line 166 of file vtkTextActor.h.

float vtkTextActor::MaximumLineHeight [protected]
 

Definition at line 167 of file vtkTextActor.h.

double vtkTextActor::FontScaleExponent [protected]
 

Definition at line 168 of file vtkTextActor.h.

double vtkTextActor::FontScaleTarget [protected]
 

Definition at line 169 of file vtkTextActor.h.

int vtkTextActor::ScaledText [protected]
 

Definition at line 170 of file vtkTextActor.h.

int vtkTextActor::AlignmentPoint [protected]
 

Definition at line 171 of file vtkTextActor.h.

vtkCoordinate* vtkTextActor::AdjustedPositionCoordinate [protected]
 

Definition at line 173 of file vtkTextActor.h.

vtkTextProperty* vtkTextActor::TextProperty [protected]
 

Definition at line 174 of file vtkTextActor.h.

vtkTimeStamp vtkTextActor::BuildTime [protected]
 

Definition at line 176 of file vtkTextActor.h.

int vtkTextActor::LastSize[2] [protected]
 

Definition at line 177 of file vtkTextActor.h.

int vtkTextActor::LastOrigin[2] [protected]
 

Definition at line 178 of file vtkTextActor.h.


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