VTK  9.2.6
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=========================================================================*/
57
58#ifndef vtkCaptionActor2D_h
59#define vtkCaptionActor2D_h
60
61#include "vtkActor2D.h"
62#include "vtkRenderingAnnotationModule.h" // For export macro
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) override;
82
84
86
90 virtual void SetCaption(const char* caption);
91 virtual char* GetCaption();
93
95
100 vtkWorldCoordinateMacro(AttachmentPoint);
102
104
107 vtkSetMacro(Border, vtkTypeBool);
108 vtkGetMacro(Border, vtkTypeBool);
109 vtkBooleanMacro(Border, vtkTypeBool);
111
113
117 vtkSetMacro(Leader, vtkTypeBool);
118 vtkGetMacro(Leader, vtkTypeBool);
119 vtkBooleanMacro(Leader, vtkTypeBool);
121
123
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) override;
197
199
205 vtkBooleanMacro(AttachEdgeOnly, vtkTypeBool);
207
216
218
223 int RenderOpaqueGeometry(vtkViewport* viewport) override;
225 int RenderOverlay(vtkViewport* viewport) override;
227
232
233protected:
236
238
244
247
248private:
249 vtkTextActor* TextActor;
250 vtkTextProperty* CaptionTextProperty;
251
252 vtkPolyData* BorderPolyData;
253 vtkPolyDataMapper2D* BorderMapper;
254 vtkActor2D* BorderActor;
255
256 vtkPolyData* HeadPolyData; // single attachment point for glyphing
257 vtkGlyph3D* HeadGlyph; // for 3D leader
258 vtkPolyData* LeaderPolyData; // line represents the leader
259 vtkAppendPolyData* AppendLeader; // append head and leader
260
261 // for 2D leader
262 vtkCoordinate* MapperCoordinate2D;
263 vtkPolyDataMapper2D* LeaderMapper2D;
264 vtkActor2D* LeaderActor2D;
265
266 // for 3D leader
267 vtkPolyDataMapper* LeaderMapper3D;
268 vtkActor* LeaderActor3D;
269
270 vtkCaptionActor2DConnection* LeaderGlyphConnectionHolder;
271
272private:
273 vtkCaptionActor2D(const vtkCaptionActor2D&) = delete;
274 void operator=(const vtkCaptionActor2D&) = delete;
275};
276
277#endif
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
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:43
copy oriented and scaled glyph geometry to every input point
Definition vtkGlyph3D.h:113
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:91
An actor that displays text.
2D text annotation
represent text properties.
abstract specification for Viewports
Definition vtkViewport.h:56
window superclass for vtkRenderWindow
Definition vtkWindow.h:39
int vtkTypeBool
Definition vtkABI.h:69