00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00024 #ifndef __vtkPlotLine_h
00025 #define __vtkPlotLine_h
00026
00027 #include "vtkPlot.h"
00028
00029 class vtkContext2D;
00030 class vtkTable;
00031 class vtkPoints2D;
00032 class vtkStdString;
00033 class vtkImageData;
00034
00035 class VTK_CHARTS_EXPORT vtkPlotLine : public vtkPlot
00036 {
00037 public:
00038 vtkTypeRevisionMacro(vtkPlotLine, vtkPlot);
00039 virtual void PrintSelf(ostream &os, vtkIndent indent);
00040
00042 static vtkPlotLine *New();
00043
00047 virtual void Update();
00048
00051 virtual bool Paint(vtkContext2D *painter);
00052
00058 virtual bool PaintLegend(vtkContext2D *painter, float rect[4]);
00059
00061 virtual void GetBounds(double bounds[4]);
00062
00063
00065
00067 virtual bool GetNearestPoint(const vtkVector2f& point,
00068 const vtkVector2f& tolerance,
00069 vtkVector2f* location);
00071
00072
00073
00075
00076 enum {
00077 NONE = 0,
00078 CROSS,
00079 PLUS,
00080 SQUARE,
00081 CIRCLE,
00082 DIAMOND
00083 };
00085
00086
00088
00090 vtkGetMacro(MarkerStyle, int);
00091 vtkSetMacro(MarkerStyle, int);
00093
00094
00095 protected:
00096 vtkPlotLine();
00097 ~vtkPlotLine();
00098
00100 void GeneraterMarker(int width, bool highlight = false);
00101
00103 bool UpdateTableCache(vtkTable *table);
00104
00108 void CalculateLogSeries();
00109
00113 void FindBadPoints();
00114
00116 void CalculateBounds(double bounds[4]);
00117
00119 vtkPoints2D* Points;
00120
00122 vtkPoints2D* Sorted;
00123
00126 vtkIdTypeArray* BadPoints;
00127
00129 vtkTimeStamp BuildTime;
00130
00132
00133 int MarkerStyle;
00134 vtkImageData* Marker;
00135 vtkImageData* HighlightMarker;
00137
00138 bool LogX, LogY;
00139
00140 private:
00141 vtkPlotLine(const vtkPlotLine &);
00142 void operator=(const vtkPlotLine &);
00143
00144
00145 };
00146
00147 #endif //__vtkPlotLine_h