2 <title>Canvas test:
2d.path.isPointInPath.bigarc
</title>
3 <!-- Testing: isPointInPath() works on unclosed arcs larger than 2pi -->
4 <script src=
"/MochiKit/MochiKit.js"></script>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css">
8 <canvas id=
"c" width=
"100" height=
"50"><p class=
"fallback">FAIL (fallback content)
</p></canvas>
11 SimpleTest
.waitForExplicitFinish();
12 MochiKit
.DOM
.addLoadEvent(function () {
14 var canvas
= document
.getElementById('c');
15 var ctx
= canvas
.getContext('2d');
17 ctx
.arc(50, 25, 10, 0, 7, false);
18 ok(ctx
.isPointInPath(50, 10) === false, "ctx.isPointInPath(50, 10) === false");
19 ok(ctx
.isPointInPath(50, 20) === true, "ctx.isPointInPath(50, 20) === true");
20 ok(ctx
.isPointInPath(50, 30) === true, "ctx.isPointInPath(50, 30) === true");
21 ok(ctx
.isPointInPath(50, 40) === false, "ctx.isPointInPath(50, 40) === false");
22 ok(ctx
.isPointInPath(30, 20) === false, "ctx.isPointInPath(30, 20) === false");
23 ok(ctx
.isPointInPath(70, 20) === false, "ctx.isPointInPath(70, 20) === false");
24 ok(ctx
.isPointInPath(30, 30) === false, "ctx.isPointInPath(30, 30) === false");
25 ok(ctx
.isPointInPath(70, 30) === false, "ctx.isPointInPath(70, 30) === false");