How to Draw a Circle With HTML5 Canvas
Draw a circle in a cavas html element using the arc method.
The arc canvas API method takes five (or optionally 6) arguments.
x The x-coordinate of the center of the circle,
y The y-coordinate of the center of the circle,
r The radius of the circle,
sAngle The starting angle, in radians (0 is at the 3 o’clock position of the arc’s circle),
eAngle The ending angle.
Note that the start / end angle of the arc is expressed in radians. That is why the end angle is
2*PI is equivalent to 360 degrees.
Thanks for reading. If you enjoyed this post, I invite you to explore more of my site. I write about web development, programming, and other fun stuff.