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
32#ifndef vtkPlotPie_h
33#define vtkPlotPie_h
34
35#include "vtkChartsCoreModule.h" // For export macro
36#include "vtkPlot.h"
37#include "vtkSmartPointer.h" // To hold ColorSeries etc.
38
39class vtkContext2D;
40class vtkColorSeries;
41class vtkPoints2D;
42
43class vtkPlotPiePrivate;
44
45class VTKCHARTSCORE_EXPORT vtkPlotPie : public vtkPlot
46{
47public:
48 vtkTypeMacro(vtkPlotPie, vtkPlot);
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
51 static vtkPlotPie* New();
52
56 bool Paint(vtkContext2D* painter) override;
57
64 bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
65
70 void SetDimensions(int arg1, int arg2, int arg3, int arg4);
71
76 void SetDimensions(const int arg[4]);
77
79
83 vtkGetVector4Macro(Dimensions, int);
85
89 void SetColorSeries(vtkColorSeries* colorSeries);
90
95
102 vtkVector2f* location, vtkIdType* segmentId) override;
104
105protected:
107 ~vtkPlotPie() override;
108
113
114 int Dimensions[4];
115
120
125
130
131private:
132 vtkPlotPie(const vtkPlotPie&) = delete;
133 void operator=(const vtkPlotPie&) = delete;
134
135 vtkPlotPiePrivate* Private;
136};
137
138#endif // vtkPlotPie_h
stores a list of colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:63
a simple class to control print indentation
Definition: vtkIndent.h:43
Class for drawing a Pie diagram.
Definition: vtkPlotPie.h:46
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkPlotPie.h:129
static vtkPlotPie * New()
~vtkPlotPie() override
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.
vtkColorSeries * GetColorSeries()
Get the color series used.
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:119
vtkPoints2D * Points
Store a well packed set of angles for the wedges of the pie.
Definition: vtkPlotPie.h:124
Abstract class for 2D plots.
Definition: vtkPlot.h:57
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:72
record modification and/or execution time
Definition: vtkTimeStamp.h:42
@ point
Definition: vtkX3D.h:242
@ location
Definition: vtkX3D.h:412
int vtkIdType
Definition: vtkType.h:332