VTK  9.3.1
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 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkMapper2D;
32 class vtkProperty2D;
33 
34 class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
35 {
36 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38  vtkTypeMacro(vtkActor2D, vtkProp);
39 
45  static vtkActor2D* New();
46 
48 
51  int RenderOverlay(vtkViewport* viewport) override;
52  int RenderOpaqueGeometry(vtkViewport* viewport) override;
53  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
55 
60 
62 
65  virtual void SetMapper(vtkMapper2D* mapper);
66  vtkGetObjectMacro(Mapper, vtkMapper2D);
68 
70 
73  vtkSetMacro(LayerNumber, int);
74  vtkGetMacro(LayerNumber, int);
76 
81  vtkProperty2D* GetProperty();
82 
86  virtual void SetProperty(vtkProperty2D*);
87 
89 
94  vtkViewportCoordinateMacro(Position);
96 
100  void SetDisplayPosition(int, int);
101 
103 
109  vtkViewportCoordinateMacro(Position2);
111 
113 
118  void SetWidth(double w);
119  double GetWidth();
120  void SetHeight(double h);
121  double GetHeight();
123 
127  vtkMTimeType GetMTime() override;
128 
134  void GetActors2D(vtkPropCollection* pc) override;
135 
139  void ShallowCopy(vtkProp* prop) override;
140 
146  void ReleaseGraphicsResources(vtkWindow*) override;
147 
153  virtual vtkCoordinate* GetActualPositionCoordinate() { return this->PositionCoordinate; }
154 
160  virtual vtkCoordinate* GetActualPosition2Coordinate() { return this->Position2Coordinate; }
161 
162 protected:
163  vtkActor2D();
164  ~vtkActor2D() override;
165 
171 
172 private:
173  vtkActor2D(const vtkActor2D&) = delete;
174  void operator=(const vtkActor2D&) = delete;
175 };
176 
177 VTK_ABI_NAMESPACE_END
178 #endif
vtkMapper2D * Mapper
Definition: vtkActor2D.h:166
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
virtual void ShallowCopy(vtkProp *prop)
Shallow copy of this vtkProp.
int LayerNumber
Definition: vtkActor2D.h:167
vtkCoordinate * Position2Coordinate
Definition: vtkActor2D.h:170
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract specification for Viewports
Definition: vtkViewport.h:44
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:213
virtual vtkTypeBool HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:277
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:216
a actor that draws 2D data
Definition: vtkActor2D.h:34
vtkCoordinate * PositionCoordinate
Definition: vtkActor2D.h:169
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:64
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:298
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
vtkProperty2D * Property
Definition: vtkActor2D.h:168
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkCoordinate * GetActualPosition2Coordinate()
Return the actual vtkCoordinate reference that the mapper should use to position the actor...
Definition: vtkActor2D.h:160
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:68
virtual void GetActors2D(vtkPropCollection *)
Definition: vtkProp.h:57
virtual vtkCoordinate * GetActualPositionCoordinate()
Return the actual vtkCoordinate reference that the mapper should use to position the actor...
Definition: vtkActor2D.h:153
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:214
represent surface properties of a 2D image
Definition: vtkProperty2D.h:29
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
abstract class specifies interface for objects which render 2D actors
Definition: vtkMapper2D.h:24