VTK  9.6.1
vtkContextActor.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
17
18#ifndef vtkContextActor_h
19#define vtkContextActor_h
20
21#include "vtkNew.h" // For ivars
22#include "vtkProp.h"
23#include "vtkRenderingContext2DModule.h" // For export macro
24#include "vtkSmartPointer.h" // For ivars
25#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkContext2D;
29class vtkContext3D;
31class vtkContextScene;
32
33class VTKRENDERINGCONTEXT2D_EXPORT VTK_MARSHALAUTO vtkContextActor : public vtkProp
34{
35public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37 vtkTypeMacro(vtkContextActor, vtkProp);
38
40
44 int RenderOverlay(vtkViewport* viewport) override;
45
47
53
58
63
70 vtkGetObjectMacro(ForceDevice, vtkContextDevice2D);
72
78 void ReleaseGraphicsResources(vtkWindow* window) override;
79
80protected:
82 ~vtkContextActor() override;
83
87 virtual void Initialize(vtkViewport* viewport);
88
94
95private:
96 vtkContextActor(const vtkContextActor&) = delete;
97 void operator=(const vtkContextActor&) = delete;
98};
99
100VTK_ABI_NAMESPACE_END
101#endif
Class for drawing 2D primitives to a graphical context.
Class for drawing 3D primitives to a graphical context.
void ReleaseGraphicsResources(vtkWindow *window) override
Release any graphics resources that are being consumed by this actor.
static vtkContextActor * New()
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.
vtkContextScene * GetScene()
Get the chart object for the actor.
vtkContextDevice2D * ForceDevice
virtual void Initialize(vtkViewport *viewport)
Initialize the actor - right now we just decide which device to initialize.
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
Abstract class for drawing 2D primitives.
Provides a 2D scene for vtkContextItem objects.
a simple class to control print indentation
Definition vtkIndent.h:29
Allocate and hold a VTK object.
Definition vtkNew.h:58
Hold a reference to a vtkObjectBase instance.
abstract specification for Viewports
Definition vtkViewport.h:47
window superclass for vtkRenderWindow
Definition vtkWindow.h:29
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)