In the last article I showed you how to draw basic shapes and paths; in this section I'm going to show you how to take things a step further and draw circles. It's not as easy as you might think, but it's still not hard at all.

There isn't a method in canvas that lets you draw a circle with a single line of code, like how fillRect works for rectangles. Instead, you have to draw circles with a path using the arc method; a circle is merely a 360 degree arc. The reason for this is that circles are actually very complex shapes, and the arc method allows for all sorts of control over the way that you draw them. For example, you might want to only draw a semi-circle. The arc method allows you to do that. You could even combine the arc method with standard straight paths to draw pizza slices and quarter circles.