VTK  9.3.0
vtkProperty2D.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#ifndef vtkProperty2D_h
18#define vtkProperty2D_h
19
20#include "vtkObject.h"
21#include "vtkRenderingCoreModule.h" // For export macro
22
23VTK_ABI_NAMESPACE_BEGIN
24class vtkViewport;
25
26#define VTK_BACKGROUND_LOCATION 0
27#define VTK_FOREGROUND_LOCATION 1
28
29class VTKRENDERINGCORE_EXPORT vtkProperty2D : public vtkObject
30{
31public:
32 vtkTypeMacro(vtkProperty2D, vtkObject);
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
39 static vtkProperty2D* New();
40
45
47
50 vtkSetVector3Macro(Color, double);
51 vtkGetVector3Macro(Color, double);
53
55
58 vtkGetMacro(Opacity, double);
59 vtkSetMacro(Opacity, double);
61
63
67 vtkSetClampMacro(PointSize, float, 0, VTK_FLOAT_MAX);
68 vtkGetMacro(PointSize, float);
70
72
76 vtkSetClampMacro(LineWidth, float, 0, VTK_FLOAT_MAX);
77 vtkGetMacro(LineWidth, float);
79
81
86 vtkSetMacro(LineStipplePattern, int);
87 vtkGetMacro(LineStipplePattern, int);
89
91
96 vtkSetClampMacro(LineStippleRepeatFactor, int, 1, VTK_INT_MAX);
97 vtkGetMacro(LineStippleRepeatFactor, int);
99
101
110 vtkSetClampMacro(DisplayLocation, int, VTK_BACKGROUND_LOCATION, VTK_FOREGROUND_LOCATION);
111 vtkGetMacro(DisplayLocation, int);
112 void SetDisplayLocationToBackground() { this->DisplayLocation = VTK_BACKGROUND_LOCATION; }
113 void SetDisplayLocationToForeground() { this->DisplayLocation = VTK_FOREGROUND_LOCATION; }
115
119 virtual void Render(vtkViewport* vtkNotUsed(viewport)) {}
120
121protected:
123 ~vtkProperty2D() override;
124
125 double Color[3];
126 double Opacity;
132
133private:
134 vtkProperty2D(const vtkProperty2D&) = delete;
135 void operator=(const vtkProperty2D&) = delete;
136};
137
138VTK_ABI_NAMESPACE_END
139#endif
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
represent surface properties of a 2D image
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:45
#define VTK_FOREGROUND_LOCATION
#define VTK_BACKGROUND_LOCATION
#define VTK_INT_MAX
Definition vtkType.h:144
#define VTK_FLOAT_MAX
Definition vtkType.h:152