VTK: Charts/Core/vtkPlotPie.h Source File

| VTK 9.3.1

vtkPlotPie.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
3
23 #ifndef vtkPlotPie_h
24 #define vtkPlotPie_h
25
26 #include "vtkChartsCoreModule.h" // For export macro
27 #include "vtkPlot.h"
28 #include "vtkSmartPointer.h" // To hold ColorSeries etc.
29
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkContext2D;
32 class vtkColorSeries;
33 class vtkPoints2D;
34
35 class vtkPlotPiePrivate;
36
37 class VTKCHARTSCORE_EXPORT vtkPlotPie : public vtkPlot
38 {
39 public:
40 vtkTypeMacro(vtkPlotPie, vtkPlot);
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
43 static vtkPlotPie* New();
44
48 bool Paint(vtkContext2D* painter) override;
49
56 bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
57
62 void SetDimensions(int arg1, int arg2, int arg3, int arg4);
63
68 void SetDimensions(const int arg[4]);
69
71
75 vtkGetVector4Macro(Dimensions, int);
77
81 void SetColorSeries(vtkColorSeries* colorSeries);
82
86 vtkColorSeries* GetColorSeries();
87
93 vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance,
94 vtkVector2f* location, vtkIdType* segmentId) override;
95 using vtkPlot::GetNearestPoint;
96
103 bool UpdateCache() override;
104
105 protected:
106 vtkPlotPie();
107 ~vtkPlotPie() override;
108
109 int Dimensions[4];
110
114 vtkSmartPointer<vtkColorSeries> ColorSeries;
115
119 vtkPoints2D* Points;
120
121 private:
122 vtkPlotPie(const vtkPlotPie&) = delete;
123 void operator=(const vtkPlotPie&) = delete;
124
125 vtkPlotPiePrivate* Private;
126 };
127
128 VTK_ABI_NAMESPACE_END
129 #endif // vtkPlotPie_h
vtkColorSeries
stores a list of colors.
Definition: vtkColorSeries.h:60
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:59
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkPlotPie
Class for drawing a Pie diagram.
Definition: vtkPlotPie.h:38
vtkPlotPie::~vtkPlotPie
~vtkPlotPie() override
vtkPlotPie::New
static vtkPlotPie * New()
vtkPlotPie::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.
vtkPlotPie::SetColorSeries
void SetColorSeries(vtkColorSeries *colorSeries)
Set the color series to use for the Pie.
vtkPlotPie::PaintLegend
bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex) override
Paint legend event for the XY plot, called whenever the legend needs the plot items symbol/mark/line ...
vtkPlotPie::Paint
bool Paint(vtkContext2D *painter) override
Paint event for the item.
vtkPlotPie::SetDimensions
void SetDimensions(int arg1, int arg2, int arg3, int arg4)
Set the dimensions of the pie, arguments 1 and 2 are the x and y coordinate of the bottom corner.
vtkPlotPie::UpdateCache
bool UpdateCache() override
Update the internal cache.
vtkPlotPie::vtkPlotPie
vtkPlotPie()
vtkPlotPie::SetDimensions
void SetDimensions(const int arg[4])
Set the dimensions of the pie, elements 0 and 1 are the x and y coordinate of the bottom corner.
vtkPlotPie::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPlotPie::ColorSeries
vtkSmartPointer< vtkColorSeries > ColorSeries
The color series to use for the pie.
Definition: vtkPlotPie.h:114
vtkPlotPie::Points
vtkPoints2D * Points
Store a well packed set of angles for the wedges of the pie.
Definition: vtkPlotPie.h:119
vtkPlotPie::GetColorSeries
vtkColorSeries * GetColorSeries()
Get the color series used.
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:53
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.
vtkPoints2D
represent and manipulate 2D points
Definition: vtkPoints2D.h:26
vtkRectf
Definition: vtkRect.h:328
vtkSmartPointer< vtkColorSeries >
vtkVector2f
Definition: vtkVector.h:463
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkX3D::location
@ location
Definition: vtkX3D.h:406
vtkPlot.h
vtkSmartPointer.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315