VTK  9.1.0
vtkProperty2D.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkProperty2D.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=========================================================================*/
35#ifndef vtkProperty2D_h
36#define vtkProperty2D_h
37
38#include "vtkObject.h"
39#include "vtkRenderingCoreModule.h" // For export macro
40
41class vtkViewport;
42
43#define VTK_BACKGROUND_LOCATION 0
44#define VTK_FOREGROUND_LOCATION 1
45
46class VTKRENDERINGCORE_EXPORT vtkProperty2D : public vtkObject
47{
48public:
49 vtkTypeMacro(vtkProperty2D, vtkObject);
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
56 static vtkProperty2D* New();
57
62
64
67 vtkSetVector3Macro(Color, double);
68 vtkGetVector3Macro(Color, double);
70
72
75 vtkGetMacro(Opacity, double);
76 vtkSetMacro(Opacity, double);
78
80
84 vtkSetClampMacro(PointSize, float, 0, VTK_FLOAT_MAX);
85 vtkGetMacro(PointSize, float);
87
89
93 vtkSetClampMacro(LineWidth, float, 0, VTK_FLOAT_MAX);
94 vtkGetMacro(LineWidth, float);
96
98
103 vtkSetMacro(LineStipplePattern, int);
104 vtkGetMacro(LineStipplePattern, int);
106
108
113 vtkSetClampMacro(LineStippleRepeatFactor, int, 1, VTK_INT_MAX);
114 vtkGetMacro(LineStippleRepeatFactor, int);
116
118
127 vtkSetClampMacro(DisplayLocation, int, VTK_BACKGROUND_LOCATION, VTK_FOREGROUND_LOCATION);
128 vtkGetMacro(DisplayLocation, int);
129 void SetDisplayLocationToBackground() { this->DisplayLocation = VTK_BACKGROUND_LOCATION; }
130 void SetDisplayLocationToForeground() { this->DisplayLocation = VTK_FOREGROUND_LOCATION; }
132
136 virtual void Render(vtkViewport* vtkNotUsed(viewport)) {}
137
138protected:
140 ~vtkProperty2D() override;
141
142 double Color[3];
143 double Opacity;
149
150private:
151 vtkProperty2D(const vtkProperty2D&) = delete;
152 void operator=(const vtkProperty2D&) = delete;
153};
154
155#endif
a simple class to control print indentation
Definition: vtkIndent.h:43
abstract base class for most VTK objects
Definition: vtkObject.h:63
represent surface properties of a 2D image
Definition: vtkProperty2D.h:47
int LineStippleRepeatFactor
void DeepCopy(vtkProperty2D *p)
Assign one property to another.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetDisplayLocationToForeground()
The DisplayLocation is either background or foreground.
static vtkProperty2D * New()
Creates a vtkProperty2D with the following default values: Opacity 1, Color (1,1,1)
void SetDisplayLocationToBackground()
The DisplayLocation is either background or foreground.
~vtkProperty2D() override
virtual void Render(vtkViewport *vtkNotUsed(viewport))
Have the device specific subclass render this property.
abstract specification for Viewports
Definition: vtkViewport.h:56
@ Color
Definition: vtkX3D.h:52
#define VTK_FOREGROUND_LOCATION
Definition: vtkProperty2D.h:44
#define VTK_BACKGROUND_LOCATION
Definition: vtkProperty2D.h:43
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FLOAT_MAX
Definition: vtkType.h:163