VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkColorSeries.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 00029 #ifndef __vtkColorSeries_h 00030 #define __vtkColorSeries_h 00031 00032 #include "vtkObject.h" 00033 #include "vtkColor.h" // Needed for vtkColor3ub 00034 00035 class VTK_CHARTS_EXPORT vtkColorSeries : public vtkObject 00036 { 00037 public: 00038 vtkTypeMacro(vtkColorSeries, vtkObject); 00039 virtual void PrintSelf(ostream &os, vtkIndent indent); 00040 00042 static vtkColorSeries* New(); 00043 00044 //BTX 00046 00047 enum { 00048 SPECTRUM = 0, 00049 WARM, 00050 COOL, 00051 BLUES, 00052 WILD_FLOWER, 00053 CITRUS, 00054 CUSTOM 00055 }; 00056 //ETX 00058 00060 void SetColorScheme(int scheme); 00061 00063 00064 vtkGetMacro(ColorScheme, int); 00066 00068 int GetNumberOfColors(); 00069 00070 //BTX 00073 vtkColor3ub GetColor(int index) const; 00074 00077 vtkColor3ub GetColorRepeating(int index) const; 00078 00081 void SetColor(int index, const vtkColor3ub &color); 00082 00084 void AddColor(const vtkColor3ub &color); 00085 00087 00088 void InsertColor(int index, const vtkColor3ub &color); 00089 //ETX 00091 00093 void RemoveColor(int index); 00094 00096 void ClearColors(); 00097 00099 void DeepCopy(vtkColorSeries *chartColors); 00100 00101 //BTX 00102 protected: 00103 vtkColorSeries(); 00104 ~vtkColorSeries(); 00105 00107 00108 class Private; 00109 Private *Storage; 00111 00113 int ColorScheme; 00114 00115 private: 00116 vtkColorSeries(const vtkColorSeries &); // Not implemented. 00117 void operator=(const vtkColorSeries &); // Not implemented. 00118 //ETX 00119 }; 00120 00121 #endif //__vtkColorSeries_h