arc()
Arc - Draws an Arc with the given inputs
Example
Syntax
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.
Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!
We'd love to hear your Feedback/Comments here.
Last updated