-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
qgscompoundcurvev2.sip
99 lines (76 loc) · 3.38 KB
/
qgscompoundcurvev2.sip
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class QgsCompoundCurveV2: public QgsCurveV2
{
%TypeHeaderCode
#include <qgscompoundcurvev2.h>
%End
public:
QgsCompoundCurveV2();
QgsCompoundCurveV2( const QgsCompoundCurveV2& curve );
//QgsCompoundCurveV2 &operator=( const QgsCompoundCurveV2 & curve );
~QgsCompoundCurveV2();
virtual bool operator==( const QgsCurveV2& other ) const;
virtual bool operator!=( const QgsCurveV2& other ) const;
virtual QString geometryType() const;
virtual int dimension() const;
virtual QgsCompoundCurveV2* clone() const;
virtual void clear();
virtual QgsRectangle calculateBoundingBox() const;
virtual bool fromWkb( QgsConstWkbPtr wkb );
virtual bool fromWkt( const QString& wkt );
int wkbSize() const;
unsigned char* asWkb( int& binarySize ) const;
QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
QString asJSON( int precision = 17 ) const;
//curve interface
virtual double length() const;
virtual QgsPointV2 startPoint() const;
virtual QgsPointV2 endPoint() const;
virtual void points( QList<QgsPointV2>& pts ) const;
virtual int numPoints() const;
virtual QgsLineStringV2* curveToLine() const;
/** Returns the number of curves in the geometry.
*/
int nCurves() const;
/** Returns the curve at the specified index.
*/
const QgsCurveV2* curveAt( int i ) const;
/** Adds a curve to the geometr (takes ownership)
*/
void addCurve( QgsCurveV2* c /Transfer/ );
/** Removes a curve from the geometry.
* @param i index of curve to remove
*/
void removeCurve( int i );
/** Adds a vertex to the end of the geometry.
*/
void addVertex( const QgsPointV2& pt );
void draw( QPainter& p ) const;
/** Transforms the geometry using a coordinate transform
* @param ct coordinate transform
@param d transformation direction
*/
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform );
void transform( const QTransform& t );
void addToPainterPath( QPainterPath& path ) const;
void drawAsPolygon( QPainter& p ) const;
virtual bool insertVertex( QgsVertexId position, const QgsPointV2& vertex );
virtual bool moveVertex( QgsVertexId position, const QgsPointV2& newPos );
virtual bool deleteVertex( QgsVertexId position );
virtual double closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const;
bool pointAt( int node, QgsPointV2& point, QgsVertexId::VertexType& type ) const;
void sumUpArea( double& sum ) const;
/** Appends first point if not already closed.*/
void close();
bool hasCurvedSegments() const;
/** Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments.
@param vertex the vertex id
@return rotation in radians, clockwise from north*/
double vertexAngle( QgsVertexId vertex ) const;
virtual QgsCompoundCurveV2* reversed() const /Factory/;
virtual bool addZValue( double zValue = 0 );
virtual bool addMValue( double mValue = 0 );
virtual bool dropZValue();
virtual bool dropMValue();
};