VTK  9.5.2
vtkActor2D.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
23#ifndef vtkActor2D_h
24#define vtkActor2D_h
25
26#include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
27#include "vtkProp.h"
28#include "vtkRenderingCoreModule.h" // For export macro
29#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkMapper2D;
33class vtkProperty2D;
34
35class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkActor2D : public vtkProp
36{
37public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39 vtkTypeMacro(vtkActor2D, vtkProp);
40
46 static vtkActor2D* New();
47
49
52 int RenderOverlay(vtkViewport* viewport) override;
53 int RenderOpaqueGeometry(vtkViewport* viewport) override;
56
61
63
66 virtual void SetMapper(vtkMapper2D* mapper);
67 vtkGetObjectMacro(Mapper, vtkMapper2D);
69
71
74 vtkSetMacro(LayerNumber, int);
75 vtkGetMacro(LayerNumber, int);
77
83
87 virtual void SetProperty(vtkProperty2D*);
88
90
95 vtkViewportCoordinateMacro(Position);
96 vtkSetObjectMacro(PositionCoordinate, vtkCoordinate);
98
102 void SetDisplayPosition(int, int);
103
105
111 vtkViewportCoordinateMacro(Position2);
112 vtkSetObjectMacro(Position2Coordinate, vtkCoordinate);
114
116
122 void SetWidth(double w);
124 double GetWidth();
126 void SetHeight(double h);
128 double GetHeight();
130
134 vtkMTimeType GetMTime() override;
135
141 void GetActors2D(vtkPropCollection* pc) override;
142
146 void ShallowCopy(vtkProp* prop) override;
147
153 void ReleaseGraphicsResources(vtkWindow*) override;
154
160 virtual vtkCoordinate* GetActualPositionCoordinate() { return this->PositionCoordinate; }
161
167 virtual vtkCoordinate* GetActualPosition2Coordinate() { return this->Position2Coordinate; }
168
169protected:
171 ~vtkActor2D() override;
172
178
179private:
180 vtkActor2D(const vtkActor2D&) = delete;
181 void operator=(const vtkActor2D&) = delete;
182};
183
184VTK_ABI_NAMESPACE_END
185#endif
a actor that draws 2D data
Definition vtkActor2D.h:36
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkCoordinate * PositionCoordinate
Definition vtkActor2D.h:176
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProperty2D * Property
Definition vtkActor2D.h:175
int LayerNumber
Definition vtkActor2D.h:174
~vtkActor2D() override
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
vtkMapper2D * Mapper
Definition vtkActor2D.h:173
vtkProperty2D * GetProperty()
Returns this actor's vtkProperty2D.
virtual void SetProperty(vtkProperty2D *)
Set this vtkProp's vtkProperty2D.
vtkCoordinate * Position2Coordinate
Definition vtkActor2D.h:177
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
virtual vtkCoordinate * GetActualPosition2Coordinate()
Return the actual vtkCoordinate reference that the mapper should use to position the actor.
Definition vtkActor2D.h:167
virtual void SetMapper(vtkMapper2D *mapper)
Set/Get the vtkMapper2D which defines the data to be drawn.
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
void SetDisplayPosition(int, int)
Set the Prop2D's position in display coordinates.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:29
abstract class specifies interface for objects which render 2D actors
Definition vtkMapper2D.h:26
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:44
represent surface properties of a 2D image
Computes the portion of a dataset which is inside a selection.
abstract specification for Viewports
Definition vtkViewport.h:47
window superclass for vtkRenderWindow
Definition vtkWindow.h:26
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_MARSHAL_EXCLUDE_REASON_IS_REDUNDANT
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)