VTK  9.0.3
vtkPlotPie.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotPie.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 =========================================================================*/
15 
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 class vtkContext2D;
31 class vtkColorSeries;
32 class vtkPoints2D;
33 
34 class vtkPlotPiePrivate;
35 
36 class VTKCHARTSCORE_EXPORT vtkPlotPie : public vtkPlot
37 {
38 public:
39  vtkTypeMacro(vtkPlotPie, vtkPlot);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  static vtkPlotPie* New();
43 
47  bool Paint(vtkContext2D* painter) override;
48 
55  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
56 
61  void SetDimensions(int arg1, int arg2, int arg3, int arg4);
62 
67  void SetDimensions(const int arg[4]);
68 
70 
74  vtkGetVector4Macro(Dimensions, int);
76 
80  void SetColorSeries(vtkColorSeries* colorSeries);
81 
86 
94 #ifndef VTK_LEGACY_REMOVE
95  vtkIdType* segmentId) override;
96 #else
97  vtkIdType* segmentId = nullptr) override;
98 #endif // VTK_LEGACY_REMOVE
99 
100 #ifndef VTK_LEGACY_REMOVE
102 #endif // VTK_LEGACY_REMOVE
103 
104 protected:
106  ~vtkPlotPie() override;
107 
112 
113  int Dimensions[4];
114 
119 
124 
129 
130 private:
131  vtkPlotPie(const vtkPlotPie&) = delete;
132  void operator=(const vtkPlotPie&) = delete;
133 
134  vtkPlotPiePrivate* Private;
135 };
136 
137 #endif // vtkPlotPie_h
stores a list of colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:53
a simple class to control print indentation
Definition: vtkIndent.h:34
Class for drawing a Pie diagram.
Definition: vtkPlotPie.h:37
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkPlotPie.h:128
~vtkPlotPie() override
static vtkPlotPie * New()
bool UpdateTableCache(vtkTable *table)
Update the table cache.
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.
void SetColorSeries(vtkColorSeries *colorSeries)
Set the color series to use for the Pie.
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 ...
bool Paint(vtkContext2D *painter) override
Paint event for the item.
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.
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkColorSeries > ColorSeries
The color series to use for the pie.
Definition: vtkPlotPie.h:118
vtkPoints2D * Points
Store a well packed set of angles for the wedges of the pie.
Definition: vtkPlotPie.h:123
vtkColorSeries * GetColorSeries()
Get the color series used.
Abstract class for 2D plots.
Definition: vtkPlot.h:47
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.
represent and manipulate 2D points
Definition: vtkPoints2D.h:34
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:63
record modification and/or execution time
Definition: vtkTimeStamp.h:33
@ point
Definition: vtkX3D.h:242
@ location
Definition: vtkX3D.h:412
int vtkIdType
Definition: vtkType.h:338