2d.reset.render.global_composite_operation.html (795B)
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.global_composite_operation-expected.html"> 5 <title>Canvas test: 2d.reset.render.global_composite_operation</title> 6 <h1>2d.reset.render.global_composite_operation</h1> 7 <p class="desc">check that canvas correctly renders rectangles with the default global composite operation after reset</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.globalCompositeOperation = "xor"; 16 17 ctx.reset(); 18 19 ctx.fillRect(10, 10, 100, 100); 20 ctx.fillRect(50, 50, 100, 100); 21 </script>