1 Test the behavior of isPointInStroke in Canvas
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Initial behavior: lineWith = 1.0
7 PASS ctx.isPointInStroke(20,20) is true
8 PASS ctx.isPointInStroke(120,20) is true
9 PASS ctx.isPointInStroke(20,120) is true
10 PASS ctx.isPointInStroke(120,120) is true
11 PASS ctx.isPointInStroke(70,20) is true
12 PASS ctx.isPointInStroke(20,70) is true
13 PASS ctx.isPointInStroke(120,70) is true
14 PASS ctx.isPointInStroke(70,120) is true
15 PASS ctx.isPointInStroke(22,22) is false
16 PASS ctx.isPointInStroke(118,22) is false
17 PASS ctx.isPointInStroke(22,118) is false
18 PASS ctx.isPointInStroke(118,118) is false
19 PASS ctx.isPointInStroke(70,18) is false
20 PASS ctx.isPointInStroke(122,70) is false
21 PASS ctx.isPointInStroke(70,122) is false
22 PASS ctx.isPointInStroke(18,70) is false
25 PASS ctx.isPointInStroke(22,22) is true
26 PASS ctx.isPointInStroke(118,22) is true
27 PASS ctx.isPointInStroke(22,118) is true
28 PASS ctx.isPointInStroke(118,118) is true
29 PASS ctx.isPointInStroke(70,18) is true
30 PASS ctx.isPointInStroke(122,70) is true
31 PASS ctx.isPointInStroke(70,122) is true
32 PASS ctx.isPointInStroke(18,70) is true
33 PASS ctx.isPointInStroke(26,70) is false
34 PASS ctx.isPointInStroke(70,26) is false
35 PASS ctx.isPointInStroke(70,114) is false
36 PASS ctx.isPointInStroke(114,70) is false
38 Check lineJoin = 'bevel'
39 PASS ctx.isPointInStroke(113,20) is false
41 Check lineJoin = 'miter'
42 PASS ctx.isPointInStroke(113,20) is true
44 Check miterLimit = 2.0
45 PASS ctx.isPointInStroke(113,20) is false
47 Check lineCap = 'butt'
48 PASS ctx.isPointInStroke(112,10) is false
50 Check lineCap = 'round'
51 PASS ctx.isPointInStroke(112,10) is true
52 PASS ctx.isPointInStroke(117,10) is false
54 Check lineCap = 'square'
55 PASS ctx.isPointInStroke(112,10) is true
56 PASS ctx.isPointInStroke(117,10) is false
58 Check setLineDash([10,10])
59 PASS ctx.isPointInStroke(15,10) is true
60 PASS ctx.isPointInStroke(25,10) is false
61 PASS ctx.isPointInStroke(35,10) is true
64 PASS ctx.isPointInStroke(15,10) is false
65 PASS ctx.isPointInStroke(25,10) is true
66 PASS ctx.isPointInStroke(35,10) is false
67 Check extremely large scale
68 PASS ctx.isPointInStroke(0, 0) is true
69 Check with non-invertible ctm.
70 PASS ctx.isPointInStroke(0, 0) is false
71 PASS successfullyParsed is true