VTK  9.4.20241121
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
36#ifndef vtkPlotArea_h
37#define vtkPlotArea_h
38
39#include "vtkPlot.h"
40
41#include "vtkChartsCoreModule.h" // for export macro
42#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
43
44VTK_ABI_NAMESPACE_BEGIN
45class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkPlotArea : public vtkPlot
46{
47public:
48 static vtkPlotArea* New();
49 vtkTypeMacro(vtkPlotArea, vtkPlot);
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
59 using Superclass::SetInputArray;
60
64 void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override;
65
67
70 void SetColorF(double r, double g, double b, double a) override;
71 void SetColorF(double r, double g, double b) override;
72
73 VTK_DEPRECATED_IN_9_3_0("Please use unambiguous SetColorF method instead.")
74 void SetColor(double r, double g, double b) override { this->SetColorF(r, g, b); }
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
109 vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance,
110 vtkVector2f* location, vtkIdType* segmentId) override;
112
118 const vtkVector2d& plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override;
119
126 bool UpdateCache() override;
127
128protected:
130 ~vtkPlotArea() override;
131
136
137private:
138 vtkPlotArea(const vtkPlotArea&) = delete;
139 void operator=(const vtkPlotArea&) = delete;
140
141 class vtkTableCache;
142 vtkTableCache* TableCache;
143
144 vtkTimeStamp UpdateTime;
145};
146
147VTK_ABI_NAMESPACE_END
148#endif
Class for drawing 2D primitives to a graphical context.
a simple class to control print indentation
Definition vtkIndent.h:108
draws an area plot.
Definition vtkPlotArea.h:46
bool Paint(vtkContext2D *painter) override
Paint event for the XY plot, called whenever the chart needs to be drawn.
~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.
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.
static vtkPlotArea * New()
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:154
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.
record modification and/or execution time
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition vtkType.h:315
#define VTK_MARSHALAUTO