PathAddQuadraticCurves(IEnumerablePointF) Method

Adds a series of quadratic Bézier curves to this Path.

Definition

Namespace: KGySoft.Drawing.Shapes
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
C#
public Path AddQuadraticCurves(
	IEnumerable<PointF> points
)

Parameters

points  IEnumerablePointF
The points that define the quadratic Bézier curves to add to this Path.

Return Value

Path
This Path instance.

Remarks

points must have 0 or an odd number of items.

When points has at least three items, the first three points define the first quadratic curve. Each additional two points define a new quadratic curve, where the last point of the previous curve is the starting point of the next curve.

If the current figure is not empty or closed, the first point of the added curve will be connected to the last point of the figure.

This method adds quadratic Bézier curves. A quadratic Bézier curve is defined by three points: the starting point, the control point, and the end point. To add cubic Bézier curves, you can use the AddBeziers method. In fact, this method transforms the quadratic curves into cubic Bézier curves internally.

The coordinates of the specified points are not validated here, but in the moment of drawing the coordinates of the possibly transformed path points must fall into the bounds of an int value; otherwise, an OverflowException will be thrown.

Exceptions

ArgumentNullExceptionpoints is .
ArgumentExceptionThe number of points is not zero, or an odd number.

See Also