content/canvas/test/test_2d.isPointInPath.winding.html

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 <!DOCTYPE HTML>
     2 <title>Canvas test: 2d.isPointInPath.winding</title>
     3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
     4 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
     5 <body>
     6 <canvas id="c" width="100" height="100"><p class="fallback">FAIL (fallback content)</p></canvas>
     7 <script>
     8 SimpleTest.waitForExplicitFinish();
     9 addLoadEvent(function () {
    11 var canvas = document.getElementById('c');
    12 var ctx = canvas.getContext('2d');
    14 ctx.beginPath();
    15 ctx.rect(0, 0, 100, 100);
    16 ctx.rect(25, 25, 50, 50);
    17 ok(ctx.isPointInPath(50, 50));
    19 ctx.beginPath();
    20 ctx.rect(0, 0, 100, 100);
    21 ctx.rect(25, 25, 50, 50);
    22 ok(ctx.isPointInPath(50, 50, 'evenodd') == false);
    24 SimpleTest.finish();
    26 });
    27 </script>

mercurial