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=========================================================================*/
124#ifndef vtkCaptionActor2D_h
125#define vtkCaptionActor2D_h
126
127#include "vtkActor2D.h"
128#include "vtkRenderingAnnotationModule.h" // For export macro
129
130class vtkActor;
133class vtkCaptionActor2DConnection;
134class vtkGlyph2D;
135class vtkGlyph3D;
136class vtkPolyData;
139class vtkTextActor;
140class vtkTextMapper;
141class vtkTextProperty;
142
143class VTKRENDERINGANNOTATION_EXPORT vtkCaptionActor2D : public vtkActor2D
144{
145public:
147 void PrintSelf(ostream& os, vtkIndent indent) override;
148
150
152
156 virtual void SetCaption(const char* caption);
157 virtual char* GetCaption();
159
161
166 vtkWorldCoordinateMacro(AttachmentPoint);
168
170
173 vtkSetMacro(Border, vtkTypeBool);
174 vtkGetMacro(Border, vtkTypeBool);
175 vtkBooleanMacro(Border, vtkTypeBool);
177
179
183 vtkSetMacro(Leader, vtkTypeBool);
184 vtkGetMacro(Leader, vtkTypeBool);
185 vtkBooleanMacro(Leader, vtkTypeBool);
187
189
192 vtkSetMacro(ThreeDimensionalLeader, vtkTypeBool);
193 vtkGetMacro(ThreeDimensionalLeader, vtkTypeBool);
194 vtkBooleanMacro(ThreeDimensionalLeader, vtkTypeBool);
196
198
210
212
219 vtkSetClampMacro(LeaderGlyphSize, double, 0.0, 0.1);
220 vtkGetMacro(LeaderGlyphSize, double);
222
224
229 vtkSetClampMacro(MaximumLeaderGlyphSize, int, 1, 1000);
230 vtkGetMacro(MaximumLeaderGlyphSize, int);
232
234
238 vtkSetClampMacro(Padding, int, 0, 50);
239 vtkGetMacro(Padding, int);
241
243
247 vtkGetObjectMacro(TextActor, vtkTextActor);
249
251
255 vtkGetObjectMacro(CaptionTextProperty, vtkTextProperty);
257
262 void ShallowCopy(vtkProp* prop) override;
263
265
269 vtkSetMacro(AttachEdgeOnly, vtkTypeBool);
270 vtkGetMacro(AttachEdgeOnly, vtkTypeBool);
271 vtkBooleanMacro(AttachEdgeOnly, vtkTypeBool);
273
282
284
289 int RenderOpaqueGeometry(vtkViewport* viewport) override;
291 int RenderOverlay(vtkViewport* viewport) override;
293
298
299protected:
302
304
310
313
314private:
315 vtkTextActor* TextActor;
316 vtkTextProperty* CaptionTextProperty;
317
318 vtkPolyData* BorderPolyData;
319 vtkPolyDataMapper2D* BorderMapper;
320 vtkActor2D* BorderActor;
321
322 vtkPolyData* HeadPolyData; // single attachment point for glyphing
323 vtkGlyph3D* HeadGlyph; // for 3D leader
324 vtkPolyData* LeaderPolyData; // line represents the leader
325 vtkAppendPolyData* AppendLeader; // append head and leader
326
327 // for 2D leader
328 vtkCoordinate* MapperCoordinate2D;
329 vtkPolyDataMapper2D* LeaderMapper2D;
330 vtkActor2D* LeaderActor2D;
331
332 // for 3D leader
333 vtkPolyDataMapper* LeaderMapper3D;
334 vtkActor* LeaderActor3D;
335
336 vtkCaptionActor2DConnection* LeaderGlyphConnectionHolder;
337
338private:
339 vtkCaptionActor2D(const vtkCaptionActor2D&) = delete;
340 void operator=(const vtkCaptionActor2D&) = delete;
341};
342
343#endif
a actor that draws 2D data
Definition: vtkActor2D.h:149
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
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:69
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:216
a simple class to control print indentation
Definition: vtkIndent.h:113
draw vtkPolyData onto the image plane
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
An actor that displays text.
Definition: vtkTextActor.h:160
2D text annotation
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