VTK
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 =========================================================================*/
27 #ifndef vtkContextActor_h
28 #define vtkContextActor_h
29 
30 #include "vtkRenderingContext2DModule.h" // For export macro
31 #include "vtkProp.h"
32 #include "vtkNew.h" // For ivars
33 #include "vtkSmartPointer.h" // For ivars
34 
35 class vtkContext2D;
36 class vtkContext3D;
37 class vtkContextDevice2D;
38 class vtkContextScene;
39 
40 class VTKRENDERINGCONTEXT2D_EXPORT vtkContextActor : public vtkProp
41 {
42 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44  vtkTypeMacro(vtkContextActor,vtkProp);
45 
46  static vtkContextActor* New();
47 
51  int RenderOverlay(vtkViewport *viewport) override;
52 
54 
57  vtkGetNewMacro(Context, vtkContext2D);
59 
63  vtkContextScene * GetScene();
64 
68  void SetScene(vtkContextScene *scene);
69 
75  void SetForceDevice(vtkContextDevice2D *dev);
76  vtkGetObjectMacro(ForceDevice, vtkContextDevice2D)
84  void ReleaseGraphicsResources(vtkWindow *window) override;
85 
86 protected:
88  ~vtkContextActor() override;
89 
93  virtual void Initialize(vtkViewport* viewport);
94 
100 
101 private:
102  vtkContextActor(const vtkContextActor&) = delete;
103  void operator=(const vtkContextActor&) = delete;
104 };
105 
106 #endif
vtkProp::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:230
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkSmartPointer< vtkContextScene >
vtkContextActor::Scene
vtkSmartPointer< vtkContextScene > Scene
Definition: vtkContextActor.h:95
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
vtkProp.h
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkContextActor
provides a vtkProp derived object.
Definition: vtkContextActor.h:40
vtkContextScene
Provides a 2D scene for vtkContextItem objects.
Definition: vtkContextScene.h:50
vtkProp::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSmartPointer.h
vtkContextActor::Context3D
vtkNew< vtkContext3D > Context3D
Definition: vtkContextActor.h:97
vtkNew< vtkContext2D >
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkContextDevice2D
Abstract class for drawing 2D primitives.
Definition: vtkContextDevice2D.h:53
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
vtkNew.h
vtkContextActor::ForceDevice
vtkContextDevice2D * ForceDevice
Definition: vtkContextActor.h:98
vtkContext3D
Class for drawing 3D primitives to a graphical context.
Definition: vtkContext3D.h:40
vtkContextActor::Initialized
bool Initialized
Definition: vtkContextActor.h:99
vtkProp::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:305
vtkContextActor::Context
vtkNew< vtkContext2D > Context
Definition: vtkContextActor.h:96