00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00027 #ifndef __vtkPlotStacked_h
00028 #define __vtkPlotStacked_h
00029
00030 #include "vtkPlot.h"
00031
00032 class vtkChartXY;
00033 class vtkContext2D;
00034 class vtkTable;
00035 class vtkPoints2D;
00036 class vtkStdString;
00037 class vtkImageData;
00038 class vtkColorSeries;
00039
00040 class vtkPlotStackedPrivate;
00041
00042 class VTK_CHARTS_EXPORT vtkPlotStacked : public vtkPlot
00043 {
00044 public:
00045 vtkTypeMacro(vtkPlotStacked, vtkPlot);
00046 virtual void PrintSelf(ostream &os, vtkIndent indent);
00047
00049 static vtkPlotStacked *New();
00050
00052
00053 virtual void SetColor(unsigned char r, unsigned char g, unsigned char b,
00054 unsigned char a);
00055 virtual void SetColor(double r, double g, double b);
00056 virtual void GetColor(double rgb[3]);
00058
00062 virtual void Update();
00063
00066 virtual bool Paint(vtkContext2D *painter);
00067
00069
00074 virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
00075 int legendIndex);
00077
00079 virtual void GetBounds(double bounds[4]);
00080
00082 virtual void SetInputArray(int index, const vtkStdString &name);
00083
00085 void SetColorSeries(vtkColorSeries *colorSeries);
00086
00088 vtkColorSeries *GetColorSeries();
00089
00091 virtual vtkStringArray *GetLabels();
00092
00093
00095
00098 virtual vtkIdType GetNearestPoint(const vtkVector2f& point,
00099 const vtkVector2f& tolerance,
00100 vtkVector2f* location);
00102
00104 virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max);
00105
00106
00107 protected:
00108 vtkPlotStacked();
00109 ~vtkPlotStacked();
00110
00112 bool UpdateTableCache(vtkTable *table);
00113
00114
00115
00116
00117 void FixExtent();
00118
00122 void CalculateLogSeries();
00123
00126 vtkIdTypeArray* BaseBadPoints;
00127
00131 vtkIdTypeArray* ExtentBadPoints;
00132
00134 vtkTimeStamp BuildTime;
00135
00136 bool LogX, LogY;
00137
00139 vtkSmartPointer<vtkColorSeries> ColorSeries;
00140
00141 private:
00142 vtkPlotStacked(const vtkPlotStacked &);
00143 void operator=(const vtkPlotStacked &);
00144
00145 vtkPlotStackedPrivate *Private;
00146
00147
00148 };
00149
00150 #endif //__vtkPlotStacked_h