Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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 Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void ShallowCopy (vtkProp *prop)
virtual void ReleaseGraphicsResources (vtkWindow *)
virtual void SetCaption (const char *)
virtual char * GetCaption ()
virtual vtkCoordinateGetAttachmentPointCoordinate ()
virtual void SetAttachmentPoint (float x[3])
virtual void SetAttachmentPoint (float x, float y, float z)
virtual float * GetAttachmentPoint ()
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 SetLeaderGlyph (vtkPolyData *)
virtual vtkPolyDataGetLeaderGlyph ()
virtual void SetLeaderGlyphSize (float)
virtual float GetLeaderGlyphSize ()
virtual void SetMaximumLeaderGlyphSize (int)
virtual int GetMaximumLeaderGlyphSize ()
virtual void SetPadding (int)
virtual int GetPadding ()
virtual void SetBold (int)
virtual int GetBold ()
virtual void BoldOn ()
virtual void BoldOff ()
virtual void SetItalic (int)
virtual int GetItalic ()
virtual void ItalicOn ()
virtual void ItalicOff ()
virtual void SetShadow (int)
virtual int GetShadow ()
virtual void ShadowOn ()
virtual void ShadowOff ()
virtual void SetFontFamily (int)
virtual int GetFontFamily ()
void SetFontFamilyToArial ()
void SetFontFamilyToCourier ()
void SetFontFamilyToTimes ()
virtual void SetJustification (int)
virtual int GetJustification ()
void SetJustificationToLeft ()
void SetJustificationToCentered ()
void SetJustificationToRight ()
virtual void SetVerticalJustification (int)
virtual int GetVerticalJustification ()
void SetVerticalJustificationToBottom ()
void SetVerticalJustificationToCentered ()
void SetVerticalJustificationToTop ()
int RenderOpaqueGeometry (vtkViewport *viewport)
int RenderTranslucentGeometry (vtkViewport *)
int RenderOverlay (vtkViewport *viewport)

Static Public Methods

int IsTypeOf (const char *type)
vtkCaptionActor2D * SafeDownCast (vtkObject *o)
vtkCaptionActor2D * New ()

Protected Methods

 vtkCaptionActor2D ()
 ~vtkCaptionActor2D ()

Protected Attributes

vtkCoordinateAttachmentPointCoordinate
char * Caption
int Border
int Leader
int ThreeDimensionalLeader
float LeaderGlyphSize
int MaximumLeaderGlyphSize
vtkPolyDataLeaderGlyph
int Padding
int Bold
int Italic
int Shadow
int FontFamily
int Justification
int VerticalJustification

Detailed Description

draw text label associated with a point.

Date:
2001/10/11 13:37:23
Revision:
1.5
Thanks:
Tim Smith who sponsored and encouraged the development of this class.
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, font attributes, whether you want a border around the caption, and whether you want a leader from the caption to the attachment point. The color of the text is controlled with vtkActor2D's property. 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 vtkScaledTextActor vtkTextMapper vtkCoordinate
Tests:
vtkCaptionActor2D (Tests)

Definition at line 101 of file vtkCaptionActor2D.h.


Constructor & Destructor Documentation

vtkCaptionActor2D::vtkCaptionActor2D   [protected]
 

vtkCaptionActor2D::~vtkCaptionActor2D   [protected]
 


Member Function Documentation

virtual const char* vtkCaptionActor2D::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

int vtkCaptionActor2D::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

virtual int vtkCaptionActor2D::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

vtkCaptionActor2D* vtkCaptionActor2D::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

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.

vtkCaptionActor2D* vtkCaptionActor2D::New   [static]
 

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 *    [virtual]
 

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

virtual char* vtkCaptionActor2D::GetCaption   [virtual]
 

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

