VTK  9.4.20241226
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
135#ifndef vtkCaptionActor2D_h
136#define vtkCaptionActor2D_h
137
138#include "vtkActor2D.h"
139#include "vtkRenderingAnnotationModule.h" // For export macro
140#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
141
142VTK_ABI_NAMESPACE_BEGIN
143class vtkActor;
146class vtkCaptionActor2DConnection;
147class vtkGlyph2D;
148class vtkGlyph3D;
149class vtkPolyData;
152class vtkTextActor;
153class vtkTextMapper;
154class vtkTextProperty;
155
156class VTKRENDERINGANNOTATION_EXPORT VTK_MARSHALAUTO vtkCaptionActor2D : public vtkActor2D
157{
158public:
160 void PrintSelf(ostream& os, vtkIndent indent) override;
161
163
165
169 virtual void SetCaption(const char* caption);
170 virtual char* GetCaption();
172
174
179 vtkWorldCoordinateMacro(AttachmentPoint);
181
183
186 vtkSetMacro(Border, vtkTypeBool);
187 vtkGetMacro(Border, vtkTypeBool);
188 vtkBooleanMacro(Border, vtkTypeBool);
190
192
196 vtkSetMacro(Leader, vtkTypeBool);
197 vtkGetMacro(Leader, vtkTypeBool);
198 vtkBooleanMacro(Leader, vtkTypeBool);
200
202
205 vtkSetMacro(ThreeDimensionalLeader, vtkTypeBool);
206 vtkGetMacro(ThreeDimensionalLeader, vtkTypeBool);
207 vtkBooleanMacro(ThreeDimensionalLeader, vtkTypeBool);
209
211
223
225
232 vtkSetClampMacro(LeaderGlyphSize, double, 0.0, 0.1);
233 vtkGetMacro(LeaderGlyphSize, double);
235
237
242 vtkSetClampMacro(MaximumLeaderGlyphSize, int, 1, 1000);
243 vtkGetMacro(MaximumLeaderGlyphSize, int);
245
247
251 vtkSetClampMacro(Padding, int, 0, 50);
252 vtkGetMacro(Padding, int);
254
256
260 vtkGetObjectMacro(TextActor, vtkTextActor);
262
264
268 vtkGetObjectMacro(CaptionTextProperty, vtkTextProperty);
270
275 void ShallowCopy(vtkProp* prop) override;
276
278
282 vtkSetMacro(AttachEdgeOnly, vtkTypeBool);
283 vtkGetMacro(AttachEdgeOnly, vtkTypeBool);
284 vtkBooleanMacro(AttachEdgeOnly, vtkTypeBool);
286
295
297
302 int RenderOpaqueGeometry(vtkViewport* viewport) override;
304 int RenderOverlay(vtkViewport* viewport) override;
306
311
312protected:
315
317
323
326
327private:
328 vtkTextActor* TextActor;
329 vtkTextProperty* CaptionTextProperty;
330
331 vtkPolyData* BorderPolyData;
332 vtkPolyDataMapper2D* BorderMapper;
333 vtkActor2D* BorderActor;
334
335 vtkPolyData* HeadPolyData; // single attachment point for glyphing
336 vtkGlyph3D* HeadGlyph; // for 3D leader
337 vtkPolyData* LeaderPolyData; // line represents the leader
338 vtkAppendPolyData* AppendLeader; // append head and leader
339
340 // for 2D leader
341 vtkCoordinate* MapperCoordinate2D;
342 vtkPolyDataMapper2D* LeaderMapper2D;
343 vtkActor2D* LeaderActor2D;
344
345 // for 3D leader
346 vtkPolyDataMapper* LeaderMapper3D;
347 vtkActor* LeaderActor3D;
348
349 vtkCaptionActor2DConnection* LeaderGlyphConnectionHolder;
350
351 vtkCaptionActor2D(const vtkCaptionActor2D&) = delete;
352 void operator=(const vtkCaptionActor2D&) = delete;
353};
354
355VTK_ABI_NAMESPACE_END
356#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
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:61
copy oriented and scaled glyph geometry to every input point
Definition vtkGlyph3D.h:211
a simple class to control print indentation
Definition vtkIndent.h:108
draw vtkPolyData onto the image plane
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:66
An actor that displays text.
2D text annotation
represent text properties.
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO