chang.shu@nokia.com | d5cb910 | 2010-05-21 20:47:13 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <title>Canvas test: 2d.path.isPointInPath.transform.3</title> |
| 3 | <script src="../tests.js"></script> |
| 4 | <link rel="stylesheet" href="../tests.css"> |
andreas.kling@nokia.com | 7817c16 | 2010-11-07 13:49:39 +0000 | [diff] [blame] | 5 | <body> |
| 6 | <p id="passtext">Pass</p> |
| 7 | <p id="failtext">Fail</p> |
| 8 | <p class="output">These images should be identical:</p> |
chang.shu@nokia.com | d5cb910 | 2010-05-21 20:47:13 +0000 | [diff] [blame] | 9 | <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> |
| 10 | |
| 11 | <ul id="d"></ul> |
| 12 | <script> |
| 13 | _addTest(function(canvas, ctx) { |
| 14 | |
| 15 | ctx.scale(-1, 1); |
| 16 | ctx.rect(-70, 0, 20, 20); |
| 17 | _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false"); |
| 18 | _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false"); |
| 19 | _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false"); |
| 20 | _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true"); |
| 21 | _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true"); |
| 22 | _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false"); |
| 23 | |
| 24 | |
| 25 | }); |
| 26 | </script> |
| 27 | |