VTK  9.4.20241222
vtkContextPolygon.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef vtkContextPolygon_h
5#define vtkContextPolygon_h
6
7#include "vtkChartsCoreModule.h"
8#include "vtkType.h" // For vtkIdType
9#include "vtkVector.h" // For vtkVector2f
10#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
11
12VTK_ABI_NAMESPACE_BEGIN
13class vtkTransform2D;
14class vtkContextPolygonPrivate;
15
16class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkContextPolygon
17{
18public:
19 // Description:
20 // Creates a new, empty polygon.
22
23 // Description:
24 // Creates a new copy of \p polygon.
26
27 // Description:
28 // Destroys the polygon.
30
31 // Description:
32 // Adds a point to the polygon.
33 void AddPoint(const vtkVector2f& point);
34
35 // Description:
36 // Adds a point to the polygon.
37 void AddPoint(float x, float y);
38
39 // Description:
40 // Returns the point at index.
42
43 // Description:
44 // Returns the number of points in the polygon.
46
47 // Description:
48 // Clears all the points from the polygon.
49 void Clear();
50
51 // Description:
52 // Returns \c true if the polygon contains \p point.
53 bool Contains(const vtkVector2f& point) const;
54
55 // Description:
56 // Returns a new polygon with each point transformed by \p transform.
58
59 // Description:
60 // Copies the values from \p other to this polygon.
62
63private:
64 vtkContextPolygonPrivate* const d;
65};
66
67VTK_ABI_NAMESPACE_END
68#endif // vtkContextPolygon_h
69// VTK-HeaderTest-Exclude: vtkContextPolygon.h
vtkIdType GetNumberOfPoints() const
void AddPoint(float x, float y)
vtkContextPolygon(const vtkContextPolygon &polygon)
bool Contains(const vtkVector2f &point) const
void AddPoint(const vtkVector2f &point)
vtkContextPolygon & operator=(const vtkContextPolygon &other)
vtkContextPolygon Transformed(vtkTransform2D *transform) const
vtkVector2f GetPoint(vtkIdType index) const
describes linear transformations via a 3x3 matrix
int vtkIdType
Definition vtkType.h:315
#define VTK_MARSHALAUTO