VTK  9.3.0
vtkCaptionActor2D.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
55#ifndef vtkCaptionActor2D_h
56#define vtkCaptionActor2D_h
57
58#include "vtkActor2D.h"
59#include "vtkRenderingAnnotationModule.h" // For export macro
60
61VTK_ABI_NAMESPACE_BEGIN
62class vtkActor;
65class vtkCaptionActor2DConnection;
66class vtkGlyph2D;
67class vtkGlyph3D;
68class vtkPolyData;
71class vtkTextActor;
72class vtkTextMapper;
73class vtkTextProperty;
74
75class VTKRENDERINGANNOTATION_EXPORT vtkCaptionActor2D : public vtkActor2D
76{
77public:
79 void PrintSelf(ostream& os, vtkIndent indent) override;
80
82
84
88 virtual void SetCaption(const char* caption);
89 virtual char* GetCaption();
91
93
98 vtkWorldCoordinateMacro(AttachmentPoint);
100
102
105 vtkSetMacro(Border, vtkTypeBool);
106 vtkGetMacro(Border, vtkTypeBool);
107 vtkBooleanMacro(Border, vtkTypeBool);
109
111
115 vtkSetMacro(Leader, vtkTypeBool);
116 vtkGetMacro(Leader, vtkTypeBool);
117 vtkBooleanMacro(Leader, vtkTypeBool);
119
121
124 vtkSetMacro(ThreeDimensionalLeader, vtkTypeBool);
125 vtkGetMacro(ThreeDimensionalLeader, vtkTypeBool);
126 vtkBooleanMacro(ThreeDimensionalLeader, vtkTypeBool);
128
130
142
144
151 vtkSetClampMacro(LeaderGlyphSize, double, 0.0, 0.1);
152 vtkGetMacro(LeaderGlyphSize, double);
154
156
161 vtkSetClampMacro(MaximumLeaderGlyphSize, int, 1, 1000);
162 vtkGetMacro(MaximumLeaderGlyphSize, int);
164
166
170 vtkSetClampMacro(Padding, int, 0, 50);
171 vtkGetMacro(Padding, int);
173
175
179 vtkGetObjectMacro(TextActor, vtkTextActor);
181
183
187 vtkGetObjectMacro(CaptionTextProperty, vtkTextProperty);
189
194 void ShallowCopy(vtkProp* prop) override;
195
197
201 vtkSetMacro(AttachEdgeOnly, vtkTypeBool);
202 vtkGetMacro(AttachEdgeOnly, vtkTypeBool);
203 vtkBooleanMacro(AttachEdgeOnly, vtkTypeBool);
205
214
216
221 int RenderOpaqueGeometry(vtkViewport* viewport) override;
223 int RenderOverlay(vtkViewport* viewport) override;
225
230
231protected:
234
236
242
245
246private:
247 vtkTextActor* TextActor;
248 vtkTextProperty* CaptionTextProperty;
249
250 vtkPolyData* BorderPolyData;
251 vtkPolyDataMapper2D* BorderMapper;
252 vtkActor2D* BorderActor;
253
254 vtkPolyData* HeadPolyData; // single attachment point for glyphing
255 vtkGlyph3D* HeadGlyph; // for 3D leader
256 vtkPolyData* LeaderPolyData; // line represents the leader
257 vtkAppendPolyData* AppendLeader; // append head and leader
258
259 // for 2D leader
260 vtkCoordinate* MapperCoordinate2D;
261 vtkPolyDataMapper2D* LeaderMapper2D;
262 vtkActor2D* LeaderActor2D;
263
264 // for 3D leader
265 vtkPolyDataMapper* LeaderMapper3D;
266 vtkActor* LeaderActor3D;
267
268 vtkCaptionActor2DConnection* LeaderGlyphConnectionHolder;
269
270 vtkCaptionActor2D(const vtkCaptionActor2D&) = delete;
271 void operator=(const vtkCaptionActor2D&) = delete;
272};
273
274VTK_ABI_NAMESPACE_END
275#endif
a actor that draws 2D data
Definition vtkActor2D.h:44
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:50
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".
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
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition vtkGlyph2D.h:41
copy oriented and scaled glyph geometry to every input point
Definition vtkGlyph3D.h:111
a simple class to control print indentation
Definition vtkIndent.h:38
draw vtkPolyData onto the image plane
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:89
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:52
An actor that displays text.
2D text annotation
represent text properties.
abstract specification for Viewports
Definition vtkViewport.h:54
window superclass for vtkRenderWindow
Definition vtkWindow.h:34
int vtkTypeBool
Definition vtkABI.h:64