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=========================================================================*/
127#ifndef vtkCaptionActor2D_h
128#define vtkCaptionActor2D_h
129
130#include "vtkActor2D.h"
131#include "vtkRenderingAnnotationModule.h" // For export macro
132
133class vtkActor;
136class vtkCaptionActor2DConnection;
137class vtkGlyph2D;
138class vtkGlyph3D;
139class vtkPolyData;
142class vtkTextActor;
143class vtkTextMapper;
144class vtkTextProperty;
145
146class VTKRENDERINGANNOTATION_EXPORT vtkCaptionActor2D : public vtkActor2D
147{
148public:
150 void PrintSelf(ostream& os, vtkIndent indent) override;
151
153
155
159 virtual void SetCaption(const char* caption);
160 virtual char* GetCaption();
162
164
169 vtkWorldCoordinateMacro(AttachmentPoint);
171
173
176 vtkSetMacro(Border, vtkTypeBool);
177 vtkGetMacro(Border, vtkTypeBool);
178 vtkBooleanMacro(Border, vtkTypeBool);
180
182
186 vtkSetMacro(Leader, vtkTypeBool);
187 vtkGetMacro(Leader, vtkTypeBool);
188 vtkBooleanMacro(Leader, vtkTypeBool);
190
192
195 vtkSetMacro(ThreeDimensionalLeader, vtkTypeBool);
196 vtkGetMacro(ThreeDimensionalLeader, vtkTypeBool);
197 vtkBooleanMacro(ThreeDimensionalLeader, vtkTypeBool);
199
201
213
215
222 vtkSetClampMacro(LeaderGlyphSize, double, 0.0, 0.1);
223 vtkGetMacro(LeaderGlyphSize, double);
225
227
232 vtkSetClampMacro(MaximumLeaderGlyphSize, int, 1, 1000);
233 vtkGetMacro(MaximumLeaderGlyphSize, int);
235
237
241 vtkSetClampMacro(Padding, int, 0, 50);
242 vtkGetMacro(Padding, int);
244
246
250 vtkGetObjectMacro(TextActor, vtkTextActor);
252
254
258 vtkGetObjectMacro(CaptionTextProperty, vtkTextProperty);
260
265 void ShallowCopy(vtkProp* prop) override;
266
268
272 vtkSetMacro(AttachEdgeOnly, vtkTypeBool);
273 vtkGetMacro(AttachEdgeOnly, vtkTypeBool);
274 vtkBooleanMacro(AttachEdgeOnly, vtkTypeBool);
276
285
287
292 int RenderOpaqueGeometry(vtkViewport* viewport) override;
294 int RenderOverlay(vtkViewport* viewport) override;
296
301
302protected:
305
307
313
316
317private:
318 vtkTextActor* TextActor;
319 vtkTextProperty* CaptionTextProperty;
320
321 vtkPolyData* BorderPolyData;
322 vtkPolyDataMapper2D* BorderMapper;
323 vtkActor2D* BorderActor;
324
325 vtkPolyData* HeadPolyData; // single attachment point for glyphing
326 vtkGlyph3D* HeadGlyph; // for 3D leader
327 vtkPolyData* LeaderPolyData; // line represents the leader
328 vtkAppendPolyData* AppendLeader; // append head and leader
329
330 // for 2D leader
331 vtkCoordinate* MapperCoordinate2D;
332 vtkPolyDataMapper2D* LeaderMapper2D;
333 vtkActor2D* LeaderActor2D;
334
335 // for 3D leader
336 vtkPolyDataMapper* LeaderMapper3D;
337 vtkActor* LeaderActor3D;
338
339 vtkCaptionActor2DConnection* LeaderGlyphConnectionHolder;
340
341private:
342 vtkCaptionActor2D(const vtkCaptionActor2D&) = delete;
343 void operator=(const vtkCaptionActor2D&) = delete;
344};
345
346#endif
a actor that draws 2D data
Definition: vtkActor2D.h:155
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:161
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
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:72
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:222
a simple class to control print indentation
Definition: vtkIndent.h:119
draw vtkPolyData onto the image plane
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
An actor that displays text.
Definition: vtkTextActor.h:166
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