VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkCaptionActor2D Class Reference

draw text label associated with a point More...

#include <vtkCaptionActor2D.h>

Inheritance diagram for vtkCaptionActor2D:
Inheritance graph
[legend]
Collaboration diagram for vtkCaptionActor2D:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkActor2D Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkCaptionActor2DNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void ShallowCopy (vtkProp *prop)
virtual void ReleaseGraphicsResources (vtkWindow *)
virtual void SetCaption (const char *caption)
virtual char * GetCaption ()
virtual vtkCoordinateGetAttachmentPointCoordinate ()
virtual void SetAttachmentPoint (float x[3])
virtual void SetAttachmentPoint (float x, float y, float z)
virtual floatGetAttachmentPoint ()
virtual void SetBorder (int)
virtual int GetBorder ()
virtual void BorderOn ()
virtual void BorderOff ()
virtual void SetLeader (int)
virtual int GetLeader ()
virtual void LeaderOn ()
virtual void LeaderOff ()
virtual void SetThreeDimensionalLeader (int)
virtual int GetThreeDimensionalLeader ()
virtual void ThreeDimensionalLeaderOn ()
virtual void ThreeDimensionalLeaderOff ()
virtual void SetLeaderGlyphData (vtkPolyData *)
virtual void SetLeaderGlyphConnection (vtkAlgorithmOutput *)
virtual vtkPolyDataGetLeaderGlyph ()
virtual void SetLeaderGlyphSize (double)
virtual double GetLeaderGlyphSize ()
virtual void SetMaximumLeaderGlyphSize (int)
virtual int GetMaximumLeaderGlyphSize ()
virtual void SetPadding (int)
virtual int GetPadding ()
virtual vtkTextActorGetTextActor ()
virtual void SetCaptionTextProperty (vtkTextProperty *p)
virtual vtkTextPropertyGetCaptionTextProperty ()
virtual void SetAttachEdgeOnly (int)
virtual int GetAttachEdgeOnly ()
virtual void AttachEdgeOnlyOn ()
virtual void AttachEdgeOnlyOff ()
int RenderOpaqueGeometry (vtkViewport *viewport)
virtual int RenderTranslucentPolygonalGeometry (vtkViewport *)
int RenderOverlay (vtkViewport *viewport)
virtual int HasTranslucentPolygonalGeometry ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkCaptionActor2DSafeDownCast (vtkObjectBase *o)
static vtkCaptionActor2DNew ()

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkCaptionActor2D ()
 ~vtkCaptionActor2D ()

Protected Attributes

vtkCoordinateAttachmentPointCoordinate
int Border
int Leader
int ThreeDimensionalLeader
double LeaderGlyphSize
int MaximumLeaderGlyphSize
int Padding
int AttachEdgeOnly

Detailed Description

draw text label associated with a point

vtkCaptionActor2D is a hybrid 2D/3D actor that is used to associate text with a point (the AttachmentPoint) in the scene. The caption can be drawn with a rectangular border and a leader connecting the caption to the attachment point. Optionally, the leader can be glyphed at its endpoint to create arrow heads or other indicators.

To use the caption actor, you normally specify the Position and Position2 coordinates (these are inherited from the vtkActor2D superclass). (Note that Position2 can be set using vtkActor2D's SetWidth() and SetHeight() methods.) Position and Position2 define the size of the caption, and a third point, the AttachmentPoint, defines a point that the caption is associated with. You must also define the caption text, whether you want a border around the caption, and whether you want a leader from the caption to the attachment point. The font attributes of the text can be set through the vtkTextProperty associated to this actor. You also indicate whether you want the leader to be 2D or 3D. (2D leaders are always drawn over the underlying geometry. 3D leaders may be occluded by the geometry.) The leader may also be terminated by an optional glyph (e.g., arrow).

The trickiest part about using this class is setting Position, Position2, and AttachmentPoint correctly. These instance variables are vtkCoordinates, and can be set up in various ways. In default usage, the AttachmentPoint is defined in the world coordinate system, Position is the lower-left corner of the caption and relative to AttachmentPoint (defined in display coordaintes, i.e., pixels), and Position2 is relative to Position and is the upper-right corner (also in display coordinates). However, the user has full control over the coordinates, and can do things like place the caption in a fixed position in the renderer, with the leader moving with the AttachmentPoint.

See also:
vtkLegendBoxActor vtkTextMapper vtkTextActor vtkTextProperty vtkCoordinate
Tests:
vtkCaptionActor2D (Tests)

Definition at line 76 of file vtkCaptionActor2D.h.


Member Typedef Documentation

Reimplemented from vtkActor2D.

Definition at line 79 of file vtkCaptionActor2D.h.


Constructor & Destructor Documentation


Member Function Documentation

static int vtkCaptionActor2D::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 vtkActor2D.

virtual int vtkCaptionActor2D::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 vtkActor2D.

Reimplemented from vtkActor2D.

virtual vtkObjectBase* vtkCaptionActor2D::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkActor2D.

Reimplemented from vtkActor2D.

void vtkCaptionActor2D::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.

Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at layer 0.

Reimplemented from vtkActor2D.

virtual void vtkCaptionActor2D::SetCaption ( const char *  caption) [virtual]

Define the text to be placed in the caption. The text can be multiple lines (separated by "\n").

virtual char* vtkCaptionActor2D::GetCaption ( ) [virtual]

Define the text to be placed in the caption. The text can be multiple lines (separated by "\n").

Set/Get the attachment point for the caption. By default, the attachment point is defined in world coordinates, but this can be changed using vtkCoordinate methods.

virtual void vtkCaptionActor2D::SetAttachmentPoint ( float  x[3]) [virtual]

Set/Get the attachment point for the caption. By default, the attachment point is defined in world coordinates, but this can be changed using vtkCoordinate methods.

virtual void vtkCaptionActor2D::SetAttachmentPoint ( float  x,
float  y,
float  z 
) [virtual]

Set/Get the attachment point for the caption. By default, the attachment point is defined in world coordinates, but this can be changed using vtkCoordinate methods.

Set/Get the attachment point for the caption. By default, the attachment point is defined in world coordinates, but this can be changed using vtkCoordinate methods.

virtual void vtkCaptionActor2D::SetBorder ( int  ) [virtual]

Enable/disable the placement of a border around the text.

virtual int vtkCaptionActor2D::GetBorder ( ) [virtual]

Enable/disable the placement of a border around the text.

virtual void vtkCaptionActor2D::BorderOn ( ) [virtual]

Enable/disable the placement of a border around the text.

virtual void vtkCaptionActor2D::BorderOff ( ) [virtual]

Enable/disable the placement of a border around the text.

virtual void vtkCaptionActor2D::SetLeader ( int  ) [virtual]

Enable/disable drawing a "line" from the caption to the attachment point.

virtual int vtkCaptionActor2D::GetLeader ( ) [virtual]

Enable/disable drawing a "line" from the caption to the attachment point.

virtual void vtkCaptionActor2D::LeaderOn ( ) [virtual]

Enable/disable drawing a "line" from the caption to the attachment point.

virtual void vtkCaptionActor2D::LeaderOff ( ) [virtual]

Enable/disable drawing a "line" from the caption to the attachment point.

virtual void vtkCaptionActor2D::SetThreeDimensionalLeader ( int  ) [virtual]

Indicate whether the leader is 2D (no hidden line) or 3D (z-buffered).

Indicate whether the leader is 2D (no hidden line) or 3D (z-buffered).

virtual void vtkCaptionActor2D::ThreeDimensionalLeaderOn ( ) [virtual]

Indicate whether the leader is 2D (no hidden line) or 3D (z-buffered).

Indicate whether the leader is 2D (no hidden line) or 3D (z-buffered).

virtual void vtkCaptionActor2D::SetLeaderGlyphData ( vtkPolyData ) [virtual]

Specify a glyph to be used as the leader "head". This could be something like an arrow or sphere. If not specified, no glyph is drawn. Note that the glyph is assumed to be aligned along the x-axis and is rotated about the origin. SetLeaderGlyphData() directly uses the polydata without setting a pipeline connection. SetLeaderGlyphConnection() sets up a pipeline connection and causes an update to the input during render.

Specify a glyph to be used as the leader "head". This could be something like an arrow or sphere. If not specified, no glyph is drawn. Note that the glyph is assumed to be aligned along the x-axis and is rotated about the origin. SetLeaderGlyphData() directly uses the polydata without setting a pipeline connection. SetLeaderGlyphConnection() sets up a pipeline connection and causes an update to the input during render.

Specify a glyph to be used as the leader "head". This could be something like an arrow or sphere. If not specified, no glyph is drawn. Note that the glyph is assumed to be aligned along the x-axis and is rotated about the origin. SetLeaderGlyphData() directly uses the polydata without setting a pipeline connection. SetLeaderGlyphConnection() sets up a pipeline connection and causes an update to the input during render.

virtual void vtkCaptionActor2D::SetLeaderGlyphSize ( double  ) [virtual]

Specify the relative size of the leader head. This is expressed as a fraction of the size (diagonal length) of the renderer. The leader head is automatically scaled so that window resize, zooming or other camera motion results in proportional changes in size to the leader glyph.

Specify the relative size of the leader head. This is expressed as a fraction of the size (diagonal length) of the renderer. The leader head is automatically scaled so that window resize, zooming or other camera motion results in proportional changes in size to the leader glyph.

virtual void vtkCaptionActor2D::SetMaximumLeaderGlyphSize ( int  ) [virtual]

Specify the maximum size of the leader head (if any) in pixels. This is used in conjunction with LeaderGlyphSize to cap the maximum size of the LeaderGlyph.

Specify the maximum size of the leader head (if any) in pixels. This is used in conjunction with LeaderGlyphSize to cap the maximum size of the LeaderGlyph.

virtual void vtkCaptionActor2D::SetPadding ( int  ) [virtual]

Set/Get the padding between the caption and the border. The value is specified in pixels.

virtual int vtkCaptionActor2D::GetPadding ( ) [virtual]

Set/Get the padding between the caption and the border. The value is specified in pixels.

Get the text actor used by the caption. This is useful if you want to control justification and other characteristics of the text actor.

Set/Get the text property.

Set/Get the text property.

void vtkCaptionActor2D::ShallowCopy ( vtkProp prop) [virtual]

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

Reimplemented from vtkActor2D.

virtual void vtkCaptionActor2D::SetAttachEdgeOnly ( int  ) [virtual]

Enable/disable whether to attach the arrow only to the edge, NOT the vertices of the caption border.

Enable/disable whether to attach the arrow only to the edge, NOT the vertices of the caption border.

virtual void vtkCaptionActor2D::AttachEdgeOnlyOn ( ) [virtual]

Enable/disable whether to attach the arrow only to the edge, NOT the vertices of the caption border.

virtual void vtkCaptionActor2D::AttachEdgeOnlyOff ( ) [virtual]

Enable/disable whether to attach the arrow only to the edge, NOT the vertices of the caption border.

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.

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

Reimplemented from vtkActor2D.

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

Reimplemented from vtkActor2D.

Definition at line 195 of file vtkCaptionActor2D.h.

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

Reimplemented from vtkActor2D.

Does this prop have some translucent polygonal geometry?

Reimplemented from vtkActor2D.


Member Data Documentation

Definition at line 209 of file vtkCaptionActor2D.h.

Definition at line 211 of file vtkCaptionActor2D.h.

Definition at line 212 of file vtkCaptionActor2D.h.

Definition at line 213 of file vtkCaptionActor2D.h.

Definition at line 214 of file vtkCaptionActor2D.h.

Definition at line 215 of file vtkCaptionActor2D.h.

Definition at line 217 of file vtkCaptionActor2D.h.

Definition at line 218 of file vtkCaptionActor2D.h.


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