VTK  9.3.1
vtkPlotArea.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkPlotArea_h
18 #define vtkPlotArea_h
19 
20 #include "vtkPlot.h"
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class VTKCHARTSCORE_EXPORT vtkPlotArea : public vtkPlot
24 {
25 public:
26  static vtkPlotArea* New();
27  vtkTypeMacro(vtkPlotArea, vtkPlot);
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
37  using Superclass::SetInputArray;
38 
42  void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override;
43 
45 
48  void SetColorF(double r, double g, double b, double a) override;
49  void SetColorF(double r, double g, double b) override;
50 
51  VTK_DEPRECATED_IN_9_3_0("Please use unambiguous SetColorF method instead.")
52  void SetColor(double r, double g, double b) override { this->SetColorF(r, g, b); };
54 
56 
59  vtkGetMacro(ValidPointMaskName, vtkStdString);
60  vtkSetMacro(ValidPointMaskName, vtkStdString);
62 
66  void GetBounds(double bounds[4]) override;
67 
71  bool Paint(vtkContext2D* painter) override;
72 
80  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
81 
87  vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance,
88  vtkVector2f* location, vtkIdType* segmentId) override;
90 
96  const vtkVector2d& plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override;
97 
104  bool UpdateCache() override;
105 
106 protected:
107  vtkPlotArea();
108  ~vtkPlotArea() override;
109 
114 
115 private:
116  vtkPlotArea(const vtkPlotArea&) = delete;
117  void operator=(const vtkPlotArea&) = delete;
118 
119  class vtkTableCache;
120  vtkTableCache* TableCache;
121 
122  vtkTimeStamp UpdateTime;
123 };
124 
125 VTK_ABI_NAMESPACE_END
126 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
vtkStdString ValidPointMaskName
Name of the valid point mask array.
Definition: vtkPlotArea.h:113
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 void SetColorF(double r, double g, double b, double a)
Set the plot color with floating values (comprised between 0.0 and 1.0)
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:24
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
Definition: vtkPlot.h:367
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:315
virtual void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Set the plot color with integer values (comprised between 0 and 255)
#define VTK_DEPRECATED_IN_9_3_0(reason)
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:49
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual bool UpdateCache()
Update the internal cache.
Definition: vtkPlot.h:429
Abstract class for 2D plots.
Definition: vtkPlot.h:43
draws an area plot.
Definition: vtkPlotArea.h:23
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...