39 const double QgsClipper::SMALL_NUM = 1e-12;
 
   48   const int nPoints = curve.size();
 
   50   double p0x, p0y, p1x = 0.0, p1y = 0.0; 
 
   52   double lastClipX = 0.0, lastClipY = 0.0; 
 
   55   line.reserve( nPoints + 1 );
 
   57   const QPointF *curveData = curve.data();
 
   59   for ( 
int i = 0; i < nPoints; ++i )
 
   77                             p0x, p0y, p1x_c,  p1y_c ) )
 
   83           connectSeparatedLines( lastClipX, lastClipY, p0x, p0y, clipExtent, line );
 
   85         if ( line.empty() || newLine )
 
   88           line << QPointF( p0x, p0y );
 
   94         line << QPointF( p1x_c,  p1y_c );
 
  102 void QgsClipper::connectSeparatedLines( 
double x0, 
double y0, 
double x1, 
double y1,
 
static const double MAX_X
Maximum X-coordinate of the rectangular box used for clipping.
static const double MIN_Y
Minimum Y-coordinate of the rectangular box used for clipping.
static const double MAX_Y
Maximum Y-coordinate of the rectangular box used for clipping.
static QPolygonF clippedLine(const QgsCurve &curve, const QgsRectangle &clipExtent)
Takes a linestring and clips it to clipExtent.
static const double MIN_X
Minimum X-coordinate of the rectangular box used for clipping.
Abstract base class for curved geometry type.
virtual QPolygonF asQPolygonF() const
Returns a QPolygonF representing the points.
A rectangle specified with double values.
double yMaximum() const SIP_HOLDGIL
Returns the y maximum value (top side of rectangle).
double xMaximum() const SIP_HOLDGIL
Returns the x maximum value (right side of rectangle).
double xMinimum() const SIP_HOLDGIL
Returns the x minimum value (left side of rectangle).
double yMinimum() const SIP_HOLDGIL
Returns the y minimum value (bottom side of rectangle).
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)