VTK
|
draw text label associated with a point More...
#include <vtkCaptionActor2D.h>
Public Types | |
typedef vtkActor2D | Superclass |
Public Types inherited from vtkActor2D | |
typedef vtkProp | Superclass |
Public Types inherited from vtkProp | |
typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkCaptionActor2D * | NewInstance () 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 vtkCoordinate * | GetAttachmentPointCoordinate () |
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 | SetLeaderGlyphData (vtkPolyData *) |
virtual void | SetLeaderGlyphConnection (vtkAlgorithmOutput *) |
virtual vtkPolyData * | GetLeaderGlyph () |
virtual void | SetLeaderGlyphSize (double) |
virtual double | GetLeaderGlyphSize () |
virtual void | SetMaximumLeaderGlyphSize (int) |
virtual int | GetMaximumLeaderGlyphSize () |
virtual void | SetPadding (int) |
virtual int | GetPadding () |
virtual vtkTextActor * | GetTextActor () |
virtual void | SetCaptionTextProperty (vtkTextProperty *p) |
virtual vtkTextProperty * | GetCaptionTextProperty () |
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 () |
Public Member Functions inherited from vtkActor2D | |
void | PrintSelf (ostream &os, vtkIndent indent) |
vtkActor2D * | NewInstance () const |
vtkProperty2D * | GetProperty () |
virtual void | SetProperty (vtkProperty2D *) |
void | SetDisplayPosition (int, int) |
virtual unsigned long | GetMTime () |
virtual void | GetActors2D (vtkPropCollection *pc) |
virtual void | SetMapper (vtkMapper2D *mapper) |
virtual vtkMapper2D * | GetMapper () |
virtual void | SetLayerNumber (int) |
virtual int | GetLayerNumber () |
virtual vtkCoordinate * | GetPositionCoordinate () |
virtual void | SetPosition (float x[2]) |
virtual void | SetPosition (float x, float y) |
virtual float * | GetPosition () |
virtual vtkCoordinate * | GetPosition2Coordinate () |
virtual void | SetPosition2 (float x[2]) |
virtual void | SetPosition2 (float x, float y) |
virtual float * | GetPosition2 () |
void | SetWidth (double w) |
double | GetWidth () |
void | SetHeight (double h) |
double | GetHeight () |
virtual vtkCoordinate * | GetActualPositionCoordinate (void) |
virtual vtkCoordinate * | GetActualPosition2Coordinate (void) |
Public Member Functions inherited from vtkProp | |
vtkProp * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | Pick () |
virtual bool | HasKeys (vtkInformation *requiredKeys) |
virtual void | BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path) |
virtual void | GetActors (vtkPropCollection *) |
virtual void | GetVolumes (vtkPropCollection *) |
virtual void | SetVisibility (int) |
virtual int | GetVisibility () |
virtual void | VisibilityOn () |
virtual void | VisibilityOff () |
virtual void | SetPickable (int) |
virtual int | GetPickable () |
virtual void | PickableOn () |
virtual void | PickableOff () |
virtual void | SetDragable (int) |
virtual int | GetDragable () |
virtual void | DragableOn () |
virtual void | DragableOff () |
virtual unsigned long | GetRedrawMTime () |
virtual void | SetUseBounds (bool) |
virtual bool | GetUseBounds () |
virtual void | UseBoundsOn () |
virtual void | UseBoundsOff () |
virtual double * | GetBounds () |
virtual void | InitPathTraversal () |
virtual vtkAssemblyPath * | GetNextPath () |
virtual int | GetNumberOfPaths () |
virtual void | PokeMatrix (vtkMatrix4x4 *vtkNotUsed(matrix)) |
virtual vtkMatrix4x4 * | GetMatrix () |
virtual vtkInformation * | GetPropertyKeys () |
virtual void | SetPropertyKeys (vtkInformation *keys) |
virtual int | RenderVolumetricGeometry (vtkViewport *) |
virtual bool | RenderFilteredOpaqueGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
virtual bool | RenderFilteredTranslucentPolygonalGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
virtual bool | RenderFilteredVolumetricGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
virtual bool | RenderFilteredOverlay (vtkViewport *v, vtkInformation *requiredKeys) |
virtual double | GetEstimatedRenderTime (vtkViewport *) |
virtual double | GetEstimatedRenderTime () |
virtual void | SetEstimatedRenderTime (double t) |
virtual void | RestoreEstimatedRenderTime () |
virtual void | AddEstimatedRenderTime (double t, vtkViewport *vtkNotUsed(vp)) |
virtual void | SetAllocatedRenderTime (double t, vtkViewport *vtkNotUsed(v)) |
virtual double | GetAllocatedRenderTime () |
void | SetRenderTimeMultiplier (double t) |
virtual double | GetRenderTimeMultiplier () |
virtual bool | GetSupportsSelection () |
virtual int | GetNumberOfConsumers () |
void | AddConsumer (vtkObject *c) |
void | RemoveConsumer (vtkObject *c) |
vtkObject * | GetConsumer (int i) |
int | IsConsumer (vtkObject *c) |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkCaptionActor2D * | SafeDownCast (vtkObjectBase *o) |
static vtkCaptionActor2D * | New () |
Static Public Member Functions inherited from vtkActor2D | |
static int | IsTypeOf (const char *type) |
static vtkActor2D * | SafeDownCast (vtkObjectBase *o) |
static vtkActor2D * | New () |
Static Public Member Functions inherited from vtkProp | |
static int | IsTypeOf (const char *type) |
static vtkProp * | SafeDownCast (vtkObjectBase *o) |
static vtkInformationIntegerKey * | GeneralTextureUnit () |
static vtkInformationDoubleVectorKey * | GeneralTextureTransform () |
Static Public Member Functions inherited from vtkObject | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkCaptionActor2D () | |
~vtkCaptionActor2D () | |
Protected Member Functions inherited from vtkActor2D | |
vtkActor2D () | |
~vtkActor2D () | |
Protected Member Functions inherited from vtkProp | |
vtkProp () | |
~vtkProp () | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
vtkCoordinate * | AttachmentPointCoordinate |
int | Border |
int | Leader |
int | ThreeDimensionalLeader |
double | LeaderGlyphSize |
int | MaximumLeaderGlyphSize |
int | Padding |
int | AttachEdgeOnly |
Protected Attributes inherited from vtkActor2D | |
vtkMapper2D * | Mapper |
int | LayerNumber |
vtkProperty2D * | Property |
vtkCoordinate * | PositionCoordinate |
vtkCoordinate * | Position2Coordinate |
Protected Attributes inherited from vtkProp | |
int | Visibility |
int | Pickable |
int | Dragable |
bool | UseBounds |
double | AllocatedRenderTime |
double | EstimatedRenderTime |
double | SavedEstimatedRenderTime |
double | RenderTimeMultiplier |
int | NumberOfConsumers |
vtkObject ** | Consumers |
vtkAssemblyPaths * | Paths |
vtkInformation * | PropertyKeys |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
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.
Definition at line 76 of file vtkCaptionActor2D.h.
Definition at line 79 of file vtkCaptionActor2D.h.
|
protected |
|
protected |
|
static |
|
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.
|
static |
|
protectedvirtual |
Reimplemented from vtkActor2D.
vtkCaptionActor2D* vtkCaptionActor2D::NewInstance | ( | ) | const |
|
virtual |
|
static |
|
virtual |
Define the text to be placed in the caption. The text can be multiple lines (separated by "\n").
|
virtual |
Define the text to be placed in the caption. The text can be multiple lines (separated by "\n").
|
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 |
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 |
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 |
Enable/disable the placement of a border around the text.
|
virtual |
Enable/disable the placement of a border around the text.
|
virtual |
Enable/disable the placement of a border around the text.
|
virtual |
Enable/disable the placement of a border around the text.
|
virtual |
Enable/disable drawing a "line" from the caption to the attachment point.
|
virtual |
Enable/disable drawing a "line" from the caption to the attachment point.
|
virtual |
Enable/disable drawing a "line" from the caption to the attachment point.
|
virtual |
Enable/disable drawing a "line" from the caption to the attachment point.
|
virtual |
Indicate whether the leader is 2D (no hidden line) or 3D (z-buffered).
|
virtual |
Indicate whether the leader is 2D (no hidden line) or 3D (z-buffered).
|
virtual |
Indicate whether the leader is 2D (no hidden line) or 3D (z-buffered).
|
virtual |
Indicate whether the leader is 2D (no hidden line) or 3D (z-buffered).
|
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.
|
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.
|
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.
|
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 |
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 |
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 |
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 |
Set/Get the padding between the caption and the border. The value is specified in pixels.
|
virtual |
Set/Get the padding between the caption and the border. The value is specified in pixels.
|
virtual |
Get the text actor used by the caption. This is useful if you want to control justification and other characteristics of the text actor.
|
virtual |
Set/Get the text property.
|
virtual |
Set/Get the text property.
|
virtual |
Shallow copy of this scaled text actor. Overloads the virtual vtkProp method.
Reimplemented from vtkActor2D.
|
virtual |
Enable/disable whether to attach the arrow only to the edge, NOT the vertices of the caption border.
|
virtual |
Enable/disable whether to attach the arrow only to the edge, NOT the vertices of the caption border.
|
virtual |
Enable/disable whether to attach the arrow only to the edge, NOT the vertices of the caption border.
|
virtual |
Enable/disable whether to attach the arrow only to the edge, NOT the vertices of the caption border.
|
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.
|
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.
|
inlinevirtual |
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.
|
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.
|
virtual |
Does this prop have some translucent polygonal geometry?
Reimplemented from vtkActor2D.
|
protected |
Definition at line 209 of file vtkCaptionActor2D.h.
|
protected |
Definition at line 211 of file vtkCaptionActor2D.h.
|
protected |
Definition at line 212 of file vtkCaptionActor2D.h.
|
protected |
Definition at line 213 of file vtkCaptionActor2D.h.
|
protected |
Definition at line 214 of file vtkCaptionActor2D.h.
|
protected |
Definition at line 215 of file vtkCaptionActor2D.h.
|
protected |
Definition at line 217 of file vtkCaptionActor2D.h.
|
protected |
Definition at line 218 of file vtkCaptionActor2D.h.