VTK
vtkPlotStacked.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotPoints.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
27 #ifndef __vtkPlotStacked_h
28 #define __vtkPlotStacked_h
29 
30 #include "vtkPlot.h"
31 
32 class vtkChartXY;
33 class vtkContext2D;
34 class vtkTable;
35 class vtkPoints2D;
36 class vtkStdString;
37 class vtkImageData;
38 class vtkColorSeries;
39 
40 class vtkPlotStackedPrivate;
41 
43 {
44 public:
45  vtkTypeMacro(vtkPlotStacked, vtkPlot);
46  virtual void PrintSelf(ostream &os, vtkIndent indent);
47 
49  static vtkPlotStacked *New();
50 
52 
53  virtual void SetColor(unsigned char r, unsigned char g, unsigned char b,
54  unsigned char a);
55  virtual void SetColor(double r, double g, double b);
56  virtual void GetColor(double rgb[3]);
58 
62  virtual void Update();
63 
66  virtual bool Paint(vtkContext2D *painter);
67 
69 
74  virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
75  int legendIndex);
77 
79  virtual void GetBounds(double bounds[4]);
80 
82  virtual void SetInputArray(int index, const vtkStdString &name);
83 
85  void SetColorSeries(vtkColorSeries *colorSeries);
86 
88  vtkColorSeries *GetColorSeries();
89 
91  virtual vtkStringArray *GetLabels();
92 
93 //BTX
95 
98  virtual vtkIdType GetNearestPoint(const vtkVector2f& point,
99  const vtkVector2f& tolerance,
100  vtkVector2f* location);
102 
104  virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max);
105 
106 //BTX
107 protected:
108  vtkPlotStacked();
109  ~vtkPlotStacked();
110 
112  bool UpdateTableCache(vtkTable *table);
113 
114  // Descript:
115  // For stacked plots the Extent data must be greater than (or equal to) the
116  // base data. Insure that this is true
117  void FixExtent();
118 
122  void CalculateLogSeries();
123 
127 
132 
135 
136  bool LogX, LogY;
137 
140 
141 private:
142  vtkPlotStacked(const vtkPlotStacked &); // Not implemented.
143  void operator=(const vtkPlotStacked &); // Not implemented.
144 
145  vtkPlotStackedPrivate *Private;
146 
147 //ETX
148 };
149 
150 #endif //__vtkPlotStacked_h
#define VTK_CHARTS_EXPORT
Wrapper around vtkstd::string to keep symbols short.
Definition: vtkStdString.h:45
vtkSmartPointer< vtkColorSeries > ColorSeries
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
virtual bool Paint(vtkContext2D *painter)
record modification and/or execution time
Definition: vtkTimeStamp.h:33
virtual void GetBounds(double bounds[4])
Definition: vtkPlot.h:213
vtkIdTypeArray * ExtentBadPoints
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:255
virtual void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
vtkTimeStamp BuildTime
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:54
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max)
a simple class to control print indentation
Definition: vtkIndent.h:37
represent and manipulate 2D points
Definition: vtkPoints2D.h:34
virtual vtkStringArray * GetLabels()
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
Abstract class for 2D plots.
Definition: vtkPlot.h:50
Class for drawing an stacked polygon plot given an X, Ybase, Yextent in a vtkTable.
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
Factory class for drawing XY charts.
Definition: vtkChartXY.h:46
virtual void SetInputArray(int index, const vtkStdString &name)
stores a list of colors.
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual void GetColor(double rgb[3])
vtkIdTypeArray * BaseBadPoints
static vtkObject * New()
virtual void Update()