forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvtkContextPolygon.h
78 lines (58 loc) · 2.09 KB
/
vtkContextPolygon.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*=========================================================================
Program: Visualization Toolkit
Module: vtkContextPolygon.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef vtkContextPolygon_h
#define vtkContextPolygon_h
#include "vtkChartsCoreModule.h"
#include "vtkVector.h" // For vtkVector2f
#include "vtkType.h" // For vtkIdType
class vtkTransform2D;
class vtkContextPolygonPrivate;
class VTKCHARTSCORE_EXPORT vtkContextPolygon
{
public:
// Description:
// Creates a new, empty polygon.
vtkContextPolygon();
// Description:
// Creates a new copy of \p polygon.
vtkContextPolygon(const vtkContextPolygon &polygon);
// Description:
// Destroys the polygon.
~vtkContextPolygon();
// Description:
// Adds a point to the polygon.
void AddPoint(const vtkVector2f &point);
// Description:
// Adds a point to the polygon.
void AddPoint(float x, float y);
// Description:
// Returns the point at index.
vtkVector2f GetPoint(vtkIdType index) const;
// Description:
// Returns the number of points in the polygon.
vtkIdType GetNumberOfPoints() const;
// Description:
// Clears all the points from the polygon.
void Clear();
// Description:
// Returns \c true if the polygon contains \p point.
bool Contains(const vtkVector2f &point) const;
// Description:
// Returns a new polygon with each point transformed by \p transform.
vtkContextPolygon Transformed(vtkTransform2D *transform) const;
// Description:
// Copies the values from \p other to this polygon.
vtkContextPolygon& operator=(const vtkContextPolygon &other);
private:
vtkContextPolygonPrivate* const d;
};
#endif // vtkContextPolygon_h
// VTK-HeaderTest-Exclude: vtkContextPolygon.h