Click or drag to resize
CanvasPathBuilderAddArc Method (Vector2, Single, Single, Single, Single)
Adds a single arc to the path, specified as a portion of an ellipse.

Namespace:  Microsoft.Graphics.Canvas.Geometry
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public void AddArc(
	Vector2 centerPoint,
	float radiusX,
	float radiusY,
	float startAngle,
	float sweepAngle
)

Parameters

centerPoint
Type: System.NumericsVector2
radiusX
Type: SystemSingle
radiusY
Type: SystemSingle
startAngle
Type: SystemSingle
sweepAngle
Type: SystemSingle
Remarks

This overload defines an arc by first specifying an ellipse (center point and radius) and then choosing which portion of the ellipse the arc should cover.

The startAngle parameter specifies where on the ellipse the arc should begin. This is measured in radians, clockwise from the positive x axis.

The sweepAngle parameter specifies the size of the arc. This is measured in radians, clockwise relative to the startAngle. Negative sweepAngle values produce a counterclockwise arc. If sweepAngle is <= -2π or >= 2π, the arc becomes a complete ellipse. Sweep values greater than this range are clamped to one full revolution.

If the current path position is not the same as the point on the ellipse where the arc will begin, these will be automatically connected using a straight line.

See the AddArc(Vector2, Single, Single, Single, CanvasSweepDirection, CanvasArcSize) overload for an alternative way to specify arcs, which is more complicated but offers extra abilities such as the option to rotate the ellipse.

See Also