GraphicsPath.AddArc

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

GraphicsPath.AddArc(x As Double, y As Double, radius As Double, startAngle As Double, endAngle As Double, clockwise As Boolean)

New in 2019r2

Supported for all project types and targets.

Adds an arc to the path.

Parameters

Value Description
x The x-coordinate of the center point of the arc.
y The y-coordinate of the center point of the arc.
radius The radius of the arc.
startAngle The angle (in radians) that determines the starting point of the arc, measured from the x-axis.
endAngle The angle (in radians) that determines the ending point of the arc, measured from the x-axis.
clockwise A Boolean value that specifies whether or not to draw the arc in the clockwise direction.

Notes

The ending point of the Arc becomes the start point for the next element added to the path. In particular, if you add two arcs in a row, there will be a line that connects the ending point of the first arc to the starting point of the second arc. If you do not want this behavior, set the new starting point manually using MoveToPoint.

Sample Code

Draw an arc that is 1/4 of a circle:

Const Pi = 3.14159
Var arc As New GraphicsPath
arc.AddArc(50, 50, 20, 0, Pi / 2, False)
g.DrawPath(arc)