VTK  9.1.0
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=========================================================================*/
64#ifndef vtkCaptionActor2D_h
65#define vtkCaptionActor2D_h
66
67#include "vtkActor2D.h"
68#include "vtkRenderingAnnotationModule.h" // For export macro
69
70class vtkActor;
73class vtkCaptionActor2DConnection;
74class vtkGlyph2D;
75class vtkGlyph3D;
76class vtkPolyData;
79class vtkTextActor;
80class vtkTextMapper;
81class vtkTextProperty;
82
83class VTKRENDERINGANNOTATION_EXPORT vtkCaptionActor2D : public vtkActor2D
84{
85public:
87 void PrintSelf(ostream& os, vtkIndent indent) override;
88
90
92
96 virtual void SetCaption(const char* caption);
97 virtual char* GetCaption();
99
101
106 vtkWorldCoordinateMacro(AttachmentPoint);
108
110
113 vtkSetMacro(Border, vtkTypeBool);
114 vtkGetMacro(Border, vtkTypeBool);
115 vtkBooleanMacro(Border, vtkTypeBool);
117
119
123 vtkSetMacro(Leader, vtkTypeBool);
124 vtkGetMacro(Leader, vtkTypeBool);
125 vtkBooleanMacro(Leader, vtkTypeBool);
127
129
132 vtkSetMacro(ThreeDimensionalLeader, vtkTypeBool);
133 vtkGetMacro(ThreeDimensionalLeader, vtkTypeBool);
134 vtkBooleanMacro(ThreeDimensionalLeader, vtkTypeBool);
136
138
150
152
159 vtkSetClampMacro(LeaderGlyphSize, double, 0.0, 0.1);
160 vtkGetMacro(LeaderGlyphSize, double);
162
164
169 vtkSetClampMacro(MaximumLeaderGlyphSize, int, 1, 1000);
170 vtkGetMacro(MaximumLeaderGlyphSize, int);
172
174
178 vtkSetClampMacro(Padding, int, 0, 50);
179 vtkGetMacro(Padding, int);
181
183
187 vtkGetObjectMacro(TextActor, vtkTextActor);
189
191
195 vtkGetObjectMacro(CaptionTextProperty, vtkTextProperty);
197
202 void ShallowCopy(vtkProp* prop) override;
203
205
209 vtkSetMacro(AttachEdgeOnly, vtkTypeBool);
210 vtkGetMacro(AttachEdgeOnly, vtkTypeBool);
211 vtkBooleanMacro(AttachEdgeOnly, vtkTypeBool);
213
222
224
229 int RenderOpaqueGeometry(vtkViewport* viewport) override;
231 int RenderOverlay(vtkViewport* viewport) override;
233
238
239protected:
242
244
250
253
254private:
255 vtkTextActor* TextActor;
256 vtkTextProperty* CaptionTextProperty;
257
258 vtkPolyData* BorderPolyData;
259 vtkPolyDataMapper2D* BorderMapper;
260 vtkActor2D* BorderActor;
261
262 vtkPolyData* HeadPolyData; // single attachment point for glyphing
263 vtkGlyph3D* HeadGlyph; // for 3D leader
264 vtkPolyData* LeaderPolyData; // line represents the leader
265 vtkAppendPolyData* AppendLeader; // append head and leader
266
267 // for 2D leader
268 vtkCoordinate* MapperCoordinate2D;
269 vtkPolyDataMapper2D* LeaderMapper2D;
270 vtkActor2D* LeaderActor2D;
271
272 // for 3D leader
273 vtkPolyDataMapper* LeaderMapper3D;
274 vtkActor* LeaderActor3D;
275
276 vtkCaptionActor2DConnection* LeaderGlyphConnectionHolder;
277
278private:
279 vtkCaptionActor2D(const vtkCaptionActor2D&) = delete;
280 void operator=(const vtkCaptionActor2D&) = delete;
281};
282
283#endif
a actor that draws 2D data
Definition: vtkActor2D.h:49
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:55
Proxy object to connect input/output ports.
appends one or more polygonal datasets together
draw text label associated with a point
virtual void SetCaptionTextProperty(vtkTextProperty *p)
Set/Get the text property.
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkTypeBool ThreeDimensionalLeader
void ShallowCopy(vtkProp *prop) override
Shallow copy of this scaled text actor.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
virtual void SetLeaderGlyphConnection(vtkAlgorithmOutput *)
Specify a glyph to be used as the leader "head".
static vtkCaptionActor2D * New()
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual void SetLeaderGlyphData(vtkPolyData *)
Specify a glyph to be used as the leader "head".
vtkTypeBool AttachEdgeOnly
virtual char * GetCaption()
Define the text to be placed in the caption.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkCaptionActor2D() override
int RenderOverlay(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkCoordinate * AttachmentPointCoordinate
virtual vtkPolyData * GetLeaderGlyph()
Specify a glyph to be used as the leader "head".
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
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:86
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:49
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:116
a simple class to control print indentation
Definition: vtkIndent.h:43
draw vtkPolyData onto the image plane
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:57
An actor that displays text.
Definition: vtkTextActor.h:60
2D text annotation
Definition: vtkTextMapper.h:57
represent text properties.
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:45
int vtkTypeBool
Definition: vtkABI.h:69