VTK  9.2.6
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, unsigned char a) override;
55  void SetColor(double r, double g, double b) override;
57 
59 
62  vtkGetMacro(ValidPointMaskName, vtkStdString);
63  vtkSetMacro(ValidPointMaskName, vtkStdString);
65 
69  void GetBounds(double bounds[4]) override;
70 
74  bool Paint(vtkContext2D* painter) override;
75 
83  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
84 
90  vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance,
91  vtkVector2f* location, vtkIdType* segmentId) override;
93 
99  const vtkVector2d& plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override;
100 
107  virtual bool UpdateCache() override;
108 
109 protected:
110  vtkPlotArea();
111  ~vtkPlotArea() override;
112 
117 
118 private:
119  vtkPlotArea(const vtkPlotArea&) = delete;
120  void operator=(const vtkPlotArea&) = delete;
121 
122  class vtkTableCache;
123  vtkTableCache* TableCache;
124 
125  vtkTimeStamp UpdateTime;
126 };
127 
128 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
vtkStdString ValidPointMaskName
Name of the valid point mask array.
Definition: vtkPlotArea.h:116
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
Paint legend event for the plot, called whenever the legend needs the plot items symbol/mark/line dra...
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
Definition: vtkPlot.h:352
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location, vtkIdType *segmentId)
Function to query a plot for the nearest point to the specified coordinate.
int vtkIdType
Definition: vtkType.h:332
virtual void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Set the plot color.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual bool UpdateCache()
Update the internal cache.
Definition: vtkPlot.h:414
Abstract class for 2D plots.
Definition: vtkPlot.h:53
draws an area plot.
Definition: vtkPlotArea.h:34
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex)
Generate and return the tooltip label string for this plot The segmentIndex parameter is ignored...