1/************************************************************************
2 * This file has been generated automatically from                      *
3 *                                                                      *
4 * src/core/qgsclipper.h                                                *
5 *                                                                      *
6 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
7 ************************************************************************/
8
9
10
11
12
13
14%Feature ARM // Some parts are not available in sip bindings on ARM because of qreal double vs. float issues
15
16
17class QgsClipper
18{
19%Docstring(signature="appended")
20A class to trim lines and polygons to within a rectangular region.
21
22The functions in this class are likely to be called from within a
23render loop and hence need to as CPU efficient as possible.
24The main purpose of the functions in this class are to trim lines
25and polygons to lie within a rectangular region. This is necessary
26for drawing items to an X11 display which have a limit on the
27magnitude of the screen coordinates (+/- 32768, i.e. 16 bit integer).
28%End
29
30%TypeHeaderCode
31#include "qgsclipper.h"
32%End
33  public:
34
35
36
37    static const double MAX_X;
38    static const double MIN_X;
39    static const double MAX_Y;
40    static const double MIN_Y;
41
42
43    enum Boundary
44    {
45      XMax,
46      XMin,
47      YMax,
48      YMin
49    };
50
51%If (!ARM) // Not available on ARM sip bindings because of qreal issues
52
53    static void trimFeature( QVector<double> &x,
54                             QVector<double> &y,
55                             bool shapeOpen );
56%Docstring
57Trims the given feature to a rectangular box. Returns the trimmed
58feature in x and y. The shapeOpen parameter determines whether
59the function treats the points as a closed shape (polygon), or as
60an open shape (linestring).
61
62.. note::
63
64   not available in Python bindings on android
65%End
66
67%End
68
69    static void trimPolygon( QPolygonF &pts, const QgsRectangle &clipRect );
70
71    static QPolygonF clippedLine( const QgsCurve &curve, const QgsRectangle &clipExtent );
72%Docstring
73Takes a linestring and clips it to clipExtent
74
75:param curve: the linestring
76:param clipExtent: clipping bounds
77
78:return: clipped line coordinates
79%End
80
81    static QPolygonF clippedLine( const QPolygonF &curve, const QgsRectangle &clipExtent );
82%Docstring
83Takes a ``curve`` and clips it to clipExtent.
84
85.. versionadded:: 3.16
86%End
87
88};
89
90
91
92/************************************************************************
93 * This file has been generated automatically from                      *
94 *                                                                      *
95 * src/core/qgsclipper.h                                                *
96 *                                                                      *
97 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
98 ************************************************************************/
99