VTK
dox/Charts/vtkPlotBar.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPlotBar.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 
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 //BTX
00076 
00078     virtual bool GetNearestPoint(const vtkVector2f& point,
00079                                  const vtkVector2f& tolerance,
00080                                  vtkVector2f* location);
00082 //ETX
00083 
00084 //BTX
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 &); // Not implemented.
00105   void operator=(const vtkPlotBar &); // Not implemented.
00106 
00107 //ETX
00108 };
00109 
00110 #endif //__vtkPlotBar_h