4 There should be a green square, followed by
6 squares of shades of green from white to full green.
<br>
5 <canvas id=
"canvas" width=
"700" height=
"100" ></canvas>
8 testRunner
.dumpAsTextWithPixelResults();
10 var canvas
= document
.getElementById("canvas");
11 var context
= canvas
.getContext("2d");
12 context
.fillStyle
= 'green';
13 context
.fillRect(0,0,100,100);
14 var context2
= canvas
.getContext("2d");
15 context2
.globalAlpha
= 0.0;
16 context2
.drawImage(canvas
, 0, 0, 100, 100, 100, 0, 100, 100);
17 context2
.globalAlpha
= 0.2;
18 context2
.drawImage(canvas
, 0, 0, 100, 100, 200, 0, 100, 100);
19 context2
.globalAlpha
= 0.4;
20 context2
.drawImage(canvas
, 0, 0, 100, 100, 300, 0, 100, 100);
21 context2
.globalAlpha
= 0.6;
22 context2
.drawImage(canvas
, 0, 0, 100, 100, 400, 0, 100, 100);
23 context2
.globalAlpha
= 0.8;
24 context2
.drawImage(canvas
, 0, 0, 100, 100, 500, 0, 100, 100);
25 context2
.globalAlpha
= 1.0;
26 context2
.drawImage(canvas
, 0, 0, 100, 100, 600, 0, 100, 100);