source:
trunk/examples/script/context2d/scripts/bezier.js@
275
Last change on this file since 275 was 2, checked in by , 16 years ago | |
---|---|
File size: 688 bytes |
Line | |
---|---|
1 | function drawShape() { |
2 | // get the canvas element using the DOM |
3 | var canvas = document.getElementById('tutorial'); |
4 | |
5 | // Make sure we don't execute when canvas isn't supported |
6 | if (canvas.getContext){ |
7 | |
8 | // use getContext to use the canvas for drawing |
9 | var ctx = canvas.getContext('2d'); |
10 | |
11 | // Draw shapes |