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=========================================================================*/
55#ifndef vtkCaptionActor2D_h
56#define vtkCaptionActor2D_h
57
58#include "vtkActor2D.h"
59#include "vtkRenderingAnnotationModule.h" // For export macro
60
61class vtkActor;
64class vtkCaptionActor2DConnection;
65class vtkGlyph2D;
66class vtkGlyph3D;
67class vtkPolyData;
70class vtkTextActor;
71class vtkTextMapper;
72class vtkTextProperty;
73
74class VTKRENDERINGANNOTATION_EXPORT vtkCaptionActor2D : public vtkActor2D
75{
76public:
78 void PrintSelf(ostream& os, vtkIndent indent) override;
79
81
83
87 virtual void SetCaption(const char* caption);
88 virtual char* GetCaption();
90
92
97 vtkWorldCoordinateMacro(AttachmentPoint);
99
101
104 vtkSetMacro(Border, vtkTypeBool);
105 vtkGetMacro(Border, vtkTypeBool);
106 vtkBooleanMacro(Border, vtkTypeBool);
108
110
114 vtkSetMacro(Leader, vtkTypeBool);
115 vtkGetMacro(Leader, vtkTypeBool);
116 vtkBooleanMacro(Leader, vtkTypeBool);
118
120
123 vtkSetMacro(ThreeDimensionalLeader, vtkTypeBool);
124 vtkGetMacro(ThreeDimensionalLeader, vtkTypeBool);
125 vtkBooleanMacro(ThreeDimensionalLeader, vtkTypeBool);
127
129
141
143
150 vtkSetClampMacro(LeaderGlyphSize, double, 0.0, 0.1);
151 vtkGetMacro(LeaderGlyphSize, double);
153
155
160 vtkSetClampMacro(MaximumLeaderGlyphSize, int, 1, 1000);
161 vtkGetMacro(MaximumLeaderGlyphSize, int);
163
165
169 vtkSetClampMacro(Padding, int, 0, 50);
170 vtkGetMacro(Padding, int);
172
174
178 vtkGetObjectMacro(TextActor, vtkTextActor);
180
182
186 vtkGetObjectMacro(CaptionTextProperty, vtkTextProperty);
188
193 void ShallowCopy(vtkProp* prop) override;
194
196
200 vtkSetMacro(AttachEdgeOnly, vtkTypeBool);
201 vtkGetMacro(AttachEdgeOnly, vtkTypeBool);
202 vtkBooleanMacro(AttachEdgeOnly, vtkTypeBool);
204
213
215
220 int RenderOpaqueGeometry(vtkViewport* viewport) override;
222 int RenderOverlay(vtkViewport* viewport) override;
224
229
230protected:
233
235
241
244
245private:
246 vtkTextActor* TextActor;
247 vtkTextProperty* CaptionTextProperty;
248
249 vtkPolyData* BorderPolyData;
250 vtkPolyDataMapper2D* BorderMapper;
251 vtkActor2D* BorderActor;
252
253 vtkPolyData* HeadPolyData; // single attachment point for glyphing
254 vtkGlyph3D* HeadGlyph; // for 3D leader
255 vtkPolyData* LeaderPolyData; // line represents the leader
256 vtkAppendPolyData* AppendLeader; // append head and leader
257
258 // for 2D leader
259 vtkCoordinate* MapperCoordinate2D;
260 vtkPolyDataMapper2D* LeaderMapper2D;
261 vtkActor2D* LeaderActor2D;
262
263 // for 3D leader
264 vtkPolyDataMapper* LeaderMapper3D;
265 vtkActor* LeaderActor3D;
266
267 vtkCaptionActor2DConnection* LeaderGlyphConnectionHolder;
268
269private:
270 vtkCaptionActor2D(const vtkCaptionActor2D&) = delete;
271 void operator=(const vtkCaptionActor2D&) = delete;
272};
273
274#endif
a actor that draws 2D data
Definition: vtkActor2D.h:40
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:46
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:77
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:107
a simple class to control print indentation
Definition: vtkIndent.h:34
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:57
An actor that displays text.
Definition: vtkTextActor.h:51
2D text annotation
Definition: vtkTextMapper.h:48
represent text properties.
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69