PathAddBeziers(PointF) Method

Adds a series of cubic 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 AddBeziers(
	params PointF[] points
)

Parameters

points  PointF
The points that define the cubic Bézier curves to add to this Path.

Return Value

Path
This Path instance.

Remarks

The allowed number of points in the points parameter is 0, 1, or a multiple of 3 plus 1.

When points has at least four items, the first four points define the first Bézier curve. Each additional three points define a new Bézier 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 cubic Bézier curves. A cubic Bézier curve is defined by four points: the starting point, two control points, and the end point. To add quadratic Bézier curves, you can use the AddQuadraticCurves method. In fact, that will transform the quadratic curves into cubic Bézier curve 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 a multiple of 3 plus 1.

See Also