OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include "PathOpsExtendedTest.h" | 7 #include "PathOpsExtendedTest.h" |
8 | 8 |
9 #define TEST(name) { name, #name } | 9 #define TEST(name) { name, #name } |
10 | 10 |
11 static void cubicOp1d(skiatest::Reporter* reporter) { | 11 static void cubicOp1d(skiatest::Reporter* reporter, const char* filename) { |
12 SkPath path, pathB; | 12 SkPath path, pathB; |
13 path.setFillType(SkPath::kWinding_FillType); | 13 path.setFillType(SkPath::kWinding_FillType); |
14 path.moveTo(0,1); | 14 path.moveTo(0,1); |
15 path.cubicTo(0,2, 1,0, 1,0); | 15 path.cubicTo(0,2, 1,0, 1,0); |
16 path.close(); | 16 path.close(); |
17 pathB.setFillType(SkPath::kWinding_FillType); | 17 pathB.setFillType(SkPath::kWinding_FillType); |
18 pathB.moveTo(0,1); | 18 pathB.moveTo(0,1); |
19 pathB.cubicTo(0,1, 1,0, 2,0); | 19 pathB.cubicTo(0,1, 1,0, 2,0); |
20 pathB.close(); | 20 pathB.close(); |
21 testPathOp(reporter, path, pathB, kDifference_PathOp); | 21 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
22 } | 22 } |
23 | 23 |
24 static void cubicOp2d(skiatest::Reporter* reporter) { | 24 static void cubicOp2d(skiatest::Reporter* reporter, const char* filename) { |
25 SkPath path, pathB; | 25 SkPath path, pathB; |
26 path.setFillType(SkPath::kWinding_FillType); | 26 path.setFillType(SkPath::kWinding_FillType); |
27 path.moveTo(0,2); | 27 path.moveTo(0,2); |
28 path.cubicTo(0,1, 1,0, 1,0); | 28 path.cubicTo(0,1, 1,0, 1,0); |
29 path.close(); | 29 path.close(); |
30 pathB.setFillType(SkPath::kWinding_FillType); | 30 pathB.setFillType(SkPath::kWinding_FillType); |
31 pathB.moveTo(0,1); | 31 pathB.moveTo(0,1); |
32 pathB.cubicTo(0,1, 2,0, 1,0); | 32 pathB.cubicTo(0,1, 2,0, 1,0); |
33 pathB.close(); | 33 pathB.close(); |
34 testPathOp(reporter, path, pathB, kDifference_PathOp); | 34 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
35 } | 35 } |
36 | 36 |
37 static void cubicOp3d(skiatest::Reporter* reporter) { | 37 static void cubicOp3d(skiatest::Reporter* reporter, const char* filename) { |
38 SkPath path, pathB; | 38 SkPath path, pathB; |
39 path.setFillType(SkPath::kWinding_FillType); | 39 path.setFillType(SkPath::kWinding_FillType); |
40 path.moveTo(0,1); | 40 path.moveTo(0,1); |
41 path.cubicTo(2,3, 1,0, 1,0); | 41 path.cubicTo(2,3, 1,0, 1,0); |
42 path.close(); | 42 path.close(); |
43 pathB.setFillType(SkPath::kWinding_FillType); | 43 pathB.setFillType(SkPath::kWinding_FillType); |
44 pathB.moveTo(0,1); | 44 pathB.moveTo(0,1); |
45 pathB.cubicTo(0,1, 1,0, 3,2); | 45 pathB.cubicTo(0,1, 1,0, 3,2); |
46 pathB.close(); | 46 pathB.close(); |
47 testPathOp(reporter, path, pathB, kDifference_PathOp); | 47 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
48 } | 48 } |
49 | 49 |
50 static void cubicOp5d(skiatest::Reporter* reporter) { | 50 static void cubicOp5d(skiatest::Reporter* reporter, const char* filename) { |
51 SkPath path, pathB; | 51 SkPath path, pathB; |
52 path.setFillType(SkPath::kWinding_FillType); | 52 path.setFillType(SkPath::kWinding_FillType); |
53 path.moveTo(0,1); | 53 path.moveTo(0,1); |
54 path.cubicTo(0,2, 1,0, 2,0); | 54 path.cubicTo(0,2, 1,0, 2,0); |
55 path.close(); | 55 path.close(); |
56 pathB.setFillType(SkPath::kWinding_FillType); | 56 pathB.setFillType(SkPath::kWinding_FillType); |
57 pathB.moveTo(0,1); | 57 pathB.moveTo(0,1); |
58 pathB.cubicTo(0,2, 1,0, 2,0); | 58 pathB.cubicTo(0,2, 1,0, 2,0); |
59 pathB.close(); | 59 pathB.close(); |
60 testPathOp(reporter, path, pathB, kDifference_PathOp); | 60 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
61 } | 61 } |
62 | 62 |
63 static void cubicOp6d(skiatest::Reporter* reporter) { | 63 static void cubicOp6d(skiatest::Reporter* reporter, const char* filename) { |
64 SkPath path, pathB; | 64 SkPath path, pathB; |
65 path.setFillType(SkPath::kWinding_FillType); | 65 path.setFillType(SkPath::kWinding_FillType); |
66 path.moveTo(0,1); | 66 path.moveTo(0,1); |
67 path.cubicTo(0,6, 1,0, 3,0); | 67 path.cubicTo(0,6, 1,0, 3,0); |
68 path.close(); | 68 path.close(); |
69 pathB.setFillType(SkPath::kWinding_FillType); | 69 pathB.setFillType(SkPath::kWinding_FillType); |
70 pathB.moveTo(0,1); | 70 pathB.moveTo(0,1); |
71 pathB.cubicTo(0,3, 1,0, 6,0); | 71 pathB.cubicTo(0,3, 1,0, 6,0); |
72 pathB.close(); | 72 pathB.close(); |
73 testPathOp(reporter, path, pathB, kDifference_PathOp); | 73 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
74 } | 74 } |
75 | 75 |
76 static void cubicOp7d(skiatest::Reporter* reporter) { | 76 static void cubicOp7d(skiatest::Reporter* reporter, const char* filename) { |
77 SkPath path, pathB; | 77 SkPath path, pathB; |
78 path.setFillType(SkPath::kWinding_FillType); | 78 path.setFillType(SkPath::kWinding_FillType); |
79 path.moveTo(0,1); | 79 path.moveTo(0,1); |
80 path.cubicTo(3,4, 1,0, 3,0); | 80 path.cubicTo(3,4, 1,0, 3,0); |
81 path.close(); | 81 path.close(); |
82 pathB.setFillType(SkPath::kWinding_FillType); | 82 pathB.setFillType(SkPath::kWinding_FillType); |
83 pathB.moveTo(0,1); | 83 pathB.moveTo(0,1); |
84 pathB.cubicTo(0,3, 1,0, 4,3); | 84 pathB.cubicTo(0,3, 1,0, 4,3); |
85 pathB.close(); | 85 pathB.close(); |
86 testPathOp(reporter, path, pathB, kDifference_PathOp); | 86 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
87 } | 87 } |
88 | 88 |
89 static void cubicOp8d(skiatest::Reporter* reporter) { | 89 static void cubicOp8d(skiatest::Reporter* reporter, const char* filename) { |
90 SkPath path, pathB; | 90 SkPath path, pathB; |
91 path.setFillType(SkPath::kWinding_FillType); | 91 path.setFillType(SkPath::kWinding_FillType); |
92 path.moveTo(0,1); | 92 path.moveTo(0,1); |
93 path.cubicTo(0,5, 1,0, 4,0); | 93 path.cubicTo(0,5, 1,0, 4,0); |
94 path.close(); | 94 path.close(); |
95 pathB.setFillType(SkPath::kWinding_FillType); | 95 pathB.setFillType(SkPath::kWinding_FillType); |
96 pathB.moveTo(0,1); | 96 pathB.moveTo(0,1); |
97 pathB.cubicTo(0,4, 1,0, 5,0); | 97 pathB.cubicTo(0,4, 1,0, 5,0); |
98 pathB.close(); | 98 pathB.close(); |
99 testPathOp(reporter, path, pathB, kDifference_PathOp); | 99 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
100 } | 100 } |
101 | 101 |
102 static void cubicOp9d(skiatest::Reporter* reporter) { | 102 static void cubicOp9d(skiatest::Reporter* reporter, const char* filename) { |
103 SkPath path, pathB; | 103 SkPath path, pathB; |
104 path.setFillType(SkPath::kWinding_FillType); | 104 path.setFillType(SkPath::kWinding_FillType); |
105 path.moveTo(0,1); | 105 path.moveTo(0,1); |
106 path.cubicTo(1,6, 1,0, 2,1); | 106 path.cubicTo(1,6, 1,0, 2,1); |
107 path.close(); | 107 path.close(); |
108 pathB.setFillType(SkPath::kWinding_FillType); | 108 pathB.setFillType(SkPath::kWinding_FillType); |
109 pathB.moveTo(0,1); | 109 pathB.moveTo(0,1); |
110 pathB.cubicTo(1,2, 1,0, 6,1); | 110 pathB.cubicTo(1,2, 1,0, 6,1); |
111 pathB.close(); | 111 pathB.close(); |
112 testPathOp(reporter, path, pathB, kDifference_PathOp); | 112 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
113 } | 113 } |
114 | 114 |
115 static void quadOp9d(skiatest::Reporter* reporter) { | 115 static void quadOp9d(skiatest::Reporter* reporter, const char* filename) { |
116 SkPath path, pathB; | 116 SkPath path, pathB; |
117 path.setFillType(SkPath::kWinding_FillType); | 117 path.setFillType(SkPath::kWinding_FillType); |
118 path.moveTo(0,1); | 118 path.moveTo(0,1); |
119 path.quadTo(1,6, 1.5f,1); | 119 path.quadTo(1,6, 1.5f,1); |
120 path.quadTo(1.5f,0.5f, 2,1); | 120 path.quadTo(1.5f,0.5f, 2,1); |
121 path.close(); | 121 path.close(); |
122 pathB.setFillType(SkPath::kWinding_FillType); | 122 pathB.setFillType(SkPath::kWinding_FillType); |
123 pathB.moveTo(0,1); | 123 pathB.moveTo(0,1); |
124 pathB.quadTo(1,2, 1.4f,1); | 124 pathB.quadTo(1,2, 1.4f,1); |
125 pathB.quadTo(3,0.4f, 6,1); | 125 pathB.quadTo(3,0.4f, 6,1); |
126 pathB.close(); | 126 pathB.close(); |
127 testPathOp(reporter, path, pathB, kDifference_PathOp); | 127 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
128 } | 128 } |
129 | 129 |
130 static void lineOp9d(skiatest::Reporter* reporter) { | 130 static void lineOp9d(skiatest::Reporter* reporter, const char* filename) { |
131 SkPath path, pathB; | 131 SkPath path, pathB; |
132 path.setFillType(SkPath::kWinding_FillType); | 132 path.setFillType(SkPath::kWinding_FillType); |
133 path.moveTo(0,1); | 133 path.moveTo(0,1); |
134 path.lineTo(1,6); | 134 path.lineTo(1,6); |
135 path.lineTo(1.5f,1); | 135 path.lineTo(1.5f,1); |
136 path.lineTo(1.8f,0.8f); | 136 path.lineTo(1.8f,0.8f); |
137 path.lineTo(2,1); | 137 path.lineTo(2,1); |
138 path.close(); | 138 path.close(); |
139 pathB.setFillType(SkPath::kWinding_FillType); | 139 pathB.setFillType(SkPath::kWinding_FillType); |
140 pathB.moveTo(0,1); | 140 pathB.moveTo(0,1); |
141 pathB.lineTo(1,2); | 141 pathB.lineTo(1,2); |
142 pathB.lineTo(1.4f,1); | 142 pathB.lineTo(1.4f,1); |
143 pathB.lineTo(3,0.4f); | 143 pathB.lineTo(3,0.4f); |
144 pathB.lineTo(6,1); | 144 pathB.lineTo(6,1); |
145 pathB.close(); | 145 pathB.close(); |
146 testPathOp(reporter, path, pathB, kDifference_PathOp); | 146 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
147 } | 147 } |
148 | 148 |
149 static void cubicOp1i(skiatest::Reporter* reporter) { | 149 static void cubicOp1i(skiatest::Reporter* reporter, const char* filename) { |
150 SkPath path, pathB; | 150 SkPath path, pathB; |
151 path.setFillType(SkPath::kWinding_FillType); | 151 path.setFillType(SkPath::kWinding_FillType); |
152 path.moveTo(0,1); | 152 path.moveTo(0,1); |
153 path.cubicTo(1,2, 1,0, 2,1); | 153 path.cubicTo(1,2, 1,0, 2,1); |
154 path.close(); | 154 path.close(); |
155 pathB.setFillType(SkPath::kWinding_FillType); | 155 pathB.setFillType(SkPath::kWinding_FillType); |
156 pathB.moveTo(0,1); | 156 pathB.moveTo(0,1); |
157 pathB.cubicTo(1,2, 1,0, 2,1); | 157 pathB.cubicTo(1,2, 1,0, 2,1); |
158 pathB.close(); | 158 pathB.close(); |
159 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 159 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
160 } | 160 } |
161 | 161 |
162 static void cubicOp10d(skiatest::Reporter* reporter) { | 162 static void cubicOp10d(skiatest::Reporter* reporter, const char* filename) { |
163 SkPath path, pathB; | 163 SkPath path, pathB; |
164 path.setFillType(SkPath::kWinding_FillType); | 164 path.setFillType(SkPath::kWinding_FillType); |
165 path.moveTo(0,1); | 165 path.moveTo(0,1); |
166 path.cubicTo(1,3, 1,0, 4,1); | 166 path.cubicTo(1,3, 1,0, 4,1); |
167 path.close(); | 167 path.close(); |
168 pathB.setFillType(SkPath::kWinding_FillType); | 168 pathB.setFillType(SkPath::kWinding_FillType); |
169 pathB.moveTo(0,1); | 169 pathB.moveTo(0,1); |
170 pathB.cubicTo(1,4, 1,0, 3,1); | 170 pathB.cubicTo(1,4, 1,0, 3,1); |
171 pathB.close(); | 171 pathB.close(); |
172 testPathOp(reporter, path, pathB, kDifference_PathOp); | 172 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
173 } | 173 } |
174 | 174 |
175 static void cubicOp11d(skiatest::Reporter* reporter) { | 175 static void cubicOp11d(skiatest::Reporter* reporter, const char* filename) { |
176 SkPath path, pathB; | 176 SkPath path, pathB; |
177 path.setFillType(SkPath::kWinding_FillType); | 177 path.setFillType(SkPath::kWinding_FillType); |
178 path.moveTo(0,1); | 178 path.moveTo(0,1); |
179 path.cubicTo(3,4, 1,0, 5,1); | 179 path.cubicTo(3,4, 1,0, 5,1); |
180 path.close(); | 180 path.close(); |
181 pathB.setFillType(SkPath::kWinding_FillType); | 181 pathB.setFillType(SkPath::kWinding_FillType); |
182 pathB.moveTo(0,1); | 182 pathB.moveTo(0,1); |
183 pathB.cubicTo(1,5, 1,0, 4,3); | 183 pathB.cubicTo(1,5, 1,0, 4,3); |
184 pathB.close(); | 184 pathB.close(); |
185 testPathOp(reporter, path, pathB, kDifference_PathOp); | 185 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
186 } | 186 } |
187 | 187 |
188 static void cubicOp12d(skiatest::Reporter* reporter) { | 188 static void cubicOp12d(skiatest::Reporter* reporter, const char* filename) { |
189 SkPath path, pathB; | 189 SkPath path, pathB; |
190 path.setFillType(SkPath::kWinding_FillType); | 190 path.setFillType(SkPath::kWinding_FillType); |
191 path.moveTo(0,1); | 191 path.moveTo(0,1); |
192 path.cubicTo(1,6, 1,0, 1,0); | 192 path.cubicTo(1,6, 1,0, 1,0); |
193 path.close(); | 193 path.close(); |
194 pathB.setFillType(SkPath::kWinding_FillType); | 194 pathB.setFillType(SkPath::kWinding_FillType); |
195 pathB.moveTo(0,1); | 195 pathB.moveTo(0,1); |
196 pathB.cubicTo(0,1, 1,0, 6,1); | 196 pathB.cubicTo(0,1, 1,0, 6,1); |
197 pathB.close(); | 197 pathB.close(); |
198 testPathOp(reporter, path, pathB, kDifference_PathOp); | 198 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
199 } | 199 } |
200 | 200 |
201 static void cubicOp13d(skiatest::Reporter* reporter) { | 201 static void cubicOp13d(skiatest::Reporter* reporter, const char* filename) { |
202 SkPath path, pathB; | 202 SkPath path, pathB; |
203 path.setFillType(SkPath::kWinding_FillType); | 203 path.setFillType(SkPath::kWinding_FillType); |
204 path.moveTo(0,1); | 204 path.moveTo(0,1); |
205 path.cubicTo(4,5, 1,0, 5,3); | 205 path.cubicTo(4,5, 1,0, 5,3); |
206 path.close(); | 206 path.close(); |
207 pathB.setFillType(SkPath::kWinding_FillType); | 207 pathB.setFillType(SkPath::kWinding_FillType); |
208 pathB.moveTo(0,1); | 208 pathB.moveTo(0,1); |
209 pathB.cubicTo(3,5, 1,0, 5,4); | 209 pathB.cubicTo(3,5, 1,0, 5,4); |
210 pathB.close(); | 210 pathB.close(); |
211 testPathOp(reporter, path, pathB, kDifference_PathOp); | 211 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
212 } | 212 } |
213 | 213 |
214 static void cubicOp14d(skiatest::Reporter* reporter) { | 214 static void cubicOp14d(skiatest::Reporter* reporter, const char* filename) { |
215 SkPath path, pathB; | 215 SkPath path, pathB; |
216 path.setFillType(SkPath::kWinding_FillType); | 216 path.setFillType(SkPath::kWinding_FillType); |
217 path.moveTo(0,1); | 217 path.moveTo(0,1); |
218 path.cubicTo(0,2, 2,0, 2,1); | 218 path.cubicTo(0,2, 2,0, 2,1); |
219 path.close(); | 219 path.close(); |
220 pathB.setFillType(SkPath::kWinding_FillType); | 220 pathB.setFillType(SkPath::kWinding_FillType); |
221 pathB.moveTo(0,2); | 221 pathB.moveTo(0,2); |
222 pathB.cubicTo(1,2, 1,0, 2,0); | 222 pathB.cubicTo(1,2, 1,0, 2,0); |
223 pathB.close(); | 223 pathB.close(); |
224 testPathOp(reporter, path, pathB, kDifference_PathOp); | 224 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
225 } | 225 } |
226 | 226 |
227 static void cubicOp15d(skiatest::Reporter* reporter) { | 227 static void cubicOp15d(skiatest::Reporter* reporter, const char* filename) { |
228 SkPath path, pathB; | 228 SkPath path, pathB; |
229 path.setFillType(SkPath::kWinding_FillType); | 229 path.setFillType(SkPath::kWinding_FillType); |
230 path.moveTo(0,1); | 230 path.moveTo(0,1); |
231 path.cubicTo(3,6, 2,0, 2,1); | 231 path.cubicTo(3,6, 2,0, 2,1); |
232 path.close(); | 232 path.close(); |
233 pathB.setFillType(SkPath::kWinding_FillType); | 233 pathB.setFillType(SkPath::kWinding_FillType); |
234 pathB.moveTo(0,2); | 234 pathB.moveTo(0,2); |
235 pathB.cubicTo(1,2, 1,0, 6,3); | 235 pathB.cubicTo(1,2, 1,0, 6,3); |
236 pathB.close(); | 236 pathB.close(); |
237 testPathOp(reporter, path, pathB, kDifference_PathOp); | 237 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
238 } | 238 } |
239 | 239 |
240 static void cubicOp16d(skiatest::Reporter* reporter) { | 240 static void cubicOp16d(skiatest::Reporter* reporter, const char* filename) { |
241 SkPath path, pathB; | 241 SkPath path, pathB; |
242 path.setFillType(SkPath::kWinding_FillType); | 242 path.setFillType(SkPath::kWinding_FillType); |
243 path.moveTo(0,2); | 243 path.moveTo(0,2); |
244 path.cubicTo(0,1, 3,0, 1,0); | 244 path.cubicTo(0,1, 3,0, 1,0); |
245 path.close(); | 245 path.close(); |
246 pathB.setFillType(SkPath::kWinding_FillType); | 246 pathB.setFillType(SkPath::kWinding_FillType); |
247 pathB.moveTo(0,3); | 247 pathB.moveTo(0,3); |
248 pathB.cubicTo(0,1, 2,0, 1,0); | 248 pathB.cubicTo(0,1, 2,0, 1,0); |
249 pathB.close(); | 249 pathB.close(); |
250 testPathOp(reporter, path, pathB, kDifference_PathOp); | 250 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
251 } | 251 } |
252 | 252 |
253 static void cubicOp17d(skiatest::Reporter* reporter) { | 253 static void cubicOp17d(skiatest::Reporter* reporter, const char* filename) { |
254 SkPath path, pathB; | 254 SkPath path, pathB; |
255 path.setFillType(SkPath::kWinding_FillType); | 255 path.setFillType(SkPath::kWinding_FillType); |
256 path.moveTo(0,2); | 256 path.moveTo(0,2); |
257 path.cubicTo(0,2, 4,0, 2,1); | 257 path.cubicTo(0,2, 4,0, 2,1); |
258 path.close(); | 258 path.close(); |
259 pathB.setFillType(SkPath::kWinding_FillType); | 259 pathB.setFillType(SkPath::kWinding_FillType); |
260 pathB.moveTo(0,4); | 260 pathB.moveTo(0,4); |
261 pathB.cubicTo(1,2, 2,0, 2,0); | 261 pathB.cubicTo(1,2, 2,0, 2,0); |
262 pathB.close(); | 262 pathB.close(); |
263 testPathOp(reporter, path, pathB, kDifference_PathOp); | 263 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
264 } | 264 } |
265 | 265 |
266 static void cubicOp18d(skiatest::Reporter* reporter) { | 266 static void cubicOp18d(skiatest::Reporter* reporter, const char* filename) { |
267 SkPath path, pathB; | 267 SkPath path, pathB; |
268 path.setFillType(SkPath::kWinding_FillType); | 268 path.setFillType(SkPath::kWinding_FillType); |
269 path.moveTo(0,1); | 269 path.moveTo(0,1); |
270 path.cubicTo(3,5, 2,0, 2,1); | 270 path.cubicTo(3,5, 2,0, 2,1); |
271 path.close(); | 271 path.close(); |
272 pathB.setFillType(SkPath::kWinding_FillType); | 272 pathB.setFillType(SkPath::kWinding_FillType); |
273 pathB.moveTo(0,2); | 273 pathB.moveTo(0,2); |
274 pathB.cubicTo(1,2, 1,0, 5,3); | 274 pathB.cubicTo(1,2, 1,0, 5,3); |
275 pathB.close(); | 275 pathB.close(); |
276 testPathOp(reporter, path, pathB, kDifference_PathOp); | 276 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
277 } | 277 } |
278 | 278 |
279 static void cubicOp19i(skiatest::Reporter* reporter) { | 279 static void cubicOp19i(skiatest::Reporter* reporter, const char* filename) { |
280 SkPath path, pathB; | 280 SkPath path, pathB; |
281 path.setFillType(SkPath::kWinding_FillType); | 281 path.setFillType(SkPath::kWinding_FillType); |
282 path.moveTo(0,2); | 282 path.moveTo(0,2); |
283 path.cubicTo(0,1, 2,1, 6,2); | 283 path.cubicTo(0,1, 2,1, 6,2); |
284 path.close(); | 284 path.close(); |
285 pathB.setFillType(SkPath::kWinding_FillType); | 285 pathB.setFillType(SkPath::kWinding_FillType); |
286 pathB.moveTo(1,2); | 286 pathB.moveTo(1,2); |
287 pathB.cubicTo(2,6, 2,0, 1,0); | 287 pathB.cubicTo(2,6, 2,0, 1,0); |
288 pathB.close(); | 288 pathB.close(); |
289 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 289 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
290 } | 290 } |
291 | 291 |
292 static void cubicOp20d(skiatest::Reporter* reporter) { | 292 static void cubicOp20d(skiatest::Reporter* reporter, const char* filename) { |
293 SkPath path, pathB; | 293 SkPath path, pathB; |
294 path.setFillType(SkPath::kWinding_FillType); | 294 path.setFillType(SkPath::kWinding_FillType); |
295 path.moveTo(0,1); | 295 path.moveTo(0,1); |
296 path.cubicTo(0,1, 6,0, 2,1); | 296 path.cubicTo(0,1, 6,0, 2,1); |
297 path.close(); | 297 path.close(); |
298 pathB.setFillType(SkPath::kWinding_FillType); | 298 pathB.setFillType(SkPath::kWinding_FillType); |
299 pathB.moveTo(0,6); | 299 pathB.moveTo(0,6); |
300 pathB.cubicTo(1,2, 1,0, 1,0); | 300 pathB.cubicTo(1,2, 1,0, 1,0); |
301 pathB.close(); | 301 pathB.close(); |
302 testPathOp(reporter, path, pathB, kDifference_PathOp); | 302 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
303 } | 303 } |
304 | 304 |
305 static void cubicOp21d(skiatest::Reporter* reporter) { | 305 static void cubicOp21d(skiatest::Reporter* reporter, const char* filename) { |
306 SkPath path, pathB; | 306 SkPath path, pathB; |
307 path.setFillType(SkPath::kWinding_FillType); | 307 path.setFillType(SkPath::kWinding_FillType); |
308 path.moveTo(0,1); | 308 path.moveTo(0,1); |
309 path.cubicTo(0,1, 2,1, 6,5); | 309 path.cubicTo(0,1, 2,1, 6,5); |
310 path.close(); | 310 path.close(); |
311 pathB.setFillType(SkPath::kWinding_FillType); | 311 pathB.setFillType(SkPath::kWinding_FillType); |
312 pathB.moveTo(1,2); | 312 pathB.moveTo(1,2); |
313 pathB.cubicTo(5,6, 1,0, 1,0); | 313 pathB.cubicTo(5,6, 1,0, 1,0); |
314 pathB.close(); | 314 pathB.close(); |
315 testPathOp(reporter, path, pathB, kDifference_PathOp); | 315 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
316 } | 316 } |
317 | 317 |
318 static void cubicOp22d(skiatest::Reporter* reporter) { | 318 static void cubicOp22d(skiatest::Reporter* reporter, const char* filename) { |
319 SkPath path, pathB; | 319 SkPath path, pathB; |
320 path.setFillType(SkPath::kWinding_FillType); | 320 path.setFillType(SkPath::kWinding_FillType); |
321 path.moveTo(0,1); | 321 path.moveTo(0,1); |
322 path.cubicTo(2,3, 3,0, 2,1); | 322 path.cubicTo(2,3, 3,0, 2,1); |
323 path.close(); | 323 path.close(); |
324 pathB.setFillType(SkPath::kWinding_FillType); | 324 pathB.setFillType(SkPath::kWinding_FillType); |
325 pathB.moveTo(0,3); | 325 pathB.moveTo(0,3); |
326 pathB.cubicTo(1,2, 1,0, 3,2); | 326 pathB.cubicTo(1,2, 1,0, 3,2); |
327 pathB.close(); | 327 pathB.close(); |
328 testPathOp(reporter, path, pathB, kDifference_PathOp); | 328 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
329 } | 329 } |
330 | 330 |
331 static void cubicOp23d(skiatest::Reporter* reporter) { | 331 static void cubicOp23d(skiatest::Reporter* reporter, const char* filename) { |
332 SkPath path, pathB; | 332 SkPath path, pathB; |
333 path.setFillType(SkPath::kWinding_FillType); | 333 path.setFillType(SkPath::kWinding_FillType); |
334 path.moveTo(0,1); | 334 path.moveTo(0,1); |
335 path.cubicTo(1,2, 4,0, 2,1); | 335 path.cubicTo(1,2, 4,0, 2,1); |
336 path.close(); | 336 path.close(); |
337 pathB.setFillType(SkPath::kWinding_FillType); | 337 pathB.setFillType(SkPath::kWinding_FillType); |
338 pathB.moveTo(0,4); | 338 pathB.moveTo(0,4); |
339 pathB.cubicTo(1,2, 1,0, 2,1); | 339 pathB.cubicTo(1,2, 1,0, 2,1); |
340 pathB.close(); | 340 pathB.close(); |
341 testPathOp(reporter, path, pathB, kDifference_PathOp); | 341 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
342 } | 342 } |
343 | 343 |
344 static void cubicOp24d(skiatest::Reporter* reporter) { | 344 static void cubicOp24d(skiatest::Reporter* reporter, const char* filename) { |
345 SkPath path, pathB; | 345 SkPath path, pathB; |
346 path.setFillType(SkPath::kWinding_FillType); | 346 path.setFillType(SkPath::kWinding_FillType); |
347 path.moveTo(0,1); | 347 path.moveTo(0,1); |
348 path.cubicTo(1,2, 2,0, 3,2); | 348 path.cubicTo(1,2, 2,0, 3,2); |
349 path.close(); | 349 path.close(); |
350 pathB.setFillType(SkPath::kWinding_FillType); | 350 pathB.setFillType(SkPath::kWinding_FillType); |
351 pathB.moveTo(0,2); | 351 pathB.moveTo(0,2); |
352 pathB.cubicTo(2,3, 1,0, 2,1); | 352 pathB.cubicTo(2,3, 1,0, 2,1); |
353 pathB.close(); | 353 pathB.close(); |
354 testPathOp(reporter, path, pathB, kDifference_PathOp); | 354 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
355 } | 355 } |
356 | 356 |
357 static void testIntersect1(skiatest::Reporter* reporter) { | 357 static void testIntersect1(skiatest::Reporter* reporter, const char* filename) { |
358 SkPath one, two; | 358 SkPath one, two; |
359 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 359 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
360 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); | 360 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); |
361 testPathOp(reporter, one, two, kIntersect_PathOp); | 361 testPathOp(reporter, one, two, kIntersect_PathOp, filename); |
362 } | 362 } |
363 | 363 |
364 static void testUnion1(skiatest::Reporter* reporter) { | 364 static void testUnion1(skiatest::Reporter* reporter, const char* filename) { |
365 SkPath one, two; | 365 SkPath one, two; |
366 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 366 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
367 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); | 367 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); |
368 testPathOp(reporter, one, two, kUnion_PathOp); | 368 testPathOp(reporter, one, two, kUnion_PathOp, filename); |
369 } | 369 } |
370 | 370 |
371 static void testDiff1(skiatest::Reporter* reporter) { | 371 static void testDiff1(skiatest::Reporter* reporter, const char* filename) { |
372 SkPath one, two; | 372 SkPath one, two; |
373 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 373 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
374 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); | 374 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); |
375 testPathOp(reporter, one, two, kDifference_PathOp); | 375 testPathOp(reporter, one, two, kDifference_PathOp, filename); |
376 } | 376 } |
377 | 377 |
378 static void testXor1(skiatest::Reporter* reporter) { | 378 static void testXor1(skiatest::Reporter* reporter, const char* filename) { |
379 SkPath one, two; | 379 SkPath one, two; |
380 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 380 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
381 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); | 381 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); |
382 testPathOp(reporter, one, two, kXOR_PathOp); | 382 testPathOp(reporter, one, two, kXOR_PathOp, filename); |
383 } | 383 } |
384 | 384 |
385 static void testIntersect2(skiatest::Reporter* reporter) { | 385 static void testIntersect2(skiatest::Reporter* reporter, const char* filename) { |
386 SkPath one, two; | 386 SkPath one, two; |
387 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 387 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
388 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); | 388 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); |
389 testPathOp(reporter, one, two, kIntersect_PathOp); | 389 testPathOp(reporter, one, two, kIntersect_PathOp, filename); |
390 } | 390 } |
391 | 391 |
392 static void testUnion2(skiatest::Reporter* reporter) { | 392 static void testUnion2(skiatest::Reporter* reporter, const char* filename) { |
393 SkPath one, two; | 393 SkPath one, two; |
394 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 394 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
395 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); | 395 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); |
396 testPathOp(reporter, one, two, kUnion_PathOp); | 396 testPathOp(reporter, one, two, kUnion_PathOp, filename); |
397 } | 397 } |
398 | 398 |
399 static void testDiff2(skiatest::Reporter* reporter) { | 399 static void testDiff2(skiatest::Reporter* reporter, const char* filename) { |
400 SkPath one, two; | 400 SkPath one, two; |
401 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 401 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
402 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); | 402 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); |
403 testPathOp(reporter, one, two, kDifference_PathOp); | 403 testPathOp(reporter, one, two, kDifference_PathOp, filename); |
404 } | 404 } |
405 | 405 |
406 static void testXor2(skiatest::Reporter* reporter) { | 406 static void testXor2(skiatest::Reporter* reporter, const char* filename) { |
407 SkPath one, two; | 407 SkPath one, two; |
408 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 408 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
409 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); | 409 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); |
410 testPathOp(reporter, one, two, kXOR_PathOp); | 410 testPathOp(reporter, one, two, kXOR_PathOp, filename); |
411 } | 411 } |
412 | 412 |
413 static void testOp1d(skiatest::Reporter* reporter) { | 413 static void testOp1d(skiatest::Reporter* reporter, const char* filename) { |
414 SkPath path, pathB; | 414 SkPath path, pathB; |
415 path.setFillType(SkPath::kWinding_FillType); | 415 path.setFillType(SkPath::kWinding_FillType); |
416 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 416 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
417 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 417 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
418 pathB.setFillType(SkPath::kWinding_FillType); | 418 pathB.setFillType(SkPath::kWinding_FillType); |
419 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 419 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
420 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 420 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
421 testPathOp(reporter, path, pathB, kDifference_PathOp); | 421 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
422 } | 422 } |
423 | 423 |
424 static void testOp2d(skiatest::Reporter* reporter) { | 424 static void testOp2d(skiatest::Reporter* reporter, const char* filename) { |
425 SkPath path, pathB; | 425 SkPath path, pathB; |
426 path.setFillType(SkPath::kWinding_FillType); | 426 path.setFillType(SkPath::kWinding_FillType); |
427 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 427 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
428 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 428 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
429 pathB.setFillType(SkPath::kEvenOdd_FillType); | 429 pathB.setFillType(SkPath::kEvenOdd_FillType); |
430 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 430 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
431 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 431 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
432 testPathOp(reporter, path, pathB, kDifference_PathOp); | 432 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
433 } | 433 } |
434 | 434 |
435 static void testOp3d(skiatest::Reporter* reporter) { | 435 static void testOp3d(skiatest::Reporter* reporter, const char* filename) { |
436 SkPath path, pathB; | 436 SkPath path, pathB; |
437 path.setFillType(SkPath::kWinding_FillType); | 437 path.setFillType(SkPath::kWinding_FillType); |
438 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 438 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
439 path.addRect(1, 1, 2, 2, SkPath::kCW_Direction); | 439 path.addRect(1, 1, 2, 2, SkPath::kCW_Direction); |
440 pathB.setFillType(SkPath::kWinding_FillType); | 440 pathB.setFillType(SkPath::kWinding_FillType); |
441 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 441 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
442 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 442 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
443 testPathOp(reporter, path, pathB, kDifference_PathOp); | 443 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
444 } | 444 } |
445 | 445 |
446 static void testOp1u(skiatest::Reporter* reporter) { | 446 static void testOp1u(skiatest::Reporter* reporter, const char* filename) { |
447 SkPath path, pathB; | 447 SkPath path, pathB; |
448 path.setFillType(SkPath::kWinding_FillType); | 448 path.setFillType(SkPath::kWinding_FillType); |
449 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 449 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
450 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 450 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
451 pathB.setFillType(SkPath::kWinding_FillType); | 451 pathB.setFillType(SkPath::kWinding_FillType); |
452 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 452 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
453 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 453 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
454 testPathOp(reporter, path, pathB, kUnion_PathOp); | 454 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
455 } | 455 } |
456 | 456 |
457 static void testOp4d(skiatest::Reporter* reporter) { | 457 static void testOp4d(skiatest::Reporter* reporter, const char* filename) { |
458 SkPath path, pathB; | 458 SkPath path, pathB; |
459 path.setFillType(SkPath::kWinding_FillType); | 459 path.setFillType(SkPath::kWinding_FillType); |
460 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 460 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
461 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); | 461 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
462 pathB.setFillType(SkPath::kWinding_FillType); | 462 pathB.setFillType(SkPath::kWinding_FillType); |
463 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 463 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
464 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 464 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
465 testPathOp(reporter, path, pathB, kDifference_PathOp); | 465 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
466 } | 466 } |
467 | 467 |
468 static void testOp5d(skiatest::Reporter* reporter) { | 468 static void testOp5d(skiatest::Reporter* reporter, const char* filename) { |
469 SkPath path, pathB; | 469 SkPath path, pathB; |
470 path.setFillType(SkPath::kEvenOdd_FillType); | 470 path.setFillType(SkPath::kEvenOdd_FillType); |
471 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 471 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
472 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 472 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
473 pathB.setFillType(SkPath::kEvenOdd_FillType); | 473 pathB.setFillType(SkPath::kEvenOdd_FillType); |
474 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 474 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
475 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 475 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
476 testPathOp(reporter, path, pathB, kDifference_PathOp); | 476 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
477 } | 477 } |
478 | 478 |
479 static void testOp6d(skiatest::Reporter* reporter) { | 479 static void testOp6d(skiatest::Reporter* reporter, const char* filename) { |
480 SkPath path, pathB; | 480 SkPath path, pathB; |
481 path.setFillType(SkPath::kEvenOdd_FillType); | 481 path.setFillType(SkPath::kEvenOdd_FillType); |
482 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 482 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
483 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 483 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
484 pathB.setFillType(SkPath::kWinding_FillType); | 484 pathB.setFillType(SkPath::kWinding_FillType); |
485 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 485 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
486 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 486 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
487 testPathOp(reporter, path, pathB, kDifference_PathOp); | 487 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
488 } | 488 } |
489 | 489 |
490 static void testOp7d(skiatest::Reporter* reporter) { | 490 static void testOp7d(skiatest::Reporter* reporter, const char* filename) { |
491 SkPath path, pathB; | 491 SkPath path, pathB; |
492 path.setFillType(SkPath::kEvenOdd_FillType); | 492 path.setFillType(SkPath::kEvenOdd_FillType); |
493 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 493 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
494 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 494 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
495 pathB.setFillType(SkPath::kEvenOdd_FillType); | 495 pathB.setFillType(SkPath::kEvenOdd_FillType); |
496 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 496 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
497 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 497 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
498 testPathOp(reporter, path, pathB, kDifference_PathOp); | 498 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
499 } | 499 } |
500 | 500 |
501 static void testOp2u(skiatest::Reporter* reporter) { | 501 static void testOp2u(skiatest::Reporter* reporter, const char* filename) { |
502 SkPath path, pathB; | 502 SkPath path, pathB; |
503 path.setFillType(SkPath::kEvenOdd_FillType); | 503 path.setFillType(SkPath::kEvenOdd_FillType); |
504 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 504 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
505 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 505 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
506 pathB.setFillType(SkPath::kWinding_FillType); | 506 pathB.setFillType(SkPath::kWinding_FillType); |
507 pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 507 pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
508 pathB.addRect(1, 1, 2, 2, SkPath::kCW_Direction); | 508 pathB.addRect(1, 1, 2, 2, SkPath::kCW_Direction); |
509 testPathOp(reporter, path, pathB, kUnion_PathOp); | 509 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
510 } | 510 } |
511 | 511 |
512 static void testOp8d(skiatest::Reporter* reporter) { | 512 static void testOp8d(skiatest::Reporter* reporter, const char* filename) { |
513 SkPath path, pathB; | 513 SkPath path, pathB; |
514 path.addRect(0, 0, 640, 480); | 514 path.addRect(0, 0, 640, 480); |
515 pathB.moveTo(577330, 1971.72f); | 515 pathB.moveTo(577330, 1971.72f); |
516 pathB.cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f); | 516 pathB.cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f); |
517 pathB.close(); | 517 pathB.close(); |
518 testPathOp(reporter, path, pathB, kDifference_PathOp); | 518 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
519 } | 519 } |
520 static void cubicOp25i(skiatest::Reporter* reporter) { | 520 static void cubicOp25i(skiatest::Reporter* reporter, const char* filename) { |
521 SkPath path, pathB; | 521 SkPath path, pathB; |
522 path.setFillType(SkPath::kWinding_FillType); | 522 path.setFillType(SkPath::kWinding_FillType); |
523 path.moveTo(0,1); | 523 path.moveTo(0,1); |
524 path.cubicTo(2,4, 5,0, 3,2); | 524 path.cubicTo(2,4, 5,0, 3,2); |
525 path.close(); | 525 path.close(); |
526 pathB.setFillType(SkPath::kWinding_FillType); | 526 pathB.setFillType(SkPath::kWinding_FillType); |
527 pathB.moveTo(0,5); | 527 pathB.moveTo(0,5); |
528 pathB.cubicTo(2,3, 1,0, 4,2); | 528 pathB.cubicTo(2,3, 1,0, 4,2); |
529 pathB.close(); | 529 pathB.close(); |
530 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 530 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
531 } | 531 } |
532 | 532 |
533 static void cubicOp26d(skiatest::Reporter* reporter) { | 533 static void cubicOp26d(skiatest::Reporter* reporter, const char* filename) { |
534 SkPath path, pathB; | 534 SkPath path, pathB; |
535 path.setFillType(SkPath::kWinding_FillType); | 535 path.setFillType(SkPath::kWinding_FillType); |
536 path.moveTo(0,1); | 536 path.moveTo(0,1); |
537 path.cubicTo(3,4, 4,0, 3,2); | 537 path.cubicTo(3,4, 4,0, 3,2); |
538 path.close(); | 538 path.close(); |
539 pathB.setFillType(SkPath::kWinding_FillType); | 539 pathB.setFillType(SkPath::kWinding_FillType); |
540 pathB.moveTo(0,4); | 540 pathB.moveTo(0,4); |
541 pathB.cubicTo(2,3, 1,0, 4,3); | 541 pathB.cubicTo(2,3, 1,0, 4,3); |
542 pathB.close(); | 542 pathB.close(); |
543 testPathOp(reporter, path, pathB, kDifference_PathOp); | 543 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
544 } | 544 } |
545 | 545 |
546 static void cubicOp27d(skiatest::Reporter* reporter) { | 546 static void cubicOp27d(skiatest::Reporter* reporter, const char* filename) { |
547 SkPath path, pathB; | 547 SkPath path, pathB; |
548 path.setFillType(SkPath::kWinding_FillType); | 548 path.setFillType(SkPath::kWinding_FillType); |
549 path.moveTo(0,1); | 549 path.moveTo(0,1); |
550 path.cubicTo(3,6, 1,0, 5,2); | 550 path.cubicTo(3,6, 1,0, 5,2); |
551 path.close(); | 551 path.close(); |
552 pathB.setFillType(SkPath::kWinding_FillType); | 552 pathB.setFillType(SkPath::kWinding_FillType); |
553 pathB.moveTo(0,1); | 553 pathB.moveTo(0,1); |
554 pathB.cubicTo(2,5, 1,0, 6,3); | 554 pathB.cubicTo(2,5, 1,0, 6,3); |
555 pathB.close(); | 555 pathB.close(); |
556 testPathOp(reporter, path, pathB, kDifference_PathOp); | 556 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
557 } | 557 } |
558 | 558 |
559 static void cubicOp28u(skiatest::Reporter* reporter) { | 559 static void cubicOp28u(skiatest::Reporter* reporter, const char* filename) { |
560 SkPath path, pathB; | 560 SkPath path, pathB; |
561 path.setFillType(SkPath::kWinding_FillType); | 561 path.setFillType(SkPath::kWinding_FillType); |
562 path.moveTo(0,1); | 562 path.moveTo(0,1); |
563 path.cubicTo(1,4, 6,0, 3,2); | 563 path.cubicTo(1,4, 6,0, 3,2); |
564 path.close(); | 564 path.close(); |
565 pathB.setFillType(SkPath::kWinding_FillType); | 565 pathB.setFillType(SkPath::kWinding_FillType); |
566 pathB.moveTo(0,6); | 566 pathB.moveTo(0,6); |
567 pathB.cubicTo(2,3, 1,0, 4,1); | 567 pathB.cubicTo(2,3, 1,0, 4,1); |
568 pathB.close(); | 568 pathB.close(); |
569 testPathOp(reporter, path, pathB, kUnion_PathOp); | 569 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
570 } | 570 } |
571 | 571 |
572 static void cubicOp29d(skiatest::Reporter* reporter) { | 572 static void cubicOp29d(skiatest::Reporter* reporter, const char* filename) { |
573 SkPath path, pathB; | 573 SkPath path, pathB; |
574 path.setFillType(SkPath::kWinding_FillType); | 574 path.setFillType(SkPath::kWinding_FillType); |
575 path.moveTo(0,1); | 575 path.moveTo(0,1); |
576 path.cubicTo(2,5, 6,0, 4,2); | 576 path.cubicTo(2,5, 6,0, 4,2); |
577 path.close(); | 577 path.close(); |
578 pathB.setFillType(SkPath::kWinding_FillType); | 578 pathB.setFillType(SkPath::kWinding_FillType); |
579 pathB.moveTo(0,6); | 579 pathB.moveTo(0,6); |
580 pathB.cubicTo(2,4, 1,0, 5,2); | 580 pathB.cubicTo(2,4, 1,0, 5,2); |
581 pathB.close(); | 581 pathB.close(); |
582 testPathOp(reporter, path, pathB, kDifference_PathOp); | 582 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
583 } | 583 } |
584 | 584 |
585 static void cubicOp30d(skiatest::Reporter* reporter) { | 585 static void cubicOp30d(skiatest::Reporter* reporter, const char* filename) { |
586 SkPath path, pathB; | 586 SkPath path, pathB; |
587 path.setFillType(SkPath::kWinding_FillType); | 587 path.setFillType(SkPath::kWinding_FillType); |
588 path.moveTo(0,1); | 588 path.moveTo(0,1); |
589 path.cubicTo(2,5, 6,0, 5,3); | 589 path.cubicTo(2,5, 6,0, 5,3); |
590 path.close(); | 590 path.close(); |
591 pathB.setFillType(SkPath::kWinding_FillType); | 591 pathB.setFillType(SkPath::kWinding_FillType); |
592 pathB.moveTo(0,6); | 592 pathB.moveTo(0,6); |
593 pathB.cubicTo(3,5, 1,0, 5,2); | 593 pathB.cubicTo(3,5, 1,0, 5,2); |
594 pathB.close(); | 594 pathB.close(); |
595 testPathOp(reporter, path, pathB, kDifference_PathOp); | 595 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
596 } | 596 } |
597 | 597 |
598 static void cubicOp31d(skiatest::Reporter* reporter) { | 598 static void cubicOp31d(skiatest::Reporter* reporter, const char* filename) { |
599 SkPath path, pathB; | 599 SkPath path, pathB; |
600 path.setFillType(SkPath::kWinding_FillType); | 600 path.setFillType(SkPath::kWinding_FillType); |
601 path.moveTo(0,2); | 601 path.moveTo(0,2); |
602 path.cubicTo(0,3, 2,1, 4,0); | 602 path.cubicTo(0,3, 2,1, 4,0); |
603 path.close(); | 603 path.close(); |
604 pathB.setFillType(SkPath::kWinding_FillType); | 604 pathB.setFillType(SkPath::kWinding_FillType); |
605 pathB.moveTo(1,2); | 605 pathB.moveTo(1,2); |
606 pathB.cubicTo(0,4, 2,0, 3,0); | 606 pathB.cubicTo(0,4, 2,0, 3,0); |
607 pathB.close(); | 607 pathB.close(); |
608 testPathOp(reporter, path, pathB, kDifference_PathOp); | 608 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
609 } | 609 } |
610 | 610 |
611 static void cubicOp31u(skiatest::Reporter* reporter) { | 611 static void cubicOp31u(skiatest::Reporter* reporter, const char* filename) { |
612 SkPath path, pathB; | 612 SkPath path, pathB; |
613 path.setFillType(SkPath::kWinding_FillType); | 613 path.setFillType(SkPath::kWinding_FillType); |
614 path.moveTo(0,2); | 614 path.moveTo(0,2); |
615 path.cubicTo(0,3, 2,1, 4,0); | 615 path.cubicTo(0,3, 2,1, 4,0); |
616 path.close(); | 616 path.close(); |
617 pathB.setFillType(SkPath::kWinding_FillType); | 617 pathB.setFillType(SkPath::kWinding_FillType); |
618 pathB.moveTo(1,2); | 618 pathB.moveTo(1,2); |
619 pathB.cubicTo(0,4, 2,0, 3,0); | 619 pathB.cubicTo(0,4, 2,0, 3,0); |
620 pathB.close(); | 620 pathB.close(); |
621 testPathOp(reporter, path, pathB, kUnion_PathOp); | 621 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
622 } | 622 } |
623 | 623 |
624 static void cubicOp31x(skiatest::Reporter* reporter) { | 624 static void cubicOp31x(skiatest::Reporter* reporter, const char* filename) { |
625 SkPath path, pathB; | 625 SkPath path, pathB; |
626 path.setFillType(SkPath::kWinding_FillType); | 626 path.setFillType(SkPath::kWinding_FillType); |
627 path.moveTo(0,2); | 627 path.moveTo(0,2); |
628 path.cubicTo(0,3, 2,1, 4,0); | 628 path.cubicTo(0,3, 2,1, 4,0); |
629 path.close(); | 629 path.close(); |
630 pathB.setFillType(SkPath::kWinding_FillType); | 630 pathB.setFillType(SkPath::kWinding_FillType); |
631 pathB.moveTo(1,2); | 631 pathB.moveTo(1,2); |
632 pathB.cubicTo(0,4, 2,0, 3,0); | 632 pathB.cubicTo(0,4, 2,0, 3,0); |
633 pathB.close(); | 633 pathB.close(); |
634 testPathOp(reporter, path, pathB, kXOR_PathOp); | 634 testPathOp(reporter, path, pathB, kXOR_PathOp, filename); |
635 } | 635 } |
636 | 636 |
637 static void cubicOp32d(skiatest::Reporter* reporter) { | 637 static void cubicOp32d(skiatest::Reporter* reporter, const char* filename) { |
638 SkPath path, pathB; | 638 SkPath path, pathB; |
639 path.setFillType(SkPath::kWinding_FillType); | 639 path.setFillType(SkPath::kWinding_FillType); |
640 path.moveTo(0,1); | 640 path.moveTo(0,1); |
641 path.cubicTo(1,2, 6,0, 3,1); | 641 path.cubicTo(1,2, 6,0, 3,1); |
642 path.close(); | 642 path.close(); |
643 pathB.setFillType(SkPath::kWinding_FillType); | 643 pathB.setFillType(SkPath::kWinding_FillType); |
644 pathB.moveTo(0,6); | 644 pathB.moveTo(0,6); |
645 pathB.cubicTo(1,3, 1,0, 2,1); | 645 pathB.cubicTo(1,3, 1,0, 2,1); |
646 pathB.close(); | 646 pathB.close(); |
647 testPathOp(reporter, path, pathB, kDifference_PathOp); | 647 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
648 } | 648 } |
649 | 649 |
650 static void cubicOp33i(skiatest::Reporter* reporter) { | 650 static void cubicOp33i(skiatest::Reporter* reporter, const char* filename) { |
651 SkPath path, pathB; | 651 SkPath path, pathB; |
652 path.setFillType(SkPath::kWinding_FillType); | 652 path.setFillType(SkPath::kWinding_FillType); |
653 path.moveTo(0,1); | 653 path.moveTo(0,1); |
654 path.cubicTo(1,2, 6,0, 3,1); | 654 path.cubicTo(1,2, 6,0, 3,1); |
655 path.close(); | 655 path.close(); |
656 pathB.setFillType(SkPath::kWinding_FillType); | 656 pathB.setFillType(SkPath::kWinding_FillType); |
657 pathB.moveTo(0,6); | 657 pathB.moveTo(0,6); |
658 pathB.cubicTo(1,3, 1,0, 2,1); | 658 pathB.cubicTo(1,3, 1,0, 2,1); |
659 pathB.close(); | 659 pathB.close(); |
660 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 660 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
661 } | 661 } |
662 | 662 |
663 static void cubicOp34d(skiatest::Reporter* reporter) { | 663 static void cubicOp34d(skiatest::Reporter* reporter, const char* filename) { |
664 SkPath path, pathB; | 664 SkPath path, pathB; |
665 path.setFillType(SkPath::kWinding_FillType); | 665 path.setFillType(SkPath::kWinding_FillType); |
666 path.moveTo(0,1); | 666 path.moveTo(0,1); |
667 path.cubicTo(3,5, 2,1, 3,1); | 667 path.cubicTo(3,5, 2,1, 3,1); |
668 path.close(); | 668 path.close(); |
669 pathB.setFillType(SkPath::kWinding_FillType); | 669 pathB.setFillType(SkPath::kWinding_FillType); |
670 pathB.moveTo(1,2); | 670 pathB.moveTo(1,2); |
671 pathB.cubicTo(1,3, 1,0, 5,3); | 671 pathB.cubicTo(1,3, 1,0, 5,3); |
672 pathB.close(); | 672 pathB.close(); |
673 testPathOp(reporter, path, pathB, kDifference_PathOp); | 673 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
674 } | 674 } |
675 | 675 |
676 static void cubicOp35d(skiatest::Reporter* reporter) { | 676 static void cubicOp35d(skiatest::Reporter* reporter, const char* filename) { |
677 SkPath path, pathB; | 677 SkPath path, pathB; |
678 path.setFillType(SkPath::kWinding_FillType); | 678 path.setFillType(SkPath::kWinding_FillType); |
679 path.moveTo(0,1); | 679 path.moveTo(0,1); |
680 path.cubicTo(1,5, 2,1, 4,0); | 680 path.cubicTo(1,5, 2,1, 4,0); |
681 path.close(); | 681 path.close(); |
682 pathB.setFillType(SkPath::kWinding_FillType); | 682 pathB.setFillType(SkPath::kWinding_FillType); |
683 pathB.moveTo(1,2); | 683 pathB.moveTo(1,2); |
684 pathB.cubicTo(0,4, 1,0, 5,1); | 684 pathB.cubicTo(0,4, 1,0, 5,1); |
685 pathB.close(); | 685 pathB.close(); |
686 testPathOp(reporter, path, pathB, kDifference_PathOp); | 686 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
687 } | 687 } |
688 | 688 |
689 static void cubicOp36u(skiatest::Reporter* reporter) { | 689 static void cubicOp36u(skiatest::Reporter* reporter, const char* filename) { |
690 SkPath path, pathB; | 690 SkPath path, pathB; |
691 path.setFillType(SkPath::kWinding_FillType); | 691 path.setFillType(SkPath::kWinding_FillType); |
692 path.moveTo(0,1); | 692 path.moveTo(0,1); |
693 path.cubicTo(1,6, 2,0, 5,1); | 693 path.cubicTo(1,6, 2,0, 5,1); |
694 path.close(); | 694 path.close(); |
695 pathB.setFillType(SkPath::kWinding_FillType); | 695 pathB.setFillType(SkPath::kWinding_FillType); |
696 pathB.moveTo(0,2); | 696 pathB.moveTo(0,2); |
697 pathB.cubicTo(1,5, 1,0, 6,1); | 697 pathB.cubicTo(1,5, 1,0, 6,1); |
698 pathB.close(); | 698 pathB.close(); |
699 testPathOp(reporter, path, pathB, kUnion_PathOp); | 699 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
700 } | 700 } |
701 | 701 |
702 static void cubicOp37d(skiatest::Reporter* reporter) { | 702 static void cubicOp37d(skiatest::Reporter* reporter, const char* filename) { |
703 SkPath path, pathB; | 703 SkPath path, pathB; |
704 path.setFillType(SkPath::kWinding_FillType); | 704 path.setFillType(SkPath::kWinding_FillType); |
705 path.moveTo(0,1); | 705 path.moveTo(0,1); |
706 path.cubicTo(2,6, 6,1, 4,3); | 706 path.cubicTo(2,6, 6,1, 4,3); |
707 path.close(); | 707 path.close(); |
708 pathB.setFillType(SkPath::kWinding_FillType); | 708 pathB.setFillType(SkPath::kWinding_FillType); |
709 pathB.moveTo(1,6); | 709 pathB.moveTo(1,6); |
710 pathB.cubicTo(3,4, 1,0, 6,2); | 710 pathB.cubicTo(3,4, 1,0, 6,2); |
711 pathB.close(); | 711 pathB.close(); |
712 testPathOp(reporter, path, pathB, kDifference_PathOp); | 712 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
713 } | 713 } |
714 | 714 |
715 // this fails to detect a cubic/cubic intersection | 715 // this fails to detect a cubic/cubic intersection |
716 // the slight overlap is missed when the cubics are approximated by quadratics | 716 // the slight overlap is missed when the cubics are approximated by quadratics |
717 // and the subsequent line/cubic intersection also (correctly) misses the inters
ection | 717 // and the subsequent line/cubic intersection also (correctly) misses the inters
ection |
718 // if the line/cubic was a matching line/approx.quadratic then the missing inter
section | 718 // if the line/cubic was a matching line/approx.quadratic then the missing inter
section |
719 // could have been detected | 719 // could have been detected |
720 static void cubicOp38d(skiatest::Reporter* reporter) { | 720 static void cubicOp38d(skiatest::Reporter* reporter, const char* filename) { |
721 SkPath path, pathB; | 721 SkPath path, pathB; |
722 path.setFillType(SkPath::kWinding_FillType); | 722 path.setFillType(SkPath::kWinding_FillType); |
723 path.moveTo(0,1); | 723 path.moveTo(0,1); |
724 path.cubicTo(0,6, 3,2, 4,1); | 724 path.cubicTo(0,6, 3,2, 4,1); |
725 path.close(); | 725 path.close(); |
726 pathB.setFillType(SkPath::kWinding_FillType); | 726 pathB.setFillType(SkPath::kWinding_FillType); |
727 pathB.moveTo(2,3); | 727 pathB.moveTo(2,3); |
728 pathB.cubicTo(1,4, 1,0, 6,0); | 728 pathB.cubicTo(1,4, 1,0, 6,0); |
729 pathB.close(); | 729 pathB.close(); |
730 testPathOp(reporter, path, pathB, kDifference_PathOp); | 730 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
731 } | 731 } |
732 | 732 |
733 static void cubicOp39d(skiatest::Reporter* reporter) { | 733 static void cubicOp39d(skiatest::Reporter* reporter, const char* filename) { |
734 SkPath path, pathB; | 734 SkPath path, pathB; |
735 path.setFillType(SkPath::kWinding_FillType); | 735 path.setFillType(SkPath::kWinding_FillType); |
736 path.moveTo(0,1); | 736 path.moveTo(0,1); |
737 path.cubicTo(2,3, 5,1, 4,3); | 737 path.cubicTo(2,3, 5,1, 4,3); |
738 path.close(); | 738 path.close(); |
739 pathB.setFillType(SkPath::kWinding_FillType); | 739 pathB.setFillType(SkPath::kWinding_FillType); |
740 pathB.moveTo(1,5); | 740 pathB.moveTo(1,5); |
741 pathB.cubicTo(3,4, 1,0, 3,2); | 741 pathB.cubicTo(3,4, 1,0, 3,2); |
742 pathB.close(); | 742 pathB.close(); |
743 testPathOp(reporter, path, pathB, kDifference_PathOp); | 743 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
744 } | 744 } |
745 | 745 |
746 static void cubicOp40d(skiatest::Reporter* reporter) { | 746 static void cubicOp40d(skiatest::Reporter* reporter, const char* filename) { |
747 SkPath path, pathB; | 747 SkPath path, pathB; |
748 path.setFillType(SkPath::kWinding_FillType); | 748 path.setFillType(SkPath::kWinding_FillType); |
749 path.moveTo(0,1); | 749 path.moveTo(0,1); |
750 path.cubicTo(1,5, 3,2, 4,2); | 750 path.cubicTo(1,5, 3,2, 4,2); |
751 path.close(); | 751 path.close(); |
752 pathB.setFillType(SkPath::kWinding_FillType); | 752 pathB.setFillType(SkPath::kWinding_FillType); |
753 pathB.moveTo(2,3); | 753 pathB.moveTo(2,3); |
754 pathB.cubicTo(2,4, 1,0, 5,1); | 754 pathB.cubicTo(2,4, 1,0, 5,1); |
755 pathB.close(); | 755 pathB.close(); |
756 testPathOp(reporter, path, pathB, kDifference_PathOp); | 756 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
757 } | 757 } |
758 | 758 |
759 static void cubicOp41i(skiatest::Reporter* reporter) { | 759 static void cubicOp41i(skiatest::Reporter* reporter, const char* filename) { |
760 SkPath path, pathB; | 760 SkPath path, pathB; |
761 path.setFillType(SkPath::kWinding_FillType); | 761 path.setFillType(SkPath::kWinding_FillType); |
762 path.moveTo(0,1); | 762 path.moveTo(0,1); |
763 path.cubicTo(2,6, 4,3, 6,4); | 763 path.cubicTo(2,6, 4,3, 6,4); |
764 path.close(); | 764 path.close(); |
765 pathB.setFillType(SkPath::kWinding_FillType); | 765 pathB.setFillType(SkPath::kWinding_FillType); |
766 pathB.moveTo(3,4); | 766 pathB.moveTo(3,4); |
767 pathB.cubicTo(4,6, 1,0, 6,2); | 767 pathB.cubicTo(4,6, 1,0, 6,2); |
768 pathB.close(); | 768 pathB.close(); |
769 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 769 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
770 } | 770 } |
771 | 771 |
772 static void cubicOp42d(skiatest::Reporter* reporter) { | 772 static void cubicOp42d(skiatest::Reporter* reporter, const char* filename) { |
773 SkPath path, pathB; | 773 SkPath path, pathB; |
774 path.setFillType(SkPath::kWinding_FillType); | 774 path.setFillType(SkPath::kWinding_FillType); |
775 path.moveTo(0,1); | 775 path.moveTo(0,1); |
776 path.cubicTo(1,2, 6,5, 5,4); | 776 path.cubicTo(1,2, 6,5, 5,4); |
777 path.close(); | 777 path.close(); |
778 pathB.setFillType(SkPath::kWinding_FillType); | 778 pathB.setFillType(SkPath::kWinding_FillType); |
779 pathB.moveTo(5,6); | 779 pathB.moveTo(5,6); |
780 pathB.cubicTo(4,5, 1,0, 2,1); | 780 pathB.cubicTo(4,5, 1,0, 2,1); |
781 pathB.close(); | 781 pathB.close(); |
782 testPathOp(reporter, path, pathB, kDifference_PathOp); | 782 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
783 } | 783 } |
784 | 784 |
785 static void cubicOp43d(skiatest::Reporter* reporter) { | 785 static void cubicOp43d(skiatest::Reporter* reporter, const char* filename) { |
786 SkPath path, pathB; | 786 SkPath path, pathB; |
787 path.setFillType(SkPath::kWinding_FillType); | 787 path.setFillType(SkPath::kWinding_FillType); |
788 path.moveTo(0,2); | 788 path.moveTo(0,2); |
789 path.cubicTo(1,2, 4,0, 3,1); | 789 path.cubicTo(1,2, 4,0, 3,1); |
790 path.close(); | 790 path.close(); |
791 pathB.setFillType(SkPath::kWinding_FillType); | 791 pathB.setFillType(SkPath::kWinding_FillType); |
792 pathB.moveTo(0,4); | 792 pathB.moveTo(0,4); |
793 pathB.cubicTo(1,3, 2,0, 2,1); | 793 pathB.cubicTo(1,3, 2,0, 2,1); |
794 pathB.close(); | 794 pathB.close(); |
795 testPathOp(reporter, path, pathB, kDifference_PathOp); | 795 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
796 } | 796 } |
797 | 797 |
798 static void cubicOp44d(skiatest::Reporter* reporter) { | 798 static void cubicOp44d(skiatest::Reporter* reporter, const char* filename) { |
799 SkPath path, pathB; | 799 SkPath path, pathB; |
800 path.setFillType(SkPath::kWinding_FillType); | 800 path.setFillType(SkPath::kWinding_FillType); |
801 path.moveTo(0,2); | 801 path.moveTo(0,2); |
802 path.cubicTo(3,6, 4,0, 3,2); | 802 path.cubicTo(3,6, 4,0, 3,2); |
803 path.close(); | 803 path.close(); |
804 pathB.setFillType(SkPath::kWinding_FillType); | 804 pathB.setFillType(SkPath::kWinding_FillType); |
805 pathB.moveTo(0,4); | 805 pathB.moveTo(0,4); |
806 pathB.cubicTo(2,3, 2,0, 6,3); | 806 pathB.cubicTo(2,3, 2,0, 6,3); |
807 pathB.close(); | 807 pathB.close(); |
808 testPathOp(reporter, path, pathB, kDifference_PathOp); | 808 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
809 } | 809 } |
810 | 810 |
811 static void cubicOp45d(skiatest::Reporter* reporter) { | 811 static void cubicOp45d(skiatest::Reporter* reporter, const char* filename) { |
812 SkPath path, pathB; | 812 SkPath path, pathB; |
813 path.setFillType(SkPath::kWinding_FillType); | 813 path.setFillType(SkPath::kWinding_FillType); |
814 path.moveTo(0,2); | 814 path.moveTo(0,2); |
815 path.cubicTo(2,4, 4,0, 3,2); | 815 path.cubicTo(2,4, 4,0, 3,2); |
816 path.close(); | 816 path.close(); |
817 pathB.setFillType(SkPath::kWinding_FillType); | 817 pathB.setFillType(SkPath::kWinding_FillType); |
818 pathB.moveTo(0,4); | 818 pathB.moveTo(0,4); |
819 pathB.cubicTo(2,3, 2,0, 4,2); | 819 pathB.cubicTo(2,3, 2,0, 4,2); |
820 pathB.close(); | 820 pathB.close(); |
821 testPathOp(reporter, path, pathB, kDifference_PathOp); | 821 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
822 } | 822 } |
823 | 823 |
824 static void cubicOp46d(skiatest::Reporter* reporter) { | 824 static void cubicOp46d(skiatest::Reporter* reporter, const char* filename) { |
825 SkPath path, pathB; | 825 SkPath path, pathB; |
826 path.setFillType(SkPath::kWinding_FillType); | 826 path.setFillType(SkPath::kWinding_FillType); |
827 path.moveTo(0,2); | 827 path.moveTo(0,2); |
828 path.cubicTo(3,5, 5,0, 4,2); | 828 path.cubicTo(3,5, 5,0, 4,2); |
829 path.close(); | 829 path.close(); |
830 pathB.setFillType(SkPath::kWinding_FillType); | 830 pathB.setFillType(SkPath::kWinding_FillType); |
831 pathB.moveTo(0,5); | 831 pathB.moveTo(0,5); |
832 pathB.cubicTo(2,4, 2,0, 5,3); | 832 pathB.cubicTo(2,4, 2,0, 5,3); |
833 pathB.close(); | 833 pathB.close(); |
834 testPathOp(reporter, path, pathB, kDifference_PathOp); | 834 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
835 } | 835 } |
836 | 836 |
837 static void cubicOp47d(skiatest::Reporter* reporter) { | 837 static void cubicOp47d(skiatest::Reporter* reporter, const char* filename) { |
838 SkPath path, pathB; | 838 SkPath path, pathB; |
839 path.setFillType(SkPath::kWinding_FillType); | 839 path.setFillType(SkPath::kWinding_FillType); |
840 path.moveTo(0,1); | 840 path.moveTo(0,1); |
841 path.cubicTo(1,6, 6,2, 5,4); | 841 path.cubicTo(1,6, 6,2, 5,4); |
842 path.close(); | 842 path.close(); |
843 pathB.setFillType(SkPath::kWinding_FillType); | 843 pathB.setFillType(SkPath::kWinding_FillType); |
844 pathB.moveTo(2,6); | 844 pathB.moveTo(2,6); |
845 pathB.cubicTo(4,5, 1,0, 6,1); | 845 pathB.cubicTo(4,5, 1,0, 6,1); |
846 pathB.close(); | 846 pathB.close(); |
847 testPathOp(reporter, path, pathB, kDifference_PathOp); | 847 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
848 } | 848 } |
849 | 849 |
850 static void cubicOp48d(skiatest::Reporter* reporter) { | 850 static void cubicOp48d(skiatest::Reporter* reporter, const char* filename) { |
851 SkPath path, pathB; | 851 SkPath path, pathB; |
852 path.setFillType(SkPath::kWinding_FillType); | 852 path.setFillType(SkPath::kWinding_FillType); |
853 path.moveTo(0,2); | 853 path.moveTo(0,2); |
854 path.cubicTo(2,3, 5,1, 3,2); | 854 path.cubicTo(2,3, 5,1, 3,2); |
855 path.close(); | 855 path.close(); |
856 pathB.setFillType(SkPath::kWinding_FillType); | 856 pathB.setFillType(SkPath::kWinding_FillType); |
857 pathB.moveTo(1,5); | 857 pathB.moveTo(1,5); |
858 pathB.cubicTo(2,3, 2,0, 3,2); | 858 pathB.cubicTo(2,3, 2,0, 3,2); |
859 pathB.close(); | 859 pathB.close(); |
860 testPathOp(reporter, path, pathB, kDifference_PathOp); | 860 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
861 } | 861 } |
862 | 862 |
863 static void cubicOp49d(skiatest::Reporter* reporter) { | 863 static void cubicOp49d(skiatest::Reporter* reporter, const char* filename) { |
864 SkPath path, pathB; | 864 SkPath path, pathB; |
865 path.setFillType(SkPath::kWinding_FillType); | 865 path.setFillType(SkPath::kWinding_FillType); |
866 path.moveTo(0,2); | 866 path.moveTo(0,2); |
867 path.cubicTo(1,5, 3,2, 4,1); | 867 path.cubicTo(1,5, 3,2, 4,1); |
868 path.close(); | 868 path.close(); |
869 pathB.setFillType(SkPath::kWinding_FillType); | 869 pathB.setFillType(SkPath::kWinding_FillType); |
870 pathB.moveTo(2,3); | 870 pathB.moveTo(2,3); |
871 pathB.cubicTo(1,4, 2,0, 5,1); | 871 pathB.cubicTo(1,4, 2,0, 5,1); |
872 pathB.close(); | 872 pathB.close(); |
873 testPathOp(reporter, path, pathB, kDifference_PathOp); | 873 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
874 } | 874 } |
875 | 875 |
876 static void cubicOp50d(skiatest::Reporter* reporter) { | 876 static void cubicOp50d(skiatest::Reporter* reporter, const char* filename) { |
877 SkPath path, pathB; | 877 SkPath path, pathB; |
878 path.setFillType(SkPath::kWinding_FillType); | 878 path.setFillType(SkPath::kWinding_FillType); |
879 path.moveTo(0,3); | 879 path.moveTo(0,3); |
880 path.cubicTo(1,6, 5,0, 5,1); | 880 path.cubicTo(1,6, 5,0, 5,1); |
881 path.close(); | 881 path.close(); |
882 pathB.setFillType(SkPath::kWinding_FillType); | 882 pathB.setFillType(SkPath::kWinding_FillType); |
883 pathB.moveTo(0,5); | 883 pathB.moveTo(0,5); |
884 pathB.cubicTo(1,5, 3,0, 6,1); | 884 pathB.cubicTo(1,5, 3,0, 6,1); |
885 pathB.close(); | 885 pathB.close(); |
886 testPathOp(reporter, path, pathB, kDifference_PathOp); | 886 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
887 } | 887 } |
888 | 888 |
889 static void cubicOp51d(skiatest::Reporter* reporter) { | 889 static void cubicOp51d(skiatest::Reporter* reporter, const char* filename) { |
890 SkPath path, pathB; | 890 SkPath path, pathB; |
891 path.setFillType(SkPath::kWinding_FillType); | 891 path.setFillType(SkPath::kWinding_FillType); |
892 path.moveTo(0,3); | 892 path.moveTo(0,3); |
893 path.cubicTo(1,2, 4,1, 6,0); | 893 path.cubicTo(1,2, 4,1, 6,0); |
894 path.close(); | 894 path.close(); |
895 pathB.setFillType(SkPath::kWinding_FillType); | 895 pathB.setFillType(SkPath::kWinding_FillType); |
896 pathB.moveTo(1,4); | 896 pathB.moveTo(1,4); |
897 pathB.cubicTo(0,6, 3,0, 2,1); | 897 pathB.cubicTo(0,6, 3,0, 2,1); |
898 pathB.close(); | 898 pathB.close(); |
899 testPathOp(reporter, path, pathB, kDifference_PathOp); | 899 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
900 } | 900 } |
901 | 901 |
902 static void cubicOp52d(skiatest::Reporter* reporter) { | 902 static void cubicOp52d(skiatest::Reporter* reporter, const char* filename) { |
903 SkPath path, pathB; | 903 SkPath path, pathB; |
904 path.setFillType(SkPath::kWinding_FillType); | 904 path.setFillType(SkPath::kWinding_FillType); |
905 path.moveTo(0,2); | 905 path.moveTo(0,2); |
906 path.cubicTo(1,2, 5,4, 4,3); | 906 path.cubicTo(1,2, 5,4, 4,3); |
907 path.close(); | 907 path.close(); |
908 pathB.setFillType(SkPath::kWinding_FillType); | 908 pathB.setFillType(SkPath::kWinding_FillType); |
909 pathB.moveTo(4,5); | 909 pathB.moveTo(4,5); |
910 pathB.cubicTo(3,4, 2,0, 2,1); | 910 pathB.cubicTo(3,4, 2,0, 2,1); |
911 pathB.close(); | 911 pathB.close(); |
912 testPathOp(reporter, path, pathB, kDifference_PathOp); | 912 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
913 } | 913 } |
914 | 914 |
915 static void cubicOp53d(skiatest::Reporter* reporter) { | 915 static void cubicOp53d(skiatest::Reporter* reporter, const char* filename) { |
916 SkPath path, pathB; | 916 SkPath path, pathB; |
917 path.setFillType(SkPath::kWinding_FillType); | 917 path.setFillType(SkPath::kWinding_FillType); |
918 path.moveTo(0,3); | 918 path.moveTo(0,3); |
919 path.cubicTo(1,2, 5,3, 2,1); | 919 path.cubicTo(1,2, 5,3, 2,1); |
920 path.close(); | 920 path.close(); |
921 pathB.setFillType(SkPath::kWinding_FillType); | 921 pathB.setFillType(SkPath::kWinding_FillType); |
922 pathB.moveTo(3,5); | 922 pathB.moveTo(3,5); |
923 pathB.cubicTo(1,2, 3,0, 2,1); | 923 pathB.cubicTo(1,2, 3,0, 2,1); |
924 pathB.close(); | 924 pathB.close(); |
925 testPathOp(reporter, path, pathB, kDifference_PathOp); | 925 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
926 } | 926 } |
927 | 927 |
928 static void cubicOp54d(skiatest::Reporter* reporter) { | 928 static void cubicOp54d(skiatest::Reporter* reporter, const char* filename) { |
929 SkPath path, pathB; | 929 SkPath path, pathB; |
930 path.setFillType(SkPath::kWinding_FillType); | 930 path.setFillType(SkPath::kWinding_FillType); |
931 path.moveTo(0,4); | 931 path.moveTo(0,4); |
932 path.cubicTo(1,3, 5,4, 4,2); | 932 path.cubicTo(1,3, 5,4, 4,2); |
933 path.close(); | 933 path.close(); |
934 pathB.setFillType(SkPath::kWinding_FillType); | 934 pathB.setFillType(SkPath::kWinding_FillType); |
935 pathB.moveTo(4,5); | 935 pathB.moveTo(4,5); |
936 pathB.cubicTo(2,4, 4,0, 3,1); | 936 pathB.cubicTo(2,4, 4,0, 3,1); |
937 pathB.close(); | 937 pathB.close(); |
938 testPathOp(reporter, path, pathB, kDifference_PathOp); | 938 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
939 } | 939 } |
940 | 940 |
941 static void cubicOp55d(skiatest::Reporter* reporter) { | 941 static void cubicOp55d(skiatest::Reporter* reporter, const char* filename) { |
942 SkPath path, pathB; | 942 SkPath path, pathB; |
943 path.setFillType(SkPath::kWinding_FillType); | 943 path.setFillType(SkPath::kWinding_FillType); |
944 path.moveTo(0,5); | 944 path.moveTo(0,5); |
945 path.cubicTo(1,3, 3,2, 5,0); | 945 path.cubicTo(1,3, 3,2, 5,0); |
946 path.close(); | 946 path.close(); |
947 pathB.setFillType(SkPath::kWinding_FillType); | 947 pathB.setFillType(SkPath::kWinding_FillType); |
948 pathB.moveTo(2,3); | 948 pathB.moveTo(2,3); |
949 pathB.cubicTo(0,5, 5,0, 3,1); | 949 pathB.cubicTo(0,5, 5,0, 3,1); |
950 pathB.close(); | 950 pathB.close(); |
951 testPathOp(reporter, path, pathB, kDifference_PathOp); | 951 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
952 } | 952 } |
953 | 953 |
954 static void cubicOp56d(skiatest::Reporter* reporter) { | 954 static void cubicOp56d(skiatest::Reporter* reporter, const char* filename) { |
955 SkPath path, pathB; | 955 SkPath path, pathB; |
956 path.setFillType(SkPath::kWinding_FillType); | 956 path.setFillType(SkPath::kWinding_FillType); |
957 path.moveTo(0,1); | 957 path.moveTo(0,1); |
958 path.cubicTo(2,6, 5,0, 2,1); | 958 path.cubicTo(2,6, 5,0, 2,1); |
959 path.close(); | 959 path.close(); |
960 pathB.setFillType(SkPath::kWinding_FillType); | 960 pathB.setFillType(SkPath::kWinding_FillType); |
961 pathB.moveTo(0,5); | 961 pathB.moveTo(0,5); |
962 pathB.cubicTo(1,2, 1,0, 6,2); | 962 pathB.cubicTo(1,2, 1,0, 6,2); |
963 pathB.close(); | 963 pathB.close(); |
964 testPathOp(reporter, path, pathB, kDifference_PathOp); | 964 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
965 } | 965 } |
966 | 966 |
967 static void cubicOp57d(skiatest::Reporter* reporter) { | 967 static void cubicOp57d(skiatest::Reporter* reporter, const char* filename) { |
968 SkPath path, pathB; | 968 SkPath path, pathB; |
969 path.setFillType(SkPath::kWinding_FillType); | 969 path.setFillType(SkPath::kWinding_FillType); |
970 path.moveTo(0,5); | 970 path.moveTo(0,5); |
971 path.cubicTo(0,5, 5,4, 6,4); | 971 path.cubicTo(0,5, 5,4, 6,4); |
972 path.close(); | 972 path.close(); |
973 pathB.setFillType(SkPath::kWinding_FillType); | 973 pathB.setFillType(SkPath::kWinding_FillType); |
974 pathB.moveTo(4,5); | 974 pathB.moveTo(4,5); |
975 pathB.cubicTo(4,6, 5,0, 5,0); | 975 pathB.cubicTo(4,6, 5,0, 5,0); |
976 pathB.close(); | 976 pathB.close(); |
977 testPathOp(reporter, path, pathB, kDifference_PathOp); | 977 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
978 } | 978 } |
979 | 979 |
980 static void cubicOp58d(skiatest::Reporter* reporter) { | 980 static void cubicOp58d(skiatest::Reporter* reporter, const char* filename) { |
981 SkPath path, pathB; | 981 SkPath path, pathB; |
982 path.setFillType(SkPath::kWinding_FillType); | 982 path.setFillType(SkPath::kWinding_FillType); |
983 path.moveTo(0,5); | 983 path.moveTo(0,5); |
984 path.cubicTo(3,4, 6,5, 5,3); | 984 path.cubicTo(3,4, 6,5, 5,3); |
985 path.close(); | 985 path.close(); |
986 pathB.setFillType(SkPath::kWinding_FillType); | 986 pathB.setFillType(SkPath::kWinding_FillType); |
987 pathB.moveTo(5,6); | 987 pathB.moveTo(5,6); |
988 pathB.cubicTo(3,5, 5,0, 4,3); | 988 pathB.cubicTo(3,5, 5,0, 4,3); |
989 pathB.close(); | 989 pathB.close(); |
990 testPathOp(reporter, path, pathB, kDifference_PathOp); | 990 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
991 } | 991 } |
992 | 992 |
993 static void cubicOp59d(skiatest::Reporter* reporter) { | 993 static void cubicOp59d(skiatest::Reporter* reporter, const char* filename) { |
994 SkPath path, pathB; | 994 SkPath path, pathB; |
995 path.setFillType(SkPath::kWinding_FillType); | 995 path.setFillType(SkPath::kWinding_FillType); |
996 path.moveTo(0,1); | 996 path.moveTo(0,1); |
997 path.cubicTo(5,6, 4,0, 4,1); | 997 path.cubicTo(5,6, 4,0, 4,1); |
998 path.close(); | 998 path.close(); |
999 pathB.setFillType(SkPath::kWinding_FillType); | 999 pathB.setFillType(SkPath::kWinding_FillType); |
1000 pathB.moveTo(0,4); | 1000 pathB.moveTo(0,4); |
1001 pathB.cubicTo(1,4, 1,0, 6,5); | 1001 pathB.cubicTo(1,4, 1,0, 6,5); |
1002 pathB.close(); | 1002 pathB.close(); |
1003 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1003 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1004 } | 1004 } |
1005 | 1005 |
1006 static void cubicOp60d(skiatest::Reporter* reporter) { | 1006 static void cubicOp60d(skiatest::Reporter* reporter, const char* filename) { |
1007 SkPath path, pathB; | 1007 SkPath path, pathB; |
1008 path.setFillType(SkPath::kWinding_FillType); | 1008 path.setFillType(SkPath::kWinding_FillType); |
1009 path.moveTo(0,2); | 1009 path.moveTo(0,2); |
1010 path.cubicTo(4,6, 6,0, 5,2); | 1010 path.cubicTo(4,6, 6,0, 5,2); |
1011 path.close(); | 1011 path.close(); |
1012 pathB.setFillType(SkPath::kWinding_FillType); | 1012 pathB.setFillType(SkPath::kWinding_FillType); |
1013 pathB.moveTo(0,6); | 1013 pathB.moveTo(0,6); |
1014 pathB.cubicTo(2,5, 2,0, 6,4); | 1014 pathB.cubicTo(2,5, 2,0, 6,4); |
1015 pathB.close(); | 1015 pathB.close(); |
1016 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1016 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1017 } | 1017 } |
1018 | 1018 |
1019 static void cubicOp61d(skiatest::Reporter* reporter) { | 1019 static void cubicOp61d(skiatest::Reporter* reporter, const char* filename) { |
1020 SkPath path, pathB; | 1020 SkPath path, pathB; |
1021 path.setFillType(SkPath::kWinding_FillType); | 1021 path.setFillType(SkPath::kWinding_FillType); |
1022 path.moveTo(1,2); | 1022 path.moveTo(1,2); |
1023 path.cubicTo(0,5, 3,2, 6,1); | 1023 path.cubicTo(0,5, 3,2, 6,1); |
1024 path.close(); | 1024 path.close(); |
1025 pathB.setFillType(SkPath::kWinding_FillType); | 1025 pathB.setFillType(SkPath::kWinding_FillType); |
1026 pathB.moveTo(2,3); | 1026 pathB.moveTo(2,3); |
1027 pathB.cubicTo(1,6, 2,1, 5,0); | 1027 pathB.cubicTo(1,6, 2,1, 5,0); |
1028 pathB.close(); | 1028 pathB.close(); |
1029 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1029 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1030 } | 1030 } |
1031 | 1031 |
1032 static void cubicOp62d(skiatest::Reporter* reporter) { | 1032 static void cubicOp62d(skiatest::Reporter* reporter, const char* filename) { |
1033 SkPath path, pathB; | 1033 SkPath path, pathB; |
1034 path.setFillType(SkPath::kWinding_FillType); | 1034 path.setFillType(SkPath::kWinding_FillType); |
1035 path.moveTo(1,3); | 1035 path.moveTo(1,3); |
1036 path.cubicTo(5,6, 5,3, 5,4); | 1036 path.cubicTo(5,6, 5,3, 5,4); |
1037 path.close(); | 1037 path.close(); |
1038 pathB.setFillType(SkPath::kWinding_FillType); | 1038 pathB.setFillType(SkPath::kWinding_FillType); |
1039 pathB.moveTo(3,5); | 1039 pathB.moveTo(3,5); |
1040 pathB.cubicTo(4,5, 3,1, 6,5); | 1040 pathB.cubicTo(4,5, 3,1, 6,5); |
1041 pathB.close(); | 1041 pathB.close(); |
1042 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1042 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1043 } | 1043 } |
1044 | 1044 |
1045 static void cubicOp63d(skiatest::Reporter* reporter) { | 1045 static void cubicOp63d(skiatest::Reporter* reporter, const char* filename) { |
1046 SkPath path, pathB; | 1046 SkPath path, pathB; |
1047 path.setFillType(SkPath::kWinding_FillType); | 1047 path.setFillType(SkPath::kWinding_FillType); |
1048 path.moveTo(2,3); | 1048 path.moveTo(2,3); |
1049 path.cubicTo(0,4, 3,2, 5,3); | 1049 path.cubicTo(0,4, 3,2, 5,3); |
1050 path.close(); | 1050 path.close(); |
1051 pathB.setFillType(SkPath::kWinding_FillType); | 1051 pathB.setFillType(SkPath::kWinding_FillType); |
1052 pathB.moveTo(2,3); | 1052 pathB.moveTo(2,3); |
1053 pathB.cubicTo(3,5, 3,2, 4,0); | 1053 pathB.cubicTo(3,5, 3,2, 4,0); |
1054 pathB.close(); | 1054 pathB.close(); |
1055 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1055 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1056 } | 1056 } |
1057 | 1057 |
1058 static void cubicOp64d(skiatest::Reporter* reporter) { | 1058 static void cubicOp64d(skiatest::Reporter* reporter, const char* filename) { |
1059 SkPath path, pathB; | 1059 SkPath path, pathB; |
1060 path.moveTo(0,1); | 1060 path.moveTo(0,1); |
1061 path.cubicTo(0,1, 1,0, 3,0); | 1061 path.cubicTo(0,1, 1,0, 3,0); |
1062 path.lineTo(0,1); | 1062 path.lineTo(0,1); |
1063 path.close(); | 1063 path.close(); |
1064 pathB.moveTo(0,1); | 1064 pathB.moveTo(0,1); |
1065 pathB.cubicTo(0,3, 1,0, 1,0); | 1065 pathB.cubicTo(0,3, 1,0, 1,0); |
1066 pathB.lineTo(0,1); | 1066 pathB.lineTo(0,1); |
1067 pathB.close(); | 1067 pathB.close(); |
1068 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1068 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1069 } | 1069 } |
1070 | 1070 |
1071 static void cubicOp65d(skiatest::Reporter* reporter) { | 1071 static void cubicOp65d(skiatest::Reporter* reporter, const char* filename) { |
1072 SkPath path, pathB; | 1072 SkPath path, pathB; |
1073 path.moveTo(0,1); | 1073 path.moveTo(0,1); |
1074 path.cubicTo(1,5, 1,0, 1,0); | 1074 path.cubicTo(1,5, 1,0, 1,0); |
1075 path.lineTo(0,1); | 1075 path.lineTo(0,1); |
1076 path.close(); | 1076 path.close(); |
1077 pathB.moveTo(0,1); | 1077 pathB.moveTo(0,1); |
1078 pathB.cubicTo(0,1, 1,0, 5,1); | 1078 pathB.cubicTo(0,1, 1,0, 5,1); |
1079 pathB.lineTo(0,1); | 1079 pathB.lineTo(0,1); |
1080 pathB.close(); | 1080 pathB.close(); |
1081 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1081 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1082 } | 1082 } |
1083 | 1083 |
1084 static void rectOp1d(skiatest::Reporter* reporter) { | 1084 static void rectOp1d(skiatest::Reporter* reporter, const char* filename) { |
1085 SkPath path, pathB; | 1085 SkPath path, pathB; |
1086 path.moveTo(0,1); | 1086 path.moveTo(0,1); |
1087 path.cubicTo(0,1, 1,0, 3,0); | 1087 path.cubicTo(0,1, 1,0, 3,0); |
1088 path.lineTo(0,1); | 1088 path.lineTo(0,1); |
1089 path.close(); | 1089 path.close(); |
1090 pathB.moveTo(0,1); | 1090 pathB.moveTo(0,1); |
1091 pathB.cubicTo(0,3, 1,0, 1,0); | 1091 pathB.cubicTo(0,3, 1,0, 1,0); |
1092 pathB.lineTo(0,1); | 1092 pathB.lineTo(0,1); |
1093 pathB.close(); | 1093 pathB.close(); |
1094 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1094 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1095 } | 1095 } |
1096 | 1096 |
1097 static void cubicOp66u(skiatest::Reporter* reporter) { | 1097 static void cubicOp66u(skiatest::Reporter* reporter, const char* filename) { |
1098 SkPath path, pathB; | 1098 SkPath path, pathB; |
1099 path.setFillType(SkPath::kWinding_FillType); | 1099 path.setFillType(SkPath::kWinding_FillType); |
1100 path.moveTo(0,1); | 1100 path.moveTo(0,1); |
1101 path.cubicTo(2,6, 4,2, 5,3); | 1101 path.cubicTo(2,6, 4,2, 5,3); |
1102 path.close(); | 1102 path.close(); |
1103 pathB.setFillType(SkPath::kWinding_FillType); | 1103 pathB.setFillType(SkPath::kWinding_FillType); |
1104 pathB.moveTo(2,4); | 1104 pathB.moveTo(2,4); |
1105 pathB.cubicTo(3,5, 1,0, 6,2); | 1105 pathB.cubicTo(3,5, 1,0, 6,2); |
1106 pathB.close(); | 1106 pathB.close(); |
1107 testPathOp(reporter, path, pathB, kUnion_PathOp); | 1107 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
1108 } | 1108 } |
1109 | 1109 |
1110 static void cubicOp67u(skiatest::Reporter* reporter) { | 1110 static void cubicOp67u(skiatest::Reporter* reporter, const char* filename) { |
1111 SkPath path, pathB; | 1111 SkPath path, pathB; |
1112 path.moveTo(3,5); | 1112 path.moveTo(3,5); |
1113 path.cubicTo(1,6, 5,0, 3,1); | 1113 path.cubicTo(1,6, 5,0, 3,1); |
1114 path.lineTo(3,5); | 1114 path.lineTo(3,5); |
1115 path.close(); | 1115 path.close(); |
1116 pathB.moveTo(0,5); | 1116 pathB.moveTo(0,5); |
1117 pathB.cubicTo(1,3, 5,3, 6,1); | 1117 pathB.cubicTo(1,3, 5,3, 6,1); |
1118 pathB.lineTo(0,5); | 1118 pathB.lineTo(0,5); |
1119 pathB.close(); | 1119 pathB.close(); |
1120 testPathOp(reporter, path, pathB, kUnion_PathOp); | 1120 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
1121 } | 1121 } |
1122 | 1122 |
1123 static void cubicOp68u(skiatest::Reporter* reporter) { | 1123 static void cubicOp68u(skiatest::Reporter* reporter, const char* filename) { |
1124 SkPath path, pathB; | 1124 SkPath path, pathB; |
1125 path.moveTo(0,5); | 1125 path.moveTo(0,5); |
1126 path.cubicTo(4,5, 4,1, 5,0); | 1126 path.cubicTo(4,5, 4,1, 5,0); |
1127 path.close(); | 1127 path.close(); |
1128 pathB.moveTo(1,4); | 1128 pathB.moveTo(1,4); |
1129 pathB.cubicTo(0,5, 5,0, 5,4); | 1129 pathB.cubicTo(0,5, 5,0, 5,4); |
1130 pathB.close(); | 1130 pathB.close(); |
1131 testPathOp(reporter, path, pathB, kUnion_PathOp); | 1131 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
1132 } | 1132 } |
1133 | 1133 |
1134 static void cubicOp69d(skiatest::Reporter* reporter) { | 1134 static void cubicOp69d(skiatest::Reporter* reporter, const char* filename) { |
1135 SkPath path, pathB; | 1135 SkPath path, pathB; |
1136 path.moveTo(1,3); | 1136 path.moveTo(1,3); |
1137 path.cubicTo(0,1, 3,1, 2,0); | 1137 path.cubicTo(0,1, 3,1, 2,0); |
1138 path.close(); | 1138 path.close(); |
1139 pathB.moveTo(1,3); | 1139 pathB.moveTo(1,3); |
1140 pathB.cubicTo(0,2, 3,1, 1,0); | 1140 pathB.cubicTo(0,2, 3,1, 1,0); |
1141 pathB.close(); | 1141 pathB.close(); |
1142 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1142 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1143 } | 1143 } |
1144 | 1144 |
1145 SkPathOp ops[] = { | 1145 SkPathOp ops[] = { |
1146 kUnion_PathOp, | 1146 kUnion_PathOp, |
1147 kXOR_PathOp, | 1147 kXOR_PathOp, |
1148 kReverseDifference_PathOp, | 1148 kReverseDifference_PathOp, |
1149 kXOR_PathOp, | 1149 kXOR_PathOp, |
1150 kReverseDifference_PathOp, | 1150 kReverseDifference_PathOp, |
1151 }; | 1151 }; |
1152 | 1152 |
1153 static void rRect1(skiatest::Reporter* reporter) { | 1153 static void rRect1(skiatest::Reporter* reporter, const char* filename) { |
1154 SkScalar xA = 0.65f; | 1154 SkScalar xA = 0.65f; |
1155 SkScalar xB = 10.65f; | 1155 SkScalar xB = 10.65f; |
1156 SkScalar xC = 20.65f; | 1156 SkScalar xC = 20.65f; |
1157 SkScalar xD = 30.65f; | 1157 SkScalar xD = 30.65f; |
1158 SkScalar xE = 40.65f; | 1158 SkScalar xE = 40.65f; |
1159 SkScalar xF = 50.65f; | 1159 SkScalar xF = 50.65f; |
1160 | 1160 |
1161 SkScalar yA = 0.65f; | 1161 SkScalar yA = 0.65f; |
1162 SkScalar yB = 10.65f; | 1162 SkScalar yB = 10.65f; |
1163 SkScalar yC = 20.65f; | 1163 SkScalar yC = 20.65f; |
1164 SkScalar yD = 30.65f; | 1164 SkScalar yD = 30.65f; |
1165 SkScalar yE = 40.65f; | 1165 SkScalar yE = 40.65f; |
1166 SkScalar yF = 50.65f; | 1166 SkScalar yF = 50.65f; |
1167 SkPath paths[5]; | 1167 SkPath paths[5]; |
1168 SkRect rects[5]; | 1168 SkRect rects[5]; |
1169 rects[0].set(xB, yB, xE, yE); | 1169 rects[0].set(xB, yB, xE, yE); |
1170 paths[0].addRoundRect(rects[0], SkIntToScalar(5), SkIntToScalar(5)); // red | 1170 paths[0].addRoundRect(rects[0], SkIntToScalar(5), SkIntToScalar(5)); // red |
1171 rects[1].set(xA, yA, xD, yD); | 1171 rects[1].set(xA, yA, xD, yD); |
1172 paths[1].addRoundRect(rects[1], SkIntToScalar(5), SkIntToScalar(5)); // gre
en | 1172 paths[1].addRoundRect(rects[1], SkIntToScalar(5), SkIntToScalar(5)); // gre
en |
1173 rects[2].set(xC, yA, xF, yD); | 1173 rects[2].set(xC, yA, xF, yD); |
1174 paths[2].addRoundRect(rects[2], SkIntToScalar(5), SkIntToScalar(5)); // blu
e | 1174 paths[2].addRoundRect(rects[2], SkIntToScalar(5), SkIntToScalar(5)); // blu
e |
1175 rects[3].set(xA, yC, xD, yF); | 1175 rects[3].set(xA, yC, xD, yF); |
1176 paths[3].addRoundRect(rects[3], SkIntToScalar(5), SkIntToScalar(5)); // yel
low | 1176 paths[3].addRoundRect(rects[3], SkIntToScalar(5), SkIntToScalar(5)); // yel
low |
1177 rects[4].set(xC, yC, xF, yF); | 1177 rects[4].set(xC, yC, xF, yF); |
1178 paths[4].addRoundRect(rects[4], SkIntToScalar(5), SkIntToScalar(5)); // cya
n | 1178 paths[4].addRoundRect(rects[4], SkIntToScalar(5), SkIntToScalar(5)); // cya
n |
1179 SkPath path; | 1179 SkPath path; |
1180 path.setFillType(SkPath::kInverseEvenOdd_FillType); | 1180 path.setFillType(SkPath::kInverseEvenOdd_FillType); |
1181 for (int index = 0; index < 5; ++index) { | 1181 for (int index = 0; index < 5; ++index) { |
1182 testPathOp(reporter, path, paths[index], ops[index]); | 1182 testPathOp(reporter, path, paths[index], ops[index], filename); |
1183 Op(path, paths[index], ops[index], &path); | 1183 Op(path, paths[index], ops[index], &path); |
1184 } | 1184 } |
1185 } | 1185 } |
1186 | 1186 |
1187 static void skp1(skiatest::Reporter* reporter) { | 1187 static void skp1(skiatest::Reporter* reporter, const char* filename) { |
1188 SkPath path; | 1188 SkPath path; |
1189 path.setFillType(SkPath::kEvenOdd_FillType); | 1189 path.setFillType(SkPath::kEvenOdd_FillType); |
1190 path.moveTo(189,7); | 1190 path.moveTo(189,7); |
1191 path.cubicTo(189,5.34314585f, 190.34314f,4, 192,4); | 1191 path.cubicTo(189,5.34314585f, 190.34314f,4, 192,4); |
1192 path.lineTo(243,4); | 1192 path.lineTo(243,4); |
1193 path.cubicTo(244.65686f,4, 246,5.34314585f, 246,7); | 1193 path.cubicTo(244.65686f,4, 246,5.34314585f, 246,7); |
1194 path.lineTo(246,21); | 1194 path.lineTo(246,21); |
1195 path.cubicTo(246,22.6568546f, 244.65686f,24, 243,24); | 1195 path.cubicTo(246,22.6568546f, 244.65686f,24, 243,24); |
1196 path.lineTo(192,24); | 1196 path.lineTo(192,24); |
1197 path.cubicTo(190.34314f,24, 189,22.6568546f, 189,21); | 1197 path.cubicTo(190.34314f,24, 189,22.6568546f, 189,21); |
(...skipping 10 matching lines...) Expand all Loading... |
1208 path.lineTo(191,8); | 1208 path.lineTo(191,8); |
1209 path.close(); | 1209 path.close(); |
1210 SkPath pathB; | 1210 SkPath pathB; |
1211 pathB.setFillType(SkPath::kWinding_FillType); | 1211 pathB.setFillType(SkPath::kWinding_FillType); |
1212 pathB.moveTo(189,4); | 1212 pathB.moveTo(189,4); |
1213 pathB.lineTo(199,14); | 1213 pathB.lineTo(199,14); |
1214 pathB.lineTo(236,14); | 1214 pathB.lineTo(236,14); |
1215 pathB.lineTo(246,4); | 1215 pathB.lineTo(246,4); |
1216 pathB.lineTo(189,4); | 1216 pathB.lineTo(189,4); |
1217 pathB.close(); | 1217 pathB.close(); |
1218 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1218 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1219 } | 1219 } |
1220 | 1220 |
1221 static void skp2(skiatest::Reporter* reporter) { | 1221 static void skp2(skiatest::Reporter* reporter, const char* filename) { |
1222 SkPath path; | 1222 SkPath path; |
1223 path.setFillType(SkPath::kEvenOdd_FillType); | 1223 path.setFillType(SkPath::kEvenOdd_FillType); |
1224 path.moveTo(253.000000f, 11757.0000f); | 1224 path.moveTo(253.000000f, 11757.0000f); |
1225 path.lineTo(253.000000f, 222.000000f); | 1225 path.lineTo(253.000000f, 222.000000f); |
1226 path.lineTo(823.000000f, 222.000000f); | 1226 path.lineTo(823.000000f, 222.000000f); |
1227 path.lineTo(823.000000f, 11757.0000f); | 1227 path.lineTo(823.000000f, 11757.0000f); |
1228 path.lineTo(253.000000f, 11757.0000f); | 1228 path.lineTo(253.000000f, 11757.0000f); |
1229 path.close(); | 1229 path.close(); |
1230 SkPath pathB; | 1230 SkPath pathB; |
1231 pathB.setFillType(SkPath::kWinding_FillType); | 1231 pathB.setFillType(SkPath::kWinding_FillType); |
1232 pathB.moveTo(258.000000f, 1028.00000f); | 1232 pathB.moveTo(258.000000f, 1028.00000f); |
1233 pathB.lineTo(258.000000f, 1027.00000f); | 1233 pathB.lineTo(258.000000f, 1027.00000f); |
1234 pathB.lineTo(823.000000f, 1027.00000f); | 1234 pathB.lineTo(823.000000f, 1027.00000f); |
1235 pathB.lineTo(823.000000f, 1028.00000f); | 1235 pathB.lineTo(823.000000f, 1028.00000f); |
1236 pathB.lineTo(258.000000f, 1028.00000f); | 1236 pathB.lineTo(258.000000f, 1028.00000f); |
1237 pathB.close(); | 1237 pathB.close(); |
1238 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1238 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1239 } | 1239 } |
1240 | 1240 |
1241 static void skp3(skiatest::Reporter* reporter) { | 1241 static void skp3(skiatest::Reporter* reporter, const char* filename) { |
1242 SkPath path; | 1242 SkPath path; |
1243 path.setFillType(SkPath::kEvenOdd_FillType); | 1243 path.setFillType(SkPath::kEvenOdd_FillType); |
1244 path.moveTo(717.000000f, 507.000000f); | 1244 path.moveTo(717.000000f, 507.000000f); |
1245 path.lineTo(717.000000f, 425.000000f); | 1245 path.lineTo(717.000000f, 425.000000f); |
1246 path.lineTo(973.000000f, 425.000000f); | 1246 path.lineTo(973.000000f, 425.000000f); |
1247 path.lineTo(973.000000f, 507.000000f); | 1247 path.lineTo(973.000000f, 507.000000f); |
1248 path.quadTo(973.000000f, 508.242645f, 972.121582f, 509.121613f); | 1248 path.quadTo(973.000000f, 508.242645f, 972.121582f, 509.121613f); |
1249 path.quadTo(971.242615f, 510.000000f, 970.000000f, 510.000000f); | 1249 path.quadTo(971.242615f, 510.000000f, 970.000000f, 510.000000f); |
1250 path.lineTo(720.000000f, 510.000000f); | 1250 path.lineTo(720.000000f, 510.000000f); |
1251 path.quadTo(718.757385f, 510.000000f, 717.878418f, 509.121613f); | 1251 path.quadTo(718.757385f, 510.000000f, 717.878418f, 509.121613f); |
1252 path.quadTo(717.000000f, 508.242645f, 717.000000f, 507.000000f); | 1252 path.quadTo(717.000000f, 508.242645f, 717.000000f, 507.000000f); |
1253 path.close(); | 1253 path.close(); |
1254 path.moveTo(719.000000f, 426.000000f); | 1254 path.moveTo(719.000000f, 426.000000f); |
1255 path.lineTo(971.000000f, 426.000000f); | 1255 path.lineTo(971.000000f, 426.000000f); |
1256 path.lineTo(971.000000f, 506.000000f); | 1256 path.lineTo(971.000000f, 506.000000f); |
1257 path.cubicTo(971.000000f, 507.104584f, 970.104553f, 508.000000f, 969.000000f
, 508.000000f); | 1257 path.cubicTo(971.000000f, 507.104584f, 970.104553f, 508.000000f, 969.000000f
, 508.000000f); |
1258 path.lineTo(721.000000f, 508.000000f); | 1258 path.lineTo(721.000000f, 508.000000f); |
1259 path.cubicTo(719.895447f, 508.000000f, 719.000000f, 507.104584f, 719.000000f
, 506.000000f); | 1259 path.cubicTo(719.895447f, 508.000000f, 719.000000f, 507.104584f, 719.000000f
, 506.000000f); |
1260 path.lineTo(719.000000f, 426.000000f); | 1260 path.lineTo(719.000000f, 426.000000f); |
1261 path.close(); | 1261 path.close(); |
1262 SkPath pathB; | 1262 SkPath pathB; |
1263 pathB.setFillType(SkPath::kWinding_FillType); | 1263 pathB.setFillType(SkPath::kWinding_FillType); |
1264 pathB.moveTo(717.000000f, 510.000000f); | 1264 pathB.moveTo(717.000000f, 510.000000f); |
1265 pathB.lineTo(760.000000f, 467.000000f); | 1265 pathB.lineTo(760.000000f, 467.000000f); |
1266 pathB.lineTo(930.000000f, 467.000000f); | 1266 pathB.lineTo(930.000000f, 467.000000f); |
1267 pathB.lineTo(973.000000f, 510.000000f); | 1267 pathB.lineTo(973.000000f, 510.000000f); |
1268 pathB.lineTo(717.000000f, 510.000000f); | 1268 pathB.lineTo(717.000000f, 510.000000f); |
1269 pathB.close(); | 1269 pathB.close(); |
1270 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1270 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1271 } | 1271 } |
1272 | 1272 |
1273 static void skp4(skiatest::Reporter* reporter) { | 1273 static void skp4(skiatest::Reporter* reporter, const char* filename) { |
1274 SkPath path; | 1274 SkPath path; |
1275 path.setFillType(SkPath::kEvenOdd_FillType); | 1275 path.setFillType(SkPath::kEvenOdd_FillType); |
1276 path.moveTo(230.756805f, 591.756775f); | 1276 path.moveTo(230.756805f, 591.756775f); |
1277 path.quadTo(232.514725f, 590.000000f, 235.000000f, 590.000000f); | 1277 path.quadTo(232.514725f, 590.000000f, 235.000000f, 590.000000f); |
1278 path.lineTo(300.000000f, 590.000000f); | 1278 path.lineTo(300.000000f, 590.000000f); |
1279 path.quadTo(302.485291f, 590.000000f, 304.243195f, 591.756775f); | 1279 path.quadTo(302.485291f, 590.000000f, 304.243195f, 591.756775f); |
1280 path.quadTo(306.000000f, 593.514709f, 306.000000f, 596.000000f); | 1280 path.quadTo(306.000000f, 593.514709f, 306.000000f, 596.000000f); |
1281 path.lineTo(306.000000f, 617.000000f); | 1281 path.lineTo(306.000000f, 617.000000f); |
1282 path.lineTo(229.000000f, 617.000000f); | 1282 path.lineTo(229.000000f, 617.000000f); |
1283 path.lineTo(229.000000f, 596.000000f); | 1283 path.lineTo(229.000000f, 596.000000f); |
1284 path.quadTo(229.000000f, 593.514709f, 230.756805f, 591.756775f); | 1284 path.quadTo(229.000000f, 593.514709f, 230.756805f, 591.756775f); |
1285 path.close(); | 1285 path.close(); |
1286 path.moveTo(231.000000f, 597.000000f); | 1286 path.moveTo(231.000000f, 597.000000f); |
1287 path.cubicTo(231.000000f, 594.238586f, 233.238571f, 592.000000f, 236.000000f
, 592.000000f); | 1287 path.cubicTo(231.000000f, 594.238586f, 233.238571f, 592.000000f, 236.000000f
, 592.000000f); |
1288 path.lineTo(299.000000f, 592.000000f); | 1288 path.lineTo(299.000000f, 592.000000f); |
1289 path.cubicTo(301.761414f, 592.000000f, 304.000000f, 594.238586f, 304.000000f
, 597.000000f); | 1289 path.cubicTo(301.761414f, 592.000000f, 304.000000f, 594.238586f, 304.000000f
, 597.000000f); |
1290 path.lineTo(304.000000f, 616.000000f); | 1290 path.lineTo(304.000000f, 616.000000f); |
1291 path.lineTo(231.000000f, 616.000000f); | 1291 path.lineTo(231.000000f, 616.000000f); |
1292 path.lineTo(231.000000f, 597.000000f); | 1292 path.lineTo(231.000000f, 597.000000f); |
1293 path.close(); | 1293 path.close(); |
1294 SkPath pathB; | 1294 SkPath pathB; |
1295 pathB.setFillType(SkPath::kWinding_FillType); | 1295 pathB.setFillType(SkPath::kWinding_FillType); |
1296 pathB.moveTo(306.000000f, 590.000000f); | 1296 pathB.moveTo(306.000000f, 590.000000f); |
1297 pathB.lineTo(292.000000f, 604.000000f); | 1297 pathB.lineTo(292.000000f, 604.000000f); |
1298 pathB.lineTo(305.000000f, 617.000000f); | 1298 pathB.lineTo(305.000000f, 617.000000f); |
1299 pathB.lineTo(306.000000f, 617.000000f); | 1299 pathB.lineTo(306.000000f, 617.000000f); |
1300 pathB.lineTo(306.000000f, 590.000000f); | 1300 pathB.lineTo(306.000000f, 590.000000f); |
1301 pathB.close(); | 1301 pathB.close(); |
1302 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1302 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1303 } | 1303 } |
1304 | 1304 |
1305 static void skp5(skiatest::Reporter* reporter) { | 1305 static void skp5(skiatest::Reporter* reporter, const char* filename) { |
1306 SkPath path; | 1306 SkPath path; |
1307 path.setFillType(SkPath::kEvenOdd_FillType); | 1307 path.setFillType(SkPath::kEvenOdd_FillType); |
1308 path.moveTo(18.0000000f, 226.000000f); | 1308 path.moveTo(18.0000000f, 226.000000f); |
1309 path.quadTo(14.6862917f, 226.000000f, 12.3423996f, 228.342407f); | 1309 path.quadTo(14.6862917f, 226.000000f, 12.3423996f, 228.342407f); |
1310 path.quadTo(10.0000000f, 230.686295f, 10.0000000f, 234.000000f); | 1310 path.quadTo(10.0000000f, 230.686295f, 10.0000000f, 234.000000f); |
1311 path.lineTo(10.0000000f, 253.000000f); | 1311 path.lineTo(10.0000000f, 253.000000f); |
1312 path.lineTo(1247.00000f, 253.000000f); | 1312 path.lineTo(1247.00000f, 253.000000f); |
1313 path.lineTo(1247.00000f, 234.000000f); | 1313 path.lineTo(1247.00000f, 234.000000f); |
1314 path.quadTo(1247.00000f, 230.686295f, 1244.65759f, 228.342407f); | 1314 path.quadTo(1247.00000f, 230.686295f, 1244.65759f, 228.342407f); |
1315 path.quadTo(1242.31372f, 226.000000f, 1239.00000f, 226.000000f); | 1315 path.quadTo(1242.31372f, 226.000000f, 1239.00000f, 226.000000f); |
1316 path.lineTo(18.0000000f, 226.000000f); | 1316 path.lineTo(18.0000000f, 226.000000f); |
1317 path.close(); | 1317 path.close(); |
1318 SkPath pathB; | 1318 SkPath pathB; |
1319 pathB.setFillType(SkPath::kInverseWinding_FillType); | 1319 pathB.setFillType(SkPath::kInverseWinding_FillType); |
1320 pathB.moveTo(18.0000000f, 226.000000f); | 1320 pathB.moveTo(18.0000000f, 226.000000f); |
1321 pathB.lineTo(1239.00000f, 226.000000f); | 1321 pathB.lineTo(1239.00000f, 226.000000f); |
1322 pathB.cubicTo(1243.41833f, 226.000000f, 1247.00000f, 229.581726f, 1247.00000
f, 234.000000f); | 1322 pathB.cubicTo(1243.41833f, 226.000000f, 1247.00000f, 229.581726f, 1247.00000
f, 234.000000f); |
1323 pathB.lineTo(1247.00000f, 252.000000f); | 1323 pathB.lineTo(1247.00000f, 252.000000f); |
1324 pathB.lineTo(10.0000000f, 252.000000f); | 1324 pathB.lineTo(10.0000000f, 252.000000f); |
1325 pathB.lineTo(10.0000000f, 234.000000f); | 1325 pathB.lineTo(10.0000000f, 234.000000f); |
1326 pathB.cubicTo(10.0000000f, 229.581726f, 13.5817204f, 226.000000f, 18.0000000
f, 226.000000f); | 1326 pathB.cubicTo(10.0000000f, 229.581726f, 13.5817204f, 226.000000f, 18.0000000
f, 226.000000f); |
1327 pathB.close(); | 1327 pathB.close(); |
1328 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1328 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1329 } | 1329 } |
1330 | 1330 |
1331 static void cubicOp70d(skiatest::Reporter* reporter) { | 1331 static void cubicOp70d(skiatest::Reporter* reporter, const char* filename) { |
1332 SkPath path, pathB; | 1332 SkPath path, pathB; |
1333 path.setFillType(SkPath::kWinding_FillType); | 1333 path.setFillType(SkPath::kWinding_FillType); |
1334 path.moveTo(0,1); | 1334 path.moveTo(0,1); |
1335 path.cubicTo(0,5, 4,0, 5,0); | 1335 path.cubicTo(0,5, 4,0, 5,0); |
1336 path.close(); | 1336 path.close(); |
1337 pathB.setFillType(SkPath::kWinding_FillType); | 1337 pathB.setFillType(SkPath::kWinding_FillType); |
1338 pathB.moveTo(0,4); | 1338 pathB.moveTo(0,4); |
1339 pathB.cubicTo(0,5, 1,0, 5,0); | 1339 pathB.cubicTo(0,5, 1,0, 5,0); |
1340 pathB.close(); | 1340 pathB.close(); |
1341 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1341 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1342 } | 1342 } |
1343 | 1343 |
1344 static void cubicOp71d(skiatest::Reporter* reporter) { | 1344 static void cubicOp71d(skiatest::Reporter* reporter, const char* filename) { |
1345 SkPath path, pathB; | 1345 SkPath path, pathB; |
1346 path.setFillType(SkPath::kWinding_FillType); | 1346 path.setFillType(SkPath::kWinding_FillType); |
1347 path.moveTo(0,1); | 1347 path.moveTo(0,1); |
1348 path.cubicTo(0,5, 4,1, 6,4); | 1348 path.cubicTo(0,5, 4,1, 6,4); |
1349 path.close(); | 1349 path.close(); |
1350 pathB.setFillType(SkPath::kWinding_FillType); | 1350 pathB.setFillType(SkPath::kWinding_FillType); |
1351 pathB.moveTo(1,4); | 1351 pathB.moveTo(1,4); |
1352 pathB.cubicTo(4,6, 1,0, 5,0); | 1352 pathB.cubicTo(4,6, 1,0, 5,0); |
1353 pathB.close(); | 1353 pathB.close(); |
1354 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1354 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1355 } | 1355 } |
1356 | 1356 |
1357 static void cubicOp72i(skiatest::Reporter* reporter) { | 1357 static void cubicOp72i(skiatest::Reporter* reporter, const char* filename) { |
1358 SkPath path, pathB; | 1358 SkPath path, pathB; |
1359 path.setFillType(SkPath::kWinding_FillType); | 1359 path.setFillType(SkPath::kWinding_FillType); |
1360 path.moveTo(0,1); | 1360 path.moveTo(0,1); |
1361 path.cubicTo(0,5, 5,2, 5,4); | 1361 path.cubicTo(0,5, 5,2, 5,4); |
1362 path.close(); | 1362 path.close(); |
1363 pathB.setFillType(SkPath::kWinding_FillType); | 1363 pathB.setFillType(SkPath::kWinding_FillType); |
1364 pathB.moveTo(2,5); | 1364 pathB.moveTo(2,5); |
1365 pathB.cubicTo(4,5, 1,0, 5,0); | 1365 pathB.cubicTo(4,5, 1,0, 5,0); |
1366 pathB.close(); | 1366 pathB.close(); |
1367 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1367 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1368 } | 1368 } |
1369 | 1369 |
1370 static void cubicOp73d(skiatest::Reporter* reporter) { | 1370 static void cubicOp73d(skiatest::Reporter* reporter, const char* filename) { |
1371 SkPath path, pathB; | 1371 SkPath path, pathB; |
1372 path.setFillType(SkPath::kWinding_FillType); | 1372 path.setFillType(SkPath::kWinding_FillType); |
1373 path.moveTo(0,1); | 1373 path.moveTo(0,1); |
1374 path.cubicTo(3,4, 4,0, 6,4); | 1374 path.cubicTo(3,4, 4,0, 6,4); |
1375 path.lineTo(0,1); | 1375 path.lineTo(0,1); |
1376 path.close(); | 1376 path.close(); |
1377 pathB.setFillType(SkPath::kWinding_FillType); | 1377 pathB.setFillType(SkPath::kWinding_FillType); |
1378 pathB.moveTo(0,4); | 1378 pathB.moveTo(0,4); |
1379 pathB.cubicTo(4,6, 1,0, 4,3); | 1379 pathB.cubicTo(4,6, 1,0, 4,3); |
1380 pathB.lineTo(0,4); | 1380 pathB.lineTo(0,4); |
1381 pathB.close(); | 1381 pathB.close(); |
1382 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1382 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1383 } | 1383 } |
1384 | 1384 |
1385 static void cubicOp74d(skiatest::Reporter* reporter) { | 1385 static void cubicOp74d(skiatest::Reporter* reporter, const char* filename) { |
1386 SkPath path, pathB; | 1386 SkPath path, pathB; |
1387 path.setFillType(SkPath::kWinding_FillType); | 1387 path.setFillType(SkPath::kWinding_FillType); |
1388 path.moveTo(0,1); | 1388 path.moveTo(0,1); |
1389 path.cubicTo(1,5, 5,1, 5,1); | 1389 path.cubicTo(1,5, 5,1, 5,1); |
1390 path.lineTo(0,1); | 1390 path.lineTo(0,1); |
1391 path.close(); | 1391 path.close(); |
1392 pathB.setFillType(SkPath::kWinding_FillType); | 1392 pathB.setFillType(SkPath::kWinding_FillType); |
1393 pathB.moveTo(1,5); | 1393 pathB.moveTo(1,5); |
1394 pathB.cubicTo(1,5, 1,0, 5,1); | 1394 pathB.cubicTo(1,5, 1,0, 5,1); |
1395 pathB.lineTo(1,5); | 1395 pathB.lineTo(1,5); |
1396 pathB.close(); | 1396 pathB.close(); |
1397 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1397 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1398 } | 1398 } |
1399 | 1399 |
1400 static void cubicOp75d(skiatest::Reporter* reporter) { | 1400 static void cubicOp75d(skiatest::Reporter* reporter, const char* filename) { |
1401 SkPath path, pathB; | 1401 SkPath path, pathB; |
1402 path.setFillType(SkPath::kWinding_FillType); | 1402 path.setFillType(SkPath::kWinding_FillType); |
1403 path.moveTo(0,1); | 1403 path.moveTo(0,1); |
1404 path.cubicTo(0,4, 5,1, 6,4); | 1404 path.cubicTo(0,4, 5,1, 6,4); |
1405 path.lineTo(0,1); | 1405 path.lineTo(0,1); |
1406 path.close(); | 1406 path.close(); |
1407 pathB.setFillType(SkPath::kWinding_FillType); | 1407 pathB.setFillType(SkPath::kWinding_FillType); |
1408 pathB.moveTo(1,5); | 1408 pathB.moveTo(1,5); |
1409 pathB.cubicTo(4,6, 1,0, 4,0); | 1409 pathB.cubicTo(4,6, 1,0, 4,0); |
1410 pathB.lineTo(1,5); | 1410 pathB.lineTo(1,5); |
1411 pathB.close(); | 1411 pathB.close(); |
1412 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1412 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1413 } | 1413 } |
1414 | 1414 |
1415 static void cubicOp76u(skiatest::Reporter* reporter) { | 1415 static void cubicOp76u(skiatest::Reporter* reporter, const char* filename) { |
1416 SkPath path, pathB; | 1416 SkPath path, pathB; |
1417 path.setFillType(SkPath::kWinding_FillType); | 1417 path.setFillType(SkPath::kWinding_FillType); |
1418 path.moveTo(0,1); | 1418 path.moveTo(0,1); |
1419 path.cubicTo(0,2, 2,0, 5,3); | 1419 path.cubicTo(0,2, 2,0, 5,3); |
1420 path.close(); | 1420 path.close(); |
1421 pathB.setFillType(SkPath::kWinding_FillType); | 1421 pathB.setFillType(SkPath::kWinding_FillType); |
1422 pathB.moveTo(0,2); | 1422 pathB.moveTo(0,2); |
1423 pathB.cubicTo(3,5, 1,0, 2,0); | 1423 pathB.cubicTo(3,5, 1,0, 2,0); |
1424 pathB.close(); | 1424 pathB.close(); |
1425 testPathOp(reporter, path, pathB, kUnion_PathOp); | 1425 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
1426 } | 1426 } |
1427 | 1427 |
1428 static void cubicOp77i(skiatest::Reporter* reporter) { | 1428 static void cubicOp77i(skiatest::Reporter* reporter, const char* filename) { |
1429 SkPath path, pathB; | 1429 SkPath path, pathB; |
1430 path.setFillType(SkPath::kEvenOdd_FillType); | 1430 path.setFillType(SkPath::kEvenOdd_FillType); |
1431 path.moveTo(0,1); | 1431 path.moveTo(0,1); |
1432 path.cubicTo(1,3, 2,0, 3,2); | 1432 path.cubicTo(1,3, 2,0, 3,2); |
1433 path.lineTo(0,1); | 1433 path.lineTo(0,1); |
1434 path.close(); | 1434 path.close(); |
1435 pathB.setFillType(SkPath::kEvenOdd_FillType); | 1435 pathB.setFillType(SkPath::kEvenOdd_FillType); |
1436 pathB.moveTo(0,2); | 1436 pathB.moveTo(0,2); |
1437 pathB.cubicTo(2,3, 1,0, 3,1); | 1437 pathB.cubicTo(2,3, 1,0, 3,1); |
1438 pathB.lineTo(0,2); | 1438 pathB.lineTo(0,2); |
1439 pathB.close(); | 1439 pathB.close(); |
1440 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1440 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1441 } | 1441 } |
1442 | 1442 |
1443 static void cubicOp78u(skiatest::Reporter* reporter) { | 1443 static void cubicOp78u(skiatest::Reporter* reporter, const char* filename) { |
1444 SkPath path, pathB; | 1444 SkPath path, pathB; |
1445 path.setFillType(SkPath::kEvenOdd_FillType); | 1445 path.setFillType(SkPath::kEvenOdd_FillType); |
1446 path.moveTo(1,6); | 1446 path.moveTo(1,6); |
1447 path.cubicTo(1,6, 5,0, 6,1); | 1447 path.cubicTo(1,6, 5,0, 6,1); |
1448 path.lineTo(1,6); | 1448 path.lineTo(1,6); |
1449 path.close(); | 1449 path.close(); |
1450 pathB.setFillType(SkPath::kEvenOdd_FillType); | 1450 pathB.setFillType(SkPath::kEvenOdd_FillType); |
1451 pathB.moveTo(0,5); | 1451 pathB.moveTo(0,5); |
1452 pathB.cubicTo(1,6, 6,1, 6,1); | 1452 pathB.cubicTo(1,6, 6,1, 6,1); |
1453 pathB.lineTo(0,5); | 1453 pathB.lineTo(0,5); |
1454 pathB.close(); | 1454 pathB.close(); |
1455 testPathOp(reporter, path, pathB, kUnion_PathOp); | 1455 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
1456 } | 1456 } |
1457 | 1457 |
1458 static void cubicOp79u(skiatest::Reporter* reporter) { | 1458 static void cubicOp79u(skiatest::Reporter* reporter, const char* filename) { |
1459 SkPath path, pathB; | 1459 SkPath path, pathB; |
1460 path.setFillType(SkPath::kWinding_FillType); | 1460 path.setFillType(SkPath::kWinding_FillType); |
1461 path.moveTo(0,1); | 1461 path.moveTo(0,1); |
1462 path.cubicTo(1,3, 1,0, 6,4); | 1462 path.cubicTo(1,3, 1,0, 6,4); |
1463 path.close(); | 1463 path.close(); |
1464 pathB.setFillType(SkPath::kWinding_FillType); | 1464 pathB.setFillType(SkPath::kWinding_FillType); |
1465 pathB.moveTo(0,1); | 1465 pathB.moveTo(0,1); |
1466 pathB.cubicTo(4,6, 1,0, 3,1); | 1466 pathB.cubicTo(4,6, 1,0, 3,1); |
1467 pathB.close(); | 1467 pathB.close(); |
1468 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1468 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1469 } | 1469 } |
1470 | 1470 |
1471 static void cubicOp80i(skiatest::Reporter* reporter) { | 1471 static void cubicOp80i(skiatest::Reporter* reporter, const char* filename) { |
1472 SkPath path, pathB; | 1472 SkPath path, pathB; |
1473 path.setFillType(SkPath::kWinding_FillType); | 1473 path.setFillType(SkPath::kWinding_FillType); |
1474 path.moveTo(0,1); | 1474 path.moveTo(0,1); |
1475 path.cubicTo(2,3, 2,1, 4,3); | 1475 path.cubicTo(2,3, 2,1, 4,3); |
1476 path.lineTo(0,1); | 1476 path.lineTo(0,1); |
1477 path.close(); | 1477 path.close(); |
1478 pathB.setFillType(SkPath::kWinding_FillType); | 1478 pathB.setFillType(SkPath::kWinding_FillType); |
1479 pathB.moveTo(1,2); | 1479 pathB.moveTo(1,2); |
1480 pathB.cubicTo(3,4, 1,0, 3,2); | 1480 pathB.cubicTo(3,4, 1,0, 3,2); |
1481 pathB.lineTo(1,2); | 1481 pathB.lineTo(1,2); |
1482 pathB.close(); | 1482 pathB.close(); |
1483 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1483 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1484 } | 1484 } |
1485 | 1485 |
1486 static void cubicOp81d(skiatest::Reporter* reporter) { | 1486 static void cubicOp81d(skiatest::Reporter* reporter, const char* filename) { |
1487 SkPath path, pathB; | 1487 SkPath path, pathB; |
1488 path.setFillType(SkPath::kWinding_FillType); | 1488 path.setFillType(SkPath::kWinding_FillType); |
1489 path.moveTo(0,1); | 1489 path.moveTo(0,1); |
1490 path.cubicTo(4,6, 4,3, 5,4); | 1490 path.cubicTo(4,6, 4,3, 5,4); |
1491 path.close(); | 1491 path.close(); |
1492 pathB.setFillType(SkPath::kWinding_FillType); | 1492 pathB.setFillType(SkPath::kWinding_FillType); |
1493 pathB.moveTo(3,4); | 1493 pathB.moveTo(3,4); |
1494 pathB.cubicTo(4,5, 1,0, 6,4); | 1494 pathB.cubicTo(4,5, 1,0, 6,4); |
1495 pathB.close(); | 1495 pathB.close(); |
1496 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1496 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1497 } | 1497 } |
1498 | 1498 |
1499 static void cubicOp82i(skiatest::Reporter* reporter) { | 1499 static void cubicOp82i(skiatest::Reporter* reporter, const char* filename) { |
1500 SkPath path, pathB; | 1500 SkPath path, pathB; |
1501 path.setFillType(SkPath::kEvenOdd_FillType); | 1501 path.setFillType(SkPath::kEvenOdd_FillType); |
1502 path.moveTo(0,1); | 1502 path.moveTo(0,1); |
1503 path.cubicTo(2,3, 5,2, 3,0); | 1503 path.cubicTo(2,3, 5,2, 3,0); |
1504 path.lineTo(0,1); | 1504 path.lineTo(0,1); |
1505 path.close(); | 1505 path.close(); |
1506 pathB.setFillType(SkPath::kWinding_FillType); | 1506 pathB.setFillType(SkPath::kWinding_FillType); |
1507 pathB.moveTo(2,5); | 1507 pathB.moveTo(2,5); |
1508 pathB.cubicTo(0,3, 1,0, 3,2); | 1508 pathB.cubicTo(0,3, 1,0, 3,2); |
1509 pathB.lineTo(2,5); | 1509 pathB.lineTo(2,5); |
1510 pathB.close(); | 1510 pathB.close(); |
1511 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1511 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1512 } | 1512 } |
1513 | 1513 |
1514 static void cubicOp83i(skiatest::Reporter* reporter) { | 1514 static void cubicOp83i(skiatest::Reporter* reporter, const char* filename) { |
1515 SkPath path, pathB; | 1515 SkPath path, pathB; |
1516 path.setFillType(SkPath::kWinding_FillType); | 1516 path.setFillType(SkPath::kWinding_FillType); |
1517 path.moveTo(0,1); | 1517 path.moveTo(0,1); |
1518 path.cubicTo(0,3, 2,1, 4,1); | 1518 path.cubicTo(0,3, 2,1, 4,1); |
1519 path.lineTo(0,1); | 1519 path.lineTo(0,1); |
1520 path.close(); | 1520 path.close(); |
1521 pathB.setFillType(SkPath::kWinding_FillType); | 1521 pathB.setFillType(SkPath::kWinding_FillType); |
1522 pathB.moveTo(1,2); | 1522 pathB.moveTo(1,2); |
1523 pathB.cubicTo(1,4, 1,0, 3,0); | 1523 pathB.cubicTo(1,4, 1,0, 3,0); |
1524 pathB.lineTo(1,2); | 1524 pathB.lineTo(1,2); |
1525 pathB.close(); | 1525 pathB.close(); |
1526 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1526 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1527 } | 1527 } |
1528 | 1528 |
1529 static void cubicOp84d(skiatest::Reporter* reporter) { | 1529 static void cubicOp84d(skiatest::Reporter* reporter, const char* filename) { |
1530 SkPath path, pathB; | 1530 SkPath path, pathB; |
1531 path.setFillType(SkPath::kWinding_FillType); | 1531 path.setFillType(SkPath::kWinding_FillType); |
1532 path.moveTo(0,4); | 1532 path.moveTo(0,4); |
1533 path.cubicTo(2,3, 6,3, 3,2); | 1533 path.cubicTo(2,3, 6,3, 3,2); |
1534 path.close(); | 1534 path.close(); |
1535 pathB.setFillType(SkPath::kWinding_FillType); | 1535 pathB.setFillType(SkPath::kWinding_FillType); |
1536 pathB.moveTo(3,6); | 1536 pathB.moveTo(3,6); |
1537 pathB.cubicTo(2,3, 4,0, 3,2); | 1537 pathB.cubicTo(2,3, 4,0, 3,2); |
1538 pathB.close(); | 1538 pathB.close(); |
1539 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1539 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1540 } | 1540 } |
1541 | 1541 |
1542 static void skpClip1(skiatest::Reporter* reporter) { | 1542 static void skpClip1(skiatest::Reporter* reporter, const char* filename) { |
1543 SkPath path; | 1543 SkPath path; |
1544 path.setFillType(SkPath::kEvenOdd_FillType); | 1544 path.setFillType(SkPath::kEvenOdd_FillType); |
1545 path.moveTo(1126.17114f, 877.171204f); | 1545 path.moveTo(1126.17114f, 877.171204f); |
1546 path.quadTo(1127.34314f, 876.000000f, 1129.00000f, 876.000000f); | 1546 path.quadTo(1127.34314f, 876.000000f, 1129.00000f, 876.000000f); |
1547 path.lineTo(1243.00000f, 876.000000f); | 1547 path.lineTo(1243.00000f, 876.000000f); |
1548 path.quadTo(1244.65686f, 876.000000f, 1245.82886f, 877.171204f); | 1548 path.quadTo(1244.65686f, 876.000000f, 1245.82886f, 877.171204f); |
1549 path.quadTo(1247.00000f, 878.343140f, 1247.00000f, 880.000000f); | 1549 path.quadTo(1247.00000f, 878.343140f, 1247.00000f, 880.000000f); |
1550 path.lineTo(1247.00000f, 907.000000f); | 1550 path.lineTo(1247.00000f, 907.000000f); |
1551 path.lineTo(1246.00000f, 907.000000f); | 1551 path.lineTo(1246.00000f, 907.000000f); |
1552 path.lineTo(1246.00000f, 880.000000f); | 1552 path.lineTo(1246.00000f, 880.000000f); |
1553 path.cubicTo(1246.00000f, 878.343140f, 1244.65686f, 877.000000f, 1243.00000f
, 877.000000f); | 1553 path.cubicTo(1246.00000f, 878.343140f, 1244.65686f, 877.000000f, 1243.00000f
, 877.000000f); |
1554 path.lineTo(1129.00000f, 877.000000f); | 1554 path.lineTo(1129.00000f, 877.000000f); |
1555 path.cubicTo(1127.34314f, 877.000000f, 1126.00000f, 878.343140f, 1126.00000f
, 880.000000f); | 1555 path.cubicTo(1127.34314f, 877.000000f, 1126.00000f, 878.343140f, 1126.00000f
, 880.000000f); |
1556 path.lineTo(1126.00000f, 907.000000f); | 1556 path.lineTo(1126.00000f, 907.000000f); |
1557 path.lineTo(1125.00000f, 907.000000f); | 1557 path.lineTo(1125.00000f, 907.000000f); |
1558 path.lineTo(1125.00000f, 880.000000f); | 1558 path.lineTo(1125.00000f, 880.000000f); |
1559 path.quadTo(1125.00000f, 878.343140f, 1126.17114f, 877.171204f); | 1559 path.quadTo(1125.00000f, 878.343140f, 1126.17114f, 877.171204f); |
1560 path.close(); | 1560 path.close(); |
1561 SkPath pathB; | 1561 SkPath pathB; |
1562 pathB.setFillType(SkPath::kWinding_FillType); | 1562 pathB.setFillType(SkPath::kWinding_FillType); |
1563 pathB.moveTo(1247.00000f, 876.000000f); | 1563 pathB.moveTo(1247.00000f, 876.000000f); |
1564 pathB.lineTo(1231.00000f, 892.000000f); | 1564 pathB.lineTo(1231.00000f, 892.000000f); |
1565 pathB.lineTo(1246.00000f, 907.000000f); | 1565 pathB.lineTo(1246.00000f, 907.000000f); |
1566 pathB.lineTo(1247.00000f, 907.000000f); | 1566 pathB.lineTo(1247.00000f, 907.000000f); |
1567 pathB.lineTo(1247.00000f, 876.000000f); | 1567 pathB.lineTo(1247.00000f, 876.000000f); |
1568 pathB.close(); | 1568 pathB.close(); |
1569 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1569 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1570 } | 1570 } |
1571 | 1571 |
1572 static void skpClip2(skiatest::Reporter* reporter) { | 1572 static void skpClip2(skiatest::Reporter* reporter, const char* filename) { |
1573 SkPath path; | 1573 SkPath path; |
1574 path.setFillType(SkPath::kEvenOdd_FillType); | 1574 path.setFillType(SkPath::kEvenOdd_FillType); |
1575 path.moveTo(134.000000f, 11414.0000f); | 1575 path.moveTo(134.000000f, 11414.0000f); |
1576 path.cubicTo(131.990234f, 11414.0000f, 130.326660f, 11415.4824f, 130.042755f
, 11417.4131f); | 1576 path.cubicTo(131.990234f, 11414.0000f, 130.326660f, 11415.4824f, 130.042755f
, 11417.4131f); |
1577 path.cubicTo(130.233124f, 11418.3193f, 131.037079f, 11419.0000f, 132.000000f
, 11419.0000f); | 1577 path.cubicTo(130.233124f, 11418.3193f, 131.037079f, 11419.0000f, 132.000000f
, 11419.0000f); |
1578 path.lineTo(806.000000f, 11419.0000f); | 1578 path.lineTo(806.000000f, 11419.0000f); |
1579 path.cubicTo(806.962891f, 11419.0000f, 807.766907f, 11418.3193f, 807.957275f
, 11417.4131f); | 1579 path.cubicTo(806.962891f, 11419.0000f, 807.766907f, 11418.3193f, 807.957275f
, 11417.4131f); |
1580 path.cubicTo(807.673401f, 11415.4824f, 806.009766f, 11414.0000f, 804.000000f
, 11414.0000f); | 1580 path.cubicTo(807.673401f, 11415.4824f, 806.009766f, 11414.0000f, 804.000000f
, 11414.0000f); |
1581 path.lineTo(134.000000f, 11414.0000f); | 1581 path.lineTo(134.000000f, 11414.0000f); |
1582 path.close(); | 1582 path.close(); |
1583 SkPath pathB; | 1583 SkPath pathB; |
1584 pathB.setFillType(SkPath::kInverseWinding_FillType); | 1584 pathB.setFillType(SkPath::kInverseWinding_FillType); |
1585 pathB.moveTo(132.000000f, 11415.0000f); | 1585 pathB.moveTo(132.000000f, 11415.0000f); |
1586 pathB.lineTo(806.000000f, 11415.0000f); | 1586 pathB.lineTo(806.000000f, 11415.0000f); |
1587 pathB.cubicTo(807.104553f, 11415.0000f, 808.000000f, 11415.4473f, 808.000000
f, 11416.0000f); | 1587 pathB.cubicTo(807.104553f, 11415.0000f, 808.000000f, 11415.4473f, 808.000000
f, 11416.0000f); |
1588 pathB.lineTo(808.000000f, 11417.0000f); | 1588 pathB.lineTo(808.000000f, 11417.0000f); |
1589 pathB.cubicTo(808.000000f, 11418.1045f, 807.104553f, 11419.0000f, 806.000000
f, 11419.0000f); | 1589 pathB.cubicTo(808.000000f, 11418.1045f, 807.104553f, 11419.0000f, 806.000000
f, 11419.0000f); |
1590 pathB.lineTo(132.000000f, 11419.0000f); | 1590 pathB.lineTo(132.000000f, 11419.0000f); |
1591 pathB.cubicTo(130.895432f, 11419.0000f, 130.000000f, 11418.1045f, 130.000000
f, 11417.0000f); | 1591 pathB.cubicTo(130.895432f, 11419.0000f, 130.000000f, 11418.1045f, 130.000000
f, 11417.0000f); |
1592 pathB.lineTo(130.000000f, 11416.0000f); | 1592 pathB.lineTo(130.000000f, 11416.0000f); |
1593 pathB.cubicTo(130.000000f, 11415.4473f, 130.895432f, 11415.0000f, 132.000000
f, 11415.0000f); | 1593 pathB.cubicTo(130.000000f, 11415.4473f, 130.895432f, 11415.0000f, 132.000000
f, 11415.0000f); |
1594 pathB.close(); | 1594 pathB.close(); |
1595 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1595 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1596 } | 1596 } |
1597 | 1597 |
1598 static void skp96prezzi1(skiatest::Reporter* reporter) { | 1598 static void skp96prezzi1(skiatest::Reporter* reporter, const char* filename) { |
1599 SkPath path; | 1599 SkPath path; |
1600 path.setFillType(SkPath::kEvenOdd_FillType); | 1600 path.setFillType(SkPath::kEvenOdd_FillType); |
1601 path.moveTo(157.464005f, 670.463989f); | 1601 path.moveTo(157.464005f, 670.463989f); |
1602 path.quadTo(158.928925f, 669.000000f, 161.000000f, 669.000000f); | 1602 path.quadTo(158.928925f, 669.000000f, 161.000000f, 669.000000f); |
1603 path.lineTo(248.000000f, 669.000000f); | 1603 path.lineTo(248.000000f, 669.000000f); |
1604 path.quadTo(250.071075f, 669.000000f, 251.535995f, 670.463989f); | 1604 path.quadTo(250.071075f, 669.000000f, 251.535995f, 670.463989f); |
1605 path.quadTo(253.000000f, 671.928955f, 253.000000f, 674.000000f); | 1605 path.quadTo(253.000000f, 671.928955f, 253.000000f, 674.000000f); |
1606 path.lineTo(253.000000f, 706.000000f); | 1606 path.lineTo(253.000000f, 706.000000f); |
1607 path.lineTo(251.000000f, 706.000000f); | 1607 path.lineTo(251.000000f, 706.000000f); |
1608 path.lineTo(251.000000f, 675.000000f); | 1608 path.lineTo(251.000000f, 675.000000f); |
1609 path.cubicTo(251.000000f, 672.790833f, 249.209137f, 671.000000f, 247.000000f
, 671.000000f); | 1609 path.cubicTo(251.000000f, 672.790833f, 249.209137f, 671.000000f, 247.000000f
, 671.000000f); |
1610 path.lineTo(162.000000f, 671.000000f); | 1610 path.lineTo(162.000000f, 671.000000f); |
1611 path.cubicTo(159.790863f, 671.000000f, 158.000000f, 672.790833f, 158.000000f
, 675.000000f); | 1611 path.cubicTo(159.790863f, 671.000000f, 158.000000f, 672.790833f, 158.000000f
, 675.000000f); |
1612 path.lineTo(158.000000f, 706.000000f); | 1612 path.lineTo(158.000000f, 706.000000f); |
1613 path.lineTo(156.000000f, 706.000000f); | 1613 path.lineTo(156.000000f, 706.000000f); |
1614 path.lineTo(156.000000f, 674.000000f); | 1614 path.lineTo(156.000000f, 674.000000f); |
1615 path.quadTo(156.000000f, 671.928955f, 157.464005f, 670.463989f); | 1615 path.quadTo(156.000000f, 671.928955f, 157.464005f, 670.463989f); |
1616 path.close(); | 1616 path.close(); |
1617 SkPath pathB; | 1617 SkPath pathB; |
1618 pathB.setFillType(SkPath::kWinding_FillType); | 1618 pathB.setFillType(SkPath::kWinding_FillType); |
1619 pathB.moveTo(156.000000f, 669.000000f); | 1619 pathB.moveTo(156.000000f, 669.000000f); |
1620 pathB.lineTo(178.500000f, 691.500000f); | 1620 pathB.lineTo(178.500000f, 691.500000f); |
1621 pathB.lineTo(230.500000f, 691.500000f); | 1621 pathB.lineTo(230.500000f, 691.500000f); |
1622 pathB.lineTo(253.000000f, 669.000000f); | 1622 pathB.lineTo(253.000000f, 669.000000f); |
1623 pathB.lineTo(156.000000f, 669.000000f); | 1623 pathB.lineTo(156.000000f, 669.000000f); |
1624 pathB.close(); | 1624 pathB.close(); |
1625 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1625 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1626 } | 1626 } |
1627 | 1627 |
1628 static void skpancestry_com1(skiatest::Reporter* reporter) { | 1628 static void skpancestry_com1(skiatest::Reporter* reporter, const char* filename)
{ |
1629 SkPath path; | 1629 SkPath path; |
1630 path.setFillType(SkPath::kEvenOdd_FillType); | 1630 path.setFillType(SkPath::kEvenOdd_FillType); |
1631 path.moveTo(161.000000f, 925.000000f); | 1631 path.moveTo(161.000000f, 925.000000f); |
1632 path.cubicTo(159.874390f, 925.000000f, 158.835663f, 925.371948f, 158.000000f
, 925.999634f); | 1632 path.cubicTo(159.874390f, 925.000000f, 158.835663f, 925.371948f, 158.000000f
, 925.999634f); |
1633 path.lineTo(158.000000f, 926.000000f); | 1633 path.lineTo(158.000000f, 926.000000f); |
1634 path.lineTo(1108.00000f, 926.000000f); | 1634 path.lineTo(1108.00000f, 926.000000f); |
1635 path.lineTo(1108.00000f, 925.999634f); | 1635 path.lineTo(1108.00000f, 925.999634f); |
1636 path.cubicTo(1107.16443f, 925.371948f, 1106.12561f, 925.000000f, 1105.00000f
, 925.000000f); | 1636 path.cubicTo(1107.16443f, 925.371948f, 1106.12561f, 925.000000f, 1105.00000f
, 925.000000f); |
1637 path.lineTo(161.000000f, 925.000000f); | 1637 path.lineTo(161.000000f, 925.000000f); |
1638 path.close(); | 1638 path.close(); |
1639 SkPath pathB; | 1639 SkPath pathB; |
1640 pathB.setFillType(SkPath::kEvenOdd_FillType); | 1640 pathB.setFillType(SkPath::kEvenOdd_FillType); |
1641 pathB.moveTo(161.000000f, 926.000000f); | 1641 pathB.moveTo(161.000000f, 926.000000f); |
1642 pathB.lineTo(1105.00000f, 926.000000f); | 1642 pathB.lineTo(1105.00000f, 926.000000f); |
1643 pathB.cubicTo(1107.20911f, 926.000000f, 1109.00000f, 927.790833f, 1109.00000
f, 930.000000f); | 1643 pathB.cubicTo(1107.20911f, 926.000000f, 1109.00000f, 927.790833f, 1109.00000
f, 930.000000f); |
1644 pathB.lineTo(1109.00000f, 956.000000f); | 1644 pathB.lineTo(1109.00000f, 956.000000f); |
1645 pathB.cubicTo(1109.00000f, 958.209167f, 1107.20911f, 960.000000f, 1105.00000
f, 960.000000f); | 1645 pathB.cubicTo(1109.00000f, 958.209167f, 1107.20911f, 960.000000f, 1105.00000
f, 960.000000f); |
1646 pathB.lineTo(161.000000f, 960.000000f); | 1646 pathB.lineTo(161.000000f, 960.000000f); |
1647 pathB.cubicTo(158.790863f, 960.000000f, 157.000000f, 958.209167f, 157.000000
f, 956.000000f); | 1647 pathB.cubicTo(158.790863f, 960.000000f, 157.000000f, 958.209167f, 157.000000
f, 956.000000f); |
1648 pathB.lineTo(157.000000f, 930.000000f); | 1648 pathB.lineTo(157.000000f, 930.000000f); |
1649 pathB.cubicTo(157.000000f, 927.790833f, 158.790863f, 926.000000f, 161.000000
f, 926.000000f); | 1649 pathB.cubicTo(157.000000f, 927.790833f, 158.790863f, 926.000000f, 161.000000
f, 926.000000f); |
1650 pathB.close(); | 1650 pathB.close(); |
1651 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1651 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1652 } | 1652 } |
1653 | 1653 |
1654 static void skpeldorado_com_ua1(skiatest::Reporter* reporter) { | 1654 static void skpeldorado_com_ua1(skiatest::Reporter* reporter, const char* filena
me) { |
1655 SkPath path; | 1655 SkPath path; |
1656 path.setFillType(SkPath::kEvenOdd_FillType); | 1656 path.setFillType(SkPath::kEvenOdd_FillType); |
1657 path.moveTo(286.695129f, 291.000000f); | 1657 path.moveTo(286.695129f, 291.000000f); |
1658 path.lineTo(229.304855f, 561.000000f); | 1658 path.lineTo(229.304855f, 561.000000f); |
1659 path.lineTo(979.304871f, 561.000000f); | 1659 path.lineTo(979.304871f, 561.000000f); |
1660 path.lineTo(1036.69507f, 291.000000f); | 1660 path.lineTo(1036.69507f, 291.000000f); |
1661 path.lineTo(286.695129f, 291.000000f); | 1661 path.lineTo(286.695129f, 291.000000f); |
1662 path.close(); | 1662 path.close(); |
1663 SkPath pathB; | 1663 SkPath pathB; |
1664 pathB.setFillType(SkPath::kWinding_FillType); | 1664 pathB.setFillType(SkPath::kWinding_FillType); |
1665 pathB.moveTo(1006.69513f, 291.000000f); | 1665 pathB.moveTo(1006.69513f, 291.000000f); |
1666 pathB.cubicTo(1023.26367f, 291.000000f, 1033.84021f, 304.431458f, 1030.31836
f, 321.000000f); | 1666 pathB.cubicTo(1023.26367f, 291.000000f, 1033.84021f, 304.431458f, 1030.31836
f, 321.000000f); |
1667 pathB.lineTo(985.681519f, 531.000000f); | 1667 pathB.lineTo(985.681519f, 531.000000f); |
1668 pathB.cubicTo(982.159790f, 547.568542f, 965.873413f, 561.000000f, 949.304871
f, 561.000000f); | 1668 pathB.cubicTo(982.159790f, 547.568542f, 965.873413f, 561.000000f, 949.304871
f, 561.000000f); |
1669 pathB.lineTo(259.304871f, 561.000000f); | 1669 pathB.lineTo(259.304871f, 561.000000f); |
1670 pathB.cubicTo(242.736313f, 561.000000f, 232.159805f, 547.568542f, 235.681549
f, 531.000000f); | 1670 pathB.cubicTo(242.736313f, 561.000000f, 232.159805f, 547.568542f, 235.681549
f, 531.000000f); |
1671 pathB.lineTo(280.318420f, 321.000000f); | 1671 pathB.lineTo(280.318420f, 321.000000f); |
1672 pathB.cubicTo(283.840179f, 304.431458f, 300.126587f, 291.000000f, 316.695129
f, 291.000000f); | 1672 pathB.cubicTo(283.840179f, 304.431458f, 300.126587f, 291.000000f, 316.695129
f, 291.000000f); |
1673 pathB.lineTo(1006.69513f, 291.000000f); | 1673 pathB.lineTo(1006.69513f, 291.000000f); |
1674 pathB.close(); | 1674 pathB.close(); |
1675 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1675 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1676 } | 1676 } |
1677 | 1677 |
1678 static void skpbyte_com1(skiatest::Reporter* reporter) { | 1678 static void skpbyte_com1(skiatest::Reporter* reporter, const char* filename) { |
1679 SkPath path; | 1679 SkPath path; |
1680 path.setFillType(SkPath::kEvenOdd_FillType); | 1680 path.setFillType(SkPath::kEvenOdd_FillType); |
1681 path.moveTo(968.000000f, 14.0000000f); | 1681 path.moveTo(968.000000f, 14.0000000f); |
1682 path.cubicTo(965.238586f, 14.0000000f, 963.000000f, 16.2385769f, 963.000000f
, 19.0000000f); | 1682 path.cubicTo(965.238586f, 14.0000000f, 963.000000f, 16.2385769f, 963.000000f
, 19.0000000f); |
1683 path.lineTo(963.000000f, 32.0000000f); | 1683 path.lineTo(963.000000f, 32.0000000f); |
1684 path.cubicTo(963.000000f, 34.7614250f, 965.238586f, 37.0000000f, 968.000000f
, 37.0000000f); | 1684 path.cubicTo(963.000000f, 34.7614250f, 965.238586f, 37.0000000f, 968.000000f
, 37.0000000f); |
1685 path.lineTo(1034.00000f, 37.0000000f); | 1685 path.lineTo(1034.00000f, 37.0000000f); |
1686 path.cubicTo(1036.76147f, 37.0000000f, 1039.00000f, 34.7614250f, 1039.00000f
, 32.0000000f); | 1686 path.cubicTo(1036.76147f, 37.0000000f, 1039.00000f, 34.7614250f, 1039.00000f
, 32.0000000f); |
1687 path.lineTo(1039.00000f, 19.0000000f); | 1687 path.lineTo(1039.00000f, 19.0000000f); |
1688 path.cubicTo(1039.00000f, 16.2385769f, 1036.76147f, 14.0000000f, 1034.00000f
, 14.0000000f); | 1688 path.cubicTo(1039.00000f, 16.2385769f, 1036.76147f, 14.0000000f, 1034.00000f
, 14.0000000f); |
1689 path.lineTo(968.000000f, 14.0000000f); | 1689 path.lineTo(968.000000f, 14.0000000f); |
1690 path.close(); | 1690 path.close(); |
1691 SkPath pathB; | 1691 SkPath pathB; |
1692 pathB.setFillType(SkPath::kInverseWinding_FillType); | 1692 pathB.setFillType(SkPath::kInverseWinding_FillType); |
1693 pathB.moveTo(968.000000f, 14.0000000f); | 1693 pathB.moveTo(968.000000f, 14.0000000f); |
1694 pathB.lineTo(1034.00000f, 14.0000000f); | 1694 pathB.lineTo(1034.00000f, 14.0000000f); |
1695 pathB.cubicTo(1036.76147f, 14.0000000f, 1039.00000f, 16.2385750f, 1039.00000
f, 19.0000000f); | 1695 pathB.cubicTo(1036.76147f, 14.0000000f, 1039.00000f, 16.2385750f, 1039.00000
f, 19.0000000f); |
1696 pathB.lineTo(1039.00000f, 32.0000000f); | 1696 pathB.lineTo(1039.00000f, 32.0000000f); |
1697 pathB.cubicTo(1039.00000f, 34.2091408f, 1036.76147f, 36.0000000f, 1034.00000
f, 36.0000000f); | 1697 pathB.cubicTo(1039.00000f, 34.2091408f, 1036.76147f, 36.0000000f, 1034.00000
f, 36.0000000f); |
1698 pathB.lineTo(968.000000f, 36.0000000f); | 1698 pathB.lineTo(968.000000f, 36.0000000f); |
1699 pathB.cubicTo(965.238586f, 36.0000000f, 963.000000f, 34.2091408f, 963.000000
f, 32.0000000f); | 1699 pathB.cubicTo(965.238586f, 36.0000000f, 963.000000f, 34.2091408f, 963.000000
f, 32.0000000f); |
1700 pathB.lineTo(963.000000f, 19.0000000f); | 1700 pathB.lineTo(963.000000f, 19.0000000f); |
1701 pathB.cubicTo(963.000000f, 16.2385750f, 965.238586f, 14.0000000f, 968.000000
f, 14.0000000f); | 1701 pathB.cubicTo(963.000000f, 16.2385750f, 965.238586f, 14.0000000f, 968.000000
f, 14.0000000f); |
1702 pathB.close(); | 1702 pathB.close(); |
1703 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1703 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1704 } | 1704 } |
1705 | 1705 |
1706 static void skphealth_com76(skiatest::Reporter* reporter) { | 1706 static void skphealth_com76(skiatest::Reporter* reporter, const char* filename)
{ |
1707 SkPath path; | 1707 SkPath path; |
1708 path.setFillType(SkPath::kEvenOdd_FillType); | 1708 path.setFillType(SkPath::kEvenOdd_FillType); |
1709 path.moveTo(708.099182f, 7.09919119f); | 1709 path.moveTo(708.099182f, 7.09919119f); |
1710 path.lineTo(708.099182f, 7.09920025f); | 1710 path.lineTo(708.099182f, 7.09920025f); |
1711 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); | 1711 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); |
1712 path.lineTo(704.000000f, 33.0000000f); | 1712 path.lineTo(704.000000f, 33.0000000f); |
1713 path.lineTo(705.000000f, 33.0000000f); | 1713 path.lineTo(705.000000f, 33.0000000f); |
1714 path.lineTo(705.000000f, 17.0000000f); | 1714 path.lineTo(705.000000f, 17.0000000f); |
1715 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f
, 7.80761385f); | 1715 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f
, 7.80761385f); |
1716 path.lineTo(708.099182f, 7.09919119f); | 1716 path.lineTo(708.099182f, 7.09919119f); |
1717 path.close(); | 1717 path.close(); |
1718 SkPath pathB; | 1718 SkPath pathB; |
1719 pathB.setFillType(SkPath::kWinding_FillType); | 1719 pathB.setFillType(SkPath::kWinding_FillType); |
1720 pathB.moveTo(704.000000f, 3.00000000f); | 1720 pathB.moveTo(704.000000f, 3.00000000f); |
1721 #if 0 | 1721 #if 0 |
1722 pathB.lineTo(719.500000f, 3.00000000f); | 1722 pathB.lineTo(719.500000f, 3.00000000f); |
1723 pathB.lineTo(705.000000f, 33.0000000f); | 1723 pathB.lineTo(705.000000f, 33.0000000f); |
1724 pathB.lineTo(704.000000f, 33.0000000f); | 1724 pathB.lineTo(704.000000f, 33.0000000f); |
1725 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1725 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1726 #else | 1726 #else |
1727 pathB.lineTo(704.000000f, 33.0000000f); | 1727 pathB.lineTo(704.000000f, 33.0000000f); |
1728 pathB.lineTo(705.000000f, 33.0000000f); | 1728 pathB.lineTo(705.000000f, 33.0000000f); |
1729 pathB.lineTo(719.500000f, 3.00000000f); | 1729 pathB.lineTo(719.500000f, 3.00000000f); |
1730 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1730 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1731 #endif | 1731 #endif |
1732 } | 1732 } |
1733 | 1733 |
1734 static void skpahrefs_com88(skiatest::Reporter* reporter) { | 1734 static void skpahrefs_com88(skiatest::Reporter* reporter, const char* filename)
{ |
1735 SkPath path; | 1735 SkPath path; |
1736 path.setFillType(SkPath::kEvenOdd_FillType); | 1736 path.setFillType(SkPath::kEvenOdd_FillType); |
1737 path.moveTo(1099.82886f, 7.17117119f); | 1737 path.moveTo(1099.82886f, 7.17117119f); |
1738 path.lineTo(1099.12134f, 7.87867832f); | 1738 path.lineTo(1099.12134f, 7.87867832f); |
1739 path.cubicTo(1099.66418f, 8.42157173f, 1100.00000f, 9.17157173f, 1100.00000f
, 10.0000000f); | 1739 path.cubicTo(1099.66418f, 8.42157173f, 1100.00000f, 9.17157173f, 1100.00000f
, 10.0000000f); |
1740 path.lineTo(1100.00000f, 28.0000000f); | 1740 path.lineTo(1100.00000f, 28.0000000f); |
1741 path.cubicTo(1100.00000f, 29.6568546f, 1098.65686f, 31.0000000f, 1097.00000f
, 31.0000000f); | 1741 path.cubicTo(1100.00000f, 29.6568546f, 1098.65686f, 31.0000000f, 1097.00000f
, 31.0000000f); |
1742 path.lineTo(1088.00000f, 31.0000000f); | 1742 path.lineTo(1088.00000f, 31.0000000f); |
1743 path.lineTo(1088.00000f, 32.0000000f); | 1743 path.lineTo(1088.00000f, 32.0000000f); |
1744 path.lineTo(1097.00000f, 32.0000000f); | 1744 path.lineTo(1097.00000f, 32.0000000f); |
1745 path.quadTo(1098.65686f, 32.0000000f, 1099.82886f, 30.8288002f); | 1745 path.quadTo(1098.65686f, 32.0000000f, 1099.82886f, 30.8288002f); |
1746 path.quadTo(1101.00000f, 29.6568546f, 1101.00000f, 28.0000000f); | 1746 path.quadTo(1101.00000f, 29.6568546f, 1101.00000f, 28.0000000f); |
1747 path.lineTo(1101.00000f, 10.0000000f); | 1747 path.lineTo(1101.00000f, 10.0000000f); |
1748 path.quadTo(1101.00000f, 8.34314537f, 1099.82886f, 7.17119980f); | 1748 path.quadTo(1101.00000f, 8.34314537f, 1099.82886f, 7.17119980f); |
1749 path.lineTo(1099.82886f, 7.17117119f); | 1749 path.lineTo(1099.82886f, 7.17117119f); |
1750 path.close(); | 1750 path.close(); |
1751 SkPath pathB; | 1751 SkPath pathB; |
1752 pathB.setFillType(SkPath::kWinding_FillType); | 1752 pathB.setFillType(SkPath::kWinding_FillType); |
1753 pathB.moveTo(1101.00000f, 6.00000000f); | 1753 pathB.moveTo(1101.00000f, 6.00000000f); |
1754 pathB.lineTo(1088.00000f, 6.00000000f); | 1754 pathB.lineTo(1088.00000f, 6.00000000f); |
1755 pathB.lineTo(1088.00000f, 19.0000000f); | 1755 pathB.lineTo(1088.00000f, 19.0000000f); |
1756 pathB.lineTo(1101.00000f, 32.0000000f); | 1756 pathB.lineTo(1101.00000f, 32.0000000f); |
1757 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1757 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1758 } | 1758 } |
1759 | 1759 |
1760 static void skpahrefs_com29(skiatest::Reporter* reporter) { | 1760 static void skpahrefs_com29(skiatest::Reporter* reporter, const char* filename)
{ |
1761 SkPath path; | 1761 SkPath path; |
1762 path.setFillType(SkPath::kEvenOdd_FillType); | 1762 path.setFillType(SkPath::kEvenOdd_FillType); |
1763 path.moveTo(1037.17114f, 7.17119980f); | 1763 path.moveTo(1037.17114f, 7.17119980f); |
1764 path.quadTo(1038.34314f, 6.00000000f, 1040.00000f, 6.00000000f); | 1764 path.quadTo(1038.34314f, 6.00000000f, 1040.00000f, 6.00000000f); |
1765 path.lineTo(1074.00000f, 6.00000000f); | 1765 path.lineTo(1074.00000f, 6.00000000f); |
1766 path.lineTo(1074.00000f, 32.0000000f); | 1766 path.lineTo(1074.00000f, 32.0000000f); |
1767 path.lineTo(1040.00000f, 32.0000000f); | 1767 path.lineTo(1040.00000f, 32.0000000f); |
1768 path.quadTo(1038.34314f, 32.0000000f, 1037.17114f, 30.8288002f); | 1768 path.quadTo(1038.34314f, 32.0000000f, 1037.17114f, 30.8288002f); |
1769 path.quadTo(1036.00000f, 29.6568546f, 1036.00000f, 28.0000000f); | 1769 path.quadTo(1036.00000f, 29.6568546f, 1036.00000f, 28.0000000f); |
1770 path.lineTo(1036.00000f, 10.0000000f); | 1770 path.lineTo(1036.00000f, 10.0000000f); |
1771 path.quadTo(1036.00000f, 8.34314537f, 1037.17114f, 7.17119980f); | 1771 path.quadTo(1036.00000f, 8.34314537f, 1037.17114f, 7.17119980f); |
1772 path.close(); | 1772 path.close(); |
1773 path.moveTo(1037.00000f, 10.0000000f); | 1773 path.moveTo(1037.00000f, 10.0000000f); |
1774 path.cubicTo(1037.00000f, 8.34314537f, 1038.34314f, 7.00000000f, 1040.00000f
, 7.00000000f); | 1774 path.cubicTo(1037.00000f, 8.34314537f, 1038.34314f, 7.00000000f, 1040.00000f
, 7.00000000f); |
1775 path.lineTo(1073.00000f, 7.00000000f); | 1775 path.lineTo(1073.00000f, 7.00000000f); |
1776 path.lineTo(1073.00000f, 31.0000000f); | 1776 path.lineTo(1073.00000f, 31.0000000f); |
1777 path.lineTo(1040.00000f, 31.0000000f); | 1777 path.lineTo(1040.00000f, 31.0000000f); |
1778 path.cubicTo(1038.34314f, 31.0000000f, 1037.00000f, 29.6568546f, 1037.00000f
, 28.0000000f); | 1778 path.cubicTo(1038.34314f, 31.0000000f, 1037.00000f, 29.6568546f, 1037.00000f
, 28.0000000f); |
1779 path.lineTo(1037.00000f, 10.0000000f); | 1779 path.lineTo(1037.00000f, 10.0000000f); |
1780 path.close(); | 1780 path.close(); |
1781 SkPath pathB; | 1781 SkPath pathB; |
1782 pathB.setFillType(SkPath::kWinding_FillType); | 1782 pathB.setFillType(SkPath::kWinding_FillType); |
1783 pathB.moveTo(1036.00000f, 32.0000000f); | 1783 pathB.moveTo(1036.00000f, 32.0000000f); |
1784 pathB.lineTo(1049.00000f, 19.0000000f); | 1784 pathB.lineTo(1049.00000f, 19.0000000f); |
1785 pathB.lineTo(1073.00000f, 31.0000000f); | 1785 pathB.lineTo(1073.00000f, 31.0000000f); |
1786 pathB.lineTo(1074.00000f, 32.0000000f); | 1786 pathB.lineTo(1074.00000f, 32.0000000f); |
1787 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1787 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1788 } | 1788 } |
1789 | 1789 |
1790 static void cubicOp85d(skiatest::Reporter* reporter) { | 1790 static void cubicOp85d(skiatest::Reporter* reporter, const char* filename) { |
1791 SkPath path; | 1791 SkPath path; |
1792 path.setFillType(SkPath::kWinding_FillType); | 1792 path.setFillType(SkPath::kWinding_FillType); |
1793 path.moveTo(0,1); | 1793 path.moveTo(0,1); |
1794 path.cubicTo(1,6, 1,0, 6,2); | 1794 path.cubicTo(1,6, 1,0, 6,2); |
1795 path.close(); | 1795 path.close(); |
1796 SkPath pathB; | 1796 SkPath pathB; |
1797 pathB.setFillType(SkPath::kWinding_FillType); | 1797 pathB.setFillType(SkPath::kWinding_FillType); |
1798 pathB.moveTo(0,1); | 1798 pathB.moveTo(0,1); |
1799 pathB.cubicTo(2,6, 1,0, 6,1); | 1799 pathB.cubicTo(2,6, 1,0, 6,1); |
1800 pathB.close(); | 1800 pathB.close(); |
1801 testPathOp(reporter, path, pathB, kDifference_PathOp); | 1801 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
1802 } | 1802 } |
1803 | 1803 |
1804 // this fails because the pair of nearly coincident cubics intersect at the ends | 1804 // this fails because the pair of nearly coincident cubics intersect at the ends |
1805 // but the line connected to one of the cubics at the same point does not inters
ect | 1805 // but the line connected to one of the cubics at the same point does not inters
ect |
1806 // the other | 1806 // the other |
1807 static void skpkkiste_to98(skiatest::Reporter* reporter) { | 1807 static void skpkkiste_to98(skiatest::Reporter* reporter, const char* filename) { |
1808 SkPath path; | 1808 SkPath path; |
1809 path.setFillType(SkPath::kEvenOdd_FillType); | 1809 path.setFillType(SkPath::kEvenOdd_FillType); |
1810 path.moveTo(96, 122); | 1810 path.moveTo(96, 122); |
1811 path.cubicTo(94.6192932f, 122, 93.3692932f, 122.559647f, 92.4644699f, 123.46
447f); | 1811 path.cubicTo(94.6192932f, 122, 93.3692932f, 122.559647f, 92.4644699f, 123.46
447f); |
1812 path.lineTo(94.1715698f, 125.17157f); | 1812 path.lineTo(94.1715698f, 125.17157f); |
1813 path.cubicTo(94.8954315f, 124.447708f, 95.8954315f, 124, 97, 124); | 1813 path.cubicTo(94.8954315f, 124.447708f, 95.8954315f, 124, 97, 124); |
1814 path.lineTo(257, 124); | 1814 path.lineTo(257, 124); |
1815 path.cubicTo(258.104553f, 124, 259.104584f, 124.447708f, 259.82843f, 125.171
57f); | 1815 path.cubicTo(258.104553f, 124, 259.104584f, 124.447708f, 259.82843f, 125.171
57f); |
1816 path.lineTo(261.535522f, 123.46447f); | 1816 path.lineTo(261.535522f, 123.46447f); |
1817 path.cubicTo(260.630707f, 122.559647f, 259.380707f, 122, 258, 122); | 1817 path.cubicTo(260.630707f, 122.559647f, 259.380707f, 122, 258, 122); |
1818 path.lineTo(96, 122); | 1818 path.lineTo(96, 122); |
1819 path.close(); | 1819 path.close(); |
1820 SkPath pathB; | 1820 SkPath pathB; |
1821 pathB.setFillType(SkPath::kWinding_FillType); | 1821 pathB.setFillType(SkPath::kWinding_FillType); |
1822 pathB.moveTo(258, 122); | 1822 pathB.moveTo(258, 122); |
1823 pathB.cubicTo(260.761414f, 122, 263, 124.238579f, 263, 127); | 1823 pathB.cubicTo(260.761414f, 122, 263, 124.238579f, 263, 127); |
1824 pathB.lineTo(263, 284); | 1824 pathB.lineTo(263, 284); |
1825 pathB.cubicTo(263, 286.761414f, 260.761414f, 289, 258, 289); | 1825 pathB.cubicTo(263, 286.761414f, 260.761414f, 289, 258, 289); |
1826 pathB.lineTo(96, 289); | 1826 pathB.lineTo(96, 289); |
1827 pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284); | 1827 pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284); |
1828 pathB.lineTo(91, 127); | 1828 pathB.lineTo(91, 127); |
1829 pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122); | 1829 pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122); |
1830 pathB.lineTo(258, 122); | 1830 pathB.lineTo(258, 122); |
1831 pathB.close(); | 1831 pathB.close(); |
1832 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1832 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1833 } | 1833 } |
1834 | 1834 |
1835 #define ISSUE_1417_WORKING_ON_LINUX_32 0 | 1835 #define ISSUE_1417_WORKING_ON_LINUX_32 0 // fails only in release linux skia_ar
ch_width=32 |
1836 #if ISSUE_1417_WORKING_ON_LINUX_32 | 1836 #if ISSUE_1417_WORKING_ON_LINUX_32 |
1837 static void issue1417(skiatest::Reporter* reporter) { | 1837 static void issue1417(skiatest::Reporter* reporter, const char* filename) { |
1838 SkPath path1; | 1838 SkPath path1; |
1839 path1.moveTo(122.58908843994140625f, 82.2836456298828125f); | 1839 path1.moveTo(122.58908843994140625f, 82.2836456298828125f); |
1840 path1.quadTo(129.8215789794921875f, 80, 138, 80); | 1840 path1.quadTo(129.8215789794921875f, 80, 138, 80); |
1841 path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f
); | 1841 path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f
); |
1842 path1.lineTo(161.1764678955078125f, 100); | 1842 path1.lineTo(161.1764678955078125f, 100); |
1843 path1.lineTo(161.1764678955078125f, 100); | 1843 path1.lineTo(161.1764678955078125f, 100); |
1844 path1.lineTo(115.29412078857421875f, 100); | 1844 path1.lineTo(115.29412078857421875f, 100); |
1845 path1.lineTo(115.29412078857421875f, 100); | 1845 path1.lineTo(115.29412078857421875f, 100); |
1846 path1.lineTo(122.58908843994140625f, 82.2836456298828125f); | 1846 path1.lineTo(122.58908843994140625f, 82.2836456298828125f); |
1847 path1.lineTo(122.58908843994140625f, 82.2836456298828125f); | 1847 path1.lineTo(122.58908843994140625f, 82.2836456298828125f); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 path2.moveTo(113.232177734375f, 173.5789947509765625f); | 1936 path2.moveTo(113.232177734375f, 173.5789947509765625f); |
1937 path2.quadTo(116.8802642822265625f, 175.69805908203125f, 120.817977905273437
5f, 177.1177825927734375f); | 1937 path2.quadTo(116.8802642822265625f, 175.69805908203125f, 120.817977905273437
5f, 177.1177825927734375f); |
1938 path2.lineTo(132.2864990234375f, 169.6969757080078125f); | 1938 path2.lineTo(132.2864990234375f, 169.6969757080078125f); |
1939 path2.lineTo(132.2864990234375f, 169.6969757080078125f); | 1939 path2.lineTo(132.2864990234375f, 169.6969757080078125f); |
1940 path2.lineTo(118.68194580078125f, 160.343841552734375f); | 1940 path2.lineTo(118.68194580078125f, 160.343841552734375f); |
1941 path2.lineTo(118.68194580078125f, 160.343841552734375f); | 1941 path2.lineTo(118.68194580078125f, 160.343841552734375f); |
1942 path2.lineTo(113.232177734375f, 173.5789947509765625f); | 1942 path2.lineTo(113.232177734375f, 173.5789947509765625f); |
1943 path2.lineTo(113.232177734375f, 173.5789947509765625f); | 1943 path2.lineTo(113.232177734375f, 173.5789947509765625f); |
1944 path2.close(); | 1944 path2.close(); |
1945 | 1945 |
1946 testPathOp(reporter, path1, path2, kUnion_PathOp); | 1946 testPathOp(reporter, path1, path2, kUnion_PathOp, filename); |
1947 } | 1947 } |
1948 #endif | 1948 #endif |
1949 | 1949 |
1950 static void issue1418(skiatest::Reporter* reporter) { | 1950 static void issue1418(skiatest::Reporter* reporter, const char* filename) { |
1951 SkPath path1; | 1951 SkPath path1; |
1952 path1.moveTo(0, 0); | 1952 path1.moveTo(0, 0); |
1953 path1.lineTo(1, 0); | 1953 path1.lineTo(1, 0); |
1954 path1.lineTo(1, 0); | 1954 path1.lineTo(1, 0); |
1955 path1.lineTo(1, 1); | 1955 path1.lineTo(1, 1); |
1956 path1.lineTo(1, 1); | 1956 path1.lineTo(1, 1); |
1957 path1.lineTo(0, 1); | 1957 path1.lineTo(0, 1); |
1958 path1.lineTo(0, 1); | 1958 path1.lineTo(0, 1); |
1959 path1.lineTo(0, 0); | 1959 path1.lineTo(0, 0); |
1960 path1.lineTo(0, 0); | 1960 path1.lineTo(0, 0); |
1961 path1.close(); | 1961 path1.close(); |
1962 | 1962 |
1963 SkPath path2; | 1963 SkPath path2; |
1964 path2.moveTo(0.64644664525985717773f, -0.35355341434478759766f); | 1964 path2.moveTo(0.64644664525985717773f, -0.35355341434478759766f); |
1965 path2.quadTo(0.79289329051971435547f, -0.50000005960464477539f, 1.0000001192
092895508f, -0.50000005960464477539f); | 1965 path2.quadTo(0.79289329051971435547f, -0.50000005960464477539f, 1.0000001192
092895508f, -0.50000005960464477539f); |
1966 path2.quadTo(1.2071068286895751953f, -0.50000005960464477539f, 1.35355353355
40771484f, -0.35355341434478759766f); | 1966 path2.quadTo(1.2071068286895751953f, -0.50000005960464477539f, 1.35355353355
40771484f, -0.35355341434478759766f); |
1967 path2.quadTo(1.5000001192092895508f, -0.20710679888725280762f, 1.50000011920
92895508f, 0); | 1967 path2.quadTo(1.5000001192092895508f, -0.20710679888725280762f, 1.50000011920
92895508f, 0); |
1968 path2.quadTo(1.5000001192092895508f, 0.20710679888725280762f, 1.353553533554
0771484f, 0.35355341434478759766f); | 1968 path2.quadTo(1.5000001192092895508f, 0.20710679888725280762f, 1.353553533554
0771484f, 0.35355341434478759766f); |
1969 path2.quadTo(1.2071068286895751953f, 0.50000005960464477539f, 1.000000119209
2895508f, 0.50000005960464477539f); | 1969 path2.quadTo(1.2071068286895751953f, 0.50000005960464477539f, 1.000000119209
2895508f, 0.50000005960464477539f); |
1970 path2.quadTo(0.79289329051971435547f, 0.50000005960464477539f, 0.64644664525
985717773f, 0.35355341434478759766f); | 1970 path2.quadTo(0.79289329051971435547f, 0.50000005960464477539f, 0.64644664525
985717773f, 0.35355341434478759766f); |
1971 path2.quadTo(0.50000005960464477539f, 0.20710679888725280762f, 0.50000005960
464477539f, 0); | 1971 path2.quadTo(0.50000005960464477539f, 0.20710679888725280762f, 0.50000005960
464477539f, 0); |
1972 path2.quadTo(0.50000005960464477539f, -0.20710679888725280762f, 0.6464466452
5985717773f, -0.35355341434478759766f); | 1972 path2.quadTo(0.50000005960464477539f, -0.20710679888725280762f, 0.6464466452
5985717773f, -0.35355341434478759766f); |
1973 testPathOp(reporter, path1, path2, kIntersect_PathOp); | 1973 testPathOp(reporter, path1, path2, kIntersect_PathOp, filename); |
1974 } | 1974 } |
1975 | 1975 |
1976 static void cubicOp85i(skiatest::Reporter* reporter) { | 1976 static void cubicOp85i(skiatest::Reporter* reporter, const char* filename) { |
1977 SkPath path, pathB; | 1977 SkPath path, pathB; |
1978 path.setFillType(SkPath::kWinding_FillType); | 1978 path.setFillType(SkPath::kWinding_FillType); |
1979 path.moveTo(3, 4); | 1979 path.moveTo(3, 4); |
1980 path.cubicTo(1, 5, 4, 3, 6, 4); | 1980 path.cubicTo(1, 5, 4, 3, 6, 4); |
1981 path.close(); | 1981 path.close(); |
1982 pathB.setFillType(SkPath::kWinding_FillType); | 1982 pathB.setFillType(SkPath::kWinding_FillType); |
1983 pathB.moveTo(3, 4); | 1983 pathB.moveTo(3, 4); |
1984 pathB.cubicTo(4, 6, 4, 3, 5, 1); | 1984 pathB.cubicTo(4, 6, 4, 3, 5, 1); |
1985 pathB.close(); | 1985 pathB.close(); |
1986 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 1986 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
1987 } | 1987 } |
1988 | 1988 |
1989 static void issue1418b(skiatest::Reporter* reporter) { | 1989 static void issue1418b(skiatest::Reporter* reporter, const char* filename) { |
1990 SkPath path1; | 1990 SkPath path1; |
1991 path1.moveTo(0, 0); | 1991 path1.moveTo(0, 0); |
1992 path1.lineTo(1, 0); | 1992 path1.lineTo(1, 0); |
1993 path1.lineTo(1, 1); | 1993 path1.lineTo(1, 1); |
1994 path1.lineTo(0, 1); | 1994 path1.lineTo(0, 1); |
1995 path1.lineTo(0, 0); | 1995 path1.lineTo(0, 0); |
1996 path1.close(); | 1996 path1.close(); |
1997 path1.setFillType(SkPath::kWinding_FillType); | 1997 path1.setFillType(SkPath::kWinding_FillType); |
1998 SkPath path2; | 1998 SkPath path2; |
1999 path2.moveTo(0.646446645f, -0.353553414f); | 1999 path2.moveTo(0.646446645f, -0.353553414f); |
2000 path2.quadTo(0.792893291f, -0.50000006f, 1.00000012f, -0.50000006f); | 2000 path2.quadTo(0.792893291f, -0.50000006f, 1.00000012f, -0.50000006f); |
2001 path2.quadTo(1.20710683f, -0.50000006f, 1.35355353f, -0.353553414f); | 2001 path2.quadTo(1.20710683f, -0.50000006f, 1.35355353f, -0.353553414f); |
2002 path2.quadTo(1.50000012f, -0.207106799f, 1.50000012f, 0); | 2002 path2.quadTo(1.50000012f, -0.207106799f, 1.50000012f, 0); |
2003 path2.quadTo(1.50000012f, 0.207106799f, 1.35355353f, 0.353553414f); | 2003 path2.quadTo(1.50000012f, 0.207106799f, 1.35355353f, 0.353553414f); |
2004 path2.quadTo(1.20710683f, 0.50000006f, 1.00000012f, 0.50000006f); | 2004 path2.quadTo(1.20710683f, 0.50000006f, 1.00000012f, 0.50000006f); |
2005 path2.quadTo(0.792893291f, 0.50000006f, 0.646446645f, 0.353553414f); | 2005 path2.quadTo(0.792893291f, 0.50000006f, 0.646446645f, 0.353553414f); |
2006 path2.quadTo(0.50000006f, 0.207106799f, 0.50000006f, 0); | 2006 path2.quadTo(0.50000006f, 0.207106799f, 0.50000006f, 0); |
2007 path2.quadTo(0.50000006f, -0.207106799f, 0.646446645f, -0.353553414f); | 2007 path2.quadTo(0.50000006f, -0.207106799f, 0.646446645f, -0.353553414f); |
2008 path2.close(); | 2008 path2.close(); |
2009 path2.moveTo(1.00000012f, 0.50000006f); | 2009 path2.moveTo(1.00000012f, 0.50000006f); |
2010 path2.lineTo(1.00000012f, 1.00000012f); | 2010 path2.lineTo(1.00000012f, 1.00000012f); |
2011 path2.lineTo(0.50000006f, 1.00000012f); | 2011 path2.lineTo(0.50000006f, 1.00000012f); |
2012 path2.quadTo(0.50000006f, 0.792893291f, 0.646446645f, 0.646446645f); | 2012 path2.quadTo(0.50000006f, 0.792893291f, 0.646446645f, 0.646446645f); |
2013 path2.quadTo(0.792893291f, 0.50000006f, 1.00000012f, 0.50000006f); | 2013 path2.quadTo(0.792893291f, 0.50000006f, 1.00000012f, 0.50000006f); |
2014 path2.close(); | 2014 path2.close(); |
2015 path2.setFillType(SkPath::kEvenOdd_FillType); | 2015 path2.setFillType(SkPath::kEvenOdd_FillType); |
2016 testPathOp(reporter, path1, path2, kIntersect_PathOp); | 2016 testPathOp(reporter, path1, path2, kIntersect_PathOp, filename); |
2017 } | 2017 } |
2018 | 2018 |
2019 static void rectOp1i(skiatest::Reporter* reporter) { | 2019 static void rectOp1i(skiatest::Reporter* reporter, const char* filename) { |
2020 SkPath path, pathB; | 2020 SkPath path, pathB; |
2021 path.setFillType(SkPath::kWinding_FillType); | 2021 path.setFillType(SkPath::kWinding_FillType); |
2022 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 2022 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
2023 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); | 2023 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
2024 pathB.setFillType(SkPath::kWinding_FillType); | 2024 pathB.setFillType(SkPath::kWinding_FillType); |
2025 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 2025 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
2026 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 2026 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
2027 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2027 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2028 } | 2028 } |
2029 | 2029 |
2030 static void rectOp2i(skiatest::Reporter* reporter) { | 2030 static void rectOp2i(skiatest::Reporter* reporter, const char* filename) { |
2031 SkPath path, pathB; | 2031 SkPath path, pathB; |
2032 path.setFillType(SkPath::kEvenOdd_FillType); | 2032 path.setFillType(SkPath::kEvenOdd_FillType); |
2033 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 2033 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
2034 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 2034 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
2035 pathB.setFillType(SkPath::kWinding_FillType); | 2035 pathB.setFillType(SkPath::kWinding_FillType); |
2036 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 2036 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
2037 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 2037 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
2038 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2038 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2039 } | 2039 } |
2040 | 2040 |
2041 static void rectOp3x(skiatest::Reporter* reporter) { | 2041 static void rectOp3x(skiatest::Reporter* reporter, const char* filename) { |
2042 SkPath path, pathB; | 2042 SkPath path, pathB; |
2043 path.setFillType(SkPath::kEvenOdd_FillType); | 2043 path.setFillType(SkPath::kEvenOdd_FillType); |
2044 path.moveTo(0, 0); | 2044 path.moveTo(0, 0); |
2045 path.lineTo(3, 0); | 2045 path.lineTo(3, 0); |
2046 path.lineTo(3, 3); | 2046 path.lineTo(3, 3); |
2047 path.lineTo(0, 3); | 2047 path.lineTo(0, 3); |
2048 path.close(); | 2048 path.close(); |
2049 path.moveTo(2, 2); | 2049 path.moveTo(2, 2); |
2050 path.lineTo(3, 2); | 2050 path.lineTo(3, 2); |
2051 path.lineTo(3, 3); | 2051 path.lineTo(3, 3); |
2052 path.lineTo(2, 3); | 2052 path.lineTo(2, 3); |
2053 path.close(); | 2053 path.close(); |
2054 pathB.setFillType(SkPath::kWinding_FillType); | 2054 pathB.setFillType(SkPath::kWinding_FillType); |
2055 pathB.moveTo(1, 1); | 2055 pathB.moveTo(1, 1); |
2056 pathB.lineTo(3, 1); | 2056 pathB.lineTo(3, 1); |
2057 pathB.lineTo(3, 3); | 2057 pathB.lineTo(3, 3); |
2058 pathB.lineTo(1, 3); | 2058 pathB.lineTo(1, 3); |
2059 pathB.close(); | 2059 pathB.close(); |
2060 pathB.moveTo(2, 2); | 2060 pathB.moveTo(2, 2); |
2061 pathB.lineTo(3, 2); | 2061 pathB.lineTo(3, 2); |
2062 pathB.lineTo(3, 3); | 2062 pathB.lineTo(3, 3); |
2063 pathB.lineTo(2, 3); | 2063 pathB.lineTo(2, 3); |
2064 pathB.close(); | 2064 pathB.close(); |
2065 testPathOp(reporter, path, pathB, kXOR_PathOp); | 2065 testPathOp(reporter, path, pathB, kXOR_PathOp, filename); |
2066 } | 2066 } |
2067 | 2067 |
2068 #define ISSUE_1435_WORKING 0 | 2068 static void issue1435(skiatest::Reporter* reporter, const char* filename) { |
2069 #if ISSUE_1435_WORKING | |
2070 static void issue1435(skiatest::Reporter* reporter) { | |
2071 SkPath path1; | 2069 SkPath path1; |
2072 path1.moveTo(160, 60); | 2070 path1.moveTo(160, 60); |
2073 path1.lineTo(220, 230); | 2071 path1.lineTo(220, 230); |
2074 path1.lineTo(60, 120); | 2072 path1.lineTo(60, 120); |
2075 path1.lineTo(260, 120); | 2073 path1.lineTo(260, 120); |
2076 path1.lineTo(90, 230); | 2074 path1.lineTo(90, 230); |
2077 path1.lineTo(160, 60); | 2075 path1.lineTo(160, 60); |
2078 path1.close(); | 2076 path1.close(); |
2079 path1.setFillType(SkPath::kEvenOdd_FillType); | 2077 path1.setFillType(SkPath::kEvenOdd_FillType); |
2080 | 2078 |
2081 | |
2082 SkPath path2; | 2079 SkPath path2; |
2083 path2.moveTo(142.589081f, 102.283646f); | 2080 path2.moveTo(142.589081f, 102.283646f); |
2084 path2.quadTo(149.821579f, 100, 158, 100); | 2081 path2.quadTo(149.821579f, 100, 158, 100); |
2085 path2.quadTo(167.156921f, 100, 175.128036f, 102.862793f); | 2082 path2.quadTo(167.156921f, 100, 175.128036f, 102.862793f); |
2086 path2.lineTo(181.176468f, 120); | 2083 path2.lineTo(181.176468f, 120); |
2087 path2.lineTo(135.294128f, 120); | 2084 path2.lineTo(135.294128f, 120); |
2088 path2.lineTo(142.589081f, 102.283646f); | 2085 path2.lineTo(142.589081f, 102.283646f); |
2089 path2.close(); | 2086 path2.close(); |
2090 path2.moveTo(118.681946f, 160.343842f); | 2087 path2.moveTo(118.681946f, 160.343842f); |
2091 path2.lineTo(135.294128f, 120); | 2088 path2.lineTo(135.294128f, 120); |
(...skipping 17 matching lines...) Expand all Loading... |
2109 path2.lineTo(195.830978f, 161.521133f); | 2106 path2.lineTo(195.830978f, 161.521133f); |
2110 path2.close(); | 2107 path2.close(); |
2111 path2.moveTo(195.830978f, 161.521133f); | 2108 path2.moveTo(195.830978f, 161.521133f); |
2112 path2.lineTo(207.878281f, 153.725815f); | 2109 path2.lineTo(207.878281f, 153.725815f); |
2113 path2.quadTo(208, 151.888062f, 208, 150); | 2110 path2.quadTo(208, 151.888062f, 208, 150); |
2114 path2.quadTo(208, 132.942657f, 198.066238f, 120); | 2111 path2.quadTo(208, 132.942657f, 198.066238f, 120); |
2115 path2.lineTo(181.176468f, 120); | 2112 path2.lineTo(181.176468f, 120); |
2116 path2.lineTo(195.830978f, 161.521133f); | 2113 path2.lineTo(195.830978f, 161.521133f); |
2117 path2.close(); | 2114 path2.close(); |
2118 path2.setFillType(SkPath::kEvenOdd_FillType); | 2115 path2.setFillType(SkPath::kEvenOdd_FillType); |
2119 testPathOp(reporter, path1, path2, kIntersect_PathOp); | 2116 testPathOp(reporter, path1, path2, kIntersect_PathOp, filename); |
2120 } | |
2121 #endif | |
2122 | |
2123 static void bufferOverflow(skiatest::Reporter* reporter) { | |
2124 SkPath path; | |
2125 path.addRect(0,0, 300,170141183460469231731687303715884105728.f); | |
2126 SkPath pathB; | |
2127 pathB.addRect(0,0, 300,16); | |
2128 testPathOp(reporter, path, pathB, kUnion_PathOp); | |
2129 } | 2117 } |
2130 | 2118 |
2131 static void skpkkiste_to716(skiatest::Reporter* reporter) { | 2119 static void skpkkiste_to716(skiatest::Reporter* reporter, const char* filename)
{ |
2132 SkPath path; | 2120 SkPath path; |
2133 path.setFillType(SkPath::kEvenOdd_FillType); | 2121 path.setFillType(SkPath::kEvenOdd_FillType); |
2134 path.moveTo(1173, 284); | 2122 path.moveTo(1173, 284); |
2135 path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f)
; | 2123 path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f)
; |
2136 path.lineTo(1174, 123.999496f); | 2124 path.lineTo(1174, 123.999496f); |
2137 path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127); | 2125 path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127); |
2138 path.lineTo(1173, 284); | 2126 path.lineTo(1173, 284); |
2139 path.close(); | 2127 path.close(); |
2140 SkPath pathB; | 2128 SkPath pathB; |
2141 pathB.setFillType(SkPath::kWinding_FillType); | 2129 pathB.setFillType(SkPath::kWinding_FillType); |
2142 pathB.moveTo(1340, 122); | 2130 pathB.moveTo(1340, 122); |
2143 pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127); | 2131 pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127); |
2144 pathB.lineTo(1345, 284); | 2132 pathB.lineTo(1345, 284); |
2145 pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289); | 2133 pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289); |
2146 pathB.lineTo(1178, 289); | 2134 pathB.lineTo(1178, 289); |
2147 pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284); | 2135 pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284); |
2148 pathB.lineTo(1173, 127); | 2136 pathB.lineTo(1173, 127); |
2149 pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122); | 2137 pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122); |
2150 pathB.lineTo(1340, 122); | 2138 pathB.lineTo(1340, 122); |
2151 pathB.close(); | 2139 pathB.close(); |
2152 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2140 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2153 } | 2141 } |
2154 | 2142 |
2155 static void loopEdge1(skiatest::Reporter* reporter) { | 2143 static void loopEdge1(skiatest::Reporter* reporter, const char* filename) { |
2156 SkPath path; | 2144 SkPath path; |
2157 path.setFillType(SkPath::kEvenOdd_FillType); | 2145 path.setFillType(SkPath::kEvenOdd_FillType); |
2158 path.moveTo(0,0); | 2146 path.moveTo(0,0); |
2159 path.lineTo(3,0); | 2147 path.lineTo(3,0); |
2160 path.lineTo(3,2); | 2148 path.lineTo(3,2); |
2161 path.lineTo(1,2); | 2149 path.lineTo(1,2); |
2162 path.lineTo(1,1); | 2150 path.lineTo(1,1); |
2163 path.lineTo(2,1); | 2151 path.lineTo(2,1); |
2164 path.lineTo(2,3); | 2152 path.lineTo(2,3); |
2165 path.lineTo(0,3); | 2153 path.lineTo(0,3); |
2166 path.close(); | 2154 path.close(); |
2167 SkPath pathB; | 2155 SkPath pathB; |
2168 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2156 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2169 pathB.moveTo(1,2); | 2157 pathB.moveTo(1,2); |
2170 pathB.lineTo(2,2); | 2158 pathB.lineTo(2,2); |
2171 pathB.lineTo(2,4); | 2159 pathB.lineTo(2,4); |
2172 pathB.lineTo(1,4); | 2160 pathB.lineTo(1,4); |
2173 pathB.close(); | 2161 pathB.close(); |
2174 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2162 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2175 } | 2163 } |
2176 | 2164 |
2177 static void loopEdge2(skiatest::Reporter* reporter) { | 2165 static void loopEdge2(skiatest::Reporter* reporter, const char* filename) { |
2178 SkPath path; | 2166 SkPath path; |
2179 path.setFillType(SkPath::kEvenOdd_FillType); | 2167 path.setFillType(SkPath::kEvenOdd_FillType); |
2180 path.moveTo(0,0); | 2168 path.moveTo(0,0); |
2181 path.lineTo(3,0); | 2169 path.lineTo(3,0); |
2182 path.lineTo(3,2); | 2170 path.lineTo(3,2); |
2183 path.lineTo(1,2); | 2171 path.lineTo(1,2); |
2184 path.lineTo(1,1); | 2172 path.lineTo(1,1); |
2185 path.lineTo(2,1); | 2173 path.lineTo(2,1); |
2186 path.lineTo(2,3); | 2174 path.lineTo(2,3); |
2187 path.lineTo(0,3); | 2175 path.lineTo(0,3); |
2188 path.close(); | 2176 path.close(); |
2189 SkPath pathB; | 2177 SkPath pathB; |
2190 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2178 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2191 pathB.moveTo(1 - 1e-6f,2); | 2179 pathB.moveTo(1 - 1e-6f,2); |
2192 pathB.lineTo(2 - 1e-6f,2); | 2180 pathB.lineTo(2 - 1e-6f,2); |
2193 pathB.lineTo(2 - 1e-6f,4); | 2181 pathB.lineTo(2 - 1e-6f,4); |
2194 pathB.lineTo(1 - 1e-6f,4); | 2182 pathB.lineTo(1 - 1e-6f,4); |
2195 pathB.close(); | 2183 pathB.close(); |
2196 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2184 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2197 } | 2185 } |
2198 | 2186 |
2199 static void cubicOp86i(skiatest::Reporter* reporter) { | 2187 static void cubicOp86i(skiatest::Reporter* reporter, const char* filename) { |
2200 SkPath path, pathB; | 2188 SkPath path, pathB; |
2201 path.setFillType(SkPath::kWinding_FillType); | 2189 path.setFillType(SkPath::kWinding_FillType); |
2202 path.moveTo(0, 4); | 2190 path.moveTo(0, 4); |
2203 path.cubicTo(3, 4, 6, 2, 5, 2); | 2191 path.cubicTo(3, 4, 6, 2, 5, 2); |
2204 path.close(); | 2192 path.close(); |
2205 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2193 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2206 pathB.moveTo(2, 6); | 2194 pathB.moveTo(2, 6); |
2207 pathB.cubicTo(2, 5, 4, 0, 4, 3); | 2195 pathB.cubicTo(2, 5, 4, 0, 4, 3); |
2208 pathB.close(); | 2196 pathB.close(); |
2209 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2197 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2210 } | 2198 } |
2211 | 2199 |
2212 static void cubicOp87u(skiatest::Reporter* reporter) { | 2200 static void cubicOp87u(skiatest::Reporter* reporter, const char* filename) { |
2213 SkPath path, pathB; | 2201 SkPath path, pathB; |
2214 path.setFillType(SkPath::kWinding_FillType); | 2202 path.setFillType(SkPath::kWinding_FillType); |
2215 path.moveTo(0,1); | 2203 path.moveTo(0,1); |
2216 path.cubicTo(0,2, 2,0, 6,4); | 2204 path.cubicTo(0,2, 2,0, 6,4); |
2217 path.close(); | 2205 path.close(); |
2218 pathB.setFillType(SkPath::kWinding_FillType); | 2206 pathB.setFillType(SkPath::kWinding_FillType); |
2219 pathB.moveTo(0,2); | 2207 pathB.moveTo(0,2); |
2220 pathB.cubicTo(4,6, 1,0, 2,0); | 2208 pathB.cubicTo(4,6, 1,0, 2,0); |
2221 pathB.close(); | 2209 pathB.close(); |
2222 testPathOp(reporter, path, pathB, kUnion_PathOp); | 2210 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
2223 } | 2211 } |
2224 | 2212 |
2225 static void cubicOp88u(skiatest::Reporter* reporter) { | 2213 static void cubicOp88u(skiatest::Reporter* reporter, const char* filename) { |
2226 SkPath path, pathB; | 2214 SkPath path, pathB; |
2227 path.setFillType(SkPath::kWinding_FillType); | 2215 path.setFillType(SkPath::kWinding_FillType); |
2228 path.moveTo(0,1); | 2216 path.moveTo(0,1); |
2229 path.cubicTo(2,5, 5,0, 6,4); | 2217 path.cubicTo(2,5, 5,0, 6,4); |
2230 path.close(); | 2218 path.close(); |
2231 pathB.setFillType(SkPath::kWinding_FillType); | 2219 pathB.setFillType(SkPath::kWinding_FillType); |
2232 pathB.moveTo(0,5); | 2220 pathB.moveTo(0,5); |
2233 pathB.cubicTo(4,6, 1,0, 5,2); | 2221 pathB.cubicTo(4,6, 1,0, 5,2); |
2234 pathB.close(); | 2222 pathB.close(); |
2235 testPathOp(reporter, path, pathB, kUnion_PathOp); | 2223 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
2236 } | 2224 } |
2237 | 2225 |
2238 static void cubicOp89u(skiatest::Reporter* reporter) { | 2226 static void cubicOp89u(skiatest::Reporter* reporter, const char* filename) { |
2239 SkPath path, pathB; | 2227 SkPath path, pathB; |
2240 path.setFillType(SkPath::kWinding_FillType); | 2228 path.setFillType(SkPath::kWinding_FillType); |
2241 path.moveTo(0, 3); | 2229 path.moveTo(0, 3); |
2242 path.cubicTo(1, 6, 5, 0, 6, 3); | 2230 path.cubicTo(1, 6, 5, 0, 6, 3); |
2243 path.close(); | 2231 path.close(); |
2244 pathB.setFillType(SkPath::kWinding_FillType); | 2232 pathB.setFillType(SkPath::kWinding_FillType); |
2245 pathB.moveTo(0, 5); | 2233 pathB.moveTo(0, 5); |
2246 pathB.cubicTo(3, 6, 3, 0, 6, 1); | 2234 pathB.cubicTo(3, 6, 3, 0, 6, 1); |
2247 pathB.close(); | 2235 pathB.close(); |
2248 testPathOp(reporter, path, pathB, kUnion_PathOp); | 2236 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
2249 } | 2237 } |
2250 | 2238 |
2251 static void cubicOp90u(skiatest::Reporter* reporter) { | 2239 static void cubicOp90u(skiatest::Reporter* reporter, const char* filename) { |
2252 SkPath path, pathB; | 2240 SkPath path, pathB; |
2253 path.setFillType(SkPath::kEvenOdd_FillType); | 2241 path.setFillType(SkPath::kEvenOdd_FillType); |
2254 path.moveTo(0, 5); | 2242 path.moveTo(0, 5); |
2255 path.cubicTo(1, 2, 5, 2, 4, 1); | 2243 path.cubicTo(1, 2, 5, 2, 4, 1); |
2256 path.close(); | 2244 path.close(); |
2257 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2245 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2258 pathB.moveTo(2, 5); | 2246 pathB.moveTo(2, 5); |
2259 pathB.cubicTo(1, 4, 5, 0, 2, 1); | 2247 pathB.cubicTo(1, 4, 5, 0, 2, 1); |
2260 pathB.close(); | 2248 pathB.close(); |
2261 testPathOp(reporter, path, pathB, kUnion_PathOp); | 2249 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
2262 } | 2250 } |
2263 | 2251 |
2264 static void cubicOp91u(skiatest::Reporter* reporter) { | 2252 static void cubicOp91u(skiatest::Reporter* reporter, const char* filename) { |
2265 SkPath path, pathB; | 2253 SkPath path, pathB; |
2266 path.setFillType(SkPath::kWinding_FillType); | 2254 path.setFillType(SkPath::kWinding_FillType); |
2267 path.moveTo(1, 6); | 2255 path.moveTo(1, 6); |
2268 path.cubicTo(0, 3, 6, 3, 5, 0); | 2256 path.cubicTo(0, 3, 6, 3, 5, 0); |
2269 path.close(); | 2257 path.close(); |
2270 pathB.setFillType(SkPath::kWinding_FillType); | 2258 pathB.setFillType(SkPath::kWinding_FillType); |
2271 pathB.moveTo(3, 6); | 2259 pathB.moveTo(3, 6); |
2272 pathB.cubicTo(0, 5, 6, 1, 3, 0); | 2260 pathB.cubicTo(0, 5, 6, 1, 3, 0); |
2273 pathB.close(); | 2261 pathB.close(); |
2274 testPathOp(reporter, path, pathB, kUnion_PathOp); | 2262 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
2275 } | 2263 } |
2276 | 2264 |
2277 static void skpaaalgarve_org53(skiatest::Reporter* reporter) { // add t cancel | 2265 static void skpaaalgarve_org53(skiatest::Reporter* reporter, const char* filenam
e) { // add t cancel |
2278 SkPath path; | 2266 SkPath path; |
2279 path.setFillType(SkPath::kEvenOdd_FillType); | 2267 path.setFillType(SkPath::kEvenOdd_FillType); |
2280 path.moveTo(-1.24344979e-014f, 348); | 2268 path.moveTo(-1.24344979e-014f, 348); |
2281 path.lineTo(258, 348); | 2269 path.lineTo(258, 348); |
2282 path.lineTo(258, 322); | 2270 path.lineTo(258, 322); |
2283 path.quadTo(258, 317.857849f, 255.072006f, 314.928009f); | 2271 path.quadTo(258, 317.857849f, 255.072006f, 314.928009f); |
2284 path.quadTo(252.142136f, 312, 248, 312); | 2272 path.quadTo(252.142136f, 312, 248, 312); |
2285 path.lineTo(1.77635684e-015f, 312); | 2273 path.lineTo(1.77635684e-015f, 312); |
2286 path.lineTo(-1.24344979e-014f, 348); | 2274 path.lineTo(-1.24344979e-014f, 348); |
2287 path.close(); | 2275 path.close(); |
2288 SkPath pathB; | 2276 SkPath pathB; |
2289 pathB.setFillType(SkPath::kWinding_FillType); | 2277 pathB.setFillType(SkPath::kWinding_FillType); |
2290 pathB.moveTo(0, 312); | 2278 pathB.moveTo(0, 312); |
2291 pathB.lineTo(258, 312); | 2279 pathB.lineTo(258, 312); |
2292 pathB.lineTo(258, 348); | 2280 pathB.lineTo(258, 348); |
2293 pathB.lineTo(0, 348); | 2281 pathB.lineTo(0, 348); |
2294 pathB.close(); | 2282 pathB.close(); |
2295 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2283 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2296 } | 2284 } |
2297 | 2285 |
2298 static void skpabcspark_ca103(skiatest::Reporter* reporter) { // add t cancel | 2286 static void skpabcspark_ca103(skiatest::Reporter* reporter, const char* filename
) { // add t cancel |
2299 SkPath path; | 2287 SkPath path; |
2300 path.setFillType(SkPath::kEvenOdd_FillType); | 2288 path.setFillType(SkPath::kEvenOdd_FillType); |
2301 path.moveTo(1.99840144e-015f, 494); | 2289 path.moveTo(1.99840144e-015f, 494); |
2302 path.lineTo(97, 494); | 2290 path.lineTo(97, 494); |
2303 path.quadTo(100.313705f, 494, 102.6576f, 491.657593f); | 2291 path.quadTo(100.313705f, 494, 102.6576f, 491.657593f); |
2304 path.quadTo(105, 489.313721f, 105, 486); | 2292 path.quadTo(105, 489.313721f, 105, 486); |
2305 path.lineTo(105, 425); | 2293 path.lineTo(105, 425); |
2306 path.quadTo(105, 421.686279f, 102.6576f, 419.342407f); | 2294 path.quadTo(105, 421.686279f, 102.6576f, 419.342407f); |
2307 path.quadTo(100.313705f, 417, 97, 417); | 2295 path.quadTo(100.313705f, 417, 97, 417); |
2308 path.lineTo(2.22044605e-016f, 417); | 2296 path.lineTo(2.22044605e-016f, 417); |
2309 path.lineTo(1.99840144e-015f, 494); | 2297 path.lineTo(1.99840144e-015f, 494); |
2310 path.close(); | 2298 path.close(); |
2311 SkPath pathB; | 2299 SkPath pathB; |
2312 pathB.setFillType(SkPath::kWinding_FillType); | 2300 pathB.setFillType(SkPath::kWinding_FillType); |
2313 pathB.moveTo(0, 417); | 2301 pathB.moveTo(0, 417); |
2314 pathB.lineTo(105, 417); | 2302 pathB.lineTo(105, 417); |
2315 pathB.lineTo(105, 494); | 2303 pathB.lineTo(105, 494); |
2316 pathB.lineTo(0, 494); | 2304 pathB.lineTo(0, 494); |
2317 pathB.close(); | 2305 pathB.close(); |
2318 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2306 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2319 } | 2307 } |
2320 | 2308 |
2321 static void skpacesoftech_com47(skiatest::Reporter* reporter) { // partial coin
cidence | 2309 static void skpacesoftech_com47(skiatest::Reporter* reporter, const char* filena
me) { // partial coincidence |
2322 SkPath path; | 2310 SkPath path; |
2323 path.setFillType(SkPath::kEvenOdd_FillType); | 2311 path.setFillType(SkPath::kEvenOdd_FillType); |
2324 path.moveTo(670.537415f, 285); | 2312 path.moveTo(670.537415f, 285); |
2325 path.lineTo(670.387451f, 285); | 2313 path.lineTo(670.387451f, 285); |
2326 path.lineTo(596.315186f, 314.850708f); | 2314 path.lineTo(596.315186f, 314.850708f); |
2327 path.lineTo(626.19696f, 389); | 2315 path.lineTo(626.19696f, 389); |
2328 path.lineTo(626.346863f, 389); | 2316 path.lineTo(626.346863f, 389); |
2329 path.lineTo(700.419189f, 359.149261f); | 2317 path.lineTo(700.419189f, 359.149261f); |
2330 path.lineTo(670.537415f, 285); | 2318 path.lineTo(670.537415f, 285); |
2331 path.close(); | 2319 path.close(); |
2332 SkPath pathB; | 2320 SkPath pathB; |
2333 pathB.setFillType(SkPath::kWinding_FillType); | 2321 pathB.setFillType(SkPath::kWinding_FillType); |
2334 pathB.moveTo(663.318542f, 374.100616f); | 2322 pathB.moveTo(663.318542f, 374.100616f); |
2335 pathB.quadTo(647.950989f, 380.293671f, 632.705322f, 373.806305f); | 2323 pathB.quadTo(647.950989f, 380.293671f, 632.705322f, 373.806305f); |
2336 pathB.quadTo(617.459595f, 367.318909f, 611.266541f, 351.951355f); | 2324 pathB.quadTo(617.459595f, 367.318909f, 611.266541f, 351.951355f); |
2337 pathB.quadTo(605.073486f, 336.58374f, 611.560913f, 321.338074f); | 2325 pathB.quadTo(605.073486f, 336.58374f, 611.560913f, 321.338074f); |
2338 pathB.quadTo(618.048279f, 306.092407f, 633.415833f, 299.899353f); | 2326 pathB.quadTo(618.048279f, 306.092407f, 633.415833f, 299.899353f); |
2339 pathB.quadTo(648.783447f, 293.706299f, 664.029114f, 300.193665f); | 2327 pathB.quadTo(648.783447f, 293.706299f, 664.029114f, 300.193665f); |
2340 pathB.quadTo(679.27478f, 306.68103f, 685.467834f, 322.048645f); | 2328 pathB.quadTo(679.27478f, 306.68103f, 685.467834f, 322.048645f); |
2341 pathB.quadTo(691.660889f, 337.416199f, 685.173523f, 352.661896f); | 2329 pathB.quadTo(691.660889f, 337.416199f, 685.173523f, 352.661896f); |
2342 pathB.quadTo(678.686157f, 367.907562f, 663.318542f, 374.100616f); | 2330 pathB.quadTo(678.686157f, 367.907562f, 663.318542f, 374.100616f); |
2343 pathB.close(); | 2331 pathB.close(); |
2344 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2332 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2345 } | 2333 } |
2346 | 2334 |
2347 static void skpact_com43(skiatest::Reporter* reporter) { // bridge op | 2335 static void skpact_com43(skiatest::Reporter* reporter, const char* filename) {
// bridge op |
2348 SkPath path; | 2336 SkPath path; |
2349 path.setFillType(SkPath::kEvenOdd_FillType); | 2337 path.setFillType(SkPath::kEvenOdd_FillType); |
2350 path.moveTo(1.45716772e-016f, 924.336121f); | 2338 path.moveTo(1.45716772e-016f, 924.336121f); |
2351 path.lineTo(-1.11022302e-016f, 920); | 2339 path.lineTo(-1.11022302e-016f, 920); |
2352 path.lineTo(6, 920); | 2340 path.lineTo(6, 920); |
2353 path.lineTo(6, 926); | 2341 path.lineTo(6, 926); |
2354 path.lineTo(1.66389287f, 926); | 2342 path.lineTo(1.66389287f, 926); |
2355 path.quadTo(1.18842196f, 925.674561f, 0.756800175f, 925.243225f); | 2343 path.quadTo(1.18842196f, 925.674561f, 0.756800175f, 925.243225f); |
2356 path.quadTo(0.325406998f, 924.811523f, 1.45716772e-016f, 924.336121f); | 2344 path.quadTo(0.325406998f, 924.811523f, 1.45716772e-016f, 924.336121f); |
2357 path.close(); | 2345 path.close(); |
2358 path.moveTo(1, 921); | 2346 path.moveTo(1, 921); |
2359 path.lineTo(5, 921); | 2347 path.lineTo(5, 921); |
2360 path.lineTo(5, 925); | 2348 path.lineTo(5, 925); |
2361 path.cubicTo(2.79086018f, 925, 1, 923.209167f, 1, 921); | 2349 path.cubicTo(2.79086018f, 925, 1, 923.209167f, 1, 921); |
2362 path.close(); | 2350 path.close(); |
2363 SkPath pathB; | 2351 SkPath pathB; |
2364 pathB.setFillType(SkPath::kWinding_FillType); | 2352 pathB.setFillType(SkPath::kWinding_FillType); |
2365 pathB.moveTo(-1, 920); | 2353 pathB.moveTo(-1, 920); |
2366 pathB.lineTo(0, 920); | 2354 pathB.lineTo(0, 920); |
2367 pathB.lineTo(3, 927); | 2355 pathB.lineTo(3, 927); |
2368 pathB.lineTo(-1, 927); | 2356 pathB.lineTo(-1, 927); |
2369 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2357 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2370 } | 2358 } |
2371 | 2359 |
2372 static void skpadbox_lt8(skiatest::Reporter* reporter) { // zero span | 2360 static void skpadbox_lt8(skiatest::Reporter* reporter, const char* filename) {
// zero span |
2373 SkPath path; | 2361 SkPath path; |
2374 path.setFillType(SkPath::kEvenOdd_FillType); | 2362 path.setFillType(SkPath::kEvenOdd_FillType); |
2375 path.moveTo(320.097229f, 628.573669f); | 2363 path.moveTo(320.097229f, 628.573669f); |
2376 path.lineTo(610.227173f, 85.7786865f); | 2364 path.lineTo(610.227173f, 85.7786865f); |
2377 path.lineTo(946.652588f, 265.601807f); | 2365 path.lineTo(946.652588f, 265.601807f); |
2378 path.lineTo(656.522644f, 808.39679f); | 2366 path.lineTo(656.522644f, 808.39679f); |
2379 path.lineTo(320.097229f, 628.573669f); | 2367 path.lineTo(320.097229f, 628.573669f); |
2380 path.close(); | 2368 path.close(); |
2381 SkPath pathB; | 2369 SkPath pathB; |
2382 pathB.setFillType(SkPath::kInverseWinding_FillType); | 2370 pathB.setFillType(SkPath::kInverseWinding_FillType); |
2383 pathB.moveTo(333.866608f, 623.496155f); | 2371 pathB.moveTo(333.866608f, 623.496155f); |
2384 pathB.lineTo(613.368042f, 100.585754f); | 2372 pathB.lineTo(613.368042f, 100.585754f); |
2385 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395
f, 100.085449f); | 2373 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395
f, 100.085449f); |
2386 pathB.lineTo(932.633057f, 269.854553f); | 2374 pathB.lineTo(932.633057f, 269.854553f); |
2387 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301
f, 271.503906f); | 2375 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301
f, 271.503906f); |
2388 pathB.lineTo(653.631897f, 794.414307f); | 2376 pathB.lineTo(653.631897f, 794.414307f); |
2389 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544
f, 794.914612f); | 2377 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544
f, 794.914612f); |
2390 pathB.lineTo(334.366943f, 625.145508f); | 2378 pathB.lineTo(334.366943f, 625.145508f); |
2391 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608
f, 623.496155f); | 2379 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608
f, 623.496155f); |
2392 pathB.close(); | 2380 pathB.close(); |
2393 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2381 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2394 } | 2382 } |
2395 | 2383 |
2396 static void skpadindex_de4(skiatest::Reporter* reporter) { // find chase op | 2384 static void skpadindex_de4(skiatest::Reporter* reporter, const char* filename) {
// find chase op |
2397 SkPath path; | 2385 SkPath path; |
2398 path.setFillType(SkPath::kEvenOdd_FillType); | 2386 path.setFillType(SkPath::kEvenOdd_FillType); |
2399 path.moveTo(0, 926); | 2387 path.moveTo(0, 926); |
2400 path.lineTo(0, 0); | 2388 path.lineTo(0, 0); |
2401 path.lineTo(1280, 0); | 2389 path.lineTo(1280, 0); |
2402 path.lineTo(1280, 926); | 2390 path.lineTo(1280, 926); |
2403 path.lineTo(0, 926); | 2391 path.lineTo(0, 926); |
2404 path.close(); | 2392 path.close(); |
2405 SkPath pathB; | 2393 SkPath pathB; |
2406 pathB.setFillType(SkPath::kWinding_FillType); | 2394 pathB.setFillType(SkPath::kWinding_FillType); |
2407 pathB.moveTo(0, 312); | 2395 pathB.moveTo(0, 312); |
2408 pathB.lineTo(8.20486257e-015f, 178); | 2396 pathB.lineTo(8.20486257e-015f, 178); |
2409 pathB.lineTo(49, 178); | 2397 pathB.lineTo(49, 178); |
2410 pathB.lineTo(49, 312); | 2398 pathB.lineTo(49, 312); |
2411 pathB.close(); | 2399 pathB.close(); |
2412 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2400 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2413 } | 2401 } |
2414 | 2402 |
2415 static void skpadithya_putr4_blogspot_com551(skiatest::Reporter* reporter) { //
calc common | 2403 static void skpadithya_putr4_blogspot_com551(skiatest::Reporter* reporter, const
char* filename) { // calc common |
2416 SkPath path; | 2404 SkPath path; |
2417 path.setFillType(SkPath::kEvenOdd_FillType); | 2405 path.setFillType(SkPath::kEvenOdd_FillType); |
2418 path.moveTo(205.605804f, 142.334625f); | 2406 path.moveTo(205.605804f, 142.334625f); |
2419 path.lineTo(254.665359f, 85.6058044f); | 2407 path.lineTo(254.665359f, 85.6058044f); |
2420 path.lineTo(311.394196f, 134.665359f); | 2408 path.lineTo(311.394196f, 134.665359f); |
2421 path.lineTo(262.334625f, 191.39418f); | 2409 path.lineTo(262.334625f, 191.39418f); |
2422 path.lineTo(205.605804f, 142.334625f); | 2410 path.lineTo(205.605804f, 142.334625f); |
2423 path.close(); | 2411 path.close(); |
2424 SkPath pathB; | 2412 SkPath pathB; |
2425 pathB.setFillType(SkPath::kWinding_FillType); | 2413 pathB.setFillType(SkPath::kWinding_FillType); |
2426 pathB.moveTo(283.407959f, 110.462646f); | 2414 pathB.moveTo(283.407959f, 110.462646f); |
2427 pathB.cubicTo(298.864319f, 123.829437f, 300.558258f, 147.195221f, 287.191467
f, 162.651581f); | 2415 pathB.cubicTo(298.864319f, 123.829437f, 300.558258f, 147.195221f, 287.191467
f, 162.651581f); |
2428 pathB.lineTo(286.537354f, 163.407959f); | 2416 pathB.lineTo(286.537354f, 163.407959f); |
2429 pathB.cubicTo(273.170563f, 178.864334f, 249.804779f, 180.558258f, 234.348419
f, 167.191467f); | 2417 pathB.cubicTo(273.170563f, 178.864334f, 249.804779f, 180.558258f, 234.348419
f, 167.191467f); |
2430 pathB.lineTo(233.592026f, 166.537338f); | 2418 pathB.lineTo(233.592026f, 166.537338f); |
2431 pathB.cubicTo(218.135666f, 153.170547f, 216.441727f, 129.804779f, 229.808517
f, 114.348412f); | 2419 pathB.cubicTo(218.135666f, 153.170547f, 216.441727f, 129.804779f, 229.808517
f, 114.348412f); |
2432 pathB.lineTo(230.462646f, 113.592026f); | 2420 pathB.lineTo(230.462646f, 113.592026f); |
2433 pathB.cubicTo(243.829437f, 98.1356659f, 267.195221f, 96.4417267f, 282.651581
f, 109.808517f); | 2421 pathB.cubicTo(243.829437f, 98.1356659f, 267.195221f, 96.4417267f, 282.651581
f, 109.808517f); |
2434 pathB.lineTo(283.407959f, 110.462646f); | 2422 pathB.lineTo(283.407959f, 110.462646f); |
2435 pathB.close(); | 2423 pathB.close(); |
2436 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2424 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2437 } | 2425 } |
2438 | 2426 |
2439 static void skpadspert_de11(skiatest::Reporter* reporter) { // mark and chase w
inding | 2427 static void skpadspert_de11(skiatest::Reporter* reporter, const char* filename)
{ // mark and chase winding |
2440 SkPath path; | 2428 SkPath path; |
2441 path.setFillType(SkPath::kEvenOdd_FillType); | 2429 path.setFillType(SkPath::kEvenOdd_FillType); |
2442 path.moveTo(-4.4408921e-016f, 682.5f); | 2430 path.moveTo(-4.4408921e-016f, 682.5f); |
2443 path.lineTo(30.5f, 682.5f); | 2431 path.lineTo(30.5f, 682.5f); |
2444 path.cubicTo(32.709137f, 682.5f, 34.5f, 680.709167f, 34.5f, 678.5f); | 2432 path.cubicTo(32.709137f, 682.5f, 34.5f, 680.709167f, 34.5f, 678.5f); |
2445 path.lineTo(34.5f, 486.5f); | 2433 path.lineTo(34.5f, 486.5f); |
2446 path.cubicTo(34.5f, 484.290863f, 32.709137f, 482.5f, 30.5f, 482.5f); | 2434 path.cubicTo(34.5f, 484.290863f, 32.709137f, 482.5f, 30.5f, 482.5f); |
2447 path.lineTo(0, 482.5f); | 2435 path.lineTo(0, 482.5f); |
2448 path.lineTo(-4.4408921e-016f, 682.5f); | 2436 path.lineTo(-4.4408921e-016f, 682.5f); |
2449 path.close(); | 2437 path.close(); |
2450 SkPath pathB; | 2438 SkPath pathB; |
2451 pathB.setFillType(SkPath::kWinding_FillType); | 2439 pathB.setFillType(SkPath::kWinding_FillType); |
2452 pathB.moveTo(0, 482); | 2440 pathB.moveTo(0, 482); |
2453 pathB.lineTo(35, 482); | 2441 pathB.lineTo(35, 482); |
2454 pathB.lineTo(35, 683); | 2442 pathB.lineTo(35, 683); |
2455 pathB.lineTo(0, 683); | 2443 pathB.lineTo(0, 683); |
2456 pathB.close(); | 2444 pathB.close(); |
2457 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2445 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2458 } | 2446 } |
2459 | 2447 |
2460 static void skpaiaigames_com870(skiatest::Reporter* reporter) { // cubic/cubic
intersect | 2448 static void skpaiaigames_com870(skiatest::Reporter* reporter, const char* filena
me) { // cubic/cubic intersect |
2461 SkPath path; | 2449 SkPath path; |
2462 path.setFillType(SkPath::kEvenOdd_FillType); | 2450 path.setFillType(SkPath::kEvenOdd_FillType); |
2463 path.moveTo(324.071075f, 845.071045f); | 2451 path.moveTo(324.071075f, 845.071045f); |
2464 path.cubicTo(324.405151f, 844.737f, 324.715668f, 844.379395f, 325, 844.00097
7f); | 2452 path.cubicTo(324.405151f, 844.737f, 324.715668f, 844.379395f, 325, 844.00097
7f); |
2465 path.lineTo(325, 842.127197f); | 2453 path.lineTo(325, 842.127197f); |
2466 path.cubicTo(324.571411f, 842.956238f, 324.017761f, 843.710144f, 323.363953f
, 844.363953f); | 2454 path.cubicTo(324.571411f, 842.956238f, 324.017761f, 843.710144f, 323.363953f
, 844.363953f); |
2467 path.lineTo(324.071075f, 845.071045f); | 2455 path.lineTo(324.071075f, 845.071045f); |
2468 path.close(); | 2456 path.close(); |
2469 path.moveTo(323.363953f, 714.636047f); | 2457 path.moveTo(323.363953f, 714.636047f); |
2470 path.lineTo(324.071075f, 713.928955f); | 2458 path.lineTo(324.071075f, 713.928955f); |
2471 path.cubicTo(324.405151f, 714.263f, 324.715668f, 714.620605f, 325, 714.99902
3f); | 2459 path.cubicTo(324.405151f, 714.263f, 324.715668f, 714.620605f, 325, 714.99902
3f); |
2472 path.lineTo(325, 716.872803f); | 2460 path.lineTo(325, 716.872803f); |
2473 path.cubicTo(324.571411f, 716.043762f, 324.017761f, 715.289856f, 323.363953f
, 714.636047f); | 2461 path.cubicTo(324.571411f, 716.043762f, 324.017761f, 715.289856f, 323.363953f
, 714.636047f); |
2474 path.close(); | 2462 path.close(); |
2475 SkPath pathB; | 2463 SkPath pathB; |
2476 pathB.setFillType(SkPath::kWinding_FillType); | 2464 pathB.setFillType(SkPath::kWinding_FillType); |
2477 pathB.moveTo(317, 711); | 2465 pathB.moveTo(317, 711); |
2478 pathB.cubicTo(322.522858f, 711, 327, 715.477173f, 327, 721); | 2466 pathB.cubicTo(322.522858f, 711, 327, 715.477173f, 327, 721); |
2479 pathB.lineTo(327, 838); | 2467 pathB.lineTo(327, 838); |
2480 pathB.cubicTo(327, 843.522827f, 322.522858f, 848, 317, 848); | 2468 pathB.cubicTo(327, 843.522827f, 322.522858f, 848, 317, 848); |
2481 pathB.lineTo(155, 848); | 2469 pathB.lineTo(155, 848); |
2482 pathB.cubicTo(149.477158f, 848, 145, 843.522827f, 145, 838); | 2470 pathB.cubicTo(149.477158f, 848, 145, 843.522827f, 145, 838); |
2483 pathB.lineTo(145, 721); | 2471 pathB.lineTo(145, 721); |
2484 pathB.cubicTo(145, 715.477173f, 149.477158f, 711, 155, 711); | 2472 pathB.cubicTo(145, 715.477173f, 149.477158f, 711, 155, 711); |
2485 pathB.lineTo(317, 711); | 2473 pathB.lineTo(317, 711); |
2486 pathB.close(); | 2474 pathB.close(); |
2487 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2475 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2488 } | 2476 } |
2489 | 2477 |
2490 static void cubicOp92i(skiatest::Reporter* reporter) { | 2478 static void cubicOp92i(skiatest::Reporter* reporter, const char* filename) { |
2491 SkPath path, pathB; | 2479 SkPath path, pathB; |
2492 path.setFillType(SkPath::kWinding_FillType); | 2480 path.setFillType(SkPath::kWinding_FillType); |
2493 path.moveTo(0, 1); | 2481 path.moveTo(0, 1); |
2494 path.cubicTo(2, 6, 4, 1, 5, 4); | 2482 path.cubicTo(2, 6, 4, 1, 5, 4); |
2495 path.close(); | 2483 path.close(); |
2496 pathB.setFillType(SkPath::kWinding_FillType); | 2484 pathB.setFillType(SkPath::kWinding_FillType); |
2497 pathB.moveTo(1, 4); | 2485 pathB.moveTo(1, 4); |
2498 pathB.cubicTo(4, 5, 1, 0, 6, 2); | 2486 pathB.cubicTo(4, 5, 1, 0, 6, 2); |
2499 pathB.close(); | 2487 pathB.close(); |
2500 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2488 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2501 } | 2489 } |
2502 | 2490 |
2503 static void cubicOp93d(skiatest::Reporter* reporter) { | 2491 static void cubicOp93d(skiatest::Reporter* reporter, const char* filename) { |
2504 SkPath path, pathB; | 2492 SkPath path, pathB; |
2505 path.setFillType(SkPath::kWinding_FillType); | 2493 path.setFillType(SkPath::kWinding_FillType); |
2506 path.moveTo(0, 1); | 2494 path.moveTo(0, 1); |
2507 path.cubicTo(1, 6, 4, 1, 4, 3); | 2495 path.cubicTo(1, 6, 4, 1, 4, 3); |
2508 path.close(); | 2496 path.close(); |
2509 pathB.setFillType(SkPath::kWinding_FillType); | 2497 pathB.setFillType(SkPath::kWinding_FillType); |
2510 pathB.moveTo(1, 4); | 2498 pathB.moveTo(1, 4); |
2511 pathB.cubicTo(3, 4, 1, 0, 6, 1); | 2499 pathB.cubicTo(3, 4, 1, 0, 6, 1); |
2512 pathB.close(); | 2500 pathB.close(); |
2513 testPathOp(reporter, path, pathB, kDifference_PathOp); | 2501 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
2514 } | 2502 } |
2515 | 2503 |
2516 static void cubicOp94u(skiatest::Reporter* reporter) { | 2504 static void cubicOp94u(skiatest::Reporter* reporter, const char* filename) { |
2517 SkPath path, pathB; | 2505 SkPath path, pathB; |
2518 path.setFillType(SkPath::kEvenOdd_FillType); | 2506 path.setFillType(SkPath::kEvenOdd_FillType); |
2519 path.moveTo(0, 3); | 2507 path.moveTo(0, 3); |
2520 path.cubicTo(2, 3, 5, 0, 5, 3); | 2508 path.cubicTo(2, 3, 5, 0, 5, 3); |
2521 path.close(); | 2509 path.close(); |
2522 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2510 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2523 pathB.moveTo(0, 5); | 2511 pathB.moveTo(0, 5); |
2524 pathB.cubicTo(3, 5, 3, 0, 3, 2); | 2512 pathB.cubicTo(3, 5, 3, 0, 3, 2); |
2525 pathB.close(); | 2513 pathB.close(); |
2526 testPathOp(reporter, path, pathB, kUnion_PathOp); | 2514 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
2527 } | 2515 } |
2528 | 2516 |
2529 static void skpadbox_lt15(skiatest::Reporter* reporter) { | 2517 static void skpadbox_lt15(skiatest::Reporter* reporter, const char* filename) { |
2530 SkPath path; | 2518 SkPath path; |
2531 path.setFillType(SkPath::kEvenOdd_FillType); | 2519 path.setFillType(SkPath::kEvenOdd_FillType); |
2532 path.moveTo(333.292084f, 624.570984f); | 2520 path.moveTo(333.292084f, 624.570984f); |
2533 path.lineTo(614.229797f, 98.9735107f); | 2521 path.lineTo(614.229797f, 98.9735107f); |
2534 path.lineTo(933.457764f, 269.604431f); | 2522 path.lineTo(933.457764f, 269.604431f); |
2535 path.lineTo(652.52002f, 795.201904f); | 2523 path.lineTo(652.52002f, 795.201904f); |
2536 path.lineTo(333.292084f, 624.570984f); | 2524 path.lineTo(333.292084f, 624.570984f); |
2537 path.close(); | 2525 path.close(); |
2538 SkPath pathB; | 2526 SkPath pathB; |
2539 pathB.setFillType(SkPath::kWinding_FillType); | 2527 pathB.setFillType(SkPath::kWinding_FillType); |
2540 pathB.moveTo(613.368042f, 100.585754f); | 2528 pathB.moveTo(613.368042f, 100.585754f); |
2541 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395
f, 100.085449f); | 2529 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395
f, 100.085449f); |
2542 pathB.lineTo(932.633057f, 269.854553f); | 2530 pathB.lineTo(932.633057f, 269.854553f); |
2543 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301
f, 271.503906f); | 2531 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301
f, 271.503906f); |
2544 pathB.lineTo(653.631897f, 794.414307f); | 2532 pathB.lineTo(653.631897f, 794.414307f); |
2545 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544
f, 794.914612f); | 2533 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544
f, 794.914612f); |
2546 pathB.lineTo(334.366943f, 625.145508f); | 2534 pathB.lineTo(334.366943f, 625.145508f); |
2547 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608
f, 623.496155f); | 2535 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608
f, 623.496155f); |
2548 pathB.lineTo(613.368042f, 100.585754f); | 2536 pathB.lineTo(613.368042f, 100.585754f); |
2549 pathB.close(); | 2537 pathB.close(); |
2550 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2538 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2551 } | 2539 } |
2552 | 2540 |
2553 static void skpadoption_org196(skiatest::Reporter* reporter) { | 2541 static void skpadoption_org196(skiatest::Reporter* reporter, const char* filenam
e) { |
2554 SkPath path; | 2542 SkPath path; |
2555 path.setFillType(SkPath::kEvenOdd_FillType); | 2543 path.setFillType(SkPath::kEvenOdd_FillType); |
2556 path.moveTo(802, 367); | 2544 path.moveTo(802, 367); |
2557 path.lineTo(802, 324); | 2545 path.lineTo(802, 324); |
2558 path.lineTo(956, 324); | 2546 path.lineTo(956, 324); |
2559 path.lineTo(956, 371); | 2547 path.lineTo(956, 371); |
2560 path.quadTo(956, 373.071075f, 954.536011f, 374.536011f); | 2548 path.quadTo(956, 373.071075f, 954.536011f, 374.536011f); |
2561 path.quadTo(953.071045f, 376, 951, 376); | 2549 path.quadTo(953.071045f, 376, 951, 376); |
2562 path.lineTo(811, 376); | 2550 path.lineTo(811, 376); |
2563 path.cubicTo(806.029419f, 376, 802, 371.970551f, 802, 367); | 2551 path.cubicTo(806.029419f, 376, 802, 371.970551f, 802, 367); |
2564 path.close(); | 2552 path.close(); |
2565 SkPath pathB; | 2553 SkPath pathB; |
2566 pathB.setFillType(SkPath::kInverseWinding_FillType); | 2554 pathB.setFillType(SkPath::kInverseWinding_FillType); |
2567 pathB.moveTo(803, 326); | 2555 pathB.moveTo(803, 326); |
2568 pathB.lineTo(955, 326); | 2556 pathB.lineTo(955, 326); |
2569 pathB.lineTo(955, 370); | 2557 pathB.lineTo(955, 370); |
2570 pathB.cubicTo(955, 372.761414f, 952.761414f, 375, 950, 375); | 2558 pathB.cubicTo(955, 372.761414f, 952.761414f, 375, 950, 375); |
2571 pathB.lineTo(808, 375); | 2559 pathB.lineTo(808, 375); |
2572 pathB.cubicTo(805.238586f, 375, 803, 372.761414f, 803, 370); | 2560 pathB.cubicTo(805.238586f, 375, 803, 372.761414f, 803, 370); |
2573 pathB.lineTo(803, 326); | 2561 pathB.lineTo(803, 326); |
2574 pathB.close(); | 2562 pathB.close(); |
2575 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2563 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2576 } | 2564 } |
2577 | 2565 |
2578 static void skpadspert_net23(skiatest::Reporter* reporter) { | 2566 static void skpadspert_net23(skiatest::Reporter* reporter, const char* filename)
{ |
2579 SkPath path; | 2567 SkPath path; |
2580 path.setFillType(SkPath::kEvenOdd_FillType); | 2568 path.setFillType(SkPath::kEvenOdd_FillType); |
2581 path.moveTo(-2.220446e-018f, 483.5f); | 2569 path.moveTo(-2.220446e-018f, 483.5f); |
2582 path.lineTo(0, 482.5f); | 2570 path.lineTo(0, 482.5f); |
2583 path.lineTo(30.5f, 482.5f); | 2571 path.lineTo(30.5f, 482.5f); |
2584 path.cubicTo(32.709137f, 482.5f, 34.5f, 484.290863f, 34.5f, 486.5f); | 2572 path.cubicTo(32.709137f, 482.5f, 34.5f, 484.290863f, 34.5f, 486.5f); |
2585 path.lineTo(34.5f, 678.5f); | 2573 path.lineTo(34.5f, 678.5f); |
2586 path.cubicTo(34.5f, 680.709167f, 32.709137f, 682.5f, 30.5f, 682.5f); | 2574 path.cubicTo(34.5f, 680.709167f, 32.709137f, 682.5f, 30.5f, 682.5f); |
2587 path.lineTo(-4.4408921e-016f, 682.5f); | 2575 path.lineTo(-4.4408921e-016f, 682.5f); |
2588 path.lineTo(-4.41868766e-016f, 681.5f); | 2576 path.lineTo(-4.41868766e-016f, 681.5f); |
2589 path.lineTo(30.5f, 681.5f); | 2577 path.lineTo(30.5f, 681.5f); |
2590 path.cubicTo(32.1568565f, 681.5f, 33.5f, 680.15686f, 33.5f, 678.5f); | 2578 path.cubicTo(32.1568565f, 681.5f, 33.5f, 680.15686f, 33.5f, 678.5f); |
2591 path.lineTo(33.5f, 486.5f); | 2579 path.lineTo(33.5f, 486.5f); |
2592 path.cubicTo(33.5f, 484.84314f, 32.1568565f, 483.5f, 30.5f, 483.5f); | 2580 path.cubicTo(33.5f, 484.84314f, 32.1568565f, 483.5f, 30.5f, 483.5f); |
2593 path.lineTo(-2.220446e-018f, 483.5f); | 2581 path.lineTo(-2.220446e-018f, 483.5f); |
2594 path.close(); | 2582 path.close(); |
2595 SkPath pathB; | 2583 SkPath pathB; |
2596 pathB.setFillType(SkPath::kWinding_FillType); | 2584 pathB.setFillType(SkPath::kWinding_FillType); |
2597 pathB.moveTo(0, 482); | 2585 pathB.moveTo(0, 482); |
2598 pathB.lineTo(35, 482); | 2586 pathB.lineTo(35, 482); |
2599 pathB.lineTo(35, 683); | 2587 pathB.lineTo(35, 683); |
2600 pathB.lineTo(0, 683); | 2588 pathB.lineTo(0, 683); |
2601 pathB.close(); | 2589 pathB.close(); |
2602 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2590 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2603 } | 2591 } |
2604 | 2592 |
2605 static void skpadventistmission_org572(skiatest::Reporter* reporter) { | 2593 static void skpadventistmission_org572(skiatest::Reporter* reporter, const char*
filename) { |
2606 SkPath path; | 2594 SkPath path; |
2607 path.setFillType(SkPath::kEvenOdd_FillType); | 2595 path.setFillType(SkPath::kEvenOdd_FillType); |
2608 path.moveTo(1182.00037f, 926); | 2596 path.moveTo(1182.00037f, 926); |
2609 path.cubicTo(1181.08813f, 924.785583f, 1179.63586f, 924, 1178, 924); | 2597 path.cubicTo(1181.08813f, 924.785583f, 1179.63586f, 924, 1178, 924); |
2610 path.lineTo(938, 924); | 2598 path.lineTo(938, 924); |
2611 path.cubicTo(936.364197f, 924, 934.911865f, 924.785583f, 933.999634f, 926); | 2599 path.cubicTo(936.364197f, 924, 934.911865f, 924.785583f, 933.999634f, 926); |
2612 path.lineTo(1182.00037f, 926); | 2600 path.lineTo(1182.00037f, 926); |
2613 path.close(); | 2601 path.close(); |
2614 SkPath pathB; | 2602 SkPath pathB; |
2615 pathB.setFillType(SkPath::kWinding_FillType); | 2603 pathB.setFillType(SkPath::kWinding_FillType); |
2616 pathB.moveTo(934, 924); | 2604 pathB.moveTo(934, 924); |
2617 pathB.lineTo(1182, 924); | 2605 pathB.lineTo(1182, 924); |
2618 pathB.lineTo(1182, 926); | 2606 pathB.lineTo(1182, 926); |
2619 pathB.lineTo(934, 926); | 2607 pathB.lineTo(934, 926); |
2620 pathB.close(); | 2608 pathB.close(); |
2621 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2609 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2622 } | 2610 } |
2623 | 2611 |
2624 static void skpagentxsites_com55(skiatest::Reporter* reporter) { | 2612 static void skpagentxsites_com55(skiatest::Reporter* reporter, const char* filen
ame) { |
2625 SkPath path; | 2613 SkPath path; |
2626 path.setFillType(SkPath::kEvenOdd_FillType); | 2614 path.setFillType(SkPath::kEvenOdd_FillType); |
2627 path.moveTo(925, 27); | 2615 path.moveTo(925, 27); |
2628 path.cubicTo(924.447693f, 27, 924, 27.4477158f, 924, 28); | 2616 path.cubicTo(924.447693f, 27, 924, 27.4477158f, 924, 28); |
2629 path.lineTo(924, 55); | 2617 path.lineTo(924, 55); |
2630 path.cubicTo(924, 55.5522842f, 924.447693f, 56, 925, 56); | 2618 path.cubicTo(924, 55.5522842f, 924.447693f, 56, 925, 56); |
2631 path.lineTo(1103, 56); | 2619 path.lineTo(1103, 56); |
2632 path.cubicTo(1103.55225f, 56, 1104, 55.5522842f, 1104, 55); | 2620 path.cubicTo(1103.55225f, 56, 1104, 55.5522842f, 1104, 55); |
2633 path.lineTo(1104, 28); | 2621 path.lineTo(1104, 28); |
2634 path.cubicTo(1104, 27.4477158f, 1103.55225f, 27, 1103, 27); | 2622 path.cubicTo(1104, 27.4477158f, 1103.55225f, 27, 1103, 27); |
2635 path.lineTo(925, 27); | 2623 path.lineTo(925, 27); |
2636 path.close(); | 2624 path.close(); |
2637 SkPath pathB; | 2625 SkPath pathB; |
2638 pathB.setFillType(SkPath::kWinding_FillType); | 2626 pathB.setFillType(SkPath::kWinding_FillType); |
2639 pathB.moveTo(1103, 27); | 2627 pathB.moveTo(1103, 27); |
2640 pathB.cubicTo(1104.10461f, 27, 1105, 27.8954315f, 1105, 29); | 2628 pathB.cubicTo(1104.10461f, 27, 1105, 27.8954315f, 1105, 29); |
2641 pathB.lineTo(1105, 54); | 2629 pathB.lineTo(1105, 54); |
2642 pathB.cubicTo(1105, 55.1045685f, 1104.10461f, 56, 1103, 56); | 2630 pathB.cubicTo(1105, 55.1045685f, 1104.10461f, 56, 1103, 56); |
2643 pathB.lineTo(926, 56); | 2631 pathB.lineTo(926, 56); |
2644 pathB.cubicTo(924.895447f, 56, 924, 55.1045685f, 924, 54); | 2632 pathB.cubicTo(924.895447f, 56, 924, 55.1045685f, 924, 54); |
2645 pathB.lineTo(924, 29); | 2633 pathB.lineTo(924, 29); |
2646 pathB.cubicTo(924, 27.8954315f, 924.895447f, 27, 926, 27); | 2634 pathB.cubicTo(924, 27.8954315f, 924.895447f, 27, 926, 27); |
2647 pathB.lineTo(1103, 27); | 2635 pathB.lineTo(1103, 27); |
2648 pathB.close(); | 2636 pathB.close(); |
2649 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2637 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2650 } | 2638 } |
2651 | 2639 |
2652 static void skpbakosoft_com10(skiatest::Reporter* reporter) { | 2640 static void skpbakosoft_com10(skiatest::Reporter* reporter, const char* filename
) { |
2653 SkPath path; | 2641 SkPath path; |
2654 path.setFillType(SkPath::kEvenOdd_FillType); | 2642 path.setFillType(SkPath::kEvenOdd_FillType); |
2655 path.moveTo(190, 170); | 2643 path.moveTo(190, 170); |
2656 path.cubicTo(178.9543f, 170, 170, 178.9543f, 170, 190); | 2644 path.cubicTo(178.9543f, 170, 170, 178.9543f, 170, 190); |
2657 path.cubicTo(170, 201.0457f, 178.9543f, 210, 190, 210); | 2645 path.cubicTo(170, 201.0457f, 178.9543f, 210, 190, 210); |
2658 path.lineTo(370, 210); | 2646 path.lineTo(370, 210); |
2659 path.cubicTo(381.045685f, 210, 390, 201.0457f, 390, 190); | 2647 path.cubicTo(381.045685f, 210, 390, 201.0457f, 390, 190); |
2660 path.cubicTo(390, 178.9543f, 381.045685f, 170, 370, 170); | 2648 path.cubicTo(390, 178.9543f, 381.045685f, 170, 370, 170); |
2661 path.lineTo(190, 170); | 2649 path.lineTo(190, 170); |
2662 path.close(); | 2650 path.close(); |
2663 SkPath pathB; | 2651 SkPath pathB; |
2664 pathB.setFillType(SkPath::kWinding_FillType); | 2652 pathB.setFillType(SkPath::kWinding_FillType); |
2665 pathB.moveTo(210, 190); | 2653 pathB.moveTo(210, 190); |
2666 pathB.quadTo(210, 198.284271f, 204.142136f, 204.142136f); | 2654 pathB.quadTo(210, 198.284271f, 204.142136f, 204.142136f); |
2667 pathB.quadTo(198.284271f, 210, 190, 210); | 2655 pathB.quadTo(198.284271f, 210, 190, 210); |
2668 pathB.quadTo(181.715729f, 210, 175.857864f, 204.142136f); | 2656 pathB.quadTo(181.715729f, 210, 175.857864f, 204.142136f); |
2669 pathB.quadTo(170, 198.284271f, 170, 190); | 2657 pathB.quadTo(170, 198.284271f, 170, 190); |
2670 pathB.quadTo(170, 181.715729f, 175.857864f, 175.857864f); | 2658 pathB.quadTo(170, 181.715729f, 175.857864f, 175.857864f); |
2671 pathB.quadTo(181.715729f, 170, 190, 170); | 2659 pathB.quadTo(181.715729f, 170, 190, 170); |
2672 pathB.quadTo(198.284271f, 170, 204.142136f, 175.857864f); | 2660 pathB.quadTo(198.284271f, 170, 204.142136f, 175.857864f); |
2673 pathB.quadTo(210, 181.715729f, 210, 190); | 2661 pathB.quadTo(210, 181.715729f, 210, 190); |
2674 pathB.close(); | 2662 pathB.close(); |
2675 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2663 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2676 } | 2664 } |
2677 | 2665 |
2678 static void skpbambootheme_com12(skiatest::Reporter* reporter) { | 2666 static void skpbambootheme_com12(skiatest::Reporter* reporter, const char* filen
ame) { |
2679 SkPath path; | 2667 SkPath path; |
2680 path.setFillType(SkPath::kEvenOdd_FillType); | 2668 path.setFillType(SkPath::kEvenOdd_FillType); |
2681 path.moveTo(47.8780937f, 58); | 2669 path.moveTo(47.8780937f, 58); |
2682 path.lineTo(0, 58); | 2670 path.lineTo(0, 58); |
2683 path.lineTo(-8.65973959e-015f, 96.9914017f); | 2671 path.lineTo(-8.65973959e-015f, 96.9914017f); |
2684 path.quadTo(20.0654926f, 96.6451874f, 34.3553391f, 82.3553391f); | 2672 path.quadTo(20.0654926f, 96.6451874f, 34.3553391f, 82.3553391f); |
2685 path.quadTo(44.9466133f, 71.764061f, 47.8780937f, 58); | 2673 path.quadTo(44.9466133f, 71.764061f, 47.8780937f, 58); |
2686 path.close(); | 2674 path.close(); |
2687 SkPath pathB; | 2675 SkPath pathB; |
2688 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2676 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2689 pathB.moveTo(-1, -3); | 2677 pathB.moveTo(-1, -3); |
2690 pathB.lineTo(-1, -3); | 2678 pathB.lineTo(-1, -3); |
2691 pathB.cubicTo(26.6142502f, -3, 49, 19.3857498f, 49, 47); | 2679 pathB.cubicTo(26.6142502f, -3, 49, 19.3857498f, 49, 47); |
2692 pathB.lineTo(49, 47); | 2680 pathB.lineTo(49, 47); |
2693 pathB.cubicTo(49, 74.6142502f, 26.6142502f, 97, -1, 97); | 2681 pathB.cubicTo(49, 74.6142502f, 26.6142502f, 97, -1, 97); |
2694 pathB.lineTo(-1, 97); | 2682 pathB.lineTo(-1, 97); |
2695 pathB.cubicTo(-28.6142502f, 97, -51, 74.6142502f, -51, 47); | 2683 pathB.cubicTo(-28.6142502f, 97, -51, 74.6142502f, -51, 47); |
2696 pathB.lineTo(-51, 47); | 2684 pathB.lineTo(-51, 47); |
2697 pathB.cubicTo(-51, 19.3857498f, -28.6142502f, -3, -1, -3); | 2685 pathB.cubicTo(-51, 19.3857498f, -28.6142502f, -3, -1, -3); |
2698 pathB.close(); | 2686 pathB.close(); |
2699 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2687 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2700 } | 2688 } |
2701 | 2689 |
2702 static void skpakmmos_ru100(skiatest::Reporter* reporter) { | 2690 static void skpakmmos_ru100(skiatest::Reporter* reporter, const char* filename)
{ |
2703 SkPath path; | 2691 SkPath path; |
2704 path.setFillType(SkPath::kEvenOdd_FillType); | 2692 path.setFillType(SkPath::kEvenOdd_FillType); |
2705 path.moveTo(693.000488f, 926); | 2693 path.moveTo(693.000488f, 926); |
2706 path.cubicTo(692.164734f, 925.37207f, 691.125793f, 925, 690, 925); | 2694 path.cubicTo(692.164734f, 925.37207f, 691.125793f, 925, 690, 925); |
2707 path.lineTo(578, 925); | 2695 path.lineTo(578, 925); |
2708 path.cubicTo(576.874207f, 925, 575.835266f, 925.37207f, 574.999512f, 926); | 2696 path.cubicTo(576.874207f, 925, 575.835266f, 925.37207f, 574.999512f, 926); |
2709 path.lineTo(693.000488f, 926); | 2697 path.lineTo(693.000488f, 926); |
2710 path.close(); | 2698 path.close(); |
2711 SkPath pathB; | 2699 SkPath pathB; |
2712 pathB.setFillType(SkPath::kWinding_FillType); | 2700 pathB.setFillType(SkPath::kWinding_FillType); |
2713 pathB.moveTo(575, 925); | 2701 pathB.moveTo(575, 925); |
2714 pathB.lineTo(693, 925); | 2702 pathB.lineTo(693, 925); |
2715 pathB.lineTo(693, 926); | 2703 pathB.lineTo(693, 926); |
2716 pathB.lineTo(575, 926); | 2704 pathB.lineTo(575, 926); |
2717 pathB.close(); | 2705 pathB.close(); |
2718 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2706 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2719 } | 2707 } |
2720 | 2708 |
2721 static void skpcarpetplanet_ru22(skiatest::Reporter* reporter) { | 2709 static void skpcarpetplanet_ru22(skiatest::Reporter* reporter, const char* filen
ame) { |
2722 SkPath path; | 2710 SkPath path; |
2723 path.setFillType(SkPath::kEvenOdd_FillType); | 2711 path.setFillType(SkPath::kEvenOdd_FillType); |
2724 path.moveTo(195, 785); | 2712 path.moveTo(195, 785); |
2725 path.cubicTo(124.307556f, 785, 67, 841.859863f, 67, 912); | 2713 path.cubicTo(124.307556f, 785, 67, 841.859863f, 67, 912); |
2726 path.lineTo(67, 913); | 2714 path.lineTo(67, 913); |
2727 path.cubicTo(67, 917.388916f, 67.2243805f, 921.725769f, 67.662384f, 926); | 2715 path.cubicTo(67, 917.388916f, 67.2243805f, 921.725769f, 67.662384f, 926); |
2728 path.lineTo(322, 926); | 2716 path.lineTo(322, 926); |
2729 path.lineTo(322, 896.048035f); | 2717 path.lineTo(322, 896.048035f); |
2730 path.cubicTo(314.09201f, 833.437622f, 260.247131f, 785, 195, 785); | 2718 path.cubicTo(314.09201f, 833.437622f, 260.247131f, 785, 195, 785); |
2731 path.close(); | 2719 path.close(); |
2732 SkPath pathB; | 2720 SkPath pathB; |
2733 pathB.setFillType(SkPath::kWinding_FillType); | 2721 pathB.setFillType(SkPath::kWinding_FillType); |
2734 pathB.moveTo(195, 785); | 2722 pathB.moveTo(195, 785); |
2735 pathB.cubicTo(265.140167f, 785, 322, 842.307556f, 322, 913); | 2723 pathB.cubicTo(265.140167f, 785, 322, 842.307556f, 322, 913); |
2736 pathB.cubicTo(322, 983.692444f, 265.140167f, 1041, 195, 1041); | 2724 pathB.cubicTo(322, 983.692444f, 265.140167f, 1041, 195, 1041); |
2737 pathB.lineTo(194, 1041); | 2725 pathB.lineTo(194, 1041); |
2738 pathB.cubicTo(123.85984f, 1041, 67, 983.692444f, 67, 913); | 2726 pathB.cubicTo(123.85984f, 1041, 67, 983.692444f, 67, 913); |
2739 pathB.cubicTo(67, 842.307556f, 123.85984f, 785, 194, 785); | 2727 pathB.cubicTo(67, 842.307556f, 123.85984f, 785, 194, 785); |
2740 pathB.lineTo(195, 785); | 2728 pathB.lineTo(195, 785); |
2741 pathB.close(); | 2729 pathB.close(); |
2742 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2730 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2743 } | 2731 } |
2744 | 2732 |
2745 #define SKPS_WORKING 0 | 2733 #define SKPS_WORKING 0 |
2746 #if SKPS_WORKING | 2734 #if SKPS_WORKING |
2747 static void skpcarrot_is24(skiatest::Reporter* reporter) { | 2735 // this fails because cubic/quad misses an intersection (failure is isolated in
c/q int test) |
| 2736 static void skpcarrot_is24(skiatest::Reporter* reporter, const char* filename) { |
2748 SkPath path; | 2737 SkPath path; |
2749 path.setFillType(SkPath::kEvenOdd_FillType); | 2738 path.setFillType(SkPath::kEvenOdd_FillType); |
2750 path.moveTo(945, 597); | 2739 path.moveTo(945, 597); |
2751 path.quadTo(913.93396f, 597, 891.96698f, 618.96698f); | 2740 path.quadTo(913.93396f, 597, 891.96698f, 618.96698f); |
2752 path.quadTo(870, 640.93396f, 870, 672); | 2741 path.quadTo(870, 640.93396f, 870, 672); |
2753 path.quadTo(870, 703.06604f, 891.96698f, 725.03302f); | 2742 path.quadTo(870, 703.06604f, 891.96698f, 725.03302f); |
2754 path.quadTo(913.93396f, 747, 945, 747); | 2743 path.quadTo(913.93396f, 747, 945, 747); |
2755 path.quadTo(976.06604f, 747, 998.03302f, 725.03302f); | 2744 path.quadTo(976.06604f, 747, 998.03302f, 725.03302f); |
2756 path.quadTo(1020, 703.06604f, 1020, 672); | 2745 path.quadTo(1020, 703.06604f, 1020, 672); |
2757 path.quadTo(1020, 640.93396f, 998.03302f, 618.96698f); | 2746 path.quadTo(1020, 640.93396f, 998.03302f, 618.96698f); |
2758 path.quadTo(976.06604f, 597, 945, 597); | 2747 path.quadTo(976.06604f, 597, 945, 597); |
2759 path.close(); | 2748 path.close(); |
2760 SkPath pathB; | 2749 SkPath pathB; |
2761 pathB.setFillType(SkPath::kWinding_FillType); | 2750 pathB.setFillType(SkPath::kWinding_FillType); |
2762 pathB.moveTo(945.080994f, 597.161987f); | 2751 pathB.moveTo(945.080994f, 597.161987f); |
2763 pathB.cubicTo(903.659973f, 597.161987f, 870.080994f, 630.73999f, 870.080994f
, 672.161987f); | 2752 pathB.cubicTo(903.659973f, 597.161987f, 870.080994f, 630.73999f, 870.080994f
, 672.161987f); |
2764 pathB.cubicTo(870.080994f, 676.096008f, 870.387024f, 679.957031f, 870.971008
f, 683.726013f); | 2753 pathB.cubicTo(870.080994f, 676.096008f, 870.387024f, 679.957031f, 870.971008
f, 683.726013f); |
2765 pathB.cubicTo(876.53302f, 719.656006f, 907.593994f, 747.161987f, 945.080994f
, 747.161987f); | 2754 pathB.cubicTo(876.53302f, 719.656006f, 907.593994f, 747.161987f, 945.080994f
, 747.161987f); |
2766 pathB.cubicTo(982.567993f, 747.161987f, 1013.62903f, 719.656006f, 1019.19104
f, 683.726013f); | 2755 pathB.cubicTo(982.567993f, 747.161987f, 1013.62903f, 719.656006f, 1019.19104
f, 683.726013f); |
2767 pathB.cubicTo(1019.77502f, 679.955017f, 1020.08099f, 676.094971f, 1020.08099
f, 672.161987f); | 2756 pathB.cubicTo(1019.77502f, 679.955017f, 1020.08099f, 676.094971f, 1020.08099
f, 672.161987f); |
2768 pathB.cubicTo(1020.08002f, 630.73999f, 986.502014f, 597.161987f, 945.080994f
, 597.161987f); | 2757 pathB.cubicTo(1020.08002f, 630.73999f, 986.502014f, 597.161987f, 945.080994f
, 597.161987f); |
2769 pathB.close(); | 2758 pathB.close(); |
2770 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2759 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2771 } | 2760 } |
2772 | 2761 |
2773 #endif | 2762 #endif |
2774 | 2763 |
2775 static void skpbangalorenest_com4(skiatest::Reporter* reporter) { | 2764 static void skpbangalorenest_com4(skiatest::Reporter* reporter, const char* file
name) { |
2776 SkPath path; | 2765 SkPath path; |
2777 path.setFillType(SkPath::kEvenOdd_FillType); | 2766 path.setFillType(SkPath::kEvenOdd_FillType); |
2778 path.moveTo(0, 926); | 2767 path.moveTo(0, 926); |
2779 path.lineTo(0, 0); | 2768 path.lineTo(0, 0); |
2780 path.lineTo(1265, 0); | 2769 path.lineTo(1265, 0); |
2781 path.lineTo(1265, 926); | 2770 path.lineTo(1265, 926); |
2782 path.lineTo(0, 926); | 2771 path.lineTo(0, 926); |
2783 path.close(); | 2772 path.close(); |
2784 SkPath pathB; | 2773 SkPath pathB; |
2785 pathB.setFillType(SkPath::kWinding_FillType); | 2774 pathB.setFillType(SkPath::kWinding_FillType); |
2786 pathB.moveTo(0, 290); | 2775 pathB.moveTo(0, 290); |
2787 pathB.lineTo(-2.64514972e-014f, 146); | 2776 pathB.lineTo(-2.64514972e-014f, 146); |
2788 pathB.lineTo(30, 146); | 2777 pathB.lineTo(30, 146); |
2789 pathB.lineTo(30, 290); | 2778 pathB.lineTo(30, 290); |
2790 pathB.close(); | 2779 pathB.close(); |
2791 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2780 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2792 } | 2781 } |
2793 | 2782 |
2794 static void skpbenzoteh_ru152(skiatest::Reporter* reporter) { | 2783 static void skpbenzoteh_ru152(skiatest::Reporter* reporter, const char* filename
) { |
2795 SkPath path; | 2784 SkPath path; |
2796 path.setFillType(SkPath::kEvenOdd_FillType); | 2785 path.setFillType(SkPath::kEvenOdd_FillType); |
2797 path.moveTo(883, 23); | 2786 path.moveTo(883, 23); |
2798 path.lineTo(883, 0); | 2787 path.lineTo(883, 0); |
2799 path.lineTo(1122.5f, 0); | 2788 path.lineTo(1122.5f, 0); |
2800 path.lineTo(1122.5f, 25.2136822f); | 2789 path.lineTo(1122.5f, 25.2136822f); |
2801 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); | 2790 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); |
2802 path.quadTo(1120.07104f, 28, 1118, 28); | 2791 path.quadTo(1120.07104f, 28, 1118, 28); |
2803 path.lineTo(888, 28); | 2792 path.lineTo(888, 28); |
2804 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2793 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2805 path.quadTo(883, 25.0710678f, 883, 23); | 2794 path.quadTo(883, 25.0710678f, 883, 23); |
2806 path.close(); | 2795 path.close(); |
2807 SkPath pathB; | 2796 SkPath pathB; |
2808 pathB.setFillType(SkPath::kWinding_FillType); | 2797 pathB.setFillType(SkPath::kWinding_FillType); |
2809 pathB.moveTo(883, 0); | 2798 pathB.moveTo(883, 0); |
2810 pathB.lineTo(1123, 0); | 2799 pathB.lineTo(1123, 0); |
2811 pathB.lineTo(1123, 23); | 2800 pathB.lineTo(1123, 23); |
2812 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); | 2801 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); |
2813 pathB.quadTo(1120.07104f, 28, 1118, 28); | 2802 pathB.quadTo(1120.07104f, 28, 1118, 28); |
2814 pathB.lineTo(888, 28); | 2803 pathB.lineTo(888, 28); |
2815 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2804 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2816 pathB.quadTo(883, 25.0710678f, 883, 23); | 2805 pathB.quadTo(883, 25.0710678f, 883, 23); |
2817 pathB.close(); | 2806 pathB.close(); |
2818 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2807 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2819 } | 2808 } |
2820 | 2809 |
2821 static void skpbestred_ru37(skiatest::Reporter* reporter) { | 2810 static void skpbestred_ru37(skiatest::Reporter* reporter, const char* filename)
{ |
2822 SkPath path; | 2811 SkPath path; |
2823 path.setFillType(SkPath::kEvenOdd_FillType); | 2812 path.setFillType(SkPath::kEvenOdd_FillType); |
2824 path.moveTo(883, 23); | 2813 path.moveTo(883, 23); |
2825 path.lineTo(883, 0); | 2814 path.lineTo(883, 0); |
2826 path.lineTo(1122.5f, 0); | 2815 path.lineTo(1122.5f, 0); |
2827 path.lineTo(1122.5f, 25.2136822f); | 2816 path.lineTo(1122.5f, 25.2136822f); |
2828 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); | 2817 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); |
2829 path.quadTo(1120.07104f, 28, 1118, 28); | 2818 path.quadTo(1120.07104f, 28, 1118, 28); |
2830 path.lineTo(888, 28); | 2819 path.lineTo(888, 28); |
2831 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2820 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2832 path.quadTo(883, 25.0710678f, 883, 23); | 2821 path.quadTo(883, 25.0710678f, 883, 23); |
2833 path.close(); | 2822 path.close(); |
2834 SkPath pathB; | 2823 SkPath pathB; |
2835 pathB.setFillType(SkPath::kWinding_FillType); | 2824 pathB.setFillType(SkPath::kWinding_FillType); |
2836 pathB.moveTo(883, 0); | 2825 pathB.moveTo(883, 0); |
2837 pathB.lineTo(1123, 0); | 2826 pathB.lineTo(1123, 0); |
2838 pathB.lineTo(1123, 23); | 2827 pathB.lineTo(1123, 23); |
2839 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); | 2828 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); |
2840 pathB.quadTo(1120.07104f, 28, 1118, 28); | 2829 pathB.quadTo(1120.07104f, 28, 1118, 28); |
2841 pathB.lineTo(888, 28); | 2830 pathB.lineTo(888, 28); |
2842 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2831 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2843 pathB.quadTo(883, 25.0710678f, 883, 23); | 2832 pathB.quadTo(883, 25.0710678f, 883, 23); |
2844 pathB.close(); | 2833 pathB.close(); |
2845 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2834 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2846 } | 2835 } |
2847 | 2836 |
2848 static void skpbingoentertainment_net189(skiatest::Reporter* reporter) { | 2837 static void skpbingoentertainment_net189(skiatest::Reporter* reporter, const cha
r* filename) { |
2849 SkPath path; | 2838 SkPath path; |
2850 path.setFillType(SkPath::kEvenOdd_FillType); | 2839 path.setFillType(SkPath::kEvenOdd_FillType); |
2851 path.moveTo(896, 745.38678f); | 2840 path.moveTo(896, 745.38678f); |
2852 path.lineTo(896, 873.38678f); | 2841 path.lineTo(896, 873.38678f); |
2853 path.lineTo(922.567993f, 876.683716f); | 2842 path.lineTo(922.567993f, 876.683716f); |
2854 path.lineTo(922.567993f, 748.683716f); | 2843 path.lineTo(922.567993f, 748.683716f); |
2855 path.lineTo(896, 745.38678f); | 2844 path.lineTo(896, 745.38678f); |
2856 path.close(); | 2845 path.close(); |
2857 SkPath pathB; | 2846 SkPath pathB; |
2858 pathB.setFillType(SkPath::kWinding_FillType); | 2847 pathB.setFillType(SkPath::kWinding_FillType); |
2859 pathB.moveTo(899.200928f, 745.783997f); | 2848 pathB.moveTo(899.200928f, 745.783997f); |
2860 pathB.cubicTo(897.119385f, 745.525696f, 895.432007f, 752.031982f, 895.432007
f, 760.316284f); | 2849 pathB.cubicTo(897.119385f, 745.525696f, 895.432007f, 752.031982f, 895.432007
f, 760.316284f); |
2861 pathB.lineTo(895.432007f, 858.316284f); | 2850 pathB.lineTo(895.432007f, 858.316284f); |
2862 pathB.cubicTo(895.432007f, 866.600586f, 897.119385f, 873.525696f, 899.200928
f, 873.783997f); | 2851 pathB.cubicTo(895.432007f, 866.600586f, 897.119385f, 873.525696f, 899.200928
f, 873.783997f); |
2863 pathB.lineTo(918.799133f, 876.216003f); | 2852 pathB.lineTo(918.799133f, 876.216003f); |
2864 pathB.cubicTo(920.880615f, 876.474304f, 922.567993f, 869.968018f, 922.567993
f, 861.683716f); | 2853 pathB.cubicTo(920.880615f, 876.474304f, 922.567993f, 869.968018f, 922.567993
f, 861.683716f); |
2865 pathB.lineTo(922.567993f, 763.683716f); | 2854 pathB.lineTo(922.567993f, 763.683716f); |
2866 pathB.cubicTo(922.567993f, 755.399414f, 920.880615f, 748.474304f, 918.799133
f, 748.216003f); | 2855 pathB.cubicTo(922.567993f, 755.399414f, 920.880615f, 748.474304f, 918.799133
f, 748.216003f); |
2867 pathB.lineTo(899.200928f, 745.783997f); | 2856 pathB.lineTo(899.200928f, 745.783997f); |
2868 pathB.close(); | 2857 pathB.close(); |
2869 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2858 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2870 } | 2859 } |
2871 | 2860 |
2872 static void skpcarrefour_ro62(skiatest::Reporter* reporter) { | 2861 static void skpcarrefour_ro62(skiatest::Reporter* reporter, const char* filename
) { |
2873 SkPath path; | 2862 SkPath path; |
2874 path.setFillType(SkPath::kEvenOdd_FillType); | 2863 path.setFillType(SkPath::kEvenOdd_FillType); |
2875 path.moveTo(1104, 453); | 2864 path.moveTo(1104, 453); |
2876 path.lineTo(399, 453); | 2865 path.lineTo(399, 453); |
2877 path.lineTo(399, 657); | 2866 path.lineTo(399, 657); |
2878 path.cubicTo(399, 661.970581f, 403.029449f, 666, 408, 666); | 2867 path.cubicTo(399, 661.970581f, 403.029449f, 666, 408, 666); |
2879 path.lineTo(1095, 666); | 2868 path.lineTo(1095, 666); |
2880 path.cubicTo(1099.97058f, 666, 1104, 661.970581f, 1104, 657); | 2869 path.cubicTo(1099.97058f, 666, 1104, 661.970581f, 1104, 657); |
2881 path.lineTo(1104, 453); | 2870 path.lineTo(1104, 453); |
2882 path.close(); | 2871 path.close(); |
2883 SkPath pathB; | 2872 SkPath pathB; |
2884 pathB.setFillType(SkPath::kInverseWinding_FillType); | 2873 pathB.setFillType(SkPath::kInverseWinding_FillType); |
2885 pathB.moveTo(400, 453); | 2874 pathB.moveTo(400, 453); |
2886 pathB.lineTo(1103, 453); | 2875 pathB.lineTo(1103, 453); |
2887 pathB.lineTo(1103, 666); | 2876 pathB.lineTo(1103, 666); |
2888 pathB.lineTo(406, 666); | 2877 pathB.lineTo(406, 666); |
2889 pathB.cubicTo(402.686279f, 666, 400, 663.313721f, 400, 660); | 2878 pathB.cubicTo(402.686279f, 666, 400, 663.313721f, 400, 660); |
2890 pathB.lineTo(400, 453); | 2879 pathB.lineTo(400, 453); |
2891 pathB.close(); | 2880 pathB.close(); |
2892 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2881 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2893 } | 2882 } |
2894 | 2883 |
2895 static void skpcaffelavazzait_com_ua21(skiatest::Reporter* reporter) { | 2884 static void skpcaffelavazzait_com_ua21(skiatest::Reporter* reporter, const char*
filename) { |
2896 SkPath path; | 2885 SkPath path; |
2897 path.setFillType(SkPath::kEvenOdd_FillType); | 2886 path.setFillType(SkPath::kEvenOdd_FillType); |
2898 path.moveTo(883, 23); | 2887 path.moveTo(883, 23); |
2899 path.lineTo(883, 0); | 2888 path.lineTo(883, 0); |
2900 path.lineTo(1122.5f, 0); | 2889 path.lineTo(1122.5f, 0); |
2901 path.lineTo(1122.5f, 25.2136822f); | 2890 path.lineTo(1122.5f, 25.2136822f); |
2902 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); | 2891 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); |
2903 path.quadTo(1120.07104f, 28, 1118, 28); | 2892 path.quadTo(1120.07104f, 28, 1118, 28); |
2904 path.lineTo(888, 28); | 2893 path.lineTo(888, 28); |
2905 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2894 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2906 path.quadTo(883, 25.0710678f, 883, 23); | 2895 path.quadTo(883, 25.0710678f, 883, 23); |
2907 path.close(); | 2896 path.close(); |
2908 SkPath pathB; | 2897 SkPath pathB; |
2909 pathB.setFillType(SkPath::kWinding_FillType); | 2898 pathB.setFillType(SkPath::kWinding_FillType); |
2910 pathB.moveTo(883, 0); | 2899 pathB.moveTo(883, 0); |
2911 pathB.lineTo(1123, 0); | 2900 pathB.lineTo(1123, 0); |
2912 pathB.lineTo(1123, 23); | 2901 pathB.lineTo(1123, 23); |
2913 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); | 2902 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); |
2914 pathB.quadTo(1120.07104f, 28, 1118, 28); | 2903 pathB.quadTo(1120.07104f, 28, 1118, 28); |
2915 pathB.lineTo(888, 28); | 2904 pathB.lineTo(888, 28); |
2916 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2905 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2917 pathB.quadTo(883, 25.0710678f, 883, 23); | 2906 pathB.quadTo(883, 25.0710678f, 883, 23); |
2918 pathB.close(); | 2907 pathB.close(); |
2919 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2908 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2920 } | 2909 } |
2921 | 2910 |
2922 static void skpcamcorder_kz21(skiatest::Reporter* reporter) { | 2911 static void skpcamcorder_kz21(skiatest::Reporter* reporter, const char* filename
) { |
2923 SkPath path; | 2912 SkPath path; |
2924 path.setFillType(SkPath::kEvenOdd_FillType); | 2913 path.setFillType(SkPath::kEvenOdd_FillType); |
2925 path.moveTo(883, 23); | 2914 path.moveTo(883, 23); |
2926 path.lineTo(883, 0); | 2915 path.lineTo(883, 0); |
2927 path.lineTo(1122.5f, 0); | 2916 path.lineTo(1122.5f, 0); |
2928 path.lineTo(1122.5f, 25.2136822f); | 2917 path.lineTo(1122.5f, 25.2136822f); |
2929 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); | 2918 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); |
2930 path.quadTo(1120.07104f, 28, 1118, 28); | 2919 path.quadTo(1120.07104f, 28, 1118, 28); |
2931 path.lineTo(888, 28); | 2920 path.lineTo(888, 28); |
2932 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2921 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2933 path.quadTo(883, 25.0710678f, 883, 23); | 2922 path.quadTo(883, 25.0710678f, 883, 23); |
2934 path.close(); | 2923 path.close(); |
2935 SkPath pathB; | 2924 SkPath pathB; |
2936 pathB.setFillType(SkPath::kWinding_FillType); | 2925 pathB.setFillType(SkPath::kWinding_FillType); |
2937 pathB.moveTo(883, 0); | 2926 pathB.moveTo(883, 0); |
2938 pathB.lineTo(1123, 0); | 2927 pathB.lineTo(1123, 0); |
2939 pathB.lineTo(1123, 23); | 2928 pathB.lineTo(1123, 23); |
2940 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); | 2929 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); |
2941 pathB.quadTo(1120.07104f, 28, 1118, 28); | 2930 pathB.quadTo(1120.07104f, 28, 1118, 28); |
2942 pathB.lineTo(888, 28); | 2931 pathB.lineTo(888, 28); |
2943 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2932 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2944 pathB.quadTo(883, 25.0710678f, 883, 23); | 2933 pathB.quadTo(883, 25.0710678f, 883, 23); |
2945 pathB.close(); | 2934 pathB.close(); |
2946 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2935 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2947 } | 2936 } |
2948 | 2937 |
2949 static void skpcavablar_net563(skiatest::Reporter* reporter) { | 2938 static void skpcavablar_net563(skiatest::Reporter* reporter, const char* filenam
e) { |
2950 SkPath path; | 2939 SkPath path; |
2951 path.setFillType(SkPath::kEvenOdd_FillType); | 2940 path.setFillType(SkPath::kEvenOdd_FillType); |
2952 path.moveTo(160.000488f, 918); | 2941 path.moveTo(160.000488f, 918); |
2953 path.cubicTo(159.164749f, 917.37207f, 158.125824f, 917, 157, 917); | 2942 path.cubicTo(159.164749f, 917.37207f, 158.125824f, 917, 157, 917); |
2954 path.lineTo(94, 917); | 2943 path.lineTo(94, 917); |
2955 path.cubicTo(92.874176f, 917, 91.8352661f, 917.37207f, 90.9995193f, 918); | 2944 path.cubicTo(92.874176f, 917, 91.8352661f, 917.37207f, 90.9995193f, 918); |
2956 path.lineTo(160.000488f, 918); | 2945 path.lineTo(160.000488f, 918); |
2957 path.close(); | 2946 path.close(); |
2958 SkPath pathB; | 2947 SkPath pathB; |
2959 pathB.setFillType(SkPath::kWinding_FillType); | 2948 pathB.setFillType(SkPath::kWinding_FillType); |
2960 pathB.moveTo(91, 917); | 2949 pathB.moveTo(91, 917); |
2961 pathB.lineTo(160, 917); | 2950 pathB.lineTo(160, 917); |
2962 pathB.lineTo(160, 918); | 2951 pathB.lineTo(160, 918); |
2963 pathB.lineTo(91, 918); | 2952 pathB.lineTo(91, 918); |
2964 pathB.close(); | 2953 pathB.close(); |
2965 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2954 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2966 } | 2955 } |
2967 | 2956 |
2968 static void skpinsomnia_gr72(skiatest::Reporter* reporter) { | 2957 static void skpinsomnia_gr72(skiatest::Reporter* reporter, const char* filename)
{ |
2969 SkPath path; | 2958 SkPath path; |
2970 path.setFillType(SkPath::kEvenOdd_FillType); | 2959 path.setFillType(SkPath::kEvenOdd_FillType); |
2971 path.moveTo(1138, 231); | 2960 path.moveTo(1138, 231); |
2972 path.lineTo(1137, 243.625748f); | 2961 path.lineTo(1137, 243.625748f); |
2973 path.lineTo(1137, 926); | 2962 path.lineTo(1137, 926); |
2974 path.lineTo(1139, 926); | 2963 path.lineTo(1139, 926); |
2975 path.lineTo(1139, 231); | 2964 path.lineTo(1139, 231); |
2976 path.lineTo(1138, 231); | 2965 path.lineTo(1138, 231); |
2977 path.close(); | 2966 path.close(); |
2978 SkPath pathB; | 2967 SkPath pathB; |
2979 pathB.setFillType(SkPath::kWinding_FillType); | 2968 pathB.setFillType(SkPath::kWinding_FillType); |
2980 pathB.moveTo(1139, 231); | 2969 pathB.moveTo(1139, 231); |
2981 pathB.lineTo(1138, 231); | 2970 pathB.lineTo(1138, 231); |
2982 pathB.lineTo(633, 6101); | 2971 pathB.lineTo(633, 6101); |
2983 pathB.lineTo(1139, 6607); | 2972 pathB.lineTo(1139, 6607); |
2984 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 2973 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
2985 } | 2974 } |
2986 | 2975 |
2987 static void cubicOp95u(skiatest::Reporter* reporter) { | 2976 static void cubicOp95u(skiatest::Reporter* reporter, const char* filename) { |
2988 SkPath path, pathB; | 2977 SkPath path, pathB; |
2989 path.setFillType(SkPath::kEvenOdd_FillType); | 2978 path.setFillType(SkPath::kEvenOdd_FillType); |
2990 path.moveTo(0, 2); | 2979 path.moveTo(0, 2); |
2991 path.cubicTo(2, 3, 5, 1, 3, 2); | 2980 path.cubicTo(2, 3, 5, 1, 3, 2); |
2992 path.close(); | 2981 path.close(); |
2993 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2982 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2994 pathB.moveTo(1, 5); | 2983 pathB.moveTo(1, 5); |
2995 pathB.cubicTo(2, 3, 2, 0, 3, 2); | 2984 pathB.cubicTo(2, 3, 2, 0, 3, 2); |
2996 pathB.close(); | 2985 pathB.close(); |
2997 testPathOp(reporter, path, pathB, kUnion_PathOp); | 2986 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
2998 } | 2987 } |
2999 | 2988 |
3000 static void cubicOp96d(skiatest::Reporter* reporter) { | 2989 static void cubicOp96d(skiatest::Reporter* reporter, const char* filename) { |
3001 SkPath path, pathB; | 2990 SkPath path, pathB; |
3002 path.setFillType(SkPath::kEvenOdd_FillType); | 2991 path.setFillType(SkPath::kEvenOdd_FillType); |
3003 path.moveTo(1, 6); | 2992 path.moveTo(1, 6); |
3004 path.cubicTo(0, 3, 6, 3, 5, 0); | 2993 path.cubicTo(0, 3, 6, 3, 5, 0); |
3005 path.close(); | 2994 path.close(); |
3006 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2995 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3007 pathB.moveTo(3, 6); | 2996 pathB.moveTo(3, 6); |
3008 pathB.cubicTo(0, 5, 6, 1, 3, 0); | 2997 pathB.cubicTo(0, 5, 6, 1, 3, 0); |
3009 pathB.close(); | 2998 pathB.close(); |
3010 testPathOp(reporter, path, pathB, kDifference_PathOp); | 2999 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
3011 } | 3000 } |
3012 | 3001 |
3013 static void cubicOp97x(skiatest::Reporter* reporter) { | 3002 static void cubicOp97x(skiatest::Reporter* reporter, const char* filename) { |
3014 SkPath path, pathB; | 3003 SkPath path, pathB; |
3015 path.setFillType(SkPath::kEvenOdd_FillType); | 3004 path.setFillType(SkPath::kEvenOdd_FillType); |
3016 path.moveTo(0, 2); | 3005 path.moveTo(0, 2); |
3017 path.cubicTo(0, 6, 2, 1, 2, 1); | 3006 path.cubicTo(0, 6, 2, 1, 2, 1); |
3018 path.close(); | 3007 path.close(); |
3019 pathB.setFillType(SkPath::kEvenOdd_FillType); | 3008 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3020 pathB.moveTo(1, 2); | 3009 pathB.moveTo(1, 2); |
3021 pathB.cubicTo(1, 2, 2, 0, 6, 0); | 3010 pathB.cubicTo(1, 2, 2, 0, 6, 0); |
3022 pathB.close(); | 3011 pathB.close(); |
3023 testPathOp(reporter, path, pathB, kXOR_PathOp); | 3012 testPathOp(reporter, path, pathB, kXOR_PathOp, filename); |
3024 } | 3013 } |
3025 | 3014 |
3026 static void cubicOp98x(skiatest::Reporter* reporter) { | 3015 static void cubicOp98x(skiatest::Reporter* reporter, const char* filename) { |
3027 SkPath path, pathB; | 3016 SkPath path, pathB; |
3028 path.setFillType(SkPath::kEvenOdd_FillType); | 3017 path.setFillType(SkPath::kEvenOdd_FillType); |
3029 path.moveTo(0, 3); | 3018 path.moveTo(0, 3); |
3030 path.cubicTo(3, 6, 4, 1, 6, 3); | 3019 path.cubicTo(3, 6, 4, 1, 6, 3); |
3031 path.close(); | 3020 path.close(); |
3032 pathB.setFillType(SkPath::kEvenOdd_FillType); | 3021 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3033 pathB.moveTo(1, 4); | 3022 pathB.moveTo(1, 4); |
3034 pathB.cubicTo(3, 6, 3, 0, 6, 3); | 3023 pathB.cubicTo(3, 6, 3, 0, 6, 3); |
3035 pathB.close(); | 3024 pathB.close(); |
3036 testPathOp(reporter, path, pathB, kXOR_PathOp); | 3025 testPathOp(reporter, path, pathB, kXOR_PathOp, filename); |
3037 } | 3026 } |
3038 | 3027 |
3039 static void cubicOp99(skiatest::Reporter* reporter) { | 3028 static void cubicOp99(skiatest::Reporter* reporter, const char* filename) { |
3040 SkPath path, pathB; | 3029 SkPath path, pathB; |
3041 path.setFillType(SkPath::kWinding_FillType); | 3030 path.setFillType(SkPath::kWinding_FillType); |
3042 path.moveTo(3,6); | 3031 path.moveTo(3,6); |
3043 path.cubicTo(0,3, 6,5, 5,4); | 3032 path.cubicTo(0,3, 6,5, 5,4); |
3044 path.close(); | 3033 path.close(); |
3045 pathB.setFillType(SkPath::kWinding_FillType); | 3034 pathB.setFillType(SkPath::kWinding_FillType); |
3046 pathB.moveTo(5,6); | 3035 pathB.moveTo(5,6); |
3047 pathB.cubicTo(4,5, 6,3, 3,0); | 3036 pathB.cubicTo(4,5, 6,3, 3,0); |
3048 pathB.close(); | 3037 pathB.close(); |
3049 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 3038 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
3050 } | 3039 } |
3051 | 3040 |
3052 static void cubicOp100(skiatest::Reporter* reporter) { | 3041 static void cubicOp100(skiatest::Reporter* reporter, const char* filename) { |
3053 SkPath path, pathB; | 3042 SkPath path, pathB; |
3054 path.setFillType(SkPath::kWinding_FillType); | 3043 path.setFillType(SkPath::kWinding_FillType); |
3055 path.moveTo(0,1); | 3044 path.moveTo(0,1); |
3056 path.cubicTo(0,2, 2,1, 4,2); | 3045 path.cubicTo(0,2, 2,1, 4,2); |
3057 path.close(); | 3046 path.close(); |
3058 pathB.setFillType(SkPath::kWinding_FillType); | 3047 pathB.setFillType(SkPath::kWinding_FillType); |
3059 pathB.moveTo(1,2); | 3048 pathB.moveTo(1,2); |
3060 pathB.cubicTo(2,4, 1,0, 2,0); | 3049 pathB.cubicTo(2,4, 1,0, 2,0); |
3061 pathB.close(); | 3050 pathB.close(); |
3062 testPathOp(reporter, path, pathB, kDifference_PathOp); | 3051 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
3063 } | 3052 } |
3064 | 3053 |
3065 static void cubicOp101(skiatest::Reporter* reporter) { | 3054 static void cubicOp101(skiatest::Reporter* reporter, const char* filename) { |
3066 SkPath path, pathB; | 3055 SkPath path, pathB; |
3067 path.setFillType(SkPath::kWinding_FillType); | 3056 path.setFillType(SkPath::kWinding_FillType); |
3068 path.moveTo(0, 1); | 3057 path.moveTo(0, 1); |
3069 path.cubicTo(2, 3, 2, 1, 5, 3); | 3058 path.cubicTo(2, 3, 2, 1, 5, 3); |
3070 path.close(); | 3059 path.close(); |
3071 pathB.setFillType(SkPath::kWinding_FillType); | 3060 pathB.setFillType(SkPath::kWinding_FillType); |
3072 pathB.moveTo(1, 2); | 3061 pathB.moveTo(1, 2); |
3073 pathB.cubicTo(3, 5, 1, 0, 3, 2); | 3062 pathB.cubicTo(3, 5, 1, 0, 3, 2); |
3074 pathB.close(); | 3063 pathB.close(); |
3075 testPathOp(reporter, path, pathB, kIntersect_PathOp); | 3064 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
3076 } | 3065 } |
3077 | 3066 |
3078 static void (*firstTest)(skiatest::Reporter* ) = 0; | 3067 static void cubicOp102(skiatest::Reporter* reporter, const char* filename) { |
| 3068 SkPath path, pathB; |
| 3069 path.setFillType(SkPath::kWinding_FillType); |
| 3070 path.moveTo(0,1); |
| 3071 path.cubicTo(1,2, 1,0, 3,0); |
| 3072 path.close(); |
| 3073 pathB.setFillType(SkPath::kWinding_FillType); |
| 3074 pathB.moveTo(0,1); |
| 3075 pathB.cubicTo(0,3, 1,0, 2,1); |
| 3076 pathB.close(); |
| 3077 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
| 3078 } |
| 3079 |
| 3080 static void cubicOp103(skiatest::Reporter* reporter, const char* filename) { |
| 3081 SkPath path, pathB; |
| 3082 path.setFillType(SkPath::kWinding_FillType); |
| 3083 path.moveTo(0,1); |
| 3084 path.cubicTo(1,5, 2,0, 2,1); |
| 3085 path.close(); |
| 3086 pathB.setFillType(SkPath::kWinding_FillType); |
| 3087 pathB.moveTo(0,2); |
| 3088 pathB.cubicTo(1,2, 1,0, 5,1); |
| 3089 pathB.close(); |
| 3090 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
| 3091 } |
| 3092 |
| 3093 static void cubicOp104(skiatest::Reporter* reporter, const char* filename) { |
| 3094 SkPath path, pathB; |
| 3095 path.setFillType(SkPath::kWinding_FillType); |
| 3096 path.moveTo(0,1); |
| 3097 path.cubicTo(0,6, 4,0, 6,1); |
| 3098 path.close(); |
| 3099 pathB.setFillType(SkPath::kWinding_FillType); |
| 3100 pathB.moveTo(0,4); |
| 3101 pathB.cubicTo(1,6, 1,0, 6,0); |
| 3102 pathB.close(); |
| 3103 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
| 3104 } |
| 3105 |
| 3106 static void cubicOp105(skiatest::Reporter* reporter, const char* filename) { |
| 3107 SkPath path, pathB; |
| 3108 path.setFillType(SkPath::kWinding_FillType); |
| 3109 path.moveTo(0,1); |
| 3110 path.cubicTo(0,4, 6,5, 2,0); |
| 3111 path.close(); |
| 3112 pathB.setFillType(SkPath::kWinding_FillType); |
| 3113 pathB.moveTo(5,6); |
| 3114 pathB.cubicTo(0,2, 1,0, 4,0); |
| 3115 pathB.close(); |
| 3116 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
| 3117 } |
| 3118 |
| 3119 static void cubicOp106(skiatest::Reporter* reporter, const char* filename) { |
| 3120 SkPath path, pathB; |
| 3121 path.setFillType(SkPath::kWinding_FillType); |
| 3122 path.moveTo(0, 1); |
| 3123 path.cubicTo(4, 6, 2, 1, 2, 0); |
| 3124 path.close(); |
| 3125 pathB.setFillType(SkPath::kWinding_FillType); |
| 3126 pathB.moveTo(1, 2); |
| 3127 pathB.cubicTo(0, 2, 1, 0, 6, 4); |
| 3128 pathB.close(); |
| 3129 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
| 3130 } |
| 3131 |
| 3132 static void cubicOp107(skiatest::Reporter* reporter, const char* filename) { |
| 3133 SkPath path, pathB; |
| 3134 path.setFillType(SkPath::kWinding_FillType); |
| 3135 path.moveTo(0, 1); |
| 3136 path.cubicTo(4, 6, 2, 1, 2, 0); |
| 3137 path.close(); |
| 3138 pathB.setFillType(SkPath::kWinding_FillType); |
| 3139 pathB.moveTo(1, 2); |
| 3140 pathB.cubicTo(0, 2, 1, 0, 6, 4); |
| 3141 pathB.close(); |
| 3142 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
| 3143 } |
| 3144 |
| 3145 static void cubicOp108(skiatest::Reporter* reporter, const char* filename) { |
| 3146 SkPath path, pathB; |
| 3147 path.setFillType(SkPath::kWinding_FillType); |
| 3148 path.moveTo(0, 1); |
| 3149 path.cubicTo(4, 6, 2, 1, 2, 0); |
| 3150 path.close(); |
| 3151 pathB.setFillType(SkPath::kWinding_FillType); |
| 3152 pathB.moveTo(1, 2); |
| 3153 pathB.cubicTo(0, 2, 1, 0, 6, 4); |
| 3154 pathB.close(); |
| 3155 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
| 3156 } |
| 3157 |
| 3158 static void cubicOp109(skiatest::Reporter* reporter, const char* filename) { |
| 3159 SkPath path, pathB; |
| 3160 path.setFillType(SkPath::kWinding_FillType); |
| 3161 path.moveTo(0,1); |
| 3162 path.cubicTo(4,5, 6,3, 5,4); |
| 3163 path.close(); |
| 3164 pathB.setFillType(SkPath::kWinding_FillType); |
| 3165 pathB.moveTo(3,6); |
| 3166 pathB.cubicTo(4,5, 1,0, 5,4); |
| 3167 pathB.close(); |
| 3168 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
| 3169 } |
| 3170 |
| 3171 static void cubicOp110(skiatest::Reporter* reporter, const char* filename) { |
| 3172 SkPath path, pathB; |
| 3173 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3174 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 3175 path.addRect(0, 0, 4, 4, SkPath::kCW_Direction); |
| 3176 pathB.setFillType(SkPath::kEvenOdd_FillType); |
| 3177 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
| 3178 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
| 3179 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
| 3180 } |
| 3181 |
| 3182 static void cubicOp111(skiatest::Reporter* reporter, const char* filename) { |
| 3183 SkPath path, pathB; |
| 3184 path.setFillType(SkPath::kWinding_FillType); |
| 3185 path.moveTo(1,4); |
| 3186 path.cubicTo(0,5, 4,1, 3,1); |
| 3187 path.close(); |
| 3188 pathB.setFillType(SkPath::kWinding_FillType); |
| 3189 pathB.moveTo(1,4); |
| 3190 pathB.cubicTo(1,3, 4,1, 5,0); |
| 3191 pathB.close(); |
| 3192 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
| 3193 } |
| 3194 |
| 3195 static void xOp1u(skiatest::Reporter* reporter, const char* filename) { |
| 3196 SkPath path, pathB; |
| 3197 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3198 path.moveTo(1, 4); |
| 3199 path.cubicTo(4, 5, 3, 2, 6, 3); |
| 3200 path.close(); |
| 3201 pathB.setFillType(SkPath::kEvenOdd_FillType); |
| 3202 pathB.moveTo(2, 3); |
| 3203 pathB.cubicTo(3, 6, 4, 1, 5, 4); |
| 3204 pathB.close(); |
| 3205 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); |
| 3206 } |
| 3207 |
| 3208 static void xOp1i(skiatest::Reporter* reporter, const char* filename) { |
| 3209 SkPath path, pathB; |
| 3210 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3211 path.moveTo(1, 4); |
| 3212 path.cubicTo(1, 5, 6, 0, 5, 1); |
| 3213 path.close(); |
| 3214 pathB.setFillType(SkPath::kEvenOdd_FillType); |
| 3215 pathB.moveTo(0, 6); |
| 3216 pathB.cubicTo(1, 5, 4, 1, 5, 1); |
| 3217 pathB.close(); |
| 3218 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
| 3219 } |
| 3220 |
| 3221 static void xOp2i(skiatest::Reporter* reporter, const char* filename) { |
| 3222 SkPath path, pathB; |
| 3223 path.setFillType(SkPath::kEvenOdd_FillType); |
| 3224 path.moveTo(1, 5); |
| 3225 path.cubicTo(0, 4, 3, 2, 6, 1); |
| 3226 path.close(); |
| 3227 pathB.setFillType(SkPath::kEvenOdd_FillType); |
| 3228 pathB.moveTo(2, 3); |
| 3229 pathB.cubicTo(1, 6, 5, 1, 4, 0); |
| 3230 pathB.close(); |
| 3231 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
| 3232 } |
| 3233 |
| 3234 static void xOp3i(skiatest::Reporter* reporter, const char* filename) { |
| 3235 SkPath path, pathB; |
| 3236 path.setFillType(SkPath::kWinding_FillType); |
| 3237 path.moveTo(1,4); |
| 3238 path.cubicTo(0,5, 4,1, 3,1); |
| 3239 path.close(); |
| 3240 pathB.setFillType(SkPath::kWinding_FillType); |
| 3241 pathB.moveTo(1,4); |
| 3242 pathB.cubicTo(1,3, 4,1, 5,0); |
| 3243 pathB.close(); |
| 3244 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); |
| 3245 } |
| 3246 |
| 3247 static void findFirst1(skiatest::Reporter* reporter, const char* filename) { |
| 3248 SkPath path, pathB; |
| 3249 path.setFillType(SkPath::kWinding_FillType); |
| 3250 path.moveTo(0,1); |
| 3251 path.cubicTo(1,6, 5,0, 2,1); |
| 3252 path.close(); |
| 3253 pathB.setFillType(SkPath::kWinding_FillType); |
| 3254 pathB.moveTo(0,5); |
| 3255 pathB.cubicTo(1,2, 1,0, 6,1); |
| 3256 pathB.close(); |
| 3257 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); |
| 3258 } |
| 3259 |
| 3260 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
| 3261 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
3079 | 3262 |
3080 static struct TestDesc tests[] = { | 3263 static struct TestDesc tests[] = { |
3081 TEST(cubicOp101), | |
3082 TEST(cubicOp100), | |
3083 TEST(cubicOp99), | |
3084 #if ISSUE_1435_WORKING | |
3085 TEST(issue1435), | |
3086 #endif | |
3087 #if SKPS_WORKING | 3264 #if SKPS_WORKING |
| 3265 // fails because a cubic/quadratic intersection is missed |
| 3266 // the internal quad/quad is far enough away from the real cubic/quad that i
t is rejected |
3088 TEST(skpcarrot_is24), | 3267 TEST(skpcarrot_is24), |
3089 #endif | 3268 #endif |
3090 #if ISSUE_1417_WORKING_ON_LINUX_32 | 3269 #if ISSUE_1417_WORKING_ON_LINUX_32 |
3091 TEST(issue1417), | 3270 TEST(issue1417), |
3092 #endif | 3271 #endif |
| 3272 TEST(skpadspert_net23), |
| 3273 TEST(skpadspert_de11), |
| 3274 TEST(findFirst1), |
| 3275 TEST(xOp2i), |
| 3276 TEST(xOp3i), |
| 3277 TEST(xOp1u), |
| 3278 TEST(xOp1i), |
| 3279 TEST(cubicOp111), |
| 3280 TEST(cubicOp110), |
| 3281 TEST(cubicOp109), |
| 3282 TEST(cubicOp108), |
| 3283 TEST(cubicOp107), |
| 3284 TEST(cubicOp106), |
| 3285 TEST(cubicOp105), |
| 3286 TEST(cubicOp104), |
| 3287 TEST(cubicOp103), |
| 3288 TEST(cubicOp102), |
| 3289 TEST(cubicOp101), |
| 3290 TEST(cubicOp100), |
| 3291 TEST(cubicOp99), |
| 3292 TEST(issue1435), |
3093 TEST(cubicOp98x), | 3293 TEST(cubicOp98x), |
3094 TEST(cubicOp97x), | 3294 TEST(cubicOp97x), |
3095 TEST(skpcarpetplanet_ru22), // cubic/cubic intersect detects unwanted coinc
idence | 3295 TEST(skpcarpetplanet_ru22), // cubic/cubic intersect detects unwanted coinc
idence |
3096 TEST(cubicOp96d), | 3296 TEST(cubicOp96d), |
3097 TEST(cubicOp95u), | 3297 TEST(cubicOp95u), |
3098 TEST(skpadbox_lt15), | 3298 TEST(skpadbox_lt15), |
3099 TEST(skpagentxsites_com55), | 3299 TEST(skpagentxsites_com55), |
3100 TEST(skpadventistmission_org572), | 3300 TEST(skpadventistmission_org572), |
3101 TEST(skpadspert_net23), | |
3102 TEST(skpadoption_org196), | 3301 TEST(skpadoption_org196), |
3103 TEST(skpbambootheme_com12), | 3302 TEST(skpbambootheme_com12), |
3104 TEST(skpbakosoft_com10), | 3303 TEST(skpbakosoft_com10), |
3105 TEST(skpakmmos_ru100), | 3304 TEST(skpakmmos_ru100), |
3106 TEST(skpbangalorenest_com4), | 3305 TEST(skpbangalorenest_com4), |
3107 TEST(skpbingoentertainment_net189), | 3306 TEST(skpbingoentertainment_net189), |
3108 TEST(skpbestred_ru37), | 3307 TEST(skpbestred_ru37), |
3109 TEST(skpbenzoteh_ru152), | 3308 TEST(skpbenzoteh_ru152), |
3110 TEST(skpcamcorder_kz21), | 3309 TEST(skpcamcorder_kz21), |
3111 TEST(skpcaffelavazzait_com_ua21), | 3310 TEST(skpcaffelavazzait_com_ua21), |
3112 TEST(skpcarrefour_ro62), | 3311 TEST(skpcarrefour_ro62), |
3113 TEST(skpcavablar_net563), | 3312 TEST(skpcavablar_net563), |
3114 TEST(skpinsomnia_gr72), | 3313 TEST(skpinsomnia_gr72), |
3115 TEST(skpadbox_lt8), | 3314 TEST(skpadbox_lt8), |
3116 TEST(skpact_com43), | 3315 TEST(skpact_com43), |
3117 TEST(skpacesoftech_com47), | 3316 TEST(skpacesoftech_com47), |
3118 TEST(skpabcspark_ca103), | 3317 TEST(skpabcspark_ca103), |
3119 TEST(cubicOp94u), | 3318 TEST(cubicOp94u), |
3120 TEST(cubicOp93d), | 3319 TEST(cubicOp93d), |
3121 TEST(cubicOp92i), | 3320 TEST(cubicOp92i), |
3122 TEST(skpadithya_putr4_blogspot_com551), | 3321 TEST(skpadithya_putr4_blogspot_com551), |
3123 TEST(skpadindex_de4), | 3322 TEST(skpadindex_de4), |
3124 TEST(skpadspert_de11), | |
3125 TEST(skpaiaigames_com870), | 3323 TEST(skpaiaigames_com870), |
3126 TEST(skpaaalgarve_org53), | 3324 TEST(skpaaalgarve_org53), |
3127 TEST(skpkkiste_to716), | 3325 TEST(skpkkiste_to716), |
3128 TEST(bufferOverflow), | |
3129 TEST(cubicOp91u), | 3326 TEST(cubicOp91u), |
3130 TEST(cubicOp90u), | 3327 TEST(cubicOp90u), |
3131 TEST(cubicOp89u), | 3328 TEST(cubicOp89u), |
3132 TEST(cubicOp88u), | 3329 TEST(cubicOp88u), |
3133 TEST(cubicOp87u), | 3330 TEST(cubicOp87u), |
3134 TEST(cubicOp86i), | 3331 TEST(cubicOp86i), |
3135 TEST(loopEdge2), | 3332 TEST(loopEdge2), |
3136 TEST(loopEdge1), | 3333 TEST(loopEdge1), |
3137 TEST(rectOp3x), | 3334 TEST(rectOp3x), |
3138 TEST(rectOp2i), | 3335 TEST(rectOp2i), |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3272 static struct TestDesc subTests[] = { | 3469 static struct TestDesc subTests[] = { |
3273 TEST(cubicOp6d), | 3470 TEST(cubicOp6d), |
3274 TEST(cubicOp8d), | 3471 TEST(cubicOp8d), |
3275 TEST(cubicOp70d), | 3472 TEST(cubicOp70d), |
3276 TEST(cubicOp16d), | 3473 TEST(cubicOp16d), |
3277 TEST(skp5), | 3474 TEST(skp5), |
3278 }; | 3475 }; |
3279 | 3476 |
3280 static const size_t subTestCount = SK_ARRAY_COUNT(subTests); | 3477 static const size_t subTestCount = SK_ARRAY_COUNT(subTests); |
3281 | 3478 |
3282 static void (*firstSubTest)(skiatest::Reporter* ) = 0; | 3479 static void (*firstSubTest)(skiatest::Reporter* , const char* filename) = 0; |
3283 | 3480 |
| 3481 static bool runSubTests = false; |
3284 static bool runSubTestsFirst = false; | 3482 static bool runSubTestsFirst = false; |
3285 static bool runReverse = false; | 3483 static bool runReverse = false; |
3286 static void (*stopTest)(skiatest::Reporter* ) = 0; | |
3287 | 3484 |
3288 DEF_TEST(PathOpsOp, reporter) { | 3485 DEF_TEST(PathOpsOp, reporter) { |
3289 #ifdef SK_DEBUG | 3486 #ifdef SK_DEBUG |
3290 SkPathOpsDebug::gMaxWindSum = 4; | 3487 SkPathOpsDebug::gMaxWindSum = 4; |
3291 SkPathOpsDebug::gMaxWindValue = 4; | 3488 SkPathOpsDebug::gMaxWindValue = 4; |
3292 #endif | 3489 #endif |
3293 #if DEBUG_SHOW_TEST_NAME | 3490 #if DEBUG_SHOW_TEST_NAME |
3294 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 3491 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
3295 #endif | 3492 #endif |
3296 if (runSubTestsFirst) { | 3493 if (runSubTests && runSubTestsFirst) { |
3297 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 3494 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); |
3298 } | 3495 } |
3299 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); | 3496 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); |
3300 if (!runSubTestsFirst) { | 3497 if (runSubTests && !runSubTestsFirst) { |
3301 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 3498 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); |
3302 } | 3499 } |
3303 #ifdef SK_DEBUG | 3500 #ifdef SK_DEBUG |
3304 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; | 3501 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; |
3305 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; | 3502 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; |
3306 #endif | 3503 #endif |
3307 } | 3504 } |
| 3505 |
| 3506 static void bufferOverflow(skiatest::Reporter* reporter, const char* filename) { |
| 3507 SkPath path; |
| 3508 path.addRect(0,0, 300,170141183460469231731687303715884105728.f); |
| 3509 SkPath pathB; |
| 3510 pathB.addRect(0,0, 300,16); |
| 3511 testPathFailOp(reporter, path, pathB, kUnion_PathOp, filename); |
| 3512 } |
| 3513 |
| 3514 static struct TestDesc failTests[] = { |
| 3515 TEST(bufferOverflow), |
| 3516 }; |
| 3517 |
| 3518 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); |
| 3519 |
| 3520 DEF_TEST(PathOpsFailOp, reporter) { |
| 3521 #ifdef SK_DEBUG |
| 3522 SkPathOpsDebug::gMaxWindSum = 4; |
| 3523 SkPathOpsDebug::gMaxWindValue = 4; |
| 3524 #endif |
| 3525 #if DEBUG_SHOW_TEST_NAME |
| 3526 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
| 3527 #endif |
| 3528 RunTestSet(reporter, failTests, failTestCount, 0, 0, false); |
| 3529 } |
OLD | NEW |