Lesson 2 – Drawing shapes on the canvas

Drawing Circles

Note!!!!  If your

 

Just as easy as drawing a line, there are two different ways you can draw a circle – but both revolve around the same method – arc() – which takes 6 parameters:

  1. x co-ordinate
  2. y co-ordinate
  3. Radius of the circle
  4. Starting angle in radians.
  5. Ending angle in radians.
  6. Whether the path is drawn anti-clockwise or not.

 


Drawing a circle with a stroke

To draw a hollow circle we just need to use the stroke method.

Challenge 1 – Draw the Olympic rings!

 

Can you recreate the Olympic rings?

 

Please  note all the material on this page was shamelessly lifted from here.