PathAddConicCurve(PointF, PointF, PointF, Single) Method

Adds a conic 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 AddConicCurve(
	PointF p1,
	PointF p2,
	PointF p3,
	float weight
)

Parameters

p1  PointF
The starting point of the conic curve.
p2  PointF
The control point of the conic curve.
p3  PointF
The ending point of the conic curve.
weight  Single
The weight of the conic curve, which determines the shape of the curve. Must be a positive value.

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.

If the weight is 1, the conic curve is equivalent to a parabolic (quadratic) Bézier curve. If the weight is less than 1, the curve is an elliptic arc, and if it's greater than 1, the curve is a hyperbolic arc.

This method transforms the conic curve into a 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

ArgumentOutOfRangeExceptionweight is negative, too large, or is not a number.

See Also