VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/Core/vtkProperty2D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkProperty2D.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00028 #ifndef vtkProperty2D_h
00029 #define vtkProperty2D_h
00030 
00031 #include "vtkRenderingCoreModule.h" // For export macro
00032 #include "vtkObject.h"
00033 
00034 class vtkViewport;
00035 
00036 #define VTK_BACKGROUND_LOCATION 0
00037 #define VTK_FOREGROUND_LOCATION 1
00038 
00039 class VTKRENDERINGCORE_EXPORT vtkProperty2D : public vtkObject
00040 {
00041 public:
00042   vtkTypeMacro(vtkProperty2D,vtkObject);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00047   static vtkProperty2D *New();
00048 
00050   void DeepCopy(vtkProperty2D *p);
00051 
00053 
00054   vtkSetVector3Macro(Color, double);
00055   vtkGetVector3Macro(Color, double);
00057 
00059 
00060   vtkGetMacro(Opacity, double);
00061   vtkSetMacro(Opacity, double);
00063 
00065 
00067   vtkSetClampMacro(PointSize,float,0,VTK_FLOAT_MAX);
00068   vtkGetMacro(PointSize,float);
00070 
00072 
00074   vtkSetClampMacro(LineWidth,float,0,VTK_FLOAT_MAX);
00075   vtkGetMacro(LineWidth,float);
00077 
00079 
00082   vtkSetMacro(LineStipplePattern,int);
00083   vtkGetMacro(LineStipplePattern,int);
00085 
00087 
00090   vtkSetClampMacro(LineStippleRepeatFactor,int,1,VTK_INT_MAX);
00091   vtkGetMacro(LineStippleRepeatFactor,int);
00093 
00095 
00101   vtkSetClampMacro( DisplayLocation, int,
00102                     VTK_BACKGROUND_LOCATION, VTK_FOREGROUND_LOCATION );
00103   vtkGetMacro( DisplayLocation, int );
00104   void SetDisplayLocationToBackground()
00105     {this->DisplayLocation = VTK_BACKGROUND_LOCATION;};
00106   void SetDisplayLocationToForeground()
00107     {this->DisplayLocation = VTK_FOREGROUND_LOCATION;};
00109 
00110 //BTX
00112 
00113   virtual void Render (vtkViewport* vtkNotUsed(viewport))  {}
00114 //ETX
00116 
00117 protected:
00118   vtkProperty2D();
00119   ~vtkProperty2D();
00120 
00121   double Color[3];
00122   double Opacity;
00123   float PointSize;
00124   float LineWidth;
00125   int   LineStipplePattern;
00126   int   LineStippleRepeatFactor;
00127   int   DisplayLocation;
00128 
00129 private:
00130   vtkProperty2D(const vtkProperty2D&);  // Not implemented.
00131   void operator=(const vtkProperty2D&);  // Not implemented.
00132 };
00133 
00134 #endif