source: trunk/examples/script/context2d/scripts/fill1.js

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

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

File size: 273 bytes
Line 
1var ctx = document.getElementById('tutorial').getContext('2d');
2 for (i=0;i<6;i++){
3 for (j=0;j<6;j++){
4 ctx.fillStyle = 'rgb(' + Math.floor(255-42.5*i) + ',' +
5 Math.floor(255-42.5*j) + ',0)';
6 ctx.fillRect(j*25,i*25,25,25);
7 }
8 }
Note: See TracBrowser for help on using the repository browser.