image-rendering-test.html (878B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/licenses/publicdomain/ 5 --> 6 <html reftest-zoom="2" class="reftest-wait"> 7 <head> 8 <title>test image-rendering</title> 9 <style> 10 canvas { position:absolute;left:0px;top:0px; } 11 </style> 12 <script type="text/javascript"> 13 document.addEventListener("MozReftestInvalidate", draw); 14 15 function draw() { 16 var canvas = document.getElementById("canvas"); 17 var ctx = canvas.getContext("2d"); 18 ctx.fillStyle = "rgb(255,0,0)"; 19 ctx.fillRect(25,25,100,100); 20 ctx.fillStyle = "rgb(0,255,0)"; 21 ctx.fillRect(25,25,50,50); 22 document.documentElement.removeAttribute('class'); 23 } 24 </script> 25 </head> 26 <body> 27 <canvas style="image-rendering: -moz-crisp-edges; " id="canvas" width="300" height="300"></canvas> 28 </body> 29 </html>