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 =========================================================================*/
28 #ifndef vtkProperty2D_h
29 #define vtkProperty2D_h
30 
31 #include "vtkRenderingCoreModule.h" // For export macro
32 #include "vtkObject.h"
33 
34 class vtkViewport;
35 
36 #define VTK_BACKGROUND_LOCATION 0
37 #define VTK_FOREGROUND_LOCATION 1
38 
40 {
41 public:
42  vtkTypeMacro(vtkProperty2D,vtkObject);
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
47  static vtkProperty2D *New();
48 
50  void DeepCopy(vtkProperty2D *p);
51 
53 
54  vtkSetVector3Macro(Color, double);
55  vtkGetVector3Macro(Color, double);
57 
59 
60  vtkGetMacro(Opacity, double);
61  vtkSetMacro(Opacity, double);
63 
65 
67  vtkSetClampMacro(PointSize,float,0,VTK_FLOAT_MAX);
68  vtkGetMacro(PointSize,float);
70 
72 
74  vtkSetClampMacro(LineWidth,float,0,VTK_FLOAT_MAX);
75  vtkGetMacro(LineWidth,float);
77 
79 
82  vtkSetMacro(LineStipplePattern,int);
83  vtkGetMacro(LineStipplePattern,int);
85 
87 
90  vtkSetClampMacro(LineStippleRepeatFactor,int,1,VTK_INT_MAX);
91  vtkGetMacro(LineStippleRepeatFactor,int);
93 
95 
101  vtkSetClampMacro( DisplayLocation, int,
103  vtkGetMacro( DisplayLocation, int );
105  {this->DisplayLocation = VTK_BACKGROUND_LOCATION;};
107  {this->DisplayLocation = VTK_FOREGROUND_LOCATION;};
109 
110 //BTX
112 
113  virtual void Render (vtkViewport* vtkNotUsed(viewport)) {}
114 //ETX
116 
117 protected:
118  vtkProperty2D();
119  ~vtkProperty2D();
120 
121  double Color[3];
122  double Opacity;
123  float PointSize;
124  float LineWidth;
128 
129 private:
130  vtkProperty2D(const vtkProperty2D&); // Not implemented.
131  void operator=(const vtkProperty2D&); // Not implemented.
132 };
133 
134 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define VTK_FOREGROUND_LOCATION
Definition: vtkProperty2D.h:37
virtual void Render(vtkViewport *vtkNotUsed(viewport))
abstract specification for Viewports
Definition: vtkViewport.h:46
#define VTK_INT_MAX
Definition: vtkType.h:130
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
#define VTK_FLOAT_MAX
Definition: vtkType.h:138
virtual void PrintSelf(ostream &os, vtkIndent indent)
int LineStippleRepeatFactor
a simple class to control print indentation
Definition: vtkIndent.h:38
void SetDisplayLocationToForeground()
#define VTKRENDERINGCORE_EXPORT
represent surface properties of a 2D image
Definition: vtkProperty2D.h:39
static vtkObject * New()
#define VTK_BACKGROUND_LOCATION
Definition: vtkProperty2D.h:36
void SetDisplayLocationToBackground()