1050788-1.html (717B)
1 <html class="reftest-wait"> 2 <head> 3 <script> 4 function doTest() { 5 var c = document.getElementById('c'); 6 var ctx = c.getContext('2d'); 7 8 ctx.transform(1, 0, 0, 1, 0.5, 0.5); 9 10 ctx.moveTo(0,0); 11 ctx.lineTo(100,0); 12 ctx.lineTo(100, 100); 13 ctx.lineTo(0,100); 14 ctx.closePath(); 15 16 ctx.moveTo(0,0); 17 ctx.lineTo(100,0); 18 ctx.lineTo(100, 100); 19 ctx.lineTo(0,100); 20 ctx.closePath(); 21 22 ctx.clip('evenodd'); 23 24 ctx.fillStyle = 'red'; 25 ctx.fillRect(0,0,400,400); 26 27 document.documentElement.removeAttribute("class"); 28 } 29 </script> 30 </head> 31 <body onload="doTest()"> 32 <canvas id="c" width="400" height="400"></canvas> 33 </body> 34 </body></html>