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

vtkCaptionActor2D Class Reference

#include <vtkCaptionActor2D.h>

Inheritance diagram for vtkCaptionActor2D:

Inheritance graph
[legend]
Collaboration diagram for vtkCaptionActor2D:

Collaboration graph
[legend]
List of all members.

Detailed Description

draw text label associated with a point

Date:
2002/11/11 21:41:29
Revision:
1.11

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
Created by:
  • Schroeder, Will
CVS contributions (if > 5%):
  • Schroeder, Will (68%)
  • Barre, Sebastien (25%)
CVS logs (CVSweb):
  • .cxx (/Hybrid/vtkCaptionActor2D.cxx)
  • .h (/Hybrid/vtkCaptionActor2D.h)
Tests:
vtkCaptionActor2D (Tests)

Definition at line 88 of file vtkCaptionActor2D.h.

Public Types

typedef vtkActor2D Superclass

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 SetCaptionTextProperty (vtkTextProperty *p)
virtual vtkTextPropertyGetCaptionTextProperty ()
virtual void SetFontFamily (int val)
virtual int GetFontFamily ()
void SetFontFamilyToArial ()
void SetFontFamilyToCourier ()
void SetFontFamilyToTimes ()
virtual void SetBold (int val)
virtual int GetBold ()
virtual void BoldOn ()
virtual void BoldOff ()
virtual void SetItalic (int val)
virtual int GetItalic ()
virtual void ItalicOn ()
virtual void ItalicOff ()
virtual void SetShadow (int val)
virtual int GetShadow ()
virtual void ShadowOn ()
virtual void ShadowOff ()
virtual void SetJustification (int val)
virtual int GetJustification ()
void SetJustificationToLeft ()
void SetJustificationToCentered ()
void SetJustificationToRight ()
virtual void SetVerticalJustification (int val)
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


Member Typedef Documentation

typedef vtkActor2D vtkCaptionActor2D::Superclass
 

Reimplemented from vtkActor2D.

Definition at line 91 of file vtkCaptionActor2D.h.


Constructor & Destructor Documentation

vtkCaptionActor2D::vtkCaptionActor2D   [protected]
 

vtkCaptionActor2D::~vtkCaptionActor2D   [protected]
 


Member Function Documentation

virtual const char* vtkCaptionActor2D::GetClassName   [virtual]
 

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 vtkTypeRevisionMacro 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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkActor2D.

vtkCaptionActor2D* vtkCaptionActor2D::SafeDownCast vtkObject   o [static]
 

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::SetCaptionTextProperty vtkTextProperty   p [virtual]
 

Set/Get the text property.

virtual vtkTextProperty* vtkCaptionActor2D::GetCaptionTextProperty   [virtual]
 

Set/Get the text property.

virtual void vtkCaptionActor2D::SetFontFamily int    val [virtual]
 

Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual int vtkCaptionActor2D::GetFontFamily   [virtual]
 

Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

void vtkCaptionActor2D::SetFontFamilyToArial   [inline]
 

Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 180 of file vtkCaptionActor2D.h.

References VTK_ARIAL.

void vtkCaptionActor2D::SetFontFamilyToCourier   [inline]
 

Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 181 of file vtkCaptionActor2D.h.

References VTK_COURIER.

void vtkCaptionActor2D::SetFontFamilyToTimes   [inline]
 

Set/Get the font family. Three font types are allowed: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 182 of file vtkCaptionActor2D.h.

References VTK_TIMES.

virtual void vtkCaptionActor2D::SetBold int    val [virtual]
 

Enable/disable text bolding. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual int vtkCaptionActor2D::GetBold   [virtual]
 

Enable/disable text bolding. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::BoldOn   [virtual]
 

Enable/disable text bolding. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::BoldOff   [virtual]
 

Enable/disable text bolding. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::SetItalic int    val [virtual]
 

Enable/disable text italic. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual int vtkCaptionActor2D::GetItalic   [virtual]
 

Enable/disable text italic. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::ItalicOn   [virtual]
 

Enable/disable text italic. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::ItalicOff   [virtual]
 

Enable/disable text italic. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::SetShadow int    val [virtual]
 

Enable/disable text shadows. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual int vtkCaptionActor2D::GetShadow   [virtual]
 

Enable/disable text shadows. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::ShadowOn   [virtual]
 

Enable/disable text shadows. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::ShadowOff   [virtual]
 

Enable/disable text shadows. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual void vtkCaptionActor2D::SetJustification int    val [virtual]
 

Set/Get the horizontal justification to left (default), centered, or right. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual int vtkCaptionActor2D::GetJustification   [virtual]
 

Set/Get the horizontal justification to left (default), centered, or right. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

void vtkCaptionActor2D::SetJustificationToLeft   [inline]
 

Set/Get the horizontal justification to left (default), centered, or right. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 227 of file vtkCaptionActor2D.h.

References VTK_TEXT_LEFT.

void vtkCaptionActor2D::SetJustificationToCentered   [inline]
 

Set/Get the horizontal justification to left (default), centered, or right. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 229 of file vtkCaptionActor2D.h.

References VTK_TEXT_CENTERED.

void vtkCaptionActor2D::SetJustificationToRight   [inline]
 

Set/Get the horizontal justification to left (default), centered, or right. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 231 of file vtkCaptionActor2D.h.

References VTK_TEXT_RIGHT.

virtual void vtkCaptionActor2D::SetVerticalJustification int    val [virtual]
 

Set/Get the vertical justification to bottom (default), middle, or top. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

virtual int vtkCaptionActor2D::GetVerticalJustification   [virtual]
 

Set/Get the vertical justification to bottom (default), middle, or top. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

void vtkCaptionActor2D::SetVerticalJustificationToBottom   [inline]
 

Set/Get the vertical justification to bottom (default), middle, or top. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 244 of file vtkCaptionActor2D.h.

References VTK_TEXT_BOTTOM.

void vtkCaptionActor2D::SetVerticalJustificationToCentered   [inline]
 

Set/Get the vertical justification to bottom (default), middle, or top. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 246 of file vtkCaptionActor2D.h.

References VTK_TEXT_CENTERED.

void vtkCaptionActor2D::SetVerticalJustificationToTop   [inline]
 

Set/Get the vertical justification to bottom (default), middle, or top. Warning: these functions remain for backward compatibility. Use the vtkTextProperty through the (Set/Get)CaptionTextProperty() methods.

Definition at line 248 of file vtkCaptionActor2D.h.

References VTK_TEXT_TOP.

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   [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 269 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 278 of file vtkCaptionActor2D.h.

char* vtkCaptionActor2D::Caption [protected]
 

Definition at line 280 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Border [protected]
 

Definition at line 281 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Leader [protected]
 

Definition at line 282 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::ThreeDimensionalLeader [protected]
 

Definition at line 283 of file vtkCaptionActor2D.h.

float vtkCaptionActor2D::LeaderGlyphSize [protected]
 

Definition at line 284 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::MaximumLeaderGlyphSize [protected]
 

Definition at line 285 of file vtkCaptionActor2D.h.

vtkPolyData* vtkCaptionActor2D::LeaderGlyph [protected]
 

Definition at line 287 of file vtkCaptionActor2D.h.

int vtkCaptionActor2D::Padding [protected]
 

Definition at line 289 of file vtkCaptionActor2D.h.


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