VTK  9.1.0
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=========================================================================*/
24#ifndef vtkContextActor_h
25#define vtkContextActor_h
26
27#include "vtkNew.h" // For ivars
28#include "vtkProp.h"
29#include "vtkRenderingContext2DModule.h" // For export macro
30#include "vtkSmartPointer.h" // For ivars
31
32class vtkContext2D;
33class vtkContext3D;
35class vtkContextScene;
36
37class VTKRENDERINGCONTEXT2D_EXPORT vtkContextActor : public vtkProp
38{
39public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41 vtkTypeMacro(vtkContextActor, vtkProp);
42
44
48 int RenderOverlay(vtkViewport* viewport) override;
49
51
56
61
66
73 vtkGetObjectMacro(ForceDevice, vtkContextDevice2D);
81 void ReleaseGraphicsResources(vtkWindow* window) override;
82
83protected:
85 ~vtkContextActor() override;
86
90 virtual void Initialize(vtkViewport* viewport);
91
97
98private:
99 vtkContextActor(const vtkContextActor&) = delete;
100 void operator=(const vtkContextActor&) = delete;
101};
102
103#endif
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:54
Class for drawing 3D primitives to a graphical context.
Definition: vtkContext3D.h:41
provides a vtkProp derived object.
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
~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:34
Allocate and hold a VTK object.
Definition: vtkNew.h:56
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:57
Hold a reference to a vtkObjectBase instance.
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39