PathAddConicCurve(Single, Single, Single, Single, Single, Single, 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(
	float x1,
	float y1,
	float x2,
	float y2,
	float x3,
	float y3,
	float weight
)

Parameters

x1  Single
The x-coordinate of the starting point of the conic curve.
y1  Single
The y-coordinate of the starting point of the conic curve.
x2  Single
The x-coordinate of the control point of the conic curve.
y2  Single
The y-coordinate of the control point of the conic curve.
x3  Single
The x-coordinate of the end point of the conic curve.
y3  Single
The y-coordinate of the end 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 must be a finite non-negative value.

See Also