OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <body> | |
3 <script> | |
4 var canvas = document.createElement('canvas'); | |
5 canvas.setAttribute('width', '400'); | |
6 canvas.setAttribute('height', '300'); | |
7 var ctx = canvas.getContext('2d'); | |
8 document.body.appendChild(canvas); | |
9 | |
10 ctx.fillStyle = 'green'; | |
11 ctx.fillRect(0, 0, 100, 100); | |
Stephen White
2013/07/25 18:01:07
Consider making these rects (and the canvas) small
| |
12 ctx.fillRect(110, 0, 100, 100); | |
13 ctx.fillRect(220, 0, 100, 100); | |
14 ctx.fillRect(0, 110, 100, 100); | |
15 ctx.fillRect(110, 110, 100, 100); | |
16 ctx.fillRect(220, 110, 100, 100); | |
17 | |
18 </script> | |
19 <p>There should be 6 green squares displayed in a 2 row by 3 column grid.</p> | |
20 </body> | |
21 </html> | |
OLD | NEW |