Document semantic of SegmentationToleranceType

.. and default of QgsCircularString::curveToLine

[ci skip]
This commit is contained in:
Sandro Santilli 2017-06-13 15:59:32 +02:00
parent a2e010c31e
commit 57bf9daaac
4 changed files with 17 additions and 2 deletions

View File

@ -59,7 +59,9 @@ class QgsAbstractGeometry
enum SegmentationToleranceType
{
MaximumAngle,
MaximumDifference
};

View File

@ -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

View File

@ -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
};

View File

@ -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;