VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPen.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 =========================================================================*/ 00015 00028 #ifndef __vtkPen_h 00029 #define __vtkPen_h 00030 00031 #include "vtkObject.h" 00032 #include "vtkColor.h" // Needed for vtkColor4ub 00033 00034 class VTK_CHARTS_EXPORT vtkPen : public vtkObject 00035 { 00036 public: 00037 vtkTypeMacro(vtkPen, vtkObject); 00038 virtual void PrintSelf(ostream &os, vtkIndent indent); 00039 00040 static vtkPen *New(); 00041 00042 //BTX 00044 00045 enum { 00046 NO_PEN, 00047 SOLID_LINE, 00048 DASH_LINE, 00049 DOT_LINE, 00050 DASH_DOT_LINE, 00051 DASH_DOT_DOT_LINE}; 00053 //ETX 00054 00057 void SetLineType(int type); 00058 00060 int GetLineType(); 00061 00064 void SetColorF(double color[3]); 00065 00068 void SetColorF(double r, double g, double b); 00069 00072 void SetColorF(double r, double g, double b, double a); 00073 00076 void SetOpacityF(double a); 00077 00080 void SetColor(unsigned char color[3]); 00081 00084 void SetColor(unsigned char r, unsigned char g, unsigned char b); 00085 00087 00089 void SetColor(unsigned char r, unsigned char g, unsigned char b, 00090 unsigned char a); 00092 00095 void SetOpacity(unsigned char a); 00096 00099 void GetColorF(double color[3]); 00100 00102 void GetColor(unsigned char color[3]); 00103 00106 unsigned char GetOpacity(); 00107 00109 unsigned char * GetColor() { return this->Color; } 00110 00112 00113 vtkSetMacro(Width, float); 00114 vtkGetMacro(Width, float); 00116 00118 void DeepCopy(vtkPen *pen); 00119 00120 //BTX 00121 protected: 00122 vtkPen(); 00123 ~vtkPen(); 00124 00126 00127 unsigned char* Color; 00128 vtkColor4ub PenColor; 00130 00132 float Width; 00133 00135 int LineType; 00136 00137 private: 00138 vtkPen(const vtkPen &); // Not implemented. 00139 void operator=(const vtkPen &); // Not implemented. 00140 //ETX 00141 }; 00142 00143 #endif //__vtkPen_h