VTK
vtkPlotArea.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotArea.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 =========================================================================*/
29 #ifndef vtkPlotArea_h
30 #define vtkPlotArea_h
31 
32 #include "vtkPlot.h"
33 
34 class VTKCHARTSCORE_EXPORT vtkPlotArea : public vtkPlot
35 {
36 public:
37  static vtkPlotArea* New();
38  vtkTypeMacro(vtkPlotArea, vtkPlot);
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
48  using Superclass::SetInputArray;
49 
51 
54  void SetColor(unsigned char r, unsigned char g, unsigned char b,
55  unsigned char a) override;
56  void SetColor(double r, double g, double b) override;
58 
60 
63  vtkGetMacro(ValidPointMaskName, vtkStdString)
64  vtkSetMacro(ValidPointMaskName, vtkStdString)
66 
70  void Update() override;
71 
75  void GetBounds(double bounds[4]) override;
76 
82  void UpdateCache() override;
83 
87  bool Paint(vtkContext2D *painter) override;
88 
96  bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
97  int legendIndex) override;
98 
104  vtkIdType GetNearestPoint(const vtkVector2f& point,
105  const vtkVector2f& tolerance,
106  vtkVector2f* location) override;
107 
112  vtkStdString GetTooltipLabel(const vtkVector2d &plotPos,
113  vtkIdType seriesIndex,
114  vtkIdType segmentIndex) override;
115 
116 protected:
118  ~vtkPlotArea() override;
119 
123  vtkStdString ValidPointMaskName;
124 
125 private:
126  vtkPlotArea(const vtkPlotArea&) = delete;
127  void operator=(const vtkPlotArea&) = delete;
128 
129  class vtkTableCache;
130  vtkTableCache* TableCache;
131 
132  vtkTimeStamp UpdateTime;
133 
134 };
135 
136 #endif
vtkPlotArea::New
static vtkPlotArea * New()
vtkPlotArea::SetColor
void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override
Overridden to set the brush color.
vtkPlot.h
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkPlotArea::SetColor
void SetColor(double r, double g, double b) override
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:59
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:53
vtkVector2d
Definition: vtkVector.h:428
vtkPlotArea
draws an area plot.
Definition: vtkPlotArea.h:35
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkX3D::location
@ location
Definition: vtkX3D.h:406
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:41
vtkRectf
Definition: vtkRect.h:333
vtkVector2f
Definition: vtkVector.h:419
vtkPlotArea::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.