tor-browser

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

imageBitmapRendering-transferFromImageBitmap-expected.html (684B)


      1 <!DOCTYPE html>
      2 <body>
      3  <p>Test whether the imageOrientation "from-image" works when creating an ImageBitmap from the ImageData of a canvas, and then transfered to an ImageBitmapRenderingContext.</p>
      4  <canvas id="canvas" width="300" height="300"></canvas>
      5 </body>
      6 <script>
      7 
      8 function drawSquares(ctx) {
      9  ctx.fillStyle = 'red';
     10  ctx.fillRect(0,0,150,150);
     11  ctx.fillStyle = 'green';
     12  ctx.fillRect(150,0,300,150);
     13  ctx.fillStyle = 'blue';
     14  ctx.fillRect(0,150,150,300);
     15 }
     16 
     17 async function runTest() {
     18  const canvas = document.getElementById('canvas');
     19  canvas.width = 300;
     20  canvas.height = 300;
     21  const ctx = canvas.getContext('2d');
     22  drawSquares(ctx);
     23 }
     24 
     25 runTest();
     26 
     27 </script>