PathAddPie(RectangleF, Single, Single) Method

Adds a pie shape 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 AddPie(
	RectangleF bounds,
	float startAngle,
	float sweepAngle
)

Parameters

bounds  RectangleF
The bounding rectangle that defines the ellipse from which the pie is drawn.
startAngle  Single
The starting angle of the pie shape, measured in degrees clockwise from the x-axis.
sweepAngle  Single
The sweep angle of the pie shape, measured in degrees clockwise from startAngle.

Return Value

Path
This Path instance.

Remarks

The pie shape is defined by a partial outline of an ellipse and the two radial lines that intersect the endpoints of the partial outline. The pie shape is added as a new closed 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