VTK  9.1.0
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 =========================================================================*/
45 #ifndef vtkPlotArea_h
46 #define vtkPlotArea_h
47 
48 #include "vtkPlot.h"
49 
50 class VTKCHARTSCORE_EXPORT vtkPlotArea : public vtkPlot
51 {
52 public:
53  static vtkPlotArea* New();
54  vtkTypeMacro(vtkPlotArea, vtkPlot);
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
64  using Superclass::SetInputArray;
65 
67 
70  void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override;
71  void SetColor(double r, double g, double b) override;
73 
75 
78  vtkGetMacro(ValidPointMaskName, vtkStdString);
79  vtkSetMacro(ValidPointMaskName, vtkStdString);
81 
85  void Update() override;
86 
90  void GetBounds(double bounds[4]) override;
91 
97  void UpdateCache() override;
98 
102  bool Paint(vtkContext2D* painter) override;
103 
111  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
112 
119  vtkVector2f* location, vtkIdType* segmentId) override;
121 
127  const vtkVector2d& plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override;
128 
129 protected:
131  ~vtkPlotArea() override;
132 
137 
138 private:
139  vtkPlotArea(const vtkPlotArea&) = delete;
140  void operator=(const vtkPlotArea&) = delete;
141 
142  class vtkTableCache;
143  vtkTableCache* TableCache;
144 
145  vtkTimeStamp UpdateTime;
146 };
147 
148 #endif
vtkPlotArea::New
static vtkPlotArea * New()
vtkPlotArea::SetColor
void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a) override
Overridden to set the brush color.
vtkPlotArea::GetTooltipLabel
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,...
vtkPlot.h
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkPlotArea::UpdateCache
void UpdateCache() override
Subclasses that build data caches to speed up painting should override this method to update such cac...
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
vtkPlotArea::SetColor
void SetColor(double r, double g, double b) override
Overridden to set the brush color.
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:73
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:157
vtkPlotArea::Update
void Update() override
Perform any updates to the item that may be necessary before rendering.
vtkVector2d
Definition: vtkVector.h:503
vtkPlotArea
draws an area plot.
Definition: vtkPlotArea.h:51
vtkPlot::GetNearestPoint
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.
vtkX3D::point
@ point
Definition: vtkX3D.h:242
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkPlotArea::GetBounds
void GetBounds(double bounds[4]) override
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
vtkPlotArea::GetNearestPoint
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.
vtkPlotArea::vtkPlotArea
vtkPlotArea()
vtkX3D::location
@ location
Definition: vtkX3D.h:412
vtkPlotArea::~vtkPlotArea
~vtkPlotArea() override
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:105
vtkRectf
Definition: vtkRect.h:336
vtkVector2f
Definition: vtkVector.h:491
vtkPlotArea::PaintLegend
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...
vtkPlotArea::Paint
bool Paint(vtkContext2D *painter) override
Paint event for the XY plot, called whenever the chart needs to be drawn.
vtkPlotArea::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPlotArea::ValidPointMaskName
vtkStdString ValidPointMaskName
Name of the valid point mask array.
Definition: vtkPlotArea.h:136