Adding Line, Circle and Rectangle drawing on canvas in HTML5

I am using Sketchpad JS library for simple Canvas drawing, so far it works perfectly, and very useful, has any one try to customize it to draw Circle, Line and Rectangle and Eraser like functions?

Any code help will be appreciated.