Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkProperty2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProperty2D.h,v $
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 =========================================================================*/
00039 #ifndef __vtkProperty2D_h
00040 #define __vtkProperty2D_h
00041 
00042 #include "vtkObject.h"
00043 
00044 class vtkViewport;
00045 
00046 #define VTK_BACKGROUND_LOCATION 0
00047 #define VTK_FOREGROUND_LOCATION 1
00048 
00049 class VTK_COMMON_EXPORT vtkProperty2D : public vtkObject
00050 {
00051 public:
00052   vtkTypeRevisionMacro(vtkProperty2D,vtkObject);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00057   static vtkProperty2D *New();
00058 
00060   void DeepCopy(vtkProperty2D *p);
00061 
00063 
00064   vtkSetVector3Macro(Color, double);
00065   vtkGetVectorMacro(Color, double, 3);
00067 
00069 
00070   vtkGetMacro(Opacity, double);
00071   vtkSetMacro(Opacity, double);
00073 
00075 
00077   vtkSetClampMacro(PointSize,float,0,VTK_LARGE_FLOAT);
00078   vtkGetMacro(PointSize,float);
00080 
00082 
00084   vtkSetClampMacro(LineWidth,float,0,VTK_LARGE_FLOAT);
00085   vtkGetMacro(LineWidth,float);
00087 
00089 
00092   vtkSetMacro(LineStipplePattern,int);
00093   vtkGetMacro(LineStipplePattern,int);
00095 
00097 
00100   vtkSetClampMacro(LineStippleRepeatFactor,int,1,VTK_LARGE_INTEGER);
00101   vtkGetMacro(LineStippleRepeatFactor,int);
00103 
00105 
00111   vtkSetClampMacro( DisplayLocation, int, 
00112                     VTK_BACKGROUND_LOCATION, VTK_FOREGROUND_LOCATION );
00113   vtkGetMacro( DisplayLocation, int );
00114   void SetDisplayLocationToBackground() 
00115     {this->DisplayLocation = VTK_BACKGROUND_LOCATION;};
00116   void SetDisplayLocationToForeground() 
00117     {this->DisplayLocation = VTK_FOREGROUND_LOCATION;};
00119   
00120   
00122   virtual void Render (vtkViewport* vtkNotUsed(viewport))  {}
00123   
00124 protected:
00125   vtkProperty2D();
00126   ~vtkProperty2D();
00127 
00128   double Color[3];
00129   double Opacity;
00130   float PointSize;
00131   float LineWidth;
00132   int   LineStipplePattern;
00133   int   LineStippleRepeatFactor;
00134   int   DisplayLocation;
00135 private:
00136   vtkProperty2D(const vtkProperty2D&);  // Not implemented.
00137   void operator=(const vtkProperty2D&);  // Not implemented.
00138 };
00139   
00140   
00141 #endif
00142 
00143 
00144