VTK  9.2.6
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=========================================================================*/
138#ifndef vtkProperty2D_h
139#define vtkProperty2D_h
140
141#include "vtkObject.h"
142#include "vtkRenderingCoreModule.h" // For export macro
143
144class vtkViewport;
145
146#define VTK_BACKGROUND_LOCATION 0
147#define VTK_FOREGROUND_LOCATION 1
148
149class VTKRENDERINGCORE_EXPORT vtkProperty2D : public vtkObject
150{
151public:
152 vtkTypeMacro(vtkProperty2D, vtkObject);
153 void PrintSelf(ostream& os, vtkIndent indent) override;
154
160
165
167
170 vtkSetVector3Macro(Color, double);
171 vtkGetVector3Macro(Color, double);
173
175
178 vtkGetMacro(Opacity, double);
179 vtkSetMacro(Opacity, double);
181
183
187 vtkSetClampMacro(PointSize, float, 0, VTK_FLOAT_MAX);
188 vtkGetMacro(PointSize, float);
190
192
196 vtkSetClampMacro(LineWidth, float, 0, VTK_FLOAT_MAX);
197 vtkGetMacro(LineWidth, float);
199
201
206 vtkSetMacro(LineStipplePattern, int);
207 vtkGetMacro(LineStipplePattern, int);
209
211
216 vtkSetClampMacro(LineStippleRepeatFactor, int, 1, VTK_INT_MAX);
217 vtkGetMacro(LineStippleRepeatFactor, int);
219
221
230 vtkSetClampMacro(DisplayLocation, int, VTK_BACKGROUND_LOCATION, VTK_FOREGROUND_LOCATION);
231 vtkGetMacro(DisplayLocation, int);
232 void SetDisplayLocationToBackground() { this->DisplayLocation = VTK_BACKGROUND_LOCATION; }
233 void SetDisplayLocationToForeground() { this->DisplayLocation = VTK_FOREGROUND_LOCATION; }
235
239 virtual void Render(vtkViewport* vtkNotUsed(viewport)) {}
240
241protected:
243 ~vtkProperty2D() override;
244
245 double Color[3];
246 double Opacity;
252
253private:
254 vtkProperty2D(const vtkProperty2D&) = delete;
255 void operator=(const vtkProperty2D&) = delete;
256};
257
258#endif
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract base class for most VTK objects
Definition: vtkObject.h:79
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:56
@ Color
Definition: vtkX3D.h:52
#define VTK_FOREGROUND_LOCATION
#define VTK_BACKGROUND_LOCATION
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FLOAT_MAX
Definition: vtkType.h:163