Draws a circle.
A circle is a round shape defined by the x
, y
, and d
parameters. x
and y
set the location of its center. d
sets its width and height (diameter). Every point on the circle's edge is the same distance, 0.5 * d
, from its center. 0.5 * d
(half the diameter) is the circle's radius. See ellipseMode() for other ways to set its position.
Examples
Syntax
circle(x, y, d)
Parameters
x
Number:
x-coordinate of the center of the circle.
y
Number:
y-coordinate of the center of the circle.
d
Number:
diameter of the circle.
Notice any errors or typos? Please let us know. Please feel free to edit src/core/shape/2d_primitives.js and open a pull request!