VTK
dox/Charts/vtkPlotPie.h
Go to the documentation of this file.
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 "vtkPlot.h"
00029 #include "vtkSmartPointer.h" // To hold ColorSeries etc.
00030 
00031 class vtkContext2D;
00032 class vtkColorSeries;
00033 class vtkPoints2D;
00034 
00035 class vtkPlotPiePrivate;
00036 
00037 class VTK_CHARTS_EXPORT vtkPlotPie : public vtkPlot
00038 {
00039 public:
00040   vtkTypeMacro(vtkPlotPie, vtkPlot);
00041   virtual void PrintSelf(ostream &os, vtkIndent indent);
00042 
00043   static vtkPlotPie *New();
00044 
00046   virtual bool Paint(vtkContext2D *painter);
00047 
00053   bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, int legendIndex);
00054 
00058   void SetDimensions(int arg1, int arg2, int arg3, int arg4);
00059 
00063   void SetDimensions(int arg[4]);
00064 
00066 
00069   vtkGetVector4Macro(Dimensions, int);
00071 
00073   void SetColorSeries(vtkColorSeries *colorSeries);
00074 
00076   vtkColorSeries *GetColorSeries();
00077 
00078 //BTX
00080 
00083   virtual vtkIdType GetNearestPoint(const vtkVector2f& point,
00084                                     const vtkVector2f& tolerance,
00085                                     vtkVector2f* location);
00087 
00088 protected:
00089   vtkPlotPie();
00090   ~vtkPlotPie();
00091 
00093   bool UpdateTableCache(vtkTable *table);
00094 
00095   int Dimensions[4];
00096 
00098   vtkSmartPointer<vtkColorSeries> ColorSeries;
00099 
00101   vtkPoints2D *Points;
00102 
00104   vtkTimeStamp BuildTime;
00105 
00106 private:
00107   vtkPlotPie(const vtkPlotPie &);     // Not implemented.
00108   void operator=(const vtkPlotPie &); // Not implemented.
00109 
00110   vtkPlotPiePrivate *Private;
00111 //ETX
00112 };
00113 
00114 #endif //__vtkPlotPie_h