Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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
Examples:
vtkTextActor (Examples)
Tests:
vtkTextActor (Tests)

Definition at line 49 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)
virtual void SetNonLinearFontScale (double exponent, int target)
void SetMapper (vtkTextMapper *mapper)
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 ()
virtual void ReleaseGraphicsResources (vtkWindow *)
int RenderOpaqueGeometry (vtkViewport *viewport)
int RenderTranslucentGeometry (vtkViewport *)
int RenderOverlay (vtkViewport *viewport)

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkTextActorSafeDownCast (vtkObject *o)
static 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 52 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.

static 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.

static 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.

static 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  ) 
 

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

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   
      Otherwise the text aligns itself to corner/midpoint 3   4   5    or
      centre of the box defined by the position 1 & 2 0   1   2   
      coordinates according to the diagram on the left. 

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   
      Otherwise the text aligns itself to corner/midpoint 3   4   5    or
      centre of the box defined by the position 1 & 2 0   1   2   
      coordinates according to the diagram on the left. 

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 115 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. 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.

Definition at line 146 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. 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.

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 159 of file vtkTextActor.h.

float vtkTextActor::MaximumLineHeight [protected]
 

Definition at line 160 of file vtkTextActor.h.

double vtkTextActor::FontScaleExponent [protected]
 

Definition at line 161 of file vtkTextActor.h.

double vtkTextActor::FontScaleTarget [protected]
 

Definition at line 162 of file vtkTextActor.h.

int vtkTextActor::ScaledText [protected]
 

Definition at line 163 of file vtkTextActor.h.

int vtkTextActor::AlignmentPoint [protected]
 

Definition at line 164 of file vtkTextActor.h.

vtkCoordinate* vtkTextActor::AdjustedPositionCoordinate [protected]
 

Definition at line 166 of file vtkTextActor.h.

vtkTextProperty* vtkTextActor::TextProperty [protected]
 

Definition at line 167 of file vtkTextActor.h.

vtkTimeStamp vtkTextActor::BuildTime [protected]
 

Definition at line 169 of file vtkTextActor.h.

int vtkTextActor::LastSize[2] [protected]
 

Definition at line 170 of file vtkTextActor.h.

int vtkTextActor::LastOrigin[2] [protected]
 

Definition at line 171 of file vtkTextActor.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 22 00:21:40 2008 for VTK by  doxygen 1.4.3-20050530