source:
trunk/examples/script/context2d/scripts/fill1.js@
268
| Last change on this file since 268 was 2, checked in by , 17 years ago | |
|---|---|
| File size: 273 bytes | |
| Line | |
|---|---|
| 1 | var 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.
