00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00024 #ifndef __vtkPlotBar_h
00025 #define __vtkPlotBar_h
00026
00027 #include "vtkPlot.h"
00028
00029 class vtkContext2D;
00030 class vtkTable;
00031 class vtkPoints2D;
00032 class vtkStdString;
00033
00034 class VTK_CHARTS_EXPORT vtkPlotBar : public vtkPlot
00035 {
00036 public:
00037 vtkTypeMacro(vtkPlotBar, vtkPlot);
00038 virtual void PrintSelf(ostream &os, vtkIndent indent);
00039
00041 static vtkPlotBar *New();
00042
00045 virtual bool Paint(vtkContext2D *painter);
00046
00052 virtual bool PaintLegend(vtkContext2D *painter, float rect[4]);
00053
00055
00056 virtual void SetColor(unsigned char r, unsigned char g, unsigned char b,
00057 unsigned char a);
00058 virtual void SetColor(double r, double g, double b);
00059 virtual void GetColor(double rgb[3]);
00061
00063 virtual void SetWidth(float width);
00064
00066 virtual float GetWidth();
00067
00068 vtkSetMacro(Offset, float);
00069 vtkGetMacro(Offset, float);
00070
00072 virtual void GetBounds(double bounds[4]);
00073
00074
00076
00078 virtual bool GetNearestPoint(const vtkVector2f& point,
00079 const vtkVector2f& tolerance,
00080 vtkVector2f* location);
00082
00083
00084
00085 protected:
00086 vtkPlotBar();
00087 ~vtkPlotBar();
00088
00090 bool UpdateTableCache(vtkTable *table);
00091
00093 vtkPoints2D *Points;
00094
00095 bool Sorted;
00096
00097 float Width;
00098 float Offset;
00099
00101 vtkTimeStamp BuildTime;
00102
00103 private:
00104 vtkPlotBar(const vtkPlotBar &);
00105 void operator=(const vtkPlotBar &);
00106
00107
00108 };
00109
00110 #endif //__vtkPlotBar_h