VTK
vtkCaptionActor2D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCaptionActor2D.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
58#ifndef vtkCaptionActor2D_h
59#define vtkCaptionActor2D_h
60
61#include "vtkRenderingAnnotationModule.h" // For export macro
62#include "vtkActor2D.h"
63
64class vtkActor;
67class vtkCaptionActor2DConnection;
68class vtkGlyph2D;
69class vtkGlyph3D;
70class vtkPolyData;
73class vtkTextActor;
74class vtkTextMapper;
75class vtkTextProperty;
76
77class VTKRENDERINGANNOTATION_EXPORT vtkCaptionActor2D : public vtkActor2D
78{
79public:
81 void PrintSelf(ostream& os, vtkIndent indent);
82
84
86
90 virtual void SetCaption(const char* caption);
91 virtual char* GetCaption();
93
95
100 vtkWorldCoordinateMacro(AttachmentPoint);
102
104
107 vtkSetMacro(Border,int);
108 vtkGetMacro(Border,int);
109 vtkBooleanMacro(Border,int);
111
113
117 vtkSetMacro(Leader,int);
118 vtkGetMacro(Leader,int);
119 vtkBooleanMacro(Leader,int);
121
123
126 vtkSetMacro(ThreeDimensionalLeader,int);
127 vtkGetMacro(ThreeDimensionalLeader,int);
128 vtkBooleanMacro(ThreeDimensionalLeader,int);
130
132
144
146
153 vtkSetClampMacro(LeaderGlyphSize,double,0.0,0.1);
154 vtkGetMacro(LeaderGlyphSize,double);
156
158
163 vtkSetClampMacro(MaximumLeaderGlyphSize,int,1,1000);
164 vtkGetMacro(MaximumLeaderGlyphSize,int);
166
168
172 vtkSetClampMacro(Padding, int, 0, 50);
173 vtkGetMacro(Padding, int);
175
177
181 vtkGetObjectMacro(TextActor,vtkTextActor);
183
185
189 vtkGetObjectMacro(CaptionTextProperty,vtkTextProperty);
191
196 void ShallowCopy(vtkProp *prop);
197
199
203 vtkSetMacro(AttachEdgeOnly,int);
204 vtkGetMacro(AttachEdgeOnly,int);
205 vtkBooleanMacro(AttachEdgeOnly,int);
207
216
218
227
232
233protected:
236
238
244
247
248
249private:
250 vtkTextActor *TextActor;
251 vtkTextProperty *CaptionTextProperty;
252
253 vtkPolyData *BorderPolyData;
254 vtkPolyDataMapper2D *BorderMapper;
255 vtkActor2D *BorderActor;
256
257 vtkPolyData *HeadPolyData; // single attachment point for glyphing
258 vtkGlyph3D *HeadGlyph; // for 3D leader
259 vtkPolyData *LeaderPolyData; // line represents the leader
260 vtkAppendPolyData *AppendLeader; // append head and leader
261
262 // for 2D leader
263 vtkCoordinate *MapperCoordinate2D;
264 vtkPolyDataMapper2D *LeaderMapper2D;
265 vtkActor2D *LeaderActor2D;
266
267 // for 3D leader
268 vtkPolyDataMapper *LeaderMapper3D;
269 vtkActor *LeaderActor3D;
270
271 vtkCaptionActor2DConnection* LeaderGlyphConnectionHolder;
272
273private:
274 vtkCaptionActor2D(const vtkCaptionActor2D&) VTK_DELETE_FUNCTION;
275 void operator=(const vtkCaptionActor2D&) VTK_DELETE_FUNCTION;
276};
277
278
279#endif
280
281
282
a actor that draws 2D data
Definition: vtkActor2D.h:46
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
Proxy object to connect input/output ports.
appends one or more polygonal datasets together
draw text label associated with a point
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int HasTranslucentPolygonalGeometry()
Does this prop have some translucent polygonal geometry?
virtual void SetCaptionTextProperty(vtkTextProperty *p)
Set/Get the text property.
int RenderOverlay(vtkViewport *viewport)
Support the standard render methods.
virtual void SetLeaderGlyphConnection(vtkAlgorithmOutput *)
static vtkCaptionActor2D * New()
virtual void SetLeaderGlyphData(vtkPolyData *)
Specify a glyph to be used as the leader "head".
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
void ShallowCopy(vtkProp *prop)
Shallow copy of this scaled text actor.
virtual char * GetCaption()
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
int RenderOpaqueGeometry(vtkViewport *viewport)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkCoordinate * AttachmentPointCoordinate
virtual vtkPolyData * GetLeaderGlyph()
virtual void SetCaption(const char *caption)
Define the text to be placed in the caption.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:71
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:40
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:112
a simple class to control print indentation
Definition: vtkIndent.h:40
draw vtkPolyData onto the image plane
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
An actor that displays text.
Definition: vtkTextActor.h:57
2D text annotation
Definition: vtkTextMapper.h:54
represent text properties.
abstract specification for Viewports
Definition: vtkViewport.h:48
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.