VTK  9.2.20221001
vtkContextActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContextActor.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 =========================================================================*/
66 #ifndef vtkContextActor_h
67 #define vtkContextActor_h
68 
69 #include "vtkNew.h" // For ivars
70 #include "vtkProp.h"
71 #include "vtkRenderingContext2DModule.h" // For export macro
72 #include "vtkSmartPointer.h" // For ivars
73 
74 VTK_ABI_NAMESPACE_BEGIN
75 class vtkContext2D;
76 class vtkContext3D;
77 class vtkContextDevice2D;
78 class vtkContextScene;
79 
80 class VTKRENDERINGCONTEXT2D_EXPORT vtkContextActor : public vtkProp
81 {
82 public:
83  void PrintSelf(ostream& os, vtkIndent indent) override;
84  vtkTypeMacro(vtkContextActor, vtkProp);
85 
86  static vtkContextActor* New();
87 
91  int RenderOverlay(vtkViewport* viewport) override;
92 
94 
99 
104 
108  void SetScene(vtkContextScene* scene);
109 
116  vtkGetObjectMacro(ForceDevice, vtkContextDevice2D);
124  void ReleaseGraphicsResources(vtkWindow* window) override;
125 
126 protected:
128  ~vtkContextActor() override;
129 
133  virtual void Initialize(vtkViewport* viewport);
134 
140 
141 private:
142  vtkContextActor(const vtkContextActor&) = delete;
143  void operator=(const vtkContextActor&) = delete;
144 };
145 
146 VTK_ABI_NAMESPACE_END
147 #endif
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:78
Class for drawing 3D primitives to a graphical context.
Definition: vtkContext3D.h:61
provides a vtkProp derived object.
void ReleaseGraphicsResources(vtkWindow *window) override
Release any graphics resources that are being consumed by this actor.
vtkNew< vtkContext2D > Context
int RenderOverlay(vtkViewport *viewport) override
We only render in the overlay for the context scene.
vtkGetNewMacro(Context, vtkContext2D)
Get the vtkContext2D for the actor.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkContextDevice2D * ForceDevice
virtual void Initialize(vtkViewport *viewport)
Initialize the actor - right now we just decide which device to initialize.
vtkContextScene * GetScene()
Get the chart object for the actor.
static vtkContextActor * New()
void SetScene(vtkContextScene *scene)
Set the scene for the actor.
void SetForceDevice(vtkContextDevice2D *dev)
Force rendering to a specific device.
vtkNew< vtkContext3D > Context3D
vtkSmartPointer< vtkContextScene > Scene
~vtkContextActor() override
Abstract class for drawing 2D primitives.
Provides a 2D scene for vtkContextItem objects.
a simple class to control print indentation
Definition: vtkIndent.h:120
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:77
abstract specification for Viewports
Definition: vtkViewport.h:57
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40