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=========================================================================*/
26#ifndef vtkProperty2D_h
27#define vtkProperty2D_h
28
29#include "vtkObject.h"
30#include "vtkRenderingCoreModule.h" // For export macro
31
32class vtkViewport;
33
34#define VTK_BACKGROUND_LOCATION 0
35#define VTK_FOREGROUND_LOCATION 1
36
37class VTKRENDERINGCORE_EXPORT vtkProperty2D : public vtkObject
38{
39public:
40 vtkTypeMacro(vtkProperty2D, vtkObject);
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
47 static vtkProperty2D* New();
48
53
55
58 vtkSetVector3Macro(Color, double);
59 vtkGetVector3Macro(Color, double);
61
63
66 vtkGetMacro(Opacity, double);
67 vtkSetMacro(Opacity, double);
69
71
75 vtkSetClampMacro(PointSize, float, 0, VTK_FLOAT_MAX);
76 vtkGetMacro(PointSize, float);
78
80
84 vtkSetClampMacro(LineWidth, float, 0, VTK_FLOAT_MAX);
85 vtkGetMacro(LineWidth, float);
87
89
94 vtkSetMacro(LineStipplePattern, int);
95 vtkGetMacro(LineStipplePattern, int);
97
99
104 vtkSetClampMacro(LineStippleRepeatFactor, int, 1, VTK_INT_MAX);
105 vtkGetMacro(LineStippleRepeatFactor, int);
107
109
118 vtkSetClampMacro(DisplayLocation, int, VTK_BACKGROUND_LOCATION, VTK_FOREGROUND_LOCATION);
119 vtkGetMacro(DisplayLocation, int);
120 void SetDisplayLocationToBackground() { this->DisplayLocation = VTK_BACKGROUND_LOCATION; }
121 void SetDisplayLocationToForeground() { this->DisplayLocation = VTK_FOREGROUND_LOCATION; }
123
127 virtual void Render(vtkViewport* vtkNotUsed(viewport)) {}
128
129protected:
131 ~vtkProperty2D() override;
132
133 double Color[3];
134 double Opacity;
140
141private:
142 vtkProperty2D(const vtkProperty2D&) = delete;
143 void operator=(const vtkProperty2D&) = delete;
144};
145
146#endif
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
represent surface properties of a 2D image
Definition: vtkProperty2D.h:38
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:47
#define VTK_FOREGROUND_LOCATION
Definition: vtkProperty2D.h:35
#define VTK_BACKGROUND_LOCATION
Definition: vtkProperty2D.h:34
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FLOAT_MAX
Definition: vtkType.h:163