|
Last change
on this file since 268 was 2, checked in by Dmitry A. Kuminov, 17 years ago |
|
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
|
File size:
549 bytes
|
| Line | |
|---|
| 1 | var ctx = document.getElementById('tutorial').getContext('2d');
|
|---|
| 2 |
|
|---|
| 3 | // Draw background
|
|---|
| 4 | ctx.fillStyle = 'rgb(255,221,0)';
|
|---|
| 5 | ctx.fillRect(0,0,150,37.5);
|
|---|
| 6 | ctx.fillStyle = 'rgb(102,204,0)';
|
|---|
| 7 | ctx.fillRect(0,37.5,150,37.5);
|
|---|
| 8 | ctx.fillStyle = 'rgb(0,153,255)';
|
|---|
| 9 | ctx.fillRect(0,75,150,37.5);
|
|---|
| 10 | ctx.fillStyle = 'rgb(255,51,0)';
|
|---|
| 11 | ctx.fillRect(0,112.5,150,37.5);
|
|---|
| 12 |
|
|---|
| 13 | // Draw semi transparent rectangles
|
|---|
| 14 | for (i=0;i<10;i++){
|
|---|
| 15 | ctx.fillStyle = 'rgba(255,255,255,'+(i+1)/10+')';
|
|---|
| 16 | for (j=0;j<4;j++){
|
|---|
| 17 | ctx.fillRect(5+i*14,5+j*37.5,14,27.5)
|
|---|
| 18 | }
|
|---|
| 19 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.