Skip to content
Permalink
Browse files

Document semantic of SegmentationToleranceType

.. and default of QgsCircularString::curveToLine

[ci skip]
  • Loading branch information
strk committed Jun 21, 2017
1 parent a2e010c commit 57bf9daaac6245b9f62e8ad01900b046210b381e
@@ -59,7 +59,9 @@ class QgsAbstractGeometry

enum SegmentationToleranceType
{

MaximumAngle,

MaximumDifference
};

@@ -74,7 +74,10 @@ class QgsCircularString: QgsCurve
Returns a new line string geometry corresponding to a segmentized approximation
of the curve.
\param tolerance segmentation tolerance
\param toleranceType maximum segmentation angle or maximum difference between approximation and curve*
\param toleranceType maximum segmentation angle or maximum difference between approximation and curve

Uses a MaximumAngle tolerance of 1 degrees by default (360
segments in a full circle)
:rtype: QgsLineString
%End

@@ -88,7 +88,13 @@ class CORE_EXPORT QgsAbstractGeometry
//! Segmentation tolerance as maximum angle or maximum difference between approximation and circle
enum SegmentationToleranceType
{

/** Maximum angle between generating radii (lines from arc center
* to output vertices) */
MaximumAngle = 0,

/** Maximum distance between an arbitrary point on the original
* curve and closest point on its approximation. */
MaximumDifference
};

@@ -72,7 +72,11 @@ class CORE_EXPORT QgsCircularString: public QgsCurve
/** Returns a new line string geometry corresponding to a segmentized approximation
* of the curve.
* \param tolerance segmentation tolerance
* \param toleranceType maximum segmentation angle or maximum difference between approximation and curve*/
* \param toleranceType maximum segmentation angle or maximum difference between approximation and curve
*
* Uses a MaximumAngle tolerance of 1 degrees by default (360
* segments in a full circle)
*/
virtual QgsLineString *curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const override SIP_FACTORY;

void draw( QPainter &p ) const override;

0 comments on commit 57bf9da

Please sign in to comment.
You can’t perform that action at this time.