VTK  9.3.0
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
26 #ifndef vtkPlotArea_h
27 #define vtkPlotArea_h
28 
29 #include "vtkPlot.h"
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKCHARTSCORE_EXPORT vtkPlotArea : public vtkPlot
33 {
34 public:
35  static vtkPlotArea* New();
36  vtkTypeMacro(vtkPlotArea, vtkPlot);
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
46  using Superclass::SetInputArray;
47 
51  void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override;
52 
54 
57  void SetColorF(double r, double g, double b, double a) override;
58  void SetColorF(double r, double g, double b) override;
59 
60  VTK_DEPRECATED_IN_9_3_0("Please use unambiguous SetColorF method instead.")
61  void SetColor(double r, double g, double b) override { this->SetColorF(r, g, b); };
63 
65 
68  vtkGetMacro(ValidPointMaskName, vtkStdString);
69  vtkSetMacro(ValidPointMaskName, vtkStdString);
71 
75  void GetBounds(double bounds[4]) override;
76 
80  bool Paint(vtkContext2D* painter) override;
81 
89  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
90 
97  vtkVector2f* location, vtkIdType* segmentId) override;
99 
105  const vtkVector2d& plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override;
106 
113  bool UpdateCache() override;
114 
115 protected:
117  ~vtkPlotArea() override;
118 
123 
124 private:
125  vtkPlotArea(const vtkPlotArea&) = delete;
126  void operator=(const vtkPlotArea&) = delete;
127 
128  class vtkTableCache;
129  vtkTableCache* TableCache;
130 
131  vtkTimeStamp UpdateTime;
132 };
133 
134 VTK_ABI_NAMESPACE_END
135 #endif
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:59
a simple class to control print indentation
Definition: vtkIndent.h:38
draws an area plot.
Definition: vtkPlotArea.h:33
bool Paint(vtkContext2D *painter) override
Paint event for the XY plot, called whenever the chart needs to be drawn.
static vtkPlotArea * New()
~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:122
void SetColorF(double r, double g, double b, double a) override
Set the plot color with floating values (comprised between 0.0 and 1.0)
bool UpdateCache() override
Update the internal cache.
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
Set the plot color with integer values (comprised between 0 and 255)
void SetColorF(double r, double g, double b) override
Set the plot color with floating values (comprised between 0.0 and 1.0)
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:53
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 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:38
record modification and/or execution time
Definition: vtkTimeStamp.h:34
@ point
Definition: vtkX3D.h:236
@ location
Definition: vtkX3D.h:406
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition: vtkType.h:315