PathAddQuadraticCurve(PointF, PointF, PointF) Method

Adds a quadratic Bézier curve 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 AddQuadraticCurve(
	PointF p1,
	PointF p2,
	PointF p3
)

Parameters

p1  PointF
The starting point of the quadratic curve.
p2  PointF
The control point of the quadratic curve.
p3  PointF
The end point of the quadratic curve.

Return Value

Path
This Path instance.

Remarks

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 a quadratic Bézier curve defined by three points: the starting point, the control point, and the end point. To add a cubic Bézier curve, you can use the AddBezier method. Similarly, to add a conic curve, you can use the AddConicCurve method. In fact, this method transforms the quadratic curve into a cubic Bézier curve internally.

The parameters 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.

See Also