PathAddArc(Single, Single, Single, Single, Single, Single) Method

Adds an elliptical arc to this Path.

Definition

Namespace: KGySoft.Drawing.Shapes
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 9.1.1
C#
public Path AddArc(
	float x,
	float y,
	float width,
	float height,
	float startAngle,
	float sweepAngle
)

Parameters

x  Single
The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the arc is drawn.
y  Single
The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the arc is drawn.
width  Single
The width of the bounding rectangle that defines the ellipse from which the arc is drawn.
height  Single
The height of the bounding rectangle that defines the ellipse from which the arc is drawn.
startAngle  Single
The starting angle of the arc, measured in degrees clockwise from the x-axis.
sweepAngle  Single
The sweep angle of the arc, measured in degrees clockwise from startAngle. If its absolute value is greater than or equal to 360, a complete ellipse is added to the path.

Return Value

Path
This Path instance.

Remarks

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

The coordinates of the specified bounding rectangle 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