arc()
Arc - Draws an Arc with the given inputs
Example
arc(200, 200, 300, 150, 0, 90)
Syntax
arc(x, y, width, height, Starting angle, Ending angle)
Input
Description
x
x co-ordinate of the center
y
y co-ordinate of the center
width
width of the arc (length in x direction)
height
height of the arc (length in y direction)
starting angle
counter-clockwise angle of first arc arm from the positive x-axis
ending angle
counter-clockwise angle of second arc arm from the positive x-axis
(x, y, width, height...)
(x, y, width, height...)

(..., Starting angle, ...)
(..., Starting angle, ...)

(..., Ending angle)
(..., Ending angle)

Description
arc() draws an arc on the canvas, using the inputs to determine the position and dimension of the shape. The width and height of the arc must always be parallel to the x-axis and y-axis respectively - this can only be changed separately with a rotation. The starting and ending angle must always be given in a counter-clockwise direction starting from the positive x-axis.
Last updated