37 const double QgsClipper::SMALL_NUM = 1e-12;
43 unsigned int wkbType, nPoints;
45 wkbPtr >> wkbType >> nPoints;
49 double p0x, p0y, p1x = 0.0, p1y = 0.0;
51 double lastClipX = 0.0, lastClipY = 0.0;
54 line.reserve( nPoints + 1 );
56 for (
unsigned int i = 0; i < nPoints; ++i )
62 wkbPtr +=
sizeof( double );
73 wkbPtr +=
sizeof( double );
75 p1x_c = p1x; p1y_c = p1y;
77 p0x, p0y, p1x_c, p1y_c ) )
79 bool newLine = line.size() > 0 && ( p0x != lastClipX || p0y != lastClipY );
83 connectSeparatedLines( lastClipX, lastClipY, p0x, p0y, clipExtent, line );
85 if ( line.size() < 1 || newLine )
88 line << QPointF( p0x, p0y );
92 lastClipX = p1x_c; lastClipY = p1y_c;
93 line << QPointF( p1x_c, p1y_c );
100 void QgsClipper::connectSeparatedLines(
double x0,
double y0,
double x1,
double y1,