Path.FitCurves Method (Single, Single)

Applies to: Graphics Mill 12.1, 6.x-12.x (may differ)

Replaces the polylines of the path with cubic Bezier curves, using the specified corner angle.

Namespace: Aurigma.GraphicsMill.Drawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public void FitCurves(
	float tolerance,
	float cornerAngle
)

Parameters

tolerance

Type: System.Single

The largest allowed distance from the curves to the points of the polylines, in path units. Must be greater than 0.
cornerAngle

Type: System.Single

The smallest turn of direction, in degrees, that keeps a point as a sharp corner. In range [0, 180].

Remarks

This method uses the Schneider algorithm. The turn of direction is measured between the directions at 4 * tolerance before and after the point.

If cornerAngle is 0, every subpath becomes one smooth curve.

The curves pass within tolerance of every input point. So this method does not smooth away steps that are larger than tolerance, for example, the steps of an outline from GetAlphaContour(). To get a smooth outline of a bitmap, trace it with GetContour().

Curves are converted to polylines first.

Exceptions

Exception Condition
System.ArgumentOutOfRangeException The tolerance is not greater than 0, or the angle is out of range.

See Also

Reference

Manual