VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPlotPie.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 00025 #ifndef __vtkPlotPie_h 00026 #define __vtkPlotPie_h 00027 00028 #include "vtkChartsCoreModule.h" // For export macro 00029 #include "vtkPlot.h" 00030 #include "vtkSmartPointer.h" // To hold ColorSeries etc. 00031 00032 class vtkContext2D; 00033 class vtkColorSeries; 00034 class vtkPoints2D; 00035 00036 class vtkPlotPiePrivate; 00037 00038 class VTKCHARTSCORE_EXPORT vtkPlotPie : public vtkPlot 00039 { 00040 public: 00041 vtkTypeMacro(vtkPlotPie, vtkPlot); 00042 virtual void PrintSelf(ostream &os, vtkIndent indent); 00043 00044 static vtkPlotPie *New(); 00045 00047 virtual bool Paint(vtkContext2D *painter); 00048 00054 bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex); 00055 00059 void SetDimensions(int arg1, int arg2, int arg3, int arg4); 00060 00064 void SetDimensions(int arg[4]); 00065 00067 00070 vtkGetVector4Macro(Dimensions, int); 00072 00074 void SetColorSeries(vtkColorSeries *colorSeries); 00075 00077 vtkColorSeries *GetColorSeries(); 00078 00079 //BTX 00081 00084 virtual vtkIdType GetNearestPoint(const vtkVector2f& point, 00085 const vtkVector2f& tolerance, 00086 vtkVector2f* location); 00088 00089 protected: 00090 vtkPlotPie(); 00091 ~vtkPlotPie(); 00092 00094 bool UpdateTableCache(vtkTable *table); 00095 00096 int Dimensions[4]; 00097 00099 vtkSmartPointer<vtkColorSeries> ColorSeries; 00100 00102 vtkPoints2D *Points; 00103 00105 vtkTimeStamp BuildTime; 00106 00107 private: 00108 vtkPlotPie(const vtkPlotPie &); // Not implemented. 00109 void operator=(const vtkPlotPie &); // Not implemented. 00110 00111 vtkPlotPiePrivate *Private; 00112 //ETX 00113 }; 00114 00115 #endif //__vtkPlotPie_h