PathAddArc(PointF, PointF, Single, Single, Single, Boolean, Boolean) Method

Adds and elliptical arc between two points 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 AddArc(
	PointF startPoint,
	PointF endPoint,
	float radiusX,
	float radiusY,
	float rotationAngle,
	bool isLargeArc,
	bool isClockwise
)

Parameters

startPoint  PointF
The starting point of the arc to add.
endPoint  PointF
The end point of the arc to add.
radiusX  Single
The radius along the x-axis of the ellipse from which the arc is drawn.
radiusY  Single
The radius along the y-axis of the ellipse from which the arc is drawn.
rotationAngle  Single
The angle, in degrees, by which the ellipse is rotated relative to the x-axis.
isLargeArc  Boolean
if the arc span is 180 degrees or greater; otherwise, .
isClockwise  Boolean
if the arc is drawn in a clockwise direction; otherwise, .

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.

This overload provides the same parameters that are used in SVG paths for elliptical arcs, and also by several XAML-based frameworks, such as WPF, UWP, and WinUI.

Though some edge cases are handled, the parameters are not completely 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.

  Note

According to the SVG specification, if the start and end points are identical, a single point is added to the path. Similarly, if either radius is zero, a straight line segment is added between the start and end points. Please note though, that the tolerances may vary among different SVG applications (e.g. browsers), and also between WPF and other XAML-based frameworks.

See Also