Thursday, 13 September 2012

HTML5 Canvas - Simple Drawing

This script shows how to draw simple graphics with Canvas in HTML5. The following techniques are adopted:

  1. Canvas for graphics.
  2. Draw lines.
  3. Draw rectangles.
  4. Draw circles.
  5. Draw text.

Output


When the file is viewed in a browser such as Chrome or Firefox, it appears as below.


Source Code



References


No comments:

Post a Comment