2d.reset.render.misc.html (788B)
1 <!DOCTYPE html> 2 <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> 3 <meta charset="UTF-8"> 4 <link rel="match" href="2d.reset.render.misc-expected.html"> 5 <title>Canvas test: 2d.reset.render.misc</title> 6 <h1>2d.reset.render.misc</h1> 7 <p class="desc">check that canvas correctly renders rectangles after reset (states not covered by other tests)</p> 8 <canvas id="canvas" width="400" height="400"> 9 <p class="fallback">FAIL (fallback content)</p> 10 </canvas> 11 <script> 12 const canvas = document.getElementById("canvas"); 13 const ctx = canvas.getContext('2d'); 14 15 ctx.fillStyle = "red"; 16 ctx.strokeStyle = "red"; 17 ctx.globalAlpha = 0.5; 18 ctx.filter = "blur(2px)"; 19 20 ctx.reset(); 21 22 ctx.fillRect(0, 0, 100, 100); 23 ctx.strokeRect(150, 150, 100, 100); 24 </script>