VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkBrush.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 00027 #ifndef __vtkBrush_h 00028 #define __vtkBrush_h 00029 00030 #include "vtkObject.h" 00031 #include "vtkColor.h" // Needed for vtkColor4ub 00032 00033 class VTK_CHARTS_EXPORT vtkBrush : public vtkObject 00034 { 00035 public: 00036 vtkTypeMacro(vtkBrush, vtkObject); 00037 virtual void PrintSelf(ostream &os, vtkIndent indent); 00038 00039 static vtkBrush *New(); 00040 00043 void SetColorF(double color[3]); 00044 00047 void SetColorF(double r, double g, double b); 00048 00051 void SetColorF(double r, double g, double b, double a); 00052 00055 void SetOpacityF(double a); 00056 00059 void SetColor(unsigned char color[3]); 00060 00063 void SetColor(unsigned char r, unsigned char g, unsigned char b); 00064 00066 00068 void SetColor(unsigned char r, unsigned char g, unsigned char b, 00069 unsigned char a); 00071 00074 void SetOpacity(unsigned char a); 00075 00078 void GetColorF(double color[4]); 00079 00081 void GetColor(unsigned char color[4]); 00082 00084 unsigned char * GetColor() { return &this->Color[0]; } 00085 00087 void DeepCopy(vtkBrush *brush); 00088 00089 //BTX 00090 protected: 00091 vtkBrush(); 00092 ~vtkBrush(); 00093 00094 // Storage of the color in RGBA format (0-255 per channel). 00095 unsigned char* Color; 00096 vtkColor4ub BrushColor; 00097 00098 private: 00099 vtkBrush(const vtkBrush &); // Not implemented. 00100 void operator=(const vtkBrush &); // Not implemented. 00101 //ETX 00102 }; 00103 00104 #endif //__vtkBrush_h