 |
Canvas - Dive Into HTML5
Getting back to that code sample in the previous example… Draw a rectangle var b_canvas = document.getElementById("b"); var b_context = b_canvas.getContext("2d"); b_context.fillRect(50, 25, 150, 100); Calling the fillRect() method draws the rectangle and
diveintohtml5.info |
 |