virtual vtkCoordinate* vtkCaptionActor2D::GetAttachmentPointCoordinate   [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[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.

virtual float* vtkCaptionActor2D::GetAttachmentPoint   [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::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).

virtual int vtkCaptionActor2D::GetThreeDimensionalLeader   [virtual]
 

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

virtual void vtkCaptionActor2D::ThreeDimensionalLeaderOff   [virtual]
 

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

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

virtual vtkPolyData* vtkCaptionActor2D::GetLeaderGlyph   [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.

virtual void vtkCaptionActor2D::SetLeaderGlyphSize float    [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.

virtual float vtkCaptionActor2D::GetLeaderGlyphSize   [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.

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.

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

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.

virtual void vtkCaptionActor2D::SetBold int    [virtual]
 

Enable/Disable bolding the caption.

virtual int vtkCaptionActor2D::GetBold   [virtual]
 

Enable/Disable bolding the caption.

virtual void vtkCaptionActor2D::BoldOn   [virtual]
 

Enable/Disable bolding the caption.

virtual void vtkCaptionActor2D::BoldOff   [virtual]
 

Enable/Disable bolding the caption.

virtual void vtkCaptionActor2D::SetItalic int    [virtual]
 

Enable/Disable italicizing the caption.

virtual int vtkCaptionActor2D::GetItalic   [virtual]
 

Enable/Disable italicizing the caption.

virtual void vtkCaptionActor2D::ItalicOn   [virtual]
 

Enable/Disable italicizing the caption.

virtual void vtkCaptionActor2D::ItalicOff   [virtual]
 

Enable/Disable italicizing the caption.

virtual void vtkCaptionActor2D::SetShadow int    [virtual]
 

Enable/Disable creating shadows on the caption. Shadows make the text easier to read.

virtual int vtkCaptionActor2D::GetShadow   [virtual]
 

Enable/Disable creating shadows on the caption. Shadows make the text easier to read.

virtual void vtkCaptionActor2D::ShadowOn   [virtual]
 

Enable/Disable creating shadows on the caption. Shadows make the text easier to read.

virtual void vtkCaptionActor2D::ShadowOff   [virtual]
 

Enable/Disable creating shadows on the caption. Shadows make the text easier to read.

virtual void vtkCaptionActor2D::SetFontFamily int    [virtual]
 

Set/Get the font family for the caption. Three font types are available: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES).

virtual int vtkCaptionActor2D::GetFontFamily   [virtual]
 

Set/Get the font family for the caption. Three font types are available: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES).

void vtkCaptionActor2D::SetFontFamilyToArial   [inline]
 

Set/Get the font family for the caption. Three font types are available: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES).

Definition at line 207 of file vtkCaptionActor2D.h.

void vtkCaptionActor2D::SetFontFamilyToCourier   [inline]
 

Set/Get the font family for the caption. Three font types are available: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES).

Definition at line 208 of file vtkCaptionActor2D.h.

void vtkCaptionActor2D::SetFontFamilyToTimes   [inline]
 

Set/Get the font family for the caption. Three font types are available: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES).

Definition at line 209 of file vtkCaptionActor2D.h.

virtual void vtkCaptionActor2D::SetJustification int    [virtual]
 

Set/Get the horizontal justification to left (default), centered, or right.

virtual int vtkCaptionActor2D::GetJustification   [virtual]
 

Set/Get the horizontal justification to left (default), centered, or right.

void vtkCaptionActor2D::SetJustificationToLeft   [inline]
 

Set/Get the horizontal justification to left (default), centered, or right.

Definition at line 217 of file vtkCaptionActor2D.h.

void vtkCaptionActor2D::SetJustificationToCentered   [inline]
 

Set/Get the horizontal justification to left (default), centered, or right.

Definition at line 219 of file vtkCaptionActor2D.h.

void vtkCaptionActor2D::SetJustificationToRight   [inline]
 

Set/Get the horizontal justification to left (default), centered, or right.

Definition at line 221 of file vtkCaptionActor2D.h.

virtual void vtkCaptionActor2D::SetVerticalJustification int    [virtual]
 

Set/Get the vertical justification to bottom (default), middle, or top.

virtual int vtkCaptionActor2D::GetVerticalJustification   [virtual]
 

Set/Get the vertical justification to bottom (default), middle, or top.

void vtkCaptionActor2D::SetVerticalJustificationToBottom   [inline]
 

Set/Get the vertical justification to bottom (default), middle, or top.

Definition at line 230 of file vtkCaptionActor2D.h.

void vtkCaptionActor2D::SetVerticalJustificationToCentered   [inline]
 

Set/Get the vertical justification to bottom (default), middle, or top.

Definition at line 232 of file vtkCaptionActor2D.h.

void vtkCaptionActor2D::SetVerticalJustificationToTop   [inline]
 

Set/Get the vertical justification to bottom (default), middle, or top.

Definition at line 234 of file vtkCaptionActor2D.h.

void vtkCaptionActor2D::ShallowCopy vtkProp   prop [virtual]
 

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

Reimplemented from vtkActor2D.

virtual void vtkCaptionActor2D::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 vtkCaptionActor2D::RenderOpaqueGeometry vtkViewport   viewport [virtual]
 

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.

int vtkCaptionActor2D::RenderTranslucentGeometry vtkViewport   viewport [inline, virtual]
 

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 254 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::RenderOverlay vtkViewport   viewport [virtual]
 

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.


Member Data Documentation

vtkCoordinate* vtkCaptionActor2D::AttachmentPointCoordinate [protected]
 

Definition at line 263 of file vtkCaptionActor2D.h.

char* vtkCaptionActor2D::Caption [protected]
 

Definition at line 265 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Border [protected]
 

Definition at line 266 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Leader [protected]
 

Definition at line 267 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::ThreeDimensionalLeader [protected]
 

Definition at line 268 of file vtkCaptionActor2D.h.

float vtkCaptionActor2D::LeaderGlyphSize [protected]
 

Definition at line 269 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::MaximumLeaderGlyphSize [protected]
 

Definition at line 270 of file vtkCaptionActor2D.h.

vtkPolyData* vtkCaptionActor2D::LeaderGlyph [protected]
 

Definition at line 271 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Padding [protected]
 

Definition at line 273 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Bold [protected]
 

Definition at line 274 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Italic [protected]
 

Definition at line 275 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Shadow [protected]
 

Definition at line 276 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::FontFamily [protected]
 

Definition at line 277 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Justification [protected]
 

Definition at line 278 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::VerticalJustification [protected]
 

Definition at line 279 of file vtkCaptionActor2D.h.


The documentation for this class was generated from the following file:
Generated on Thu Mar 28 14:27:41 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001