source: trunk/examples/script/context2d/scripts/bezier.js@ 275

Last change on this file since 275 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 688 bytes
Line 
1function drawShape() {
2// get the canvas element using the DOM
3var 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