2 Any copyright is dedicated to the Public Domain.
3 http://creativecommons.org/publicdomain/zero/1.0/
5 <svg xmlns=
"http://www.w3.org/2000/svg">
7 <title>Test 'stroke-linecap: round' with zero length path segments
</title>
9 <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=1075399 for paths and
10 https://bugzilla.mozilla.org/show_bug.cgi?id=1187770 for lines -->
16 stroke-linecap: round;
23 /* expect lime circles to cover red circles */
24 path.circles-expected, line.circles-expected {
28 path.circles-not-expected {
32 /* thicker stroke to cover circles-not-expected paths */
38 /* to show edges of shapes to help in debugging:
51 <rect width=
"100%" height=
"100%" style=
"fill:lime"/>
53 <!-- Column 1: test single segment zero-length subpaths: -->
55 <g transform=
"translate(25,25)">
56 <circle cx=
"0" cy=
"0" r=
"8"/>
57 <circle cx=
"50" cy=
"50" r=
"8"/>
58 <circle cx=
"100" cy=
"100" r=
"8"/>
59 <path class=
"circles-expected" d=
"M0,0 L0,0 M20,20 L30,30 M50,50 L50,50 M70,70 L80,80 M100,100 L100,100"/>
62 <g transform=
"translate(25,75)">
63 <circle cx=
"0" cy=
"0" r=
"8"/>
64 <circle cx=
"50" cy=
"50" r=
"8"/>
65 <circle cx=
"100" cy=
"100" r=
"8"/>
66 <path class=
"circles-expected" d=
"M0,0 C0,0 0,0 0,0 M20,20 L30,30 M50,50 C50,50 50,50 50,50 M70,70 L80,80 M100,100 C100,100 100,100 100,100"/>
69 <g transform=
"translate(25,125)">
70 <circle cx=
"0" cy=
"0" r=
"8"/>
71 <circle cx=
"50" cy=
"50" r=
"8"/>
72 <circle cx=
"100" cy=
"100" r=
"8"/>
73 <path class=
"circles-expected" d=
"M0,0 A0,10 0 0 0 0,0 M20,20 L30,30 M50,50 A0,10 0 0 0 50,50 M70,70 L80,80 M100,100 A0,10 0 0 0 100,100"/>
76 <g transform=
"translate(25,175)">
77 <circle cx=
"0" cy=
"0" r=
"8"/>
78 <circle cx=
"50" cy=
"50" r=
"8"/>
79 <circle cx=
"100" cy=
"100" r=
"8"/>
80 <path class=
"circles-expected" d=
"M0,0 Z M20,20 L30,30 M50,50 Z M70,70 L80,80 M100,100 Z"/>
84 <!-- Column 2: test multi-segment zero-length subpaths: -->
86 <g transform=
"translate(175,25)">
87 <circle cx=
"0" cy=
"0" r=
"8"/>
88 <circle cx=
"50" cy=
"50" r=
"8"/>
89 <circle cx=
"100" cy=
"100" r=
"8"/>
90 <path class=
"circles-expected" d=
"M0,0 L0,0 M0,0 L0,0 M20,20 L30,30 M50,50 L50,50 L50,50 M70,70 L80,80 M100,100 L100,100 L100,100"/>
93 <g transform=
"translate(177,75)">
94 <circle cx=
"0" cy=
"0" r=
"8"/>
95 <circle cx=
"50" cy=
"50" r=
"8"/>
96 <circle cx=
"100" cy=
"100" r=
"8"/>
97 <path class=
"circles-expected" d=
"M0,0 C0,0 0,0 0,0 C0,0 0,0 0,0 M20,20 L30,30 M50,50 C50,50 50,50 50,50 C50,50 50,50 50,50 M70,70 L80,80 M100,100 C100,100 100,100 100,100 C100,100 100,100 100,100"/>
100 <g transform=
"translate(175,125)">
101 <circle cx=
"0" cy=
"0" r=
"8"/>
102 <circle cx=
"50" cy=
"50" r=
"8"/>
103 <circle cx=
"100" cy=
"100" r=
"8"/>
104 <path class=
"circles-expected" d=
"M0,0 A0,10 0 0 0 0,0 A0,10 0 0 0 0,0 M20,20 L30,30 M50,50 A0,10 0 0 0 50,50 A0,10 0 0 0 50,50 M70,70 L80,80 M100,100 A0,10 0 0 0 100,100 A0,10 0 0 0 100,100"/>
107 <g transform=
"translate(175,175)">
108 <circle cx=
"0" cy=
"0" r=
"8"/>
109 <circle cx=
"50" cy=
"50" r=
"8"/>
110 <circle cx=
"100" cy=
"100" r=
"8"/>
111 <path class=
"circles-expected" d=
"M0,0 Z Z M20,20 L30,30 M50,50 Z Z M70,70 L80,80 M100,100 Z Z"/>
115 <!-- Column 3: test non-zero-length subpaths that begin, end and contain
116 zero length segments: -->
118 <g transform=
"translate(325,25)">
119 <path class=
"circles-not-expected" d=
"M20,20 L20,20 L30,30 L30,30 L40,40 L40,40"/>
120 <path class=
"coverer" d=
"M20,20 L40,40"/>
123 <g transform=
"translate(325,75)">
124 <path class=
"circles-not-expected" d=
"M20,20 C20,20 20,20 20,20 C20,20 30,30 30,30 C30,30 30,30 30,30 C30,30 40,40 40,40 C40,40 40,40 40,40"/>
125 <path class=
"coverer" d=
"M20,20 L40,40"/>
128 <g transform=
"translate(325,125)">
129 <path class=
"circles-not-expected" d=
"M20,20 A0,10 0 0 0 20,20 A0,10 0 0 0 30,30 A0,10 0 0 0 30,30 A0,10 0 0 0 40,40 A0,10 0 0 0 40,40"/>
130 <path class=
"coverer" d=
"M20,20 L40,40"/>
133 <!-- this one is shorter because the Z's mean we only have path end points
135 <g transform=
"translate(325,175)">
136 <circle cx=
"20" cy=
"20" r=
"8"/>
137 <path class=
"circles-expected" d=
"M20,20 Z L30,30 Z L40,40 Z"/>
141 <!-- Column 4: test lone movetos -->
143 <g transform=
"translate(425,25)">
144 <path class=
"circles-not-expected" d=
"M0,0 M0,0 M20,20 L30,30 M50,50 M50,50 M70,70 L80,80 M100,100 M100,100"/>
145 <path class=
"coverer" d=
"M20,20 L30,30 M70,70 L80,80"/>
148 <!-- Column 5: test stroke-dasharray -->
150 <g transform=
"translate(525,25)">
151 <circle cy=
"0" r=
"8"/>
152 <circle cy=
"40" r=
"8"/>
153 <circle cy=
"80" r=
"8"/>
154 <path class=
"circles-expected" d=
"M0,0v81" stroke-dasharray=
"0 40" />
156 <g transform=
"translate(575,25)">
157 <circle cy=
"0" r=
"8"/>
158 <circle cy=
"40" r=
"8"/>
159 <circle cy=
"80" r=
"8"/>
160 <path class=
"circles-expected" d=
"M0,0v81" stroke-dasharray=
"0" />
163 <!-- Column 6: test zero-length line -->
164 <g transform=
"translate(625, 25)">
165 <circle cy=
"0" r=
"8" />
166 <line class=
"circles-expected" x1=
"0" y1=
"0" x2=
"0" y2=
"0" />