tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

2d.reset.state.clip.html (670B)


      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.state.clip-expected.html">
      5 <title>Canvas test: 2d.reset.state.clip</title>
      6 <h1>2d.reset.state.clip</h1>
      7 <p class="desc">check that the clip is reset</p>
      8 <canvas id="canvas" width="200" height="200">
      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.beginPath();
     16  ctx.rect(0, 0, 100, 100);
     17  ctx.clip();
     18 
     19  ctx.fillRect(0, 0, 200, 200);
     20 
     21  ctx.reset();
     22 
     23  ctx.fillRect(0, 0, 200, 200);
     24 </script>