VTK  9.4.20251007
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
16
17#ifndef vtkProperty2D_h
18#define vtkProperty2D_h
19
20#include "vtkObject.h"
21#include "vtkRenderingCoreModule.h" // For export macro
22#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkViewport;
26
27#define VTK_BACKGROUND_LOCATION 0
28#define VTK_FOREGROUND_LOCATION 1
29
30class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkProperty2D : public vtkObject
31{
32public:
33 vtkTypeMacro(vtkProperty2D, vtkObject);
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
40 static vtkProperty2D* New();
41
46
48
51 vtkSetVector3Macro(Color, double);
52 vtkGetVector3Macro(Color, double);
54
56
59 vtkGetMacro(Opacity, double);
60 vtkSetMacro(Opacity, double);
62
64
68 vtkSetClampMacro(PointSize, float, 0, VTK_FLOAT_MAX);
69 vtkGetMacro(PointSize, float);
71
73
77 vtkSetClampMacro(LineWidth, float, 0, VTK_FLOAT_MAX);
78 vtkGetMacro(LineWidth, float);
80
82
87 vtkSetMacro(LineStipplePattern, int);
88 vtkGetMacro(LineStipplePattern, int);
90
92
97 vtkSetClampMacro(LineStippleRepeatFactor, int, 1, VTK_INT_MAX);
98 vtkGetMacro(LineStippleRepeatFactor, int);
100
102
112 vtkGetMacro(DisplayLocation, int);
116
120 virtual void Render(vtkViewport* vtkNotUsed(viewport)) {}
121
122protected:
124 ~vtkProperty2D() override;
125
126 double Color[3];
127 double Opacity;
133
134private:
135 vtkProperty2D(const vtkProperty2D&) = delete;
136 void operator=(const vtkProperty2D&) = delete;
137};
138
139VTK_ABI_NAMESPACE_END
140#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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.
double Color[3]
abstract specification for Viewports
Definition vtkViewport.h:46
#define VTK_FOREGROUND_LOCATION
#define VTK_BACKGROUND_LOCATION
#define VTK_INT_MAX
Definition vtkType.h:144
#define VTK_FLOAT_MAX
Definition vtkType.h:152
#define VTK_MARSHALAUTO