VTK  9.7.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 #include "vtkChartsCoreModule.h" // for export macro
23 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkPlotArea : public vtkPlot
27 {
28 public:
29  static vtkPlotArea* New();
30  vtkTypeMacro(vtkPlotArea, vtkPlot);
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
40  using Superclass::SetInputArray;
41 
45  void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override;
46  void SetColor(unsigned char r, unsigned char g, unsigned char b) override;
47 
49 
52  void SetColorF(double r, double g, double b, double a) override;
53  void SetColorF(double r, double g, double b) override;
55 
57 
60  vtkGetMacro(ValidPointMaskName, vtkStdString);
61  vtkSetMacro(ValidPointMaskName, vtkStdString);
63 
67  void GetBounds(double bounds[4]) override;
68 
72  bool Paint(vtkContext2D* painter) override;
73 
81  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
82 
88  vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance,
89  vtkVector2f* location, vtkIdType* segmentId) override;
91 
97  const vtkVector2d& plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override;
98 
105  bool UpdateCache() override;
106 
107 protected:
108  vtkPlotArea();
109  ~vtkPlotArea() override;
110 
115 
116 private:
117  vtkPlotArea(const vtkPlotArea&) = delete;
118  void operator=(const vtkPlotArea&) = delete;
119 
120  class vtkTableCache;
121  vtkTableCache* TableCache;
122 
123  vtkTimeStamp UpdateTime;
124 };
125 
126 VTK_ABI_NAMESPACE_END
127 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:27
vtkStdString ValidPointMaskName
Name of the valid point mask array.
Definition: vtkPlotArea.h:114
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:393
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:363
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)
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:455
Abstract class for 2D plots.
Definition: vtkPlot.h:43
draws an area plot.
Definition: vtkPlotArea.h:26
#define VTK_MARSHALAUTO
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...