VTK
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 "vtkRenderingCoreModule.h" // For export macro
30 #include "vtkObject.h"
31 
32 class vtkViewport;
33 
34 #define VTK_BACKGROUND_LOCATION 0
35 #define VTK_FOREGROUND_LOCATION 1
36 
37 class VTKRENDERINGCORE_EXPORT vtkProperty2D : public vtkObject
38 {
39 public:
40  vtkTypeMacro(vtkProperty2D,vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
47  static vtkProperty2D *New();
48 
52  void DeepCopy(vtkProperty2D *p);
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,
120  vtkGetMacro( DisplayLocation, int );
122  {this->DisplayLocation = VTK_BACKGROUND_LOCATION;};
124  {this->DisplayLocation = VTK_FOREGROUND_LOCATION;};
126 
130  virtual void Render (vtkViewport* vtkNotUsed(viewport)) {}
131 
132 protected:
133  vtkProperty2D();
134  ~vtkProperty2D() override;
135 
136  double Color[3];
137  double Opacity;
138  float PointSize;
139  float LineWidth;
143 
144 private:
145  vtkProperty2D(const vtkProperty2D&) = delete;
146  void operator=(const vtkProperty2D&) = delete;
147 };
148 
149 #endif
vtkProperty2D::Opacity
double Opacity
Definition: vtkProperty2D.h:137
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:159
vtkProperty2D::LineStippleRepeatFactor
int LineStippleRepeatFactor
Definition: vtkProperty2D.h:141
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkX3D::Color
Definition: vtkX3D.h:46
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:53
vtkProperty2D::PointSize
float PointSize
Definition: vtkProperty2D.h:138
vtkProperty2D::DisplayLocation
int DisplayLocation
Definition: vtkProperty2D.h:142
vtkProperty2D::Render
virtual void Render(vtkViewport *vtkNotUsed(viewport))
Have the device specific subclass render this property.
Definition: vtkProperty2D.h:130
vtkProperty2D::LineStipplePattern
int LineStipplePattern
Definition: vtkProperty2D.h:140
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:167
vtkProperty2D::SetDisplayLocationToForeground
void SetDisplayLocationToForeground()
Definition: vtkProperty2D.h:123
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkObject.h
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:37
vtkProperty2D::LineWidth
float LineWidth
Definition: vtkProperty2D.h:139
vtkProperty2D::SetDisplayLocationToBackground
void SetDisplayLocationToBackground()
Definition: vtkProperty2D.h:121
VTK_FOREGROUND_LOCATION
#define VTK_FOREGROUND_LOCATION
Definition: vtkProperty2D.h:35
VTK_BACKGROUND_LOCATION
#define VTK_BACKGROUND_LOCATION
Definition: vtkProperty2D.h:34