Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkProperty2D.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkProperty2D.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00042 #ifndef __vtkProperty2D_h
    00043 #define __vtkProperty2D_h
    00044
    00045 #include "vtkObject.h"
    00046
    00047 class vtkViewport;
    00048
    00049 #define VTK_BACKGROUND_LOCATION 0
    00050 #define VTK_FOREGROUND_LOCATION 1
    00051
    00052 class VTK_COMMON_EXPORT vtkProperty2D : public vtkObject
    00053 {
    00054 public:
    00055   vtkTypeRevisionMacro(vtkProperty2D,vtkObject);
    00056   void PrintSelf(ostream& os, vtkIndent indent);
    00057
    00060   static vtkProperty2D *New();
    00061
    00063   void DeepCopy(vtkProperty2D *p);
    00064
    00066
    00067   vtkSetVector3Macro(Color, float);
    00068   vtkGetVectorMacro(Color, float, 3);
    00070
    00072
    00073   vtkGetMacro(Opacity, float);
    00074   vtkSetMacro(Opacity, float);
    00076
    00078
    00080   vtkSetClampMacro(PointSize,float,0,VTK_LARGE_FLOAT);
    00081   vtkGetMacro(PointSize,float);
    00083
    00085
    00087   vtkSetClampMacro(LineWidth,float,0,VTK_LARGE_FLOAT);
    00088   vtkGetMacro(LineWidth,float);
    00090
    00092
    00095   vtkSetMacro(LineStipplePattern,int);
    00096   vtkGetMacro(LineStipplePattern,int);
    00098
    00100
    00103   vtkSetClampMacro(LineStippleRepeatFactor,int,1,VTK_LARGE_INTEGER);
    00104   vtkGetMacro(LineStippleRepeatFactor,int);
    00106
    00108
    00114   vtkSetClampMacro( DisplayLocation, int,
    00115                     VTK_BACKGROUND_LOCATION, VTK_FOREGROUND_LOCATION );
    00116   vtkGetMacro( DisplayLocation, int );
    00117   void SetDisplayLocationToBackground()
    00118     {this->DisplayLocation = VTK_BACKGROUND_LOCATION;};
    00119   void SetDisplayLocationToForeground()
    00120     {this->DisplayLocation = VTK_FOREGROUND_LOCATION;};
    00122
    00123
    00125   virtual void Render (vtkViewport* vtkNotUsed(viewport))  {}
    00126
    00127 protected:
    00128   vtkProperty2D();
    00129   ~vtkProperty2D();
    00130
    00131   float Color[3];
    00132   float Opacity;
    00133   float PointSize;
    00134   float LineWidth;
    00135   int   LineStipplePattern;
    00136   int   LineStippleRepeatFactor;
    00137   int   DisplayLocation;
    00138 private:
    00139   vtkProperty2D(const vtkProperty2D&);  // Not implemented.
    00140   void operator=(const vtkProperty2D&);  // Not implemented.
    00141 };
    00142
    00143
    00144 #endif
    00145
    00146
    00147