VTK
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(int arg[4]);
68 
70 
74  vtkGetVector4Macro(Dimensions, int);
76 
80  void SetColorSeries(vtkColorSeries *colorSeries);
81 
85  vtkColorSeries *GetColorSeries();
86 
93  const vtkVector2f& tolerance,
94  vtkVector2f* location) override;
95 
96 protected:
97  vtkPlotPie();
98  ~vtkPlotPie() override;
99 
103  bool UpdateTableCache(vtkTable *table);
104 
105  int Dimensions[4];
106 
111 
116 
121 
122 private:
123  vtkPlotPie(const vtkPlotPie &) = delete;
124  void operator=(const vtkPlotPie &) = delete;
125 
126  vtkPlotPiePrivate *Private;
127 
128 };
129 
130 #endif //vtkPlotPie_h
vtkPoints2D
represent and manipulate 2D points
Definition: vtkPoints2D.h:33
vtkPlot.h
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkColorSeries
stores a list of colors.
Definition: vtkColorSeries.h:51
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkSmartPointer< vtkColorSeries >
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:52
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:46
vtkX3D::point
Definition: vtkX3D.h:236
vtkPlotPie::Points
vtkPoints2D * Points
Store a well packed set of angles for the wedges of the pie.
Definition: vtkPlotPie.h:115
vtkPlotPie::BuildTime
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkPlotPie.h:120
vtkPlot::GetNearestPoint
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
Function to query a plot for the nearest point to the specified coordinate.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSmartPointer.h
vtkPlot::PaintLegend
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
Paint legend event for the plot, called whenever the legend needs the plot items symbol/mark/line dra...
vtkPlotPie
Class for drawing a Pie diagram.
Definition: vtkPlotPie.h:36
vtkAbstractContextItem::Paint
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
vtkPlotPie::ColorSeries
vtkSmartPointer< vtkColorSeries > ColorSeries
The color series to use for the pie.
Definition: vtkPlotPie.h:110
vtkX3D::location
Definition: vtkX3D.h:406
vtkPlot::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRectf
Definition: vtkRect.h:293
vtkVector2f
Definition: vtkVector.h:415