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 =========================================================================*/
48 #ifndef vtkPlotArea_h
49 #define vtkPlotArea_h
50 
51 #include "vtkPlot.h"
52 
53 class VTKCHARTSCORE_EXPORT vtkPlotArea : public vtkPlot
54 {
55 public:
56  static vtkPlotArea* New();
57  vtkTypeMacro(vtkPlotArea, vtkPlot);
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
67  using Superclass::SetInputArray;
68 
70 
73  void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override;
74  void SetColor(double r, double g, double b) override;
76 
78 
81  vtkGetMacro(ValidPointMaskName, vtkStdString);
82  vtkSetMacro(ValidPointMaskName, vtkStdString);
84 
88  void GetBounds(double bounds[4]) override;
89 
93  bool Paint(vtkContext2D* painter) override;
94 
102  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
103 
110  vtkVector2f* location, vtkIdType* segmentId) override;
112 
118  const vtkVector2d& plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override;
119 
126  virtual bool UpdateCache() override;
127 
128 protected:
130  ~vtkPlotArea() override;
131 
136 
137 private:
138  vtkPlotArea(const vtkPlotArea&) = delete;
139  void operator=(const vtkPlotArea&) = delete;
140 
141  class vtkTableCache;
142  vtkTableCache* TableCache;
143 
144  vtkTimeStamp UpdateTime;
145 };
146 
147 #endif
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:77
a simple class to control print indentation
Definition: vtkIndent.h:119
draws an area plot.
Definition: vtkPlotArea.h:54
bool Paint(vtkContext2D *painter) override
Paint event for the XY plot, called whenever the chart needs to be drawn.
static vtkPlotArea * New()
virtual bool UpdateCache() override
Update the internal cache.
~vtkPlotArea() override
vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override
Generate and return the tooltip label string for this plot The segmentIndex parameter is ignored,...
vtkStdString ValidPointMaskName
Name of the valid point mask array.
Definition: vtkPlotArea.h:135
void GetBounds(double bounds[4]) override
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override
Overridden to set the brush color.
void SetColor(double r, double g, double b) override
Overridden to set the brush color.
vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location, vtkIdType *segmentId) override
Function to query a plot for the nearest point to the specified coordinate.
bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex) override
Paint legend event for the plot, called whenever the legend needs the plot items symbol/mark/line dra...
Abstract class for 2D plots.
Definition: vtkPlot.h:163
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.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:108
record modification and/or execution time
Definition: vtkTimeStamp.h:55
@ point
Definition: vtkX3D.h:242
@ location
Definition: vtkX3D.h:412
int vtkIdType
Definition: vtkType.h:332