VTK  9.1.0
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 
42 #ifndef vtkPlotPie_h
43 #define vtkPlotPie_h
44 
45 #include "vtkChartsCoreModule.h" // For export macro
46 #include "vtkPlot.h"
47 #include "vtkSmartPointer.h" // To hold ColorSeries etc.
48 
49 class vtkContext2D;
50 class vtkColorSeries;
51 class vtkPoints2D;
52 
53 class vtkPlotPiePrivate;
54 
55 class VTKCHARTSCORE_EXPORT vtkPlotPie : public vtkPlot
56 {
57 public:
58  vtkTypeMacro(vtkPlotPie, vtkPlot);
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61  static vtkPlotPie* New();
62 
66  bool Paint(vtkContext2D* painter) override;
67 
74  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
75 
80  void SetDimensions(int arg1, int arg2, int arg3, int arg4);
81 
86  void SetDimensions(const int arg[4]);
87 
89 
93  vtkGetVector4Macro(Dimensions, int);
95 
99  void SetColorSeries(vtkColorSeries* colorSeries);
100 
105 
112  vtkVector2f* location, vtkIdType* segmentId) override;
114 
115 protected:
117  ~vtkPlotPie() override;
118 
123 
124  int Dimensions[4];
125 
130 
135 
140 
141 private:
142  vtkPlotPie(const vtkPlotPie&) = delete;
143  void operator=(const vtkPlotPie&) = delete;
144 
145  vtkPlotPiePrivate* Private;
146 };
147 
148 #endif // vtkPlotPie_h
stores a list of colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:73
a simple class to control print indentation
Definition: vtkIndent.h:113
Class for drawing a Pie diagram.
Definition: vtkPlotPie.h:56
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkPlotPie.h:139
~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:129
vtkPoints2D * Points
Store a well packed set of angles for the wedges of the pie.
Definition: vtkPlotPie.h:134
vtkColorSeries * GetColorSeries()
Get the color series used.
Abstract class for 2D plots.
Definition: vtkPlot.h:157
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:172
record modification and/or execution time
Definition: vtkTimeStamp.h:52
@ point
Definition: vtkX3D.h:242
@ location
Definition: vtkX3D.h:412
int vtkIdType
Definition: vtkType.h:332