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 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 | 9 |
10 #define TEST(name) { name, #name } | 10 #define TEST(name) { name, #name } |
11 | 11 |
12 static void cubicOp1d(skiatest::Reporter* reporter, const char* filename) { | 12 static void cubicOp1d(skiatest::Reporter* reporter, const char* filename) { |
13 SkPath path, pathB; | 13 SkPath path, pathB; |
14 path.setFillType(SkPath::kWinding_FillType); | 14 path.setFillType(SkPath::kWinding_FillType); |
15 path.moveTo(0,1); | 15 path.moveTo(0,1); |
16 path.cubicTo(0,2, 1,0, 1,0); | 16 path.cubicTo(0,2, 1,0, 1,0); |
17 path.close(); | 17 path.close(); |
18 pathB.setFillType(SkPath::kWinding_FillType); | 18 pathB.setFillType(SkPath::kWinding_FillType); |
19 pathB.moveTo(0,1); | 19 pathB.moveTo(0,1); |
20 pathB.cubicTo(0,1, 1,0, 2,0); | 20 pathB.cubicTo(0,1, 1,0, 2,0); |
21 pathB.close(); | 21 pathB.close(); |
22 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 22 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
23 } | 23 } |
24 | 24 |
25 static void cubicOp2d(skiatest::Reporter* reporter, const char* filename) { | 25 static void cubicOp2d(skiatest::Reporter* reporter, const char* filename) { |
26 SkPath path, pathB; | 26 SkPath path, pathB; |
27 path.setFillType(SkPath::kWinding_FillType); | 27 path.setFillType(SkPath::kWinding_FillType); |
28 path.moveTo(0,2); | 28 path.moveTo(0,2); |
29 path.cubicTo(0,1, 1,0, 1,0); | 29 path.cubicTo(0,1, 1,0, 1,0); |
30 path.close(); | 30 path.close(); |
31 pathB.setFillType(SkPath::kWinding_FillType); | 31 pathB.setFillType(SkPath::kWinding_FillType); |
32 pathB.moveTo(0,1); | 32 pathB.moveTo(0,1); |
33 pathB.cubicTo(0,1, 2,0, 1,0); | 33 pathB.cubicTo(0,1, 2,0, 1,0); |
34 pathB.close(); | 34 pathB.close(); |
35 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 35 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
36 } | 36 } |
37 | 37 |
38 static void cubicOp3d(skiatest::Reporter* reporter, const char* filename) { | 38 static void cubicOp3d(skiatest::Reporter* reporter, const char* filename) { |
39 SkPath path, pathB; | 39 SkPath path, pathB; |
40 path.setFillType(SkPath::kWinding_FillType); | 40 path.setFillType(SkPath::kWinding_FillType); |
41 path.moveTo(0,1); | 41 path.moveTo(0,1); |
42 path.cubicTo(2,3, 1,0, 1,0); | 42 path.cubicTo(2,3, 1,0, 1,0); |
43 path.close(); | 43 path.close(); |
44 pathB.setFillType(SkPath::kWinding_FillType); | 44 pathB.setFillType(SkPath::kWinding_FillType); |
45 pathB.moveTo(0,1); | 45 pathB.moveTo(0,1); |
46 pathB.cubicTo(0,1, 1,0, 3,2); | 46 pathB.cubicTo(0,1, 1,0, 3,2); |
47 pathB.close(); | 47 pathB.close(); |
48 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 48 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
49 } | 49 } |
50 | 50 |
51 static void cubicOp5d(skiatest::Reporter* reporter, const char* filename) { | 51 static void cubicOp5d(skiatest::Reporter* reporter, const char* filename) { |
52 SkPath path, pathB; | 52 SkPath path, pathB; |
53 path.setFillType(SkPath::kWinding_FillType); | 53 path.setFillType(SkPath::kWinding_FillType); |
54 path.moveTo(0,1); | 54 path.moveTo(0,1); |
55 path.cubicTo(0,2, 1,0, 2,0); | 55 path.cubicTo(0,2, 1,0, 2,0); |
56 path.close(); | 56 path.close(); |
57 pathB.setFillType(SkPath::kWinding_FillType); | 57 pathB.setFillType(SkPath::kWinding_FillType); |
58 pathB.moveTo(0,1); | 58 pathB.moveTo(0,1); |
59 pathB.cubicTo(0,2, 1,0, 2,0); | 59 pathB.cubicTo(0,2, 1,0, 2,0); |
60 pathB.close(); | 60 pathB.close(); |
61 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 61 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
62 } | 62 } |
63 | 63 |
64 static void cubicOp6d(skiatest::Reporter* reporter, const char* filename) { | 64 static void cubicOp6d(skiatest::Reporter* reporter, const char* filename) { |
65 SkPath path, pathB; | 65 SkPath path, pathB; |
66 path.setFillType(SkPath::kWinding_FillType); | 66 path.setFillType(SkPath::kWinding_FillType); |
67 path.moveTo(0,1); | 67 path.moveTo(0,1); |
68 path.cubicTo(0,6, 1,0, 3,0); | 68 path.cubicTo(0,6, 1,0, 3,0); |
69 path.close(); | 69 path.close(); |
70 pathB.setFillType(SkPath::kWinding_FillType); | 70 pathB.setFillType(SkPath::kWinding_FillType); |
71 pathB.moveTo(0,1); | 71 pathB.moveTo(0,1); |
72 pathB.cubicTo(0,3, 1,0, 6,0); | 72 pathB.cubicTo(0,3, 1,0, 6,0); |
73 pathB.close(); | 73 pathB.close(); |
74 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 74 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
75 } | 75 } |
76 | 76 |
77 static void cubicOp7d(skiatest::Reporter* reporter, const char* filename) { | 77 static void cubicOp7d(skiatest::Reporter* reporter, const char* filename) { |
78 SkPath path, pathB; | 78 SkPath path, pathB; |
79 path.setFillType(SkPath::kWinding_FillType); | 79 path.setFillType(SkPath::kWinding_FillType); |
80 path.moveTo(0,1); | 80 path.moveTo(0,1); |
81 path.cubicTo(3,4, 1,0, 3,0); | 81 path.cubicTo(3,4, 1,0, 3,0); |
82 path.close(); | 82 path.close(); |
83 pathB.setFillType(SkPath::kWinding_FillType); | 83 pathB.setFillType(SkPath::kWinding_FillType); |
84 pathB.moveTo(0,1); | 84 pathB.moveTo(0,1); |
85 pathB.cubicTo(0,3, 1,0, 4,3); | 85 pathB.cubicTo(0,3, 1,0, 4,3); |
86 pathB.close(); | 86 pathB.close(); |
87 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 87 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
88 } | 88 } |
89 | 89 |
90 static void cubicOp8d(skiatest::Reporter* reporter, const char* filename) { | 90 static void cubicOp8d(skiatest::Reporter* reporter, const char* filename) { |
91 SkPath path, pathB; | 91 SkPath path, pathB; |
92 path.setFillType(SkPath::kWinding_FillType); | 92 path.setFillType(SkPath::kWinding_FillType); |
93 path.moveTo(0,1); | 93 path.moveTo(0,1); |
94 path.cubicTo(0,5, 1,0, 4,0); | 94 path.cubicTo(0,5, 1,0, 4,0); |
95 path.close(); | 95 path.close(); |
96 pathB.setFillType(SkPath::kWinding_FillType); | 96 pathB.setFillType(SkPath::kWinding_FillType); |
97 pathB.moveTo(0,1); | 97 pathB.moveTo(0,1); |
98 pathB.cubicTo(0,4, 1,0, 5,0); | 98 pathB.cubicTo(0,4, 1,0, 5,0); |
99 pathB.close(); | 99 pathB.close(); |
100 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 100 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
101 } | 101 } |
102 | 102 |
103 static void cubicOp9d(skiatest::Reporter* reporter, const char* filename) { | 103 static void cubicOp9d(skiatest::Reporter* reporter, const char* filename) { |
104 SkPath path, pathB; | 104 SkPath path, pathB; |
105 path.setFillType(SkPath::kWinding_FillType); | 105 path.setFillType(SkPath::kWinding_FillType); |
106 path.moveTo(0,1); | 106 path.moveTo(0,1); |
107 path.cubicTo(1,6, 1,0, 2,1); | 107 path.cubicTo(1,6, 1,0, 2,1); |
108 path.close(); | 108 path.close(); |
109 pathB.setFillType(SkPath::kWinding_FillType); | 109 pathB.setFillType(SkPath::kWinding_FillType); |
110 pathB.moveTo(0,1); | 110 pathB.moveTo(0,1); |
111 pathB.cubicTo(1,2, 1,0, 6,1); | 111 pathB.cubicTo(1,2, 1,0, 6,1); |
112 pathB.close(); | 112 pathB.close(); |
113 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 113 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
114 } | 114 } |
115 | 115 |
116 static void quadOp9d(skiatest::Reporter* reporter, const char* filename) { | 116 static void quadOp9d(skiatest::Reporter* reporter, const char* filename) { |
117 SkPath path, pathB; | 117 SkPath path, pathB; |
118 path.setFillType(SkPath::kWinding_FillType); | 118 path.setFillType(SkPath::kWinding_FillType); |
119 path.moveTo(0,1); | 119 path.moveTo(0,1); |
120 path.quadTo(1,6, 1.5f,1); | 120 path.quadTo(1,6, 1.5f,1); |
121 path.quadTo(1.5f,0.5f, 2,1); | 121 path.quadTo(1.5f,0.5f, 2,1); |
122 path.close(); | 122 path.close(); |
123 pathB.setFillType(SkPath::kWinding_FillType); | 123 pathB.setFillType(SkPath::kWinding_FillType); |
124 pathB.moveTo(0,1); | 124 pathB.moveTo(0,1); |
125 pathB.quadTo(1,2, 1.4f,1); | 125 pathB.quadTo(1,2, 1.4f,1); |
126 pathB.quadTo(3,0.4f, 6,1); | 126 pathB.quadTo(3,0.4f, 6,1); |
127 pathB.close(); | 127 pathB.close(); |
128 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 128 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
129 } | 129 } |
130 | 130 |
131 static void lineOp9d(skiatest::Reporter* reporter, const char* filename) { | 131 static void lineOp9d(skiatest::Reporter* reporter, const char* filename) { |
132 SkPath path, pathB; | 132 SkPath path, pathB; |
133 path.setFillType(SkPath::kWinding_FillType); | 133 path.setFillType(SkPath::kWinding_FillType); |
134 path.moveTo(0,1); | 134 path.moveTo(0,1); |
135 path.lineTo(1,6); | 135 path.lineTo(1,6); |
136 path.lineTo(1.5f,1); | 136 path.lineTo(1.5f,1); |
137 path.lineTo(1.8f,0.8f); | 137 path.lineTo(1.8f,0.8f); |
138 path.lineTo(2,1); | 138 path.lineTo(2,1); |
139 path.close(); | 139 path.close(); |
140 pathB.setFillType(SkPath::kWinding_FillType); | 140 pathB.setFillType(SkPath::kWinding_FillType); |
141 pathB.moveTo(0,1); | 141 pathB.moveTo(0,1); |
142 pathB.lineTo(1,2); | 142 pathB.lineTo(1,2); |
143 pathB.lineTo(1.4f,1); | 143 pathB.lineTo(1.4f,1); |
144 pathB.lineTo(3,0.4f); | 144 pathB.lineTo(3,0.4f); |
145 pathB.lineTo(6,1); | 145 pathB.lineTo(6,1); |
146 pathB.close(); | 146 pathB.close(); |
147 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 147 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
148 } | 148 } |
149 | 149 |
150 static void cubicOp1i(skiatest::Reporter* reporter, const char* filename) { | 150 static void cubicOp1i(skiatest::Reporter* reporter, const char* filename) { |
151 SkPath path, pathB; | 151 SkPath path, pathB; |
152 path.setFillType(SkPath::kWinding_FillType); | 152 path.setFillType(SkPath::kWinding_FillType); |
153 path.moveTo(0,1); | 153 path.moveTo(0,1); |
154 path.cubicTo(1,2, 1,0, 2,1); | 154 path.cubicTo(1,2, 1,0, 2,1); |
155 path.close(); | 155 path.close(); |
156 pathB.setFillType(SkPath::kWinding_FillType); | 156 pathB.setFillType(SkPath::kWinding_FillType); |
157 pathB.moveTo(0,1); | 157 pathB.moveTo(0,1); |
158 pathB.cubicTo(1,2, 1,0, 2,1); | 158 pathB.cubicTo(1,2, 1,0, 2,1); |
159 pathB.close(); | 159 pathB.close(); |
160 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 160 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
161 } | 161 } |
162 | 162 |
163 static void cubicOp10d(skiatest::Reporter* reporter, const char* filename) { | 163 static void cubicOp10d(skiatest::Reporter* reporter, const char* filename) { |
164 SkPath path, pathB; | 164 SkPath path, pathB; |
165 path.setFillType(SkPath::kWinding_FillType); | 165 path.setFillType(SkPath::kWinding_FillType); |
166 path.moveTo(0,1); | 166 path.moveTo(0,1); |
167 path.cubicTo(1,3, 1,0, 4,1); | 167 path.cubicTo(1,3, 1,0, 4,1); |
168 path.close(); | 168 path.close(); |
169 pathB.setFillType(SkPath::kWinding_FillType); | 169 pathB.setFillType(SkPath::kWinding_FillType); |
170 pathB.moveTo(0,1); | 170 pathB.moveTo(0,1); |
171 pathB.cubicTo(1,4, 1,0, 3,1); | 171 pathB.cubicTo(1,4, 1,0, 3,1); |
172 pathB.close(); | 172 pathB.close(); |
173 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 173 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
174 } | 174 } |
175 | 175 |
176 static void cubicOp11d(skiatest::Reporter* reporter, const char* filename) { | 176 static void cubicOp11d(skiatest::Reporter* reporter, const char* filename) { |
177 SkPath path, pathB; | 177 SkPath path, pathB; |
178 path.setFillType(SkPath::kWinding_FillType); | 178 path.setFillType(SkPath::kWinding_FillType); |
179 path.moveTo(0,1); | 179 path.moveTo(0,1); |
180 path.cubicTo(3,4, 1,0, 5,1); | 180 path.cubicTo(3,4, 1,0, 5,1); |
181 path.close(); | 181 path.close(); |
182 pathB.setFillType(SkPath::kWinding_FillType); | 182 pathB.setFillType(SkPath::kWinding_FillType); |
183 pathB.moveTo(0,1); | 183 pathB.moveTo(0,1); |
184 pathB.cubicTo(1,5, 1,0, 4,3); | 184 pathB.cubicTo(1,5, 1,0, 4,3); |
185 pathB.close(); | 185 pathB.close(); |
186 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 186 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
187 } | 187 } |
188 | 188 |
189 static void cubicOp12d(skiatest::Reporter* reporter, const char* filename) { | 189 static void cubicOp12d(skiatest::Reporter* reporter, const char* filename) { |
190 SkPath path, pathB; | 190 SkPath path, pathB; |
191 path.setFillType(SkPath::kWinding_FillType); | 191 path.setFillType(SkPath::kWinding_FillType); |
192 path.moveTo(0,1); | 192 path.moveTo(0,1); |
193 path.cubicTo(1,6, 1,0, 1,0); | 193 path.cubicTo(1,6, 1,0, 1,0); |
194 path.close(); | 194 path.close(); |
195 pathB.setFillType(SkPath::kWinding_FillType); | 195 pathB.setFillType(SkPath::kWinding_FillType); |
196 pathB.moveTo(0,1); | 196 pathB.moveTo(0,1); |
197 pathB.cubicTo(0,1, 1,0, 6,1); | 197 pathB.cubicTo(0,1, 1,0, 6,1); |
198 pathB.close(); | 198 pathB.close(); |
199 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 199 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
200 } | 200 } |
201 | 201 |
202 static void cubicOp13d(skiatest::Reporter* reporter, const char* filename) { | 202 static void cubicOp13d(skiatest::Reporter* reporter, const char* filename) { |
203 SkPath path, pathB; | 203 SkPath path, pathB; |
204 path.setFillType(SkPath::kWinding_FillType); | 204 path.setFillType(SkPath::kWinding_FillType); |
205 path.moveTo(0,1); | 205 path.moveTo(0,1); |
206 path.cubicTo(4,5, 1,0, 5,3); | 206 path.cubicTo(4,5, 1,0, 5,3); |
207 path.close(); | 207 path.close(); |
208 pathB.setFillType(SkPath::kWinding_FillType); | 208 pathB.setFillType(SkPath::kWinding_FillType); |
209 pathB.moveTo(0,1); | 209 pathB.moveTo(0,1); |
210 pathB.cubicTo(3,5, 1,0, 5,4); | 210 pathB.cubicTo(3,5, 1,0, 5,4); |
211 pathB.close(); | 211 pathB.close(); |
212 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 212 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
213 } | 213 } |
214 | 214 |
215 static void cubicOp14d(skiatest::Reporter* reporter, const char* filename) { | 215 static void cubicOp14d(skiatest::Reporter* reporter, const char* filename) { |
216 SkPath path, pathB; | 216 SkPath path, pathB; |
217 path.setFillType(SkPath::kWinding_FillType); | 217 path.setFillType(SkPath::kWinding_FillType); |
218 path.moveTo(0,1); | 218 path.moveTo(0,1); |
219 path.cubicTo(0,2, 2,0, 2,1); | 219 path.cubicTo(0,2, 2,0, 2,1); |
220 path.close(); | 220 path.close(); |
221 pathB.setFillType(SkPath::kWinding_FillType); | 221 pathB.setFillType(SkPath::kWinding_FillType); |
222 pathB.moveTo(0,2); | 222 pathB.moveTo(0,2); |
223 pathB.cubicTo(1,2, 1,0, 2,0); | 223 pathB.cubicTo(1,2, 1,0, 2,0); |
224 pathB.close(); | 224 pathB.close(); |
225 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 225 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
226 } | 226 } |
227 | 227 |
228 static void cubicOp15d(skiatest::Reporter* reporter, const char* filename) { | 228 static void cubicOp15d(skiatest::Reporter* reporter, const char* filename) { |
229 SkPath path, pathB; | 229 SkPath path, pathB; |
230 path.setFillType(SkPath::kWinding_FillType); | 230 path.setFillType(SkPath::kWinding_FillType); |
231 path.moveTo(0,1); | 231 path.moveTo(0,1); |
232 path.cubicTo(3,6, 2,0, 2,1); | 232 path.cubicTo(3,6, 2,0, 2,1); |
233 path.close(); | 233 path.close(); |
234 pathB.setFillType(SkPath::kWinding_FillType); | 234 pathB.setFillType(SkPath::kWinding_FillType); |
235 pathB.moveTo(0,2); | 235 pathB.moveTo(0,2); |
236 pathB.cubicTo(1,2, 1,0, 6,3); | 236 pathB.cubicTo(1,2, 1,0, 6,3); |
237 pathB.close(); | 237 pathB.close(); |
238 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 238 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
239 } | 239 } |
240 | 240 |
241 static void cubicOp16d(skiatest::Reporter* reporter, const char* filename) { | 241 static void cubicOp16d(skiatest::Reporter* reporter, const char* filename) { |
242 SkPath path, pathB; | 242 SkPath path, pathB; |
243 path.setFillType(SkPath::kWinding_FillType); | 243 path.setFillType(SkPath::kWinding_FillType); |
244 path.moveTo(0,2); | 244 path.moveTo(0,2); |
245 path.cubicTo(0,1, 3,0, 1,0); | 245 path.cubicTo(0,1, 3,0, 1,0); |
246 path.close(); | 246 path.close(); |
247 pathB.setFillType(SkPath::kWinding_FillType); | 247 pathB.setFillType(SkPath::kWinding_FillType); |
248 pathB.moveTo(0,3); | 248 pathB.moveTo(0,3); |
249 pathB.cubicTo(0,1, 2,0, 1,0); | 249 pathB.cubicTo(0,1, 2,0, 1,0); |
250 pathB.close(); | 250 pathB.close(); |
251 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 251 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
252 } | 252 } |
253 | 253 |
254 static void cubicOp17d(skiatest::Reporter* reporter, const char* filename) { | 254 static void cubicOp17d(skiatest::Reporter* reporter, const char* filename) { |
255 SkPath path, pathB; | 255 SkPath path, pathB; |
256 path.setFillType(SkPath::kWinding_FillType); | 256 path.setFillType(SkPath::kWinding_FillType); |
257 path.moveTo(0,2); | 257 path.moveTo(0,2); |
258 path.cubicTo(0,2, 4,0, 2,1); | 258 path.cubicTo(0,2, 4,0, 2,1); |
259 path.close(); | 259 path.close(); |
260 pathB.setFillType(SkPath::kWinding_FillType); | 260 pathB.setFillType(SkPath::kWinding_FillType); |
261 pathB.moveTo(0,4); | 261 pathB.moveTo(0,4); |
262 pathB.cubicTo(1,2, 2,0, 2,0); | 262 pathB.cubicTo(1,2, 2,0, 2,0); |
263 pathB.close(); | 263 pathB.close(); |
264 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 264 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
265 } | 265 } |
266 | 266 |
267 static void cubicOp18d(skiatest::Reporter* reporter, const char* filename) { | 267 static void cubicOp18d(skiatest::Reporter* reporter, const char* filename) { |
268 SkPath path, pathB; | 268 SkPath path, pathB; |
269 path.setFillType(SkPath::kWinding_FillType); | 269 path.setFillType(SkPath::kWinding_FillType); |
270 path.moveTo(0,1); | 270 path.moveTo(0,1); |
271 path.cubicTo(3,5, 2,0, 2,1); | 271 path.cubicTo(3,5, 2,0, 2,1); |
272 path.close(); | 272 path.close(); |
273 pathB.setFillType(SkPath::kWinding_FillType); | 273 pathB.setFillType(SkPath::kWinding_FillType); |
274 pathB.moveTo(0,2); | 274 pathB.moveTo(0,2); |
275 pathB.cubicTo(1,2, 1,0, 5,3); | 275 pathB.cubicTo(1,2, 1,0, 5,3); |
276 pathB.close(); | 276 pathB.close(); |
277 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 277 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
278 } | 278 } |
279 | 279 |
280 static void cubicOp19i(skiatest::Reporter* reporter, const char* filename) { | 280 static void cubicOp19i(skiatest::Reporter* reporter, const char* filename) { |
281 SkPath path, pathB; | 281 SkPath path, pathB; |
282 path.setFillType(SkPath::kWinding_FillType); | 282 path.setFillType(SkPath::kWinding_FillType); |
283 path.moveTo(0,2); | 283 path.moveTo(0,2); |
284 path.cubicTo(0,1, 2,1, 6,2); | 284 path.cubicTo(0,1, 2,1, 6,2); |
285 path.close(); | 285 path.close(); |
286 pathB.setFillType(SkPath::kWinding_FillType); | 286 pathB.setFillType(SkPath::kWinding_FillType); |
287 pathB.moveTo(1,2); | 287 pathB.moveTo(1,2); |
288 pathB.cubicTo(2,6, 2,0, 1,0); | 288 pathB.cubicTo(2,6, 2,0, 1,0); |
289 pathB.close(); | 289 pathB.close(); |
290 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 290 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
291 } | 291 } |
292 | 292 |
293 static void cubicOp20d(skiatest::Reporter* reporter, const char* filename) { | 293 static void cubicOp20d(skiatest::Reporter* reporter, const char* filename) { |
294 SkPath path, pathB; | 294 SkPath path, pathB; |
295 path.setFillType(SkPath::kWinding_FillType); | 295 path.setFillType(SkPath::kWinding_FillType); |
296 path.moveTo(0,1); | 296 path.moveTo(0,1); |
297 path.cubicTo(0,1, 6,0, 2,1); | 297 path.cubicTo(0,1, 6,0, 2,1); |
298 path.close(); | 298 path.close(); |
299 pathB.setFillType(SkPath::kWinding_FillType); | 299 pathB.setFillType(SkPath::kWinding_FillType); |
300 pathB.moveTo(0,6); | 300 pathB.moveTo(0,6); |
301 pathB.cubicTo(1,2, 1,0, 1,0); | 301 pathB.cubicTo(1,2, 1,0, 1,0); |
302 pathB.close(); | 302 pathB.close(); |
303 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 303 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
304 } | 304 } |
305 | 305 |
306 static void cubicOp21d(skiatest::Reporter* reporter, const char* filename) { | 306 static void cubicOp21d(skiatest::Reporter* reporter, const char* filename) { |
307 SkPath path, pathB; | 307 SkPath path, pathB; |
308 path.setFillType(SkPath::kWinding_FillType); | 308 path.setFillType(SkPath::kWinding_FillType); |
309 path.moveTo(0,1); | 309 path.moveTo(0,1); |
310 path.cubicTo(0,1, 2,1, 6,5); | 310 path.cubicTo(0,1, 2,1, 6,5); |
311 path.close(); | 311 path.close(); |
312 pathB.setFillType(SkPath::kWinding_FillType); | 312 pathB.setFillType(SkPath::kWinding_FillType); |
313 pathB.moveTo(1,2); | 313 pathB.moveTo(1,2); |
314 pathB.cubicTo(5,6, 1,0, 1,0); | 314 pathB.cubicTo(5,6, 1,0, 1,0); |
315 pathB.close(); | 315 pathB.close(); |
316 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 316 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
317 } | 317 } |
318 | 318 |
319 static void cubicOp22d(skiatest::Reporter* reporter, const char* filename) { | 319 static void cubicOp22d(skiatest::Reporter* reporter, const char* filename) { |
320 SkPath path, pathB; | 320 SkPath path, pathB; |
321 path.setFillType(SkPath::kWinding_FillType); | 321 path.setFillType(SkPath::kWinding_FillType); |
322 path.moveTo(0,1); | 322 path.moveTo(0,1); |
323 path.cubicTo(2,3, 3,0, 2,1); | 323 path.cubicTo(2,3, 3,0, 2,1); |
324 path.close(); | 324 path.close(); |
325 pathB.setFillType(SkPath::kWinding_FillType); | 325 pathB.setFillType(SkPath::kWinding_FillType); |
326 pathB.moveTo(0,3); | 326 pathB.moveTo(0,3); |
327 pathB.cubicTo(1,2, 1,0, 3,2); | 327 pathB.cubicTo(1,2, 1,0, 3,2); |
328 pathB.close(); | 328 pathB.close(); |
329 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 329 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
330 } | 330 } |
331 | 331 |
332 static void cubicOp23d(skiatest::Reporter* reporter, const char* filename) { | 332 static void cubicOp23d(skiatest::Reporter* reporter, const char* filename) { |
333 SkPath path, pathB; | 333 SkPath path, pathB; |
334 path.setFillType(SkPath::kWinding_FillType); | 334 path.setFillType(SkPath::kWinding_FillType); |
335 path.moveTo(0,1); | 335 path.moveTo(0,1); |
336 path.cubicTo(1,2, 4,0, 2,1); | 336 path.cubicTo(1,2, 4,0, 2,1); |
337 path.close(); | 337 path.close(); |
338 pathB.setFillType(SkPath::kWinding_FillType); | 338 pathB.setFillType(SkPath::kWinding_FillType); |
339 pathB.moveTo(0,4); | 339 pathB.moveTo(0,4); |
340 pathB.cubicTo(1,2, 1,0, 2,1); | 340 pathB.cubicTo(1,2, 1,0, 2,1); |
341 pathB.close(); | 341 pathB.close(); |
342 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 342 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
343 } | 343 } |
344 | 344 |
345 static void cubicOp24d(skiatest::Reporter* reporter, const char* filename) { | 345 static void cubicOp24d(skiatest::Reporter* reporter, const char* filename) { |
346 SkPath path, pathB; | 346 SkPath path, pathB; |
347 path.setFillType(SkPath::kWinding_FillType); | 347 path.setFillType(SkPath::kWinding_FillType); |
348 path.moveTo(0,1); | 348 path.moveTo(0,1); |
349 path.cubicTo(1,2, 2,0, 3,2); | 349 path.cubicTo(1,2, 2,0, 3,2); |
350 path.close(); | 350 path.close(); |
351 pathB.setFillType(SkPath::kWinding_FillType); | 351 pathB.setFillType(SkPath::kWinding_FillType); |
352 pathB.moveTo(0,2); | 352 pathB.moveTo(0,2); |
353 pathB.cubicTo(2,3, 1,0, 2,1); | 353 pathB.cubicTo(2,3, 1,0, 2,1); |
354 pathB.close(); | 354 pathB.close(); |
355 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 355 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
356 } | 356 } |
357 | 357 |
358 static void testIntersect1(skiatest::Reporter* reporter, const char* filename) { | 358 static void testIntersect1(skiatest::Reporter* reporter, const char* filename) { |
359 SkPath one, two; | 359 SkPath one, two; |
360 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 360 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
361 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); | 361 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); |
362 testPathOp(reporter, one, two, kIntersect_PathOp, filename); | 362 testPathOp(reporter, one, two, kIntersect_SkPathOp, filename); |
363 } | 363 } |
364 | 364 |
365 static void testUnion1(skiatest::Reporter* reporter, const char* filename) { | 365 static void testUnion1(skiatest::Reporter* reporter, const char* filename) { |
366 SkPath one, two; | 366 SkPath one, two; |
367 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 367 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
368 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); | 368 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); |
369 testPathOp(reporter, one, two, kUnion_PathOp, filename); | 369 testPathOp(reporter, one, two, kUnion_SkPathOp, filename); |
370 } | 370 } |
371 | 371 |
372 static void testDiff1(skiatest::Reporter* reporter, const char* filename) { | 372 static void testDiff1(skiatest::Reporter* reporter, const char* filename) { |
373 SkPath one, two; | 373 SkPath one, two; |
374 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 374 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
375 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); | 375 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); |
376 testPathOp(reporter, one, two, kDifference_PathOp, filename); | 376 testPathOp(reporter, one, two, kDifference_SkPathOp, filename); |
377 } | 377 } |
378 | 378 |
379 static void testXor1(skiatest::Reporter* reporter, const char* filename) { | 379 static void testXor1(skiatest::Reporter* reporter, const char* filename) { |
380 SkPath one, two; | 380 SkPath one, two; |
381 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 381 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
382 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); | 382 two.addRect(3, 3, 9, 9, SkPath::kCW_Direction); |
383 testPathOp(reporter, one, two, kXOR_PathOp, filename); | 383 testPathOp(reporter, one, two, kXOR_SkPathOp, filename); |
384 } | 384 } |
385 | 385 |
386 static void testIntersect2(skiatest::Reporter* reporter, const char* filename) { | 386 static void testIntersect2(skiatest::Reporter* reporter, const char* filename) { |
387 SkPath one, two; | 387 SkPath one, two; |
388 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 388 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
389 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); | 389 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); |
390 testPathOp(reporter, one, two, kIntersect_PathOp, filename); | 390 testPathOp(reporter, one, two, kIntersect_SkPathOp, filename); |
391 } | 391 } |
392 | 392 |
393 static void testUnion2(skiatest::Reporter* reporter, const char* filename) { | 393 static void testUnion2(skiatest::Reporter* reporter, const char* filename) { |
394 SkPath one, two; | 394 SkPath one, two; |
395 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 395 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
396 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); | 396 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); |
397 testPathOp(reporter, one, two, kUnion_PathOp, filename); | 397 testPathOp(reporter, one, two, kUnion_SkPathOp, filename); |
398 } | 398 } |
399 | 399 |
400 static void testDiff2(skiatest::Reporter* reporter, const char* filename) { | 400 static void testDiff2(skiatest::Reporter* reporter, const char* filename) { |
401 SkPath one, two; | 401 SkPath one, two; |
402 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 402 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
403 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); | 403 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); |
404 testPathOp(reporter, one, two, kDifference_PathOp, filename); | 404 testPathOp(reporter, one, two, kDifference_SkPathOp, filename); |
405 } | 405 } |
406 | 406 |
407 static void testXor2(skiatest::Reporter* reporter, const char* filename) { | 407 static void testXor2(skiatest::Reporter* reporter, const char* filename) { |
408 SkPath one, two; | 408 SkPath one, two; |
409 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); | 409 one.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
410 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); | 410 two.addRect(0, 3, 9, 9, SkPath::kCW_Direction); |
411 testPathOp(reporter, one, two, kXOR_PathOp, filename); | 411 testPathOp(reporter, one, two, kXOR_SkPathOp, filename); |
412 } | 412 } |
413 | 413 |
414 static void testOp1d(skiatest::Reporter* reporter, const char* filename) { | 414 static void testOp1d(skiatest::Reporter* reporter, const char* filename) { |
415 SkPath path, pathB; | 415 SkPath path, pathB; |
416 path.setFillType(SkPath::kWinding_FillType); | 416 path.setFillType(SkPath::kWinding_FillType); |
417 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 417 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
418 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 418 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
419 pathB.setFillType(SkPath::kWinding_FillType); | 419 pathB.setFillType(SkPath::kWinding_FillType); |
420 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 420 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
421 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 421 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
422 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 422 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
423 } | 423 } |
424 | 424 |
425 static void testOp2d(skiatest::Reporter* reporter, const char* filename) { | 425 static void testOp2d(skiatest::Reporter* reporter, const char* filename) { |
426 SkPath path, pathB; | 426 SkPath path, pathB; |
427 path.setFillType(SkPath::kWinding_FillType); | 427 path.setFillType(SkPath::kWinding_FillType); |
428 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 428 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
429 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 429 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
430 pathB.setFillType(SkPath::kEvenOdd_FillType); | 430 pathB.setFillType(SkPath::kEvenOdd_FillType); |
431 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 431 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
432 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 432 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
433 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 433 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
434 } | 434 } |
435 | 435 |
436 static void testOp3d(skiatest::Reporter* reporter, const char* filename) { | 436 static void testOp3d(skiatest::Reporter* reporter, const char* filename) { |
437 SkPath path, pathB; | 437 SkPath path, pathB; |
438 path.setFillType(SkPath::kWinding_FillType); | 438 path.setFillType(SkPath::kWinding_FillType); |
439 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 439 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
440 path.addRect(1, 1, 2, 2, SkPath::kCW_Direction); | 440 path.addRect(1, 1, 2, 2, SkPath::kCW_Direction); |
441 pathB.setFillType(SkPath::kWinding_FillType); | 441 pathB.setFillType(SkPath::kWinding_FillType); |
442 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 442 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
443 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 443 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
444 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 444 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
445 } | 445 } |
446 | 446 |
447 static void testOp1u(skiatest::Reporter* reporter, const char* filename) { | 447 static void testOp1u(skiatest::Reporter* reporter, const char* filename) { |
448 SkPath path, pathB; | 448 SkPath path, pathB; |
449 path.setFillType(SkPath::kWinding_FillType); | 449 path.setFillType(SkPath::kWinding_FillType); |
450 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 450 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
451 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 451 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
452 pathB.setFillType(SkPath::kWinding_FillType); | 452 pathB.setFillType(SkPath::kWinding_FillType); |
453 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 453 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
454 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 454 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
455 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 455 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
456 } | 456 } |
457 | 457 |
458 static void testOp4d(skiatest::Reporter* reporter, const char* filename) { | 458 static void testOp4d(skiatest::Reporter* reporter, const char* filename) { |
459 SkPath path, pathB; | 459 SkPath path, pathB; |
460 path.setFillType(SkPath::kWinding_FillType); | 460 path.setFillType(SkPath::kWinding_FillType); |
461 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 461 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
462 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); | 462 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
463 pathB.setFillType(SkPath::kWinding_FillType); | 463 pathB.setFillType(SkPath::kWinding_FillType); |
464 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 464 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
465 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 465 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
466 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 466 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
467 } | 467 } |
468 | 468 |
469 static void testOp5d(skiatest::Reporter* reporter, const char* filename) { | 469 static void testOp5d(skiatest::Reporter* reporter, const char* filename) { |
470 SkPath path, pathB; | 470 SkPath path, pathB; |
471 path.setFillType(SkPath::kEvenOdd_FillType); | 471 path.setFillType(SkPath::kEvenOdd_FillType); |
472 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 472 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
473 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 473 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
474 pathB.setFillType(SkPath::kEvenOdd_FillType); | 474 pathB.setFillType(SkPath::kEvenOdd_FillType); |
475 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 475 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
476 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 476 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
477 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 477 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
478 } | 478 } |
479 | 479 |
480 static void testOp6d(skiatest::Reporter* reporter, const char* filename) { | 480 static void testOp6d(skiatest::Reporter* reporter, const char* filename) { |
481 SkPath path, pathB; | 481 SkPath path, pathB; |
482 path.setFillType(SkPath::kEvenOdd_FillType); | 482 path.setFillType(SkPath::kEvenOdd_FillType); |
483 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 483 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
484 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 484 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
485 pathB.setFillType(SkPath::kWinding_FillType); | 485 pathB.setFillType(SkPath::kWinding_FillType); |
486 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 486 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
487 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 487 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
488 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 488 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
489 } | 489 } |
490 | 490 |
491 static void testOp7d(skiatest::Reporter* reporter, const char* filename) { | 491 static void testOp7d(skiatest::Reporter* reporter, const char* filename) { |
492 SkPath path, pathB; | 492 SkPath path, pathB; |
493 path.setFillType(SkPath::kEvenOdd_FillType); | 493 path.setFillType(SkPath::kEvenOdd_FillType); |
494 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 494 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
495 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 495 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
496 pathB.setFillType(SkPath::kEvenOdd_FillType); | 496 pathB.setFillType(SkPath::kEvenOdd_FillType); |
497 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 497 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
498 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 498 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
499 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 499 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
500 } | 500 } |
501 | 501 |
502 static void testOp2u(skiatest::Reporter* reporter, const char* filename) { | 502 static void testOp2u(skiatest::Reporter* reporter, const char* filename) { |
503 SkPath path, pathB; | 503 SkPath path, pathB; |
504 path.setFillType(SkPath::kEvenOdd_FillType); | 504 path.setFillType(SkPath::kEvenOdd_FillType); |
505 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 505 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
506 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 506 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
507 pathB.setFillType(SkPath::kWinding_FillType); | 507 pathB.setFillType(SkPath::kWinding_FillType); |
508 pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 508 pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
509 pathB.addRect(1, 1, 2, 2, SkPath::kCW_Direction); | 509 pathB.addRect(1, 1, 2, 2, SkPath::kCW_Direction); |
510 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 510 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
511 } | 511 } |
512 | 512 |
513 static void testOp8d(skiatest::Reporter* reporter, const char* filename) { | 513 static void testOp8d(skiatest::Reporter* reporter, const char* filename) { |
514 SkPath path, pathB; | 514 SkPath path, pathB; |
515 path.addRect(0, 0, 640, 480); | 515 path.addRect(0, 0, 640, 480); |
516 pathB.moveTo(577330, 1971.72f); | 516 pathB.moveTo(577330, 1971.72f); |
517 pathB.cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f); | 517 pathB.cubicTo(10.7082f, -116.596f, 262.057f, 45.6468f, 294.694f, 1.96237f); |
518 pathB.close(); | 518 pathB.close(); |
519 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 519 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
520 } | 520 } |
521 static void cubicOp25i(skiatest::Reporter* reporter, const char* filename) { | 521 static void cubicOp25i(skiatest::Reporter* reporter, const char* filename) { |
522 SkPath path, pathB; | 522 SkPath path, pathB; |
523 path.setFillType(SkPath::kWinding_FillType); | 523 path.setFillType(SkPath::kWinding_FillType); |
524 path.moveTo(0,1); | 524 path.moveTo(0,1); |
525 path.cubicTo(2,4, 5,0, 3,2); | 525 path.cubicTo(2,4, 5,0, 3,2); |
526 path.close(); | 526 path.close(); |
527 pathB.setFillType(SkPath::kWinding_FillType); | 527 pathB.setFillType(SkPath::kWinding_FillType); |
528 pathB.moveTo(0,5); | 528 pathB.moveTo(0,5); |
529 pathB.cubicTo(2,3, 1,0, 4,2); | 529 pathB.cubicTo(2,3, 1,0, 4,2); |
530 pathB.close(); | 530 pathB.close(); |
531 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 531 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
532 } | 532 } |
533 | 533 |
534 static void cubicOp26d(skiatest::Reporter* reporter, const char* filename) { | 534 static void cubicOp26d(skiatest::Reporter* reporter, const char* filename) { |
535 SkPath path, pathB; | 535 SkPath path, pathB; |
536 path.setFillType(SkPath::kWinding_FillType); | 536 path.setFillType(SkPath::kWinding_FillType); |
537 path.moveTo(0,1); | 537 path.moveTo(0,1); |
538 path.cubicTo(3,4, 4,0, 3,2); | 538 path.cubicTo(3,4, 4,0, 3,2); |
539 path.close(); | 539 path.close(); |
540 pathB.setFillType(SkPath::kWinding_FillType); | 540 pathB.setFillType(SkPath::kWinding_FillType); |
541 pathB.moveTo(0,4); | 541 pathB.moveTo(0,4); |
542 pathB.cubicTo(2,3, 1,0, 4,3); | 542 pathB.cubicTo(2,3, 1,0, 4,3); |
543 pathB.close(); | 543 pathB.close(); |
544 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 544 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
545 } | 545 } |
546 | 546 |
547 static void cubicOp27d(skiatest::Reporter* reporter, const char* filename) { | 547 static void cubicOp27d(skiatest::Reporter* reporter, const char* filename) { |
548 SkPath path, pathB; | 548 SkPath path, pathB; |
549 path.setFillType(SkPath::kWinding_FillType); | 549 path.setFillType(SkPath::kWinding_FillType); |
550 path.moveTo(0,1); | 550 path.moveTo(0,1); |
551 path.cubicTo(3,6, 1,0, 5,2); | 551 path.cubicTo(3,6, 1,0, 5,2); |
552 path.close(); | 552 path.close(); |
553 pathB.setFillType(SkPath::kWinding_FillType); | 553 pathB.setFillType(SkPath::kWinding_FillType); |
554 pathB.moveTo(0,1); | 554 pathB.moveTo(0,1); |
555 pathB.cubicTo(2,5, 1,0, 6,3); | 555 pathB.cubicTo(2,5, 1,0, 6,3); |
556 pathB.close(); | 556 pathB.close(); |
557 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 557 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
558 } | 558 } |
559 | 559 |
560 static void cubicOp28u(skiatest::Reporter* reporter, const char* filename) { | 560 static void cubicOp28u(skiatest::Reporter* reporter, const char* filename) { |
561 SkPath path, pathB; | 561 SkPath path, pathB; |
562 path.setFillType(SkPath::kWinding_FillType); | 562 path.setFillType(SkPath::kWinding_FillType); |
563 path.moveTo(0,1); | 563 path.moveTo(0,1); |
564 path.cubicTo(1,4, 6,0, 3,2); | 564 path.cubicTo(1,4, 6,0, 3,2); |
565 path.close(); | 565 path.close(); |
566 pathB.setFillType(SkPath::kWinding_FillType); | 566 pathB.setFillType(SkPath::kWinding_FillType); |
567 pathB.moveTo(0,6); | 567 pathB.moveTo(0,6); |
568 pathB.cubicTo(2,3, 1,0, 4,1); | 568 pathB.cubicTo(2,3, 1,0, 4,1); |
569 pathB.close(); | 569 pathB.close(); |
570 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 570 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
571 } | 571 } |
572 | 572 |
573 static void cubicOp29d(skiatest::Reporter* reporter, const char* filename) { | 573 static void cubicOp29d(skiatest::Reporter* reporter, const char* filename) { |
574 SkPath path, pathB; | 574 SkPath path, pathB; |
575 path.setFillType(SkPath::kWinding_FillType); | 575 path.setFillType(SkPath::kWinding_FillType); |
576 path.moveTo(0,1); | 576 path.moveTo(0,1); |
577 path.cubicTo(2,5, 6,0, 4,2); | 577 path.cubicTo(2,5, 6,0, 4,2); |
578 path.close(); | 578 path.close(); |
579 pathB.setFillType(SkPath::kWinding_FillType); | 579 pathB.setFillType(SkPath::kWinding_FillType); |
580 pathB.moveTo(0,6); | 580 pathB.moveTo(0,6); |
581 pathB.cubicTo(2,4, 1,0, 5,2); | 581 pathB.cubicTo(2,4, 1,0, 5,2); |
582 pathB.close(); | 582 pathB.close(); |
583 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 583 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
584 } | 584 } |
585 | 585 |
586 static void cubicOp30d(skiatest::Reporter* reporter, const char* filename) { | 586 static void cubicOp30d(skiatest::Reporter* reporter, const char* filename) { |
587 SkPath path, pathB; | 587 SkPath path, pathB; |
588 path.setFillType(SkPath::kWinding_FillType); | 588 path.setFillType(SkPath::kWinding_FillType); |
589 path.moveTo(0,1); | 589 path.moveTo(0,1); |
590 path.cubicTo(2,5, 6,0, 5,3); | 590 path.cubicTo(2,5, 6,0, 5,3); |
591 path.close(); | 591 path.close(); |
592 pathB.setFillType(SkPath::kWinding_FillType); | 592 pathB.setFillType(SkPath::kWinding_FillType); |
593 pathB.moveTo(0,6); | 593 pathB.moveTo(0,6); |
594 pathB.cubicTo(3,5, 1,0, 5,2); | 594 pathB.cubicTo(3,5, 1,0, 5,2); |
595 pathB.close(); | 595 pathB.close(); |
596 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 596 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
597 } | 597 } |
598 | 598 |
599 static void cubicOp31d(skiatest::Reporter* reporter, const char* filename) { | 599 static void cubicOp31d(skiatest::Reporter* reporter, const char* filename) { |
600 SkPath path, pathB; | 600 SkPath path, pathB; |
601 path.setFillType(SkPath::kWinding_FillType); | 601 path.setFillType(SkPath::kWinding_FillType); |
602 path.moveTo(0,2); | 602 path.moveTo(0,2); |
603 path.cubicTo(0,3, 2,1, 4,0); | 603 path.cubicTo(0,3, 2,1, 4,0); |
604 path.close(); | 604 path.close(); |
605 pathB.setFillType(SkPath::kWinding_FillType); | 605 pathB.setFillType(SkPath::kWinding_FillType); |
606 pathB.moveTo(1,2); | 606 pathB.moveTo(1,2); |
607 pathB.cubicTo(0,4, 2,0, 3,0); | 607 pathB.cubicTo(0,4, 2,0, 3,0); |
608 pathB.close(); | 608 pathB.close(); |
609 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 609 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
610 } | 610 } |
611 | 611 |
612 static void cubicOp31u(skiatest::Reporter* reporter, const char* filename) { | 612 static void cubicOp31u(skiatest::Reporter* reporter, const char* filename) { |
613 SkPath path, pathB; | 613 SkPath path, pathB; |
614 path.setFillType(SkPath::kWinding_FillType); | 614 path.setFillType(SkPath::kWinding_FillType); |
615 path.moveTo(0,2); | 615 path.moveTo(0,2); |
616 path.cubicTo(0,3, 2,1, 4,0); | 616 path.cubicTo(0,3, 2,1, 4,0); |
617 path.close(); | 617 path.close(); |
618 pathB.setFillType(SkPath::kWinding_FillType); | 618 pathB.setFillType(SkPath::kWinding_FillType); |
619 pathB.moveTo(1,2); | 619 pathB.moveTo(1,2); |
620 pathB.cubicTo(0,4, 2,0, 3,0); | 620 pathB.cubicTo(0,4, 2,0, 3,0); |
621 pathB.close(); | 621 pathB.close(); |
622 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 622 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
623 } | 623 } |
624 | 624 |
625 static void cubicOp31x(skiatest::Reporter* reporter, const char* filename) { | 625 static void cubicOp31x(skiatest::Reporter* reporter, const char* filename) { |
626 SkPath path, pathB; | 626 SkPath path, pathB; |
627 path.setFillType(SkPath::kWinding_FillType); | 627 path.setFillType(SkPath::kWinding_FillType); |
628 path.moveTo(0,2); | 628 path.moveTo(0,2); |
629 path.cubicTo(0,3, 2,1, 4,0); | 629 path.cubicTo(0,3, 2,1, 4,0); |
630 path.close(); | 630 path.close(); |
631 pathB.setFillType(SkPath::kWinding_FillType); | 631 pathB.setFillType(SkPath::kWinding_FillType); |
632 pathB.moveTo(1,2); | 632 pathB.moveTo(1,2); |
633 pathB.cubicTo(0,4, 2,0, 3,0); | 633 pathB.cubicTo(0,4, 2,0, 3,0); |
634 pathB.close(); | 634 pathB.close(); |
635 testPathOp(reporter, path, pathB, kXOR_PathOp, filename); | 635 testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); |
636 } | 636 } |
637 | 637 |
638 static void cubicOp32d(skiatest::Reporter* reporter, const char* filename) { | 638 static void cubicOp32d(skiatest::Reporter* reporter, const char* filename) { |
639 SkPath path, pathB; | 639 SkPath path, pathB; |
640 path.setFillType(SkPath::kWinding_FillType); | 640 path.setFillType(SkPath::kWinding_FillType); |
641 path.moveTo(0,1); | 641 path.moveTo(0,1); |
642 path.cubicTo(1,2, 6,0, 3,1); | 642 path.cubicTo(1,2, 6,0, 3,1); |
643 path.close(); | 643 path.close(); |
644 pathB.setFillType(SkPath::kWinding_FillType); | 644 pathB.setFillType(SkPath::kWinding_FillType); |
645 pathB.moveTo(0,6); | 645 pathB.moveTo(0,6); |
646 pathB.cubicTo(1,3, 1,0, 2,1); | 646 pathB.cubicTo(1,3, 1,0, 2,1); |
647 pathB.close(); | 647 pathB.close(); |
648 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 648 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
649 } | 649 } |
650 | 650 |
651 static void cubicOp33i(skiatest::Reporter* reporter, const char* filename) { | 651 static void cubicOp33i(skiatest::Reporter* reporter, const char* filename) { |
652 SkPath path, pathB; | 652 SkPath path, pathB; |
653 path.setFillType(SkPath::kWinding_FillType); | 653 path.setFillType(SkPath::kWinding_FillType); |
654 path.moveTo(0,1); | 654 path.moveTo(0,1); |
655 path.cubicTo(1,2, 6,0, 3,1); | 655 path.cubicTo(1,2, 6,0, 3,1); |
656 path.close(); | 656 path.close(); |
657 pathB.setFillType(SkPath::kWinding_FillType); | 657 pathB.setFillType(SkPath::kWinding_FillType); |
658 pathB.moveTo(0,6); | 658 pathB.moveTo(0,6); |
659 pathB.cubicTo(1,3, 1,0, 2,1); | 659 pathB.cubicTo(1,3, 1,0, 2,1); |
660 pathB.close(); | 660 pathB.close(); |
661 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 661 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
662 } | 662 } |
663 | 663 |
664 static void cubicOp34d(skiatest::Reporter* reporter, const char* filename) { | 664 static void cubicOp34d(skiatest::Reporter* reporter, const char* filename) { |
665 SkPath path, pathB; | 665 SkPath path, pathB; |
666 path.setFillType(SkPath::kWinding_FillType); | 666 path.setFillType(SkPath::kWinding_FillType); |
667 path.moveTo(0,1); | 667 path.moveTo(0,1); |
668 path.cubicTo(3,5, 2,1, 3,1); | 668 path.cubicTo(3,5, 2,1, 3,1); |
669 path.close(); | 669 path.close(); |
670 pathB.setFillType(SkPath::kWinding_FillType); | 670 pathB.setFillType(SkPath::kWinding_FillType); |
671 pathB.moveTo(1,2); | 671 pathB.moveTo(1,2); |
672 pathB.cubicTo(1,3, 1,0, 5,3); | 672 pathB.cubicTo(1,3, 1,0, 5,3); |
673 pathB.close(); | 673 pathB.close(); |
674 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 674 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
675 } | 675 } |
676 | 676 |
677 static void cubicOp35d(skiatest::Reporter* reporter, const char* filename) { | 677 static void cubicOp35d(skiatest::Reporter* reporter, const char* filename) { |
678 SkPath path, pathB; | 678 SkPath path, pathB; |
679 path.setFillType(SkPath::kWinding_FillType); | 679 path.setFillType(SkPath::kWinding_FillType); |
680 path.moveTo(0,1); | 680 path.moveTo(0,1); |
681 path.cubicTo(1,5, 2,1, 4,0); | 681 path.cubicTo(1,5, 2,1, 4,0); |
682 path.close(); | 682 path.close(); |
683 pathB.setFillType(SkPath::kWinding_FillType); | 683 pathB.setFillType(SkPath::kWinding_FillType); |
684 pathB.moveTo(1,2); | 684 pathB.moveTo(1,2); |
685 pathB.cubicTo(0,4, 1,0, 5,1); | 685 pathB.cubicTo(0,4, 1,0, 5,1); |
686 pathB.close(); | 686 pathB.close(); |
687 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 687 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
688 } | 688 } |
689 | 689 |
690 static void cubicOp36u(skiatest::Reporter* reporter, const char* filename) { | 690 static void cubicOp36u(skiatest::Reporter* reporter, const char* filename) { |
691 SkPath path, pathB; | 691 SkPath path, pathB; |
692 path.setFillType(SkPath::kWinding_FillType); | 692 path.setFillType(SkPath::kWinding_FillType); |
693 path.moveTo(0,1); | 693 path.moveTo(0,1); |
694 path.cubicTo(1,6, 2,0, 5,1); | 694 path.cubicTo(1,6, 2,0, 5,1); |
695 path.close(); | 695 path.close(); |
696 pathB.setFillType(SkPath::kWinding_FillType); | 696 pathB.setFillType(SkPath::kWinding_FillType); |
697 pathB.moveTo(0,2); | 697 pathB.moveTo(0,2); |
698 pathB.cubicTo(1,5, 1,0, 6,1); | 698 pathB.cubicTo(1,5, 1,0, 6,1); |
699 pathB.close(); | 699 pathB.close(); |
700 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 700 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
701 } | 701 } |
702 | 702 |
703 static void cubicOp37d(skiatest::Reporter* reporter, const char* filename) { | 703 static void cubicOp37d(skiatest::Reporter* reporter, const char* filename) { |
704 SkPath path, pathB; | 704 SkPath path, pathB; |
705 path.setFillType(SkPath::kWinding_FillType); | 705 path.setFillType(SkPath::kWinding_FillType); |
706 path.moveTo(0,1); | 706 path.moveTo(0,1); |
707 path.cubicTo(2,6, 6,1, 4,3); | 707 path.cubicTo(2,6, 6,1, 4,3); |
708 path.close(); | 708 path.close(); |
709 pathB.setFillType(SkPath::kWinding_FillType); | 709 pathB.setFillType(SkPath::kWinding_FillType); |
710 pathB.moveTo(1,6); | 710 pathB.moveTo(1,6); |
711 pathB.cubicTo(3,4, 1,0, 6,2); | 711 pathB.cubicTo(3,4, 1,0, 6,2); |
712 pathB.close(); | 712 pathB.close(); |
713 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 713 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
714 } | 714 } |
715 | 715 |
716 // this fails to detect a cubic/cubic intersection | |
717 // the slight overlap is missed when the cubics are approximated by quadratics | |
718 // and the subsequent line/cubic intersection also (correctly) misses the inters
ection | |
719 // if the line/cubic was a matching line/approx.quadratic then the missing inter
section | |
720 // could have been detected | |
721 static void cubicOp38d(skiatest::Reporter* reporter, const char* filename) { | 716 static void cubicOp38d(skiatest::Reporter* reporter, const char* filename) { |
722 SkPath path, pathB; | 717 SkPath path, pathB; |
723 path.setFillType(SkPath::kWinding_FillType); | 718 path.setFillType(SkPath::kWinding_FillType); |
724 path.moveTo(0,1); | 719 path.moveTo(0,1); |
725 path.cubicTo(0,6, 3,2, 4,1); | 720 path.cubicTo(0,6, 3,2, 4,1); |
726 path.close(); | 721 path.close(); |
727 pathB.setFillType(SkPath::kWinding_FillType); | 722 pathB.setFillType(SkPath::kWinding_FillType); |
728 pathB.moveTo(2,3); | 723 pathB.moveTo(2,3); |
729 pathB.cubicTo(1,4, 1,0, 6,0); | 724 pathB.cubicTo(1,4, 1,0, 6,0); |
730 pathB.close(); | 725 pathB.close(); |
731 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 726 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
732 } | 727 } |
733 | 728 |
734 static void cubicOp39d(skiatest::Reporter* reporter, const char* filename) { | 729 static void cubicOp39d(skiatest::Reporter* reporter, const char* filename) { |
735 SkPath path, pathB; | 730 SkPath path, pathB; |
736 path.setFillType(SkPath::kWinding_FillType); | 731 path.setFillType(SkPath::kWinding_FillType); |
737 path.moveTo(0,1); | 732 path.moveTo(0,1); |
738 path.cubicTo(2,3, 5,1, 4,3); | 733 path.cubicTo(2,3, 5,1, 4,3); |
739 path.close(); | 734 path.close(); |
740 pathB.setFillType(SkPath::kWinding_FillType); | 735 pathB.setFillType(SkPath::kWinding_FillType); |
741 pathB.moveTo(1,5); | 736 pathB.moveTo(1,5); |
742 pathB.cubicTo(3,4, 1,0, 3,2); | 737 pathB.cubicTo(3,4, 1,0, 3,2); |
743 pathB.close(); | 738 pathB.close(); |
744 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 739 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
745 } | 740 } |
746 | 741 |
747 static void cubicOp40d(skiatest::Reporter* reporter, const char* filename) { | 742 static void cubicOp40d(skiatest::Reporter* reporter, const char* filename) { |
748 SkPath path, pathB; | 743 SkPath path, pathB; |
749 path.setFillType(SkPath::kWinding_FillType); | 744 path.setFillType(SkPath::kWinding_FillType); |
750 path.moveTo(0,1); | 745 path.moveTo(0,1); |
751 path.cubicTo(1,5, 3,2, 4,2); | 746 path.cubicTo(1,5, 3,2, 4,2); |
752 path.close(); | 747 path.close(); |
753 pathB.setFillType(SkPath::kWinding_FillType); | 748 pathB.setFillType(SkPath::kWinding_FillType); |
754 pathB.moveTo(2,3); | 749 pathB.moveTo(2,3); |
755 pathB.cubicTo(2,4, 1,0, 5,1); | 750 pathB.cubicTo(2,4, 1,0, 5,1); |
756 pathB.close(); | 751 pathB.close(); |
757 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 752 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
758 } | 753 } |
759 | 754 |
760 static void cubicOp41i(skiatest::Reporter* reporter, const char* filename) { | 755 static void cubicOp41i(skiatest::Reporter* reporter, const char* filename) { |
761 SkPath path, pathB; | 756 SkPath path, pathB; |
762 path.setFillType(SkPath::kWinding_FillType); | 757 path.setFillType(SkPath::kWinding_FillType); |
763 path.moveTo(0,1); | 758 path.moveTo(0,1); |
764 path.cubicTo(2,6, 4,3, 6,4); | 759 path.cubicTo(2,6, 4,3, 6,4); |
765 path.close(); | 760 path.close(); |
766 pathB.setFillType(SkPath::kWinding_FillType); | 761 pathB.setFillType(SkPath::kWinding_FillType); |
767 pathB.moveTo(3,4); | 762 pathB.moveTo(3,4); |
768 pathB.cubicTo(4,6, 1,0, 6,2); | 763 pathB.cubicTo(4,6, 1,0, 6,2); |
769 pathB.close(); | 764 pathB.close(); |
770 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 765 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
771 } | 766 } |
772 | 767 |
773 static void cubicOp42d(skiatest::Reporter* reporter, const char* filename) { | 768 static void cubicOp42d(skiatest::Reporter* reporter, const char* filename) { |
774 SkPath path, pathB; | 769 SkPath path, pathB; |
775 path.setFillType(SkPath::kWinding_FillType); | 770 path.setFillType(SkPath::kWinding_FillType); |
776 path.moveTo(0,1); | 771 path.moveTo(0,1); |
777 path.cubicTo(1,2, 6,5, 5,4); | 772 path.cubicTo(1,2, 6,5, 5,4); |
778 path.close(); | 773 path.close(); |
779 pathB.setFillType(SkPath::kWinding_FillType); | 774 pathB.setFillType(SkPath::kWinding_FillType); |
780 pathB.moveTo(5,6); | 775 pathB.moveTo(5,6); |
781 pathB.cubicTo(4,5, 1,0, 2,1); | 776 pathB.cubicTo(4,5, 1,0, 2,1); |
782 pathB.close(); | 777 pathB.close(); |
783 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 778 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
784 } | 779 } |
785 | 780 |
786 static void cubicOp43d(skiatest::Reporter* reporter, const char* filename) { | 781 static void cubicOp43d(skiatest::Reporter* reporter, const char* filename) { |
787 SkPath path, pathB; | 782 SkPath path, pathB; |
788 path.setFillType(SkPath::kWinding_FillType); | 783 path.setFillType(SkPath::kWinding_FillType); |
789 path.moveTo(0,2); | 784 path.moveTo(0,2); |
790 path.cubicTo(1,2, 4,0, 3,1); | 785 path.cubicTo(1,2, 4,0, 3,1); |
791 path.close(); | 786 path.close(); |
792 pathB.setFillType(SkPath::kWinding_FillType); | 787 pathB.setFillType(SkPath::kWinding_FillType); |
793 pathB.moveTo(0,4); | 788 pathB.moveTo(0,4); |
794 pathB.cubicTo(1,3, 2,0, 2,1); | 789 pathB.cubicTo(1,3, 2,0, 2,1); |
795 pathB.close(); | 790 pathB.close(); |
796 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 791 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
797 } | 792 } |
798 | 793 |
799 static void cubicOp44d(skiatest::Reporter* reporter, const char* filename) { | 794 static void cubicOp44d(skiatest::Reporter* reporter, const char* filename) { |
800 SkPath path, pathB; | 795 SkPath path, pathB; |
801 path.setFillType(SkPath::kWinding_FillType); | 796 path.setFillType(SkPath::kWinding_FillType); |
802 path.moveTo(0,2); | 797 path.moveTo(0,2); |
803 path.cubicTo(3,6, 4,0, 3,2); | 798 path.cubicTo(3,6, 4,0, 3,2); |
804 path.close(); | 799 path.close(); |
805 pathB.setFillType(SkPath::kWinding_FillType); | 800 pathB.setFillType(SkPath::kWinding_FillType); |
806 pathB.moveTo(0,4); | 801 pathB.moveTo(0,4); |
807 pathB.cubicTo(2,3, 2,0, 6,3); | 802 pathB.cubicTo(2,3, 2,0, 6,3); |
808 pathB.close(); | 803 pathB.close(); |
809 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 804 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
810 } | 805 } |
811 | 806 |
812 static void cubicOp45d(skiatest::Reporter* reporter, const char* filename) { | 807 static void cubicOp45d(skiatest::Reporter* reporter, const char* filename) { |
813 SkPath path, pathB; | 808 SkPath path, pathB; |
814 path.setFillType(SkPath::kWinding_FillType); | 809 path.setFillType(SkPath::kWinding_FillType); |
815 path.moveTo(0,2); | 810 path.moveTo(0,2); |
816 path.cubicTo(2,4, 4,0, 3,2); | 811 path.cubicTo(2,4, 4,0, 3,2); |
817 path.close(); | 812 path.close(); |
818 pathB.setFillType(SkPath::kWinding_FillType); | 813 pathB.setFillType(SkPath::kWinding_FillType); |
819 pathB.moveTo(0,4); | 814 pathB.moveTo(0,4); |
820 pathB.cubicTo(2,3, 2,0, 4,2); | 815 pathB.cubicTo(2,3, 2,0, 4,2); |
821 pathB.close(); | 816 pathB.close(); |
822 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 817 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
823 } | 818 } |
824 | 819 |
825 static void cubicOp46d(skiatest::Reporter* reporter, const char* filename) { | 820 static void cubicOp46d(skiatest::Reporter* reporter, const char* filename) { |
826 SkPath path, pathB; | 821 SkPath path, pathB; |
827 path.setFillType(SkPath::kWinding_FillType); | 822 path.setFillType(SkPath::kWinding_FillType); |
828 path.moveTo(0,2); | 823 path.moveTo(0,2); |
829 path.cubicTo(3,5, 5,0, 4,2); | 824 path.cubicTo(3,5, 5,0, 4,2); |
830 path.close(); | 825 path.close(); |
831 pathB.setFillType(SkPath::kWinding_FillType); | 826 pathB.setFillType(SkPath::kWinding_FillType); |
832 pathB.moveTo(0,5); | 827 pathB.moveTo(0,5); |
833 pathB.cubicTo(2,4, 2,0, 5,3); | 828 pathB.cubicTo(2,4, 2,0, 5,3); |
834 pathB.close(); | 829 pathB.close(); |
835 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 830 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
836 } | 831 } |
837 | 832 |
838 static void cubicOp47d(skiatest::Reporter* reporter, const char* filename) { | 833 static void cubicOp47d(skiatest::Reporter* reporter, const char* filename) { |
839 SkPath path, pathB; | 834 SkPath path, pathB; |
840 path.setFillType(SkPath::kWinding_FillType); | 835 path.setFillType(SkPath::kWinding_FillType); |
841 path.moveTo(0,1); | 836 path.moveTo(0,1); |
842 path.cubicTo(1,6, 6,2, 5,4); | 837 path.cubicTo(1,6, 6,2, 5,4); |
843 path.close(); | 838 path.close(); |
844 pathB.setFillType(SkPath::kWinding_FillType); | 839 pathB.setFillType(SkPath::kWinding_FillType); |
845 pathB.moveTo(2,6); | 840 pathB.moveTo(2,6); |
846 pathB.cubicTo(4,5, 1,0, 6,1); | 841 pathB.cubicTo(4,5, 1,0, 6,1); |
847 pathB.close(); | 842 pathB.close(); |
848 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 843 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
849 } | 844 } |
850 | 845 |
851 static void cubicOp48d(skiatest::Reporter* reporter, const char* filename) { | 846 static void cubicOp48d(skiatest::Reporter* reporter, const char* filename) { |
852 SkPath path, pathB; | 847 SkPath path, pathB; |
853 path.setFillType(SkPath::kWinding_FillType); | 848 path.setFillType(SkPath::kWinding_FillType); |
854 path.moveTo(0,2); | 849 path.moveTo(0,2); |
855 path.cubicTo(2,3, 5,1, 3,2); | 850 path.cubicTo(2,3, 5,1, 3,2); |
856 path.close(); | 851 path.close(); |
857 pathB.setFillType(SkPath::kWinding_FillType); | 852 pathB.setFillType(SkPath::kWinding_FillType); |
858 pathB.moveTo(1,5); | 853 pathB.moveTo(1,5); |
859 pathB.cubicTo(2,3, 2,0, 3,2); | 854 pathB.cubicTo(2,3, 2,0, 3,2); |
860 pathB.close(); | 855 pathB.close(); |
861 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 856 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
862 } | 857 } |
863 | 858 |
864 static void cubicOp49d(skiatest::Reporter* reporter, const char* filename) { | 859 static void cubicOp49d(skiatest::Reporter* reporter, const char* filename) { |
865 SkPath path, pathB; | 860 SkPath path, pathB; |
866 path.setFillType(SkPath::kWinding_FillType); | 861 path.setFillType(SkPath::kWinding_FillType); |
867 path.moveTo(0,2); | 862 path.moveTo(0,2); |
868 path.cubicTo(1,5, 3,2, 4,1); | 863 path.cubicTo(1,5, 3,2, 4,1); |
869 path.close(); | 864 path.close(); |
870 pathB.setFillType(SkPath::kWinding_FillType); | 865 pathB.setFillType(SkPath::kWinding_FillType); |
871 pathB.moveTo(2,3); | 866 pathB.moveTo(2,3); |
872 pathB.cubicTo(1,4, 2,0, 5,1); | 867 pathB.cubicTo(1,4, 2,0, 5,1); |
873 pathB.close(); | 868 pathB.close(); |
874 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 869 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
875 } | 870 } |
876 | 871 |
877 static void cubicOp50d(skiatest::Reporter* reporter, const char* filename) { | 872 static void cubicOp50d(skiatest::Reporter* reporter, const char* filename) { |
878 SkPath path, pathB; | 873 SkPath path, pathB; |
879 path.setFillType(SkPath::kWinding_FillType); | 874 path.setFillType(SkPath::kWinding_FillType); |
880 path.moveTo(0,3); | 875 path.moveTo(0,3); |
881 path.cubicTo(1,6, 5,0, 5,1); | 876 path.cubicTo(1,6, 5,0, 5,1); |
882 path.close(); | 877 path.close(); |
883 pathB.setFillType(SkPath::kWinding_FillType); | 878 pathB.setFillType(SkPath::kWinding_FillType); |
884 pathB.moveTo(0,5); | 879 pathB.moveTo(0,5); |
885 pathB.cubicTo(1,5, 3,0, 6,1); | 880 pathB.cubicTo(1,5, 3,0, 6,1); |
886 pathB.close(); | 881 pathB.close(); |
887 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 882 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
888 } | 883 } |
889 | 884 |
890 static void cubicOp51d(skiatest::Reporter* reporter, const char* filename) { | 885 static void cubicOp51d(skiatest::Reporter* reporter, const char* filename) { |
891 SkPath path, pathB; | 886 SkPath path, pathB; |
892 path.setFillType(SkPath::kWinding_FillType); | 887 path.setFillType(SkPath::kWinding_FillType); |
893 path.moveTo(0,3); | 888 path.moveTo(0,3); |
894 path.cubicTo(1,2, 4,1, 6,0); | 889 path.cubicTo(1,2, 4,1, 6,0); |
895 path.close(); | 890 path.close(); |
896 pathB.setFillType(SkPath::kWinding_FillType); | 891 pathB.setFillType(SkPath::kWinding_FillType); |
897 pathB.moveTo(1,4); | 892 pathB.moveTo(1,4); |
898 pathB.cubicTo(0,6, 3,0, 2,1); | 893 pathB.cubicTo(0,6, 3,0, 2,1); |
899 pathB.close(); | 894 pathB.close(); |
900 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 895 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
901 } | 896 } |
902 | 897 |
903 static void cubicOp52d(skiatest::Reporter* reporter, const char* filename) { | 898 static void cubicOp52d(skiatest::Reporter* reporter, const char* filename) { |
904 SkPath path, pathB; | 899 SkPath path, pathB; |
905 path.setFillType(SkPath::kWinding_FillType); | 900 path.setFillType(SkPath::kWinding_FillType); |
906 path.moveTo(0,2); | 901 path.moveTo(0,2); |
907 path.cubicTo(1,2, 5,4, 4,3); | 902 path.cubicTo(1,2, 5,4, 4,3); |
908 path.close(); | 903 path.close(); |
909 pathB.setFillType(SkPath::kWinding_FillType); | 904 pathB.setFillType(SkPath::kWinding_FillType); |
910 pathB.moveTo(4,5); | 905 pathB.moveTo(4,5); |
911 pathB.cubicTo(3,4, 2,0, 2,1); | 906 pathB.cubicTo(3,4, 2,0, 2,1); |
912 pathB.close(); | 907 pathB.close(); |
913 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 908 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
914 } | 909 } |
915 | 910 |
916 static void cubicOp53d(skiatest::Reporter* reporter, const char* filename) { | 911 static void cubicOp53d(skiatest::Reporter* reporter, const char* filename) { |
917 SkPath path, pathB; | 912 SkPath path, pathB; |
918 path.setFillType(SkPath::kWinding_FillType); | 913 path.setFillType(SkPath::kWinding_FillType); |
919 path.moveTo(0,3); | 914 path.moveTo(0,3); |
920 path.cubicTo(1,2, 5,3, 2,1); | 915 path.cubicTo(1,2, 5,3, 2,1); |
921 path.close(); | 916 path.close(); |
922 pathB.setFillType(SkPath::kWinding_FillType); | 917 pathB.setFillType(SkPath::kWinding_FillType); |
923 pathB.moveTo(3,5); | 918 pathB.moveTo(3,5); |
924 pathB.cubicTo(1,2, 3,0, 2,1); | 919 pathB.cubicTo(1,2, 3,0, 2,1); |
925 pathB.close(); | 920 pathB.close(); |
926 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 921 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
927 } | 922 } |
928 | 923 |
929 static void cubicOp54d(skiatest::Reporter* reporter, const char* filename) { | 924 static void cubicOp54d(skiatest::Reporter* reporter, const char* filename) { |
930 SkPath path, pathB; | 925 SkPath path, pathB; |
931 path.setFillType(SkPath::kWinding_FillType); | 926 path.setFillType(SkPath::kWinding_FillType); |
932 path.moveTo(0,4); | 927 path.moveTo(0,4); |
933 path.cubicTo(1,3, 5,4, 4,2); | 928 path.cubicTo(1,3, 5,4, 4,2); |
934 path.close(); | 929 path.close(); |
935 pathB.setFillType(SkPath::kWinding_FillType); | 930 pathB.setFillType(SkPath::kWinding_FillType); |
936 pathB.moveTo(4,5); | 931 pathB.moveTo(4,5); |
937 pathB.cubicTo(2,4, 4,0, 3,1); | 932 pathB.cubicTo(2,4, 4,0, 3,1); |
938 pathB.close(); | 933 pathB.close(); |
939 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 934 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
940 } | 935 } |
941 | 936 |
942 static void cubicOp55d(skiatest::Reporter* reporter, const char* filename) { | 937 static void cubicOp55d(skiatest::Reporter* reporter, const char* filename) { |
943 SkPath path, pathB; | 938 SkPath path, pathB; |
944 path.setFillType(SkPath::kWinding_FillType); | 939 path.setFillType(SkPath::kWinding_FillType); |
945 path.moveTo(0,5); | 940 path.moveTo(0,5); |
946 path.cubicTo(1,3, 3,2, 5,0); | 941 path.cubicTo(1,3, 3,2, 5,0); |
947 path.close(); | 942 path.close(); |
948 pathB.setFillType(SkPath::kWinding_FillType); | 943 pathB.setFillType(SkPath::kWinding_FillType); |
949 pathB.moveTo(2,3); | 944 pathB.moveTo(2,3); |
950 pathB.cubicTo(0,5, 5,0, 3,1); | 945 pathB.cubicTo(0,5, 5,0, 3,1); |
951 pathB.close(); | 946 pathB.close(); |
952 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 947 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
953 } | 948 } |
954 | 949 |
955 static void cubicOp56d(skiatest::Reporter* reporter, const char* filename) { | 950 static void cubicOp56d(skiatest::Reporter* reporter, const char* filename) { |
956 SkPath path, pathB; | 951 SkPath path, pathB; |
957 path.setFillType(SkPath::kWinding_FillType); | 952 path.setFillType(SkPath::kWinding_FillType); |
958 path.moveTo(0,1); | 953 path.moveTo(0,1); |
959 path.cubicTo(2,6, 5,0, 2,1); | 954 path.cubicTo(2,6, 5,0, 2,1); |
960 path.close(); | 955 path.close(); |
961 pathB.setFillType(SkPath::kWinding_FillType); | 956 pathB.setFillType(SkPath::kWinding_FillType); |
962 pathB.moveTo(0,5); | 957 pathB.moveTo(0,5); |
963 pathB.cubicTo(1,2, 1,0, 6,2); | 958 pathB.cubicTo(1,2, 1,0, 6,2); |
964 pathB.close(); | 959 pathB.close(); |
965 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 960 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
966 } | 961 } |
967 | 962 |
968 static void cubicOp57d(skiatest::Reporter* reporter, const char* filename) { | 963 static void cubicOp57d(skiatest::Reporter* reporter, const char* filename) { |
969 SkPath path, pathB; | 964 SkPath path, pathB; |
970 path.setFillType(SkPath::kWinding_FillType); | 965 path.setFillType(SkPath::kWinding_FillType); |
971 path.moveTo(0,5); | 966 path.moveTo(0,5); |
972 path.cubicTo(0,5, 5,4, 6,4); | 967 path.cubicTo(0,5, 5,4, 6,4); |
973 path.close(); | 968 path.close(); |
974 pathB.setFillType(SkPath::kWinding_FillType); | 969 pathB.setFillType(SkPath::kWinding_FillType); |
975 pathB.moveTo(4,5); | 970 pathB.moveTo(4,5); |
976 pathB.cubicTo(4,6, 5,0, 5,0); | 971 pathB.cubicTo(4,6, 5,0, 5,0); |
977 pathB.close(); | 972 pathB.close(); |
978 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 973 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
979 } | 974 } |
980 | 975 |
981 static void cubicOp58d(skiatest::Reporter* reporter, const char* filename) { | 976 static void cubicOp58d(skiatest::Reporter* reporter, const char* filename) { |
982 SkPath path, pathB; | 977 SkPath path, pathB; |
983 path.setFillType(SkPath::kWinding_FillType); | 978 path.setFillType(SkPath::kWinding_FillType); |
984 path.moveTo(0,5); | 979 path.moveTo(0,5); |
985 path.cubicTo(3,4, 6,5, 5,3); | 980 path.cubicTo(3,4, 6,5, 5,3); |
986 path.close(); | 981 path.close(); |
987 pathB.setFillType(SkPath::kWinding_FillType); | 982 pathB.setFillType(SkPath::kWinding_FillType); |
988 pathB.moveTo(5,6); | 983 pathB.moveTo(5,6); |
989 pathB.cubicTo(3,5, 5,0, 4,3); | 984 pathB.cubicTo(3,5, 5,0, 4,3); |
990 pathB.close(); | 985 pathB.close(); |
991 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 986 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
992 } | 987 } |
993 | 988 |
994 static void cubicOp59d(skiatest::Reporter* reporter, const char* filename) { | 989 static void cubicOp59d(skiatest::Reporter* reporter, const char* filename) { |
995 SkPath path, pathB; | 990 SkPath path, pathB; |
996 path.setFillType(SkPath::kWinding_FillType); | 991 path.setFillType(SkPath::kWinding_FillType); |
997 path.moveTo(0,1); | 992 path.moveTo(0,1); |
998 path.cubicTo(5,6, 4,0, 4,1); | 993 path.cubicTo(5,6, 4,0, 4,1); |
999 path.close(); | 994 path.close(); |
1000 pathB.setFillType(SkPath::kWinding_FillType); | 995 pathB.setFillType(SkPath::kWinding_FillType); |
1001 pathB.moveTo(0,4); | 996 pathB.moveTo(0,4); |
1002 pathB.cubicTo(1,4, 1,0, 6,5); | 997 pathB.cubicTo(1,4, 1,0, 6,5); |
1003 pathB.close(); | 998 pathB.close(); |
1004 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 999 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1005 } | 1000 } |
1006 | 1001 |
1007 static void cubicOp60d(skiatest::Reporter* reporter, const char* filename) { | 1002 static void cubicOp60d(skiatest::Reporter* reporter, const char* filename) { |
1008 SkPath path, pathB; | 1003 SkPath path, pathB; |
1009 path.setFillType(SkPath::kWinding_FillType); | 1004 path.setFillType(SkPath::kWinding_FillType); |
1010 path.moveTo(0,2); | 1005 path.moveTo(0,2); |
1011 path.cubicTo(4,6, 6,0, 5,2); | 1006 path.cubicTo(4,6, 6,0, 5,2); |
1012 path.close(); | 1007 path.close(); |
1013 pathB.setFillType(SkPath::kWinding_FillType); | 1008 pathB.setFillType(SkPath::kWinding_FillType); |
1014 pathB.moveTo(0,6); | 1009 pathB.moveTo(0,6); |
1015 pathB.cubicTo(2,5, 2,0, 6,4); | 1010 pathB.cubicTo(2,5, 2,0, 6,4); |
1016 pathB.close(); | 1011 pathB.close(); |
1017 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1012 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1018 } | 1013 } |
1019 | 1014 |
1020 static void cubicOp61d(skiatest::Reporter* reporter, const char* filename) { | 1015 static void cubicOp61d(skiatest::Reporter* reporter, const char* filename) { |
1021 SkPath path, pathB; | 1016 SkPath path, pathB; |
1022 path.setFillType(SkPath::kWinding_FillType); | 1017 path.setFillType(SkPath::kWinding_FillType); |
1023 path.moveTo(1,2); | 1018 path.moveTo(1,2); |
1024 path.cubicTo(0,5, 3,2, 6,1); | 1019 path.cubicTo(0,5, 3,2, 6,1); |
1025 path.close(); | 1020 path.close(); |
1026 pathB.setFillType(SkPath::kWinding_FillType); | 1021 pathB.setFillType(SkPath::kWinding_FillType); |
1027 pathB.moveTo(2,3); | 1022 pathB.moveTo(2,3); |
1028 pathB.cubicTo(1,6, 2,1, 5,0); | 1023 pathB.cubicTo(1,6, 2,1, 5,0); |
1029 pathB.close(); | 1024 pathB.close(); |
1030 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1025 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1031 } | 1026 } |
1032 | 1027 |
1033 static void cubicOp62d(skiatest::Reporter* reporter, const char* filename) { | 1028 static void cubicOp62d(skiatest::Reporter* reporter, const char* filename) { |
1034 SkPath path, pathB; | 1029 SkPath path, pathB; |
1035 path.setFillType(SkPath::kWinding_FillType); | 1030 path.setFillType(SkPath::kWinding_FillType); |
1036 path.moveTo(1,3); | 1031 path.moveTo(1,3); |
1037 path.cubicTo(5,6, 5,3, 5,4); | 1032 path.cubicTo(5,6, 5,3, 5,4); |
1038 path.close(); | 1033 path.close(); |
1039 pathB.setFillType(SkPath::kWinding_FillType); | 1034 pathB.setFillType(SkPath::kWinding_FillType); |
1040 pathB.moveTo(3,5); | 1035 pathB.moveTo(3,5); |
1041 pathB.cubicTo(4,5, 3,1, 6,5); | 1036 pathB.cubicTo(4,5, 3,1, 6,5); |
1042 pathB.close(); | 1037 pathB.close(); |
1043 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1038 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1044 } | 1039 } |
1045 | 1040 |
1046 static void cubicOp63d(skiatest::Reporter* reporter, const char* filename) { | 1041 static void cubicOp63d(skiatest::Reporter* reporter, const char* filename) { |
1047 SkPath path, pathB; | 1042 SkPath path, pathB; |
1048 path.setFillType(SkPath::kWinding_FillType); | 1043 path.setFillType(SkPath::kWinding_FillType); |
1049 path.moveTo(2,3); | 1044 path.moveTo(2,3); |
1050 path.cubicTo(0,4, 3,2, 5,3); | 1045 path.cubicTo(0,4, 3,2, 5,3); |
1051 path.close(); | 1046 path.close(); |
1052 pathB.setFillType(SkPath::kWinding_FillType); | 1047 pathB.setFillType(SkPath::kWinding_FillType); |
1053 pathB.moveTo(2,3); | 1048 pathB.moveTo(2,3); |
1054 pathB.cubicTo(3,5, 3,2, 4,0); | 1049 pathB.cubicTo(3,5, 3,2, 4,0); |
1055 pathB.close(); | 1050 pathB.close(); |
1056 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1051 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1057 } | 1052 } |
1058 | 1053 |
1059 static void cubicOp64d(skiatest::Reporter* reporter, const char* filename) { | 1054 static void cubicOp64d(skiatest::Reporter* reporter, const char* filename) { |
1060 SkPath path, pathB; | 1055 SkPath path, pathB; |
1061 path.moveTo(0,1); | 1056 path.moveTo(0,1); |
1062 path.cubicTo(0,1, 1,0, 3,0); | 1057 path.cubicTo(0,1, 1,0, 3,0); |
1063 path.lineTo(0,1); | 1058 path.lineTo(0,1); |
1064 path.close(); | 1059 path.close(); |
1065 pathB.moveTo(0,1); | 1060 pathB.moveTo(0,1); |
1066 pathB.cubicTo(0,3, 1,0, 1,0); | 1061 pathB.cubicTo(0,3, 1,0, 1,0); |
1067 pathB.lineTo(0,1); | 1062 pathB.lineTo(0,1); |
1068 pathB.close(); | 1063 pathB.close(); |
1069 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1064 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1070 } | 1065 } |
1071 | 1066 |
1072 static void cubicOp65d(skiatest::Reporter* reporter, const char* filename) { | 1067 static void cubicOp65d(skiatest::Reporter* reporter, const char* filename) { |
1073 SkPath path, pathB; | 1068 SkPath path, pathB; |
1074 path.moveTo(0,1); | 1069 path.moveTo(0,1); |
1075 path.cubicTo(1,5, 1,0, 1,0); | 1070 path.cubicTo(1,5, 1,0, 1,0); |
1076 path.lineTo(0,1); | 1071 path.lineTo(0,1); |
1077 path.close(); | 1072 path.close(); |
1078 pathB.moveTo(0,1); | 1073 pathB.moveTo(0,1); |
1079 pathB.cubicTo(0,1, 1,0, 5,1); | 1074 pathB.cubicTo(0,1, 1,0, 5,1); |
1080 pathB.lineTo(0,1); | 1075 pathB.lineTo(0,1); |
1081 pathB.close(); | 1076 pathB.close(); |
1082 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1077 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1083 } | 1078 } |
1084 | 1079 |
1085 static void rectOp1d(skiatest::Reporter* reporter, const char* filename) { | 1080 static void rectOp1d(skiatest::Reporter* reporter, const char* filename) { |
1086 SkPath path, pathB; | 1081 SkPath path, pathB; |
1087 path.moveTo(0,1); | 1082 path.moveTo(0,1); |
1088 path.cubicTo(0,1, 1,0, 3,0); | 1083 path.cubicTo(0,1, 1,0, 3,0); |
1089 path.lineTo(0,1); | 1084 path.lineTo(0,1); |
1090 path.close(); | 1085 path.close(); |
1091 pathB.moveTo(0,1); | 1086 pathB.moveTo(0,1); |
1092 pathB.cubicTo(0,3, 1,0, 1,0); | 1087 pathB.cubicTo(0,3, 1,0, 1,0); |
1093 pathB.lineTo(0,1); | 1088 pathB.lineTo(0,1); |
1094 pathB.close(); | 1089 pathB.close(); |
1095 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1090 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1096 } | 1091 } |
1097 | 1092 |
1098 static void cubicOp66u(skiatest::Reporter* reporter, const char* filename) { | 1093 static void cubicOp66u(skiatest::Reporter* reporter, const char* filename) { |
1099 SkPath path, pathB; | 1094 SkPath path, pathB; |
1100 path.setFillType(SkPath::kWinding_FillType); | 1095 path.setFillType(SkPath::kWinding_FillType); |
1101 path.moveTo(0,1); | 1096 path.moveTo(0,1); |
1102 path.cubicTo(2,6, 4,2, 5,3); | 1097 path.cubicTo(2,6, 4,2, 5,3); |
1103 path.close(); | 1098 path.close(); |
1104 pathB.setFillType(SkPath::kWinding_FillType); | 1099 pathB.setFillType(SkPath::kWinding_FillType); |
1105 pathB.moveTo(2,4); | 1100 pathB.moveTo(2,4); |
1106 pathB.cubicTo(3,5, 1,0, 6,2); | 1101 pathB.cubicTo(3,5, 1,0, 6,2); |
1107 pathB.close(); | 1102 pathB.close(); |
1108 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 1103 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
1109 } | 1104 } |
1110 | 1105 |
1111 static void cubicOp67u(skiatest::Reporter* reporter, const char* filename) { | 1106 static void cubicOp67u(skiatest::Reporter* reporter, const char* filename) { |
1112 SkPath path, pathB; | 1107 SkPath path, pathB; |
1113 path.moveTo(3,5); | 1108 path.moveTo(3,5); |
1114 path.cubicTo(1,6, 5,0, 3,1); | 1109 path.cubicTo(1,6, 5,0, 3,1); |
1115 path.lineTo(3,5); | 1110 path.lineTo(3,5); |
1116 path.close(); | 1111 path.close(); |
1117 pathB.moveTo(0,5); | 1112 pathB.moveTo(0,5); |
1118 pathB.cubicTo(1,3, 5,3, 6,1); | 1113 pathB.cubicTo(1,3, 5,3, 6,1); |
1119 pathB.lineTo(0,5); | 1114 pathB.lineTo(0,5); |
1120 pathB.close(); | 1115 pathB.close(); |
1121 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 1116 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
1122 } | 1117 } |
1123 | 1118 |
1124 static void cubicOp68u(skiatest::Reporter* reporter, const char* filename) { | 1119 static void cubicOp68u(skiatest::Reporter* reporter, const char* filename) { |
1125 SkPath path, pathB; | 1120 SkPath path, pathB; |
1126 path.moveTo(0,5); | 1121 path.moveTo(0,5); |
1127 path.cubicTo(4,5, 4,1, 5,0); | 1122 path.cubicTo(4,5, 4,1, 5,0); |
1128 path.close(); | 1123 path.close(); |
1129 pathB.moveTo(1,4); | 1124 pathB.moveTo(1,4); |
1130 pathB.cubicTo(0,5, 5,0, 5,4); | 1125 pathB.cubicTo(0,5, 5,0, 5,4); |
1131 pathB.close(); | 1126 pathB.close(); |
1132 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 1127 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
1133 } | 1128 } |
1134 | 1129 |
1135 static void cubicOp69d(skiatest::Reporter* reporter, const char* filename) { | 1130 static void cubicOp69d(skiatest::Reporter* reporter, const char* filename) { |
1136 SkPath path, pathB; | 1131 SkPath path, pathB; |
1137 path.moveTo(1,3); | 1132 path.moveTo(1,3); |
1138 path.cubicTo(0,1, 3,1, 2,0); | 1133 path.cubicTo(0,1, 3,1, 2,0); |
1139 path.close(); | 1134 path.close(); |
1140 pathB.moveTo(1,3); | 1135 pathB.moveTo(1,3); |
1141 pathB.cubicTo(0,2, 3,1, 1,0); | 1136 pathB.cubicTo(0,2, 3,1, 1,0); |
1142 pathB.close(); | 1137 pathB.close(); |
1143 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1138 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1144 } | 1139 } |
1145 | 1140 |
1146 SkPathOp ops[] = { | 1141 SkPathOp ops[] = { |
1147 kUnion_PathOp, | 1142 kUnion_SkPathOp, |
1148 kXOR_PathOp, | 1143 kXOR_SkPathOp, |
1149 kReverseDifference_PathOp, | 1144 kReverseDifference_SkPathOp, |
1150 kXOR_PathOp, | 1145 kXOR_SkPathOp, |
1151 kReverseDifference_PathOp, | 1146 kReverseDifference_SkPathOp, |
1152 }; | 1147 }; |
1153 | 1148 |
1154 static void rRect1(skiatest::Reporter* reporter, const char* filename) { | 1149 static void rRect1(skiatest::Reporter* reporter, const char* filename) { |
1155 SkScalar xA = 0.65f; | 1150 SkScalar xA = 0.65f; |
1156 SkScalar xB = 10.65f; | 1151 SkScalar xB = 10.65f; |
1157 SkScalar xC = 20.65f; | 1152 SkScalar xC = 20.65f; |
1158 SkScalar xD = 30.65f; | 1153 SkScalar xD = 30.65f; |
1159 SkScalar xE = 40.65f; | 1154 SkScalar xE = 40.65f; |
1160 SkScalar xF = 50.65f; | 1155 SkScalar xF = 50.65f; |
1161 | 1156 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 path.lineTo(191,8); | 1204 path.lineTo(191,8); |
1210 path.close(); | 1205 path.close(); |
1211 SkPath pathB; | 1206 SkPath pathB; |
1212 pathB.setFillType(SkPath::kWinding_FillType); | 1207 pathB.setFillType(SkPath::kWinding_FillType); |
1213 pathB.moveTo(189,4); | 1208 pathB.moveTo(189,4); |
1214 pathB.lineTo(199,14); | 1209 pathB.lineTo(199,14); |
1215 pathB.lineTo(236,14); | 1210 pathB.lineTo(236,14); |
1216 pathB.lineTo(246,4); | 1211 pathB.lineTo(246,4); |
1217 pathB.lineTo(189,4); | 1212 pathB.lineTo(189,4); |
1218 pathB.close(); | 1213 pathB.close(); |
1219 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1214 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1220 } | 1215 } |
1221 | 1216 |
1222 static void skp2(skiatest::Reporter* reporter, const char* filename) { | 1217 static void skp2(skiatest::Reporter* reporter, const char* filename) { |
1223 SkPath path; | 1218 SkPath path; |
1224 path.setFillType(SkPath::kEvenOdd_FillType); | 1219 path.setFillType(SkPath::kEvenOdd_FillType); |
1225 path.moveTo(253.000000f, 11757.0000f); | 1220 path.moveTo(253.000000f, 11757.0000f); |
1226 path.lineTo(253.000000f, 222.000000f); | 1221 path.lineTo(253.000000f, 222.000000f); |
1227 path.lineTo(823.000000f, 222.000000f); | 1222 path.lineTo(823.000000f, 222.000000f); |
1228 path.lineTo(823.000000f, 11757.0000f); | 1223 path.lineTo(823.000000f, 11757.0000f); |
1229 path.lineTo(253.000000f, 11757.0000f); | 1224 path.lineTo(253.000000f, 11757.0000f); |
1230 path.close(); | 1225 path.close(); |
1231 SkPath pathB; | 1226 SkPath pathB; |
1232 pathB.setFillType(SkPath::kWinding_FillType); | 1227 pathB.setFillType(SkPath::kWinding_FillType); |
1233 pathB.moveTo(258.000000f, 1028.00000f); | 1228 pathB.moveTo(258.000000f, 1028.00000f); |
1234 pathB.lineTo(258.000000f, 1027.00000f); | 1229 pathB.lineTo(258.000000f, 1027.00000f); |
1235 pathB.lineTo(823.000000f, 1027.00000f); | 1230 pathB.lineTo(823.000000f, 1027.00000f); |
1236 pathB.lineTo(823.000000f, 1028.00000f); | 1231 pathB.lineTo(823.000000f, 1028.00000f); |
1237 pathB.lineTo(258.000000f, 1028.00000f); | 1232 pathB.lineTo(258.000000f, 1028.00000f); |
1238 pathB.close(); | 1233 pathB.close(); |
1239 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1234 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1240 } | 1235 } |
1241 | 1236 |
1242 static void skp3(skiatest::Reporter* reporter, const char* filename) { | 1237 static void skp3(skiatest::Reporter* reporter, const char* filename) { |
1243 SkPath path; | 1238 SkPath path; |
1244 path.setFillType(SkPath::kEvenOdd_FillType); | 1239 path.setFillType(SkPath::kEvenOdd_FillType); |
1245 path.moveTo(717.000000f, 507.000000f); | 1240 path.moveTo(717.000000f, 507.000000f); |
1246 path.lineTo(717.000000f, 425.000000f); | 1241 path.lineTo(717.000000f, 425.000000f); |
1247 path.lineTo(973.000000f, 425.000000f); | 1242 path.lineTo(973.000000f, 425.000000f); |
1248 path.lineTo(973.000000f, 507.000000f); | 1243 path.lineTo(973.000000f, 507.000000f); |
1249 path.quadTo(973.000000f, 508.242645f, 972.121582f, 509.121613f); | 1244 path.quadTo(973.000000f, 508.242645f, 972.121582f, 509.121613f); |
(...skipping 11 matching lines...) Expand all Loading... |
1261 path.lineTo(719.000000f, 426.000000f); | 1256 path.lineTo(719.000000f, 426.000000f); |
1262 path.close(); | 1257 path.close(); |
1263 SkPath pathB; | 1258 SkPath pathB; |
1264 pathB.setFillType(SkPath::kWinding_FillType); | 1259 pathB.setFillType(SkPath::kWinding_FillType); |
1265 pathB.moveTo(717.000000f, 510.000000f); | 1260 pathB.moveTo(717.000000f, 510.000000f); |
1266 pathB.lineTo(760.000000f, 467.000000f); | 1261 pathB.lineTo(760.000000f, 467.000000f); |
1267 pathB.lineTo(930.000000f, 467.000000f); | 1262 pathB.lineTo(930.000000f, 467.000000f); |
1268 pathB.lineTo(973.000000f, 510.000000f); | 1263 pathB.lineTo(973.000000f, 510.000000f); |
1269 pathB.lineTo(717.000000f, 510.000000f); | 1264 pathB.lineTo(717.000000f, 510.000000f); |
1270 pathB.close(); | 1265 pathB.close(); |
1271 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1266 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1272 } | 1267 } |
1273 | 1268 |
1274 static void skp4(skiatest::Reporter* reporter, const char* filename) { | 1269 static void skp4(skiatest::Reporter* reporter, const char* filename) { |
1275 SkPath path; | 1270 SkPath path; |
1276 path.setFillType(SkPath::kEvenOdd_FillType); | 1271 path.setFillType(SkPath::kEvenOdd_FillType); |
1277 path.moveTo(230.756805f, 591.756775f); | 1272 path.moveTo(230.756805f, 591.756775f); |
1278 path.quadTo(232.514725f, 590.000000f, 235.000000f, 590.000000f); | 1273 path.quadTo(232.514725f, 590.000000f, 235.000000f, 590.000000f); |
1279 path.lineTo(300.000000f, 590.000000f); | 1274 path.lineTo(300.000000f, 590.000000f); |
1280 path.quadTo(302.485291f, 590.000000f, 304.243195f, 591.756775f); | 1275 path.quadTo(302.485291f, 590.000000f, 304.243195f, 591.756775f); |
1281 path.quadTo(306.000000f, 593.514709f, 306.000000f, 596.000000f); | 1276 path.quadTo(306.000000f, 593.514709f, 306.000000f, 596.000000f); |
(...skipping 11 matching lines...) Expand all Loading... |
1293 path.lineTo(231.000000f, 597.000000f); | 1288 path.lineTo(231.000000f, 597.000000f); |
1294 path.close(); | 1289 path.close(); |
1295 SkPath pathB; | 1290 SkPath pathB; |
1296 pathB.setFillType(SkPath::kWinding_FillType); | 1291 pathB.setFillType(SkPath::kWinding_FillType); |
1297 pathB.moveTo(306.000000f, 590.000000f); | 1292 pathB.moveTo(306.000000f, 590.000000f); |
1298 pathB.lineTo(292.000000f, 604.000000f); | 1293 pathB.lineTo(292.000000f, 604.000000f); |
1299 pathB.lineTo(305.000000f, 617.000000f); | 1294 pathB.lineTo(305.000000f, 617.000000f); |
1300 pathB.lineTo(306.000000f, 617.000000f); | 1295 pathB.lineTo(306.000000f, 617.000000f); |
1301 pathB.lineTo(306.000000f, 590.000000f); | 1296 pathB.lineTo(306.000000f, 590.000000f); |
1302 pathB.close(); | 1297 pathB.close(); |
1303 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1298 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1304 } | 1299 } |
1305 | 1300 |
1306 static void skp5(skiatest::Reporter* reporter, const char* filename) { | 1301 static void skp5(skiatest::Reporter* reporter, const char* filename) { |
1307 SkPath path; | 1302 SkPath path; |
1308 path.setFillType(SkPath::kEvenOdd_FillType); | 1303 path.setFillType(SkPath::kEvenOdd_FillType); |
1309 path.moveTo(18.0000000f, 226.000000f); | 1304 path.moveTo(18.0000000f, 226.000000f); |
1310 path.quadTo(14.6862917f, 226.000000f, 12.3423996f, 228.342407f); | 1305 path.quadTo(14.6862917f, 226.000000f, 12.3423996f, 228.342407f); |
1311 path.quadTo(10.0000000f, 230.686295f, 10.0000000f, 234.000000f); | 1306 path.quadTo(10.0000000f, 230.686295f, 10.0000000f, 234.000000f); |
1312 path.lineTo(10.0000000f, 253.000000f); | 1307 path.lineTo(10.0000000f, 253.000000f); |
1313 path.lineTo(1247.00000f, 253.000000f); | 1308 path.lineTo(1247.00000f, 253.000000f); |
1314 path.lineTo(1247.00000f, 234.000000f); | 1309 path.lineTo(1247.00000f, 234.000000f); |
1315 path.quadTo(1247.00000f, 230.686295f, 1244.65759f, 228.342407f); | 1310 path.quadTo(1247.00000f, 230.686295f, 1244.65759f, 228.342407f); |
1316 path.quadTo(1242.31372f, 226.000000f, 1239.00000f, 226.000000f); | 1311 path.quadTo(1242.31372f, 226.000000f, 1239.00000f, 226.000000f); |
1317 path.lineTo(18.0000000f, 226.000000f); | 1312 path.lineTo(18.0000000f, 226.000000f); |
1318 path.close(); | 1313 path.close(); |
1319 SkPath pathB; | 1314 SkPath pathB; |
1320 pathB.setFillType(SkPath::kInverseWinding_FillType); | 1315 pathB.setFillType(SkPath::kInverseWinding_FillType); |
1321 pathB.moveTo(18.0000000f, 226.000000f); | 1316 pathB.moveTo(18.0000000f, 226.000000f); |
1322 pathB.lineTo(1239.00000f, 226.000000f); | 1317 pathB.lineTo(1239.00000f, 226.000000f); |
1323 pathB.cubicTo(1243.41833f, 226.000000f, 1247.00000f, 229.581726f, 1247.00000
f, 234.000000f); | 1318 pathB.cubicTo(1243.41833f, 226.000000f, 1247.00000f, 229.581726f, 1247.00000
f, 234.000000f); |
1324 pathB.lineTo(1247.00000f, 252.000000f); | 1319 pathB.lineTo(1247.00000f, 252.000000f); |
1325 pathB.lineTo(10.0000000f, 252.000000f); | 1320 pathB.lineTo(10.0000000f, 252.000000f); |
1326 pathB.lineTo(10.0000000f, 234.000000f); | 1321 pathB.lineTo(10.0000000f, 234.000000f); |
1327 pathB.cubicTo(10.0000000f, 229.581726f, 13.5817204f, 226.000000f, 18.0000000
f, 226.000000f); | 1322 pathB.cubicTo(10.0000000f, 229.581726f, 13.5817204f, 226.000000f, 18.0000000
f, 226.000000f); |
1328 pathB.close(); | 1323 pathB.close(); |
1329 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1324 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1330 } | 1325 } |
1331 | 1326 |
1332 static void cubicOp70d(skiatest::Reporter* reporter, const char* filename) { | 1327 static void cubicOp70d(skiatest::Reporter* reporter, const char* filename) { |
1333 SkPath path, pathB; | 1328 SkPath path, pathB; |
1334 path.setFillType(SkPath::kWinding_FillType); | 1329 path.setFillType(SkPath::kWinding_FillType); |
1335 path.moveTo(0,1); | 1330 path.moveTo(0,1); |
1336 path.cubicTo(0,5, 4,0, 5,0); | 1331 path.cubicTo(0,5, 4,0, 5,0); |
1337 path.close(); | 1332 path.close(); |
1338 pathB.setFillType(SkPath::kWinding_FillType); | 1333 pathB.setFillType(SkPath::kWinding_FillType); |
1339 pathB.moveTo(0,4); | 1334 pathB.moveTo(0,4); |
1340 pathB.cubicTo(0,5, 1,0, 5,0); | 1335 pathB.cubicTo(0,5, 1,0, 5,0); |
1341 pathB.close(); | 1336 pathB.close(); |
1342 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1337 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1343 } | 1338 } |
1344 | 1339 |
1345 static void cubicOp71d(skiatest::Reporter* reporter, const char* filename) { | 1340 static void cubicOp71d(skiatest::Reporter* reporter, const char* filename) { |
1346 SkPath path, pathB; | 1341 SkPath path, pathB; |
1347 path.setFillType(SkPath::kWinding_FillType); | 1342 path.setFillType(SkPath::kWinding_FillType); |
1348 path.moveTo(0,1); | 1343 path.moveTo(0,1); |
1349 path.cubicTo(0,5, 4,1, 6,4); | 1344 path.cubicTo(0,5, 4,1, 6,4); |
1350 path.close(); | 1345 path.close(); |
1351 pathB.setFillType(SkPath::kWinding_FillType); | 1346 pathB.setFillType(SkPath::kWinding_FillType); |
1352 pathB.moveTo(1,4); | 1347 pathB.moveTo(1,4); |
1353 pathB.cubicTo(4,6, 1,0, 5,0); | 1348 pathB.cubicTo(4,6, 1,0, 5,0); |
1354 pathB.close(); | 1349 pathB.close(); |
1355 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1350 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1356 } | 1351 } |
1357 | 1352 |
1358 static void cubicOp72i(skiatest::Reporter* reporter, const char* filename) { | 1353 static void cubicOp72i(skiatest::Reporter* reporter, const char* filename) { |
1359 SkPath path, pathB; | 1354 SkPath path, pathB; |
1360 path.setFillType(SkPath::kWinding_FillType); | 1355 path.setFillType(SkPath::kWinding_FillType); |
1361 path.moveTo(0,1); | 1356 path.moveTo(0,1); |
1362 path.cubicTo(0,5, 5,2, 5,4); | 1357 path.cubicTo(0,5, 5,2, 5,4); |
1363 path.close(); | 1358 path.close(); |
1364 pathB.setFillType(SkPath::kWinding_FillType); | 1359 pathB.setFillType(SkPath::kWinding_FillType); |
1365 pathB.moveTo(2,5); | 1360 pathB.moveTo(2,5); |
1366 pathB.cubicTo(4,5, 1,0, 5,0); | 1361 pathB.cubicTo(4,5, 1,0, 5,0); |
1367 pathB.close(); | 1362 pathB.close(); |
1368 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1363 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1369 } | 1364 } |
1370 | 1365 |
1371 static void cubicOp73d(skiatest::Reporter* reporter, const char* filename) { | 1366 static void cubicOp73d(skiatest::Reporter* reporter, const char* filename) { |
1372 SkPath path, pathB; | 1367 SkPath path, pathB; |
1373 path.setFillType(SkPath::kWinding_FillType); | 1368 path.setFillType(SkPath::kWinding_FillType); |
1374 path.moveTo(0,1); | 1369 path.moveTo(0,1); |
1375 path.cubicTo(3,4, 4,0, 6,4); | 1370 path.cubicTo(3,4, 4,0, 6,4); |
1376 path.lineTo(0,1); | 1371 path.lineTo(0,1); |
1377 path.close(); | 1372 path.close(); |
1378 pathB.setFillType(SkPath::kWinding_FillType); | 1373 pathB.setFillType(SkPath::kWinding_FillType); |
1379 pathB.moveTo(0,4); | 1374 pathB.moveTo(0,4); |
1380 pathB.cubicTo(4,6, 1,0, 4,3); | 1375 pathB.cubicTo(4,6, 1,0, 4,3); |
1381 pathB.lineTo(0,4); | 1376 pathB.lineTo(0,4); |
1382 pathB.close(); | 1377 pathB.close(); |
1383 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1378 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1384 } | 1379 } |
1385 | 1380 |
1386 static void cubicOp74d(skiatest::Reporter* reporter, const char* filename) { | 1381 static void cubicOp74d(skiatest::Reporter* reporter, const char* filename) { |
1387 SkPath path, pathB; | 1382 SkPath path, pathB; |
1388 path.setFillType(SkPath::kWinding_FillType); | 1383 path.setFillType(SkPath::kWinding_FillType); |
1389 path.moveTo(0,1); | 1384 path.moveTo(0,1); |
1390 path.cubicTo(1,5, 5,1, 5,1); | 1385 path.cubicTo(1,5, 5,1, 5,1); |
1391 path.lineTo(0,1); | 1386 path.lineTo(0,1); |
1392 path.close(); | 1387 path.close(); |
1393 pathB.setFillType(SkPath::kWinding_FillType); | 1388 pathB.setFillType(SkPath::kWinding_FillType); |
1394 pathB.moveTo(1,5); | 1389 pathB.moveTo(1,5); |
1395 pathB.cubicTo(1,5, 1,0, 5,1); | 1390 pathB.cubicTo(1,5, 1,0, 5,1); |
1396 pathB.lineTo(1,5); | 1391 pathB.lineTo(1,5); |
1397 pathB.close(); | 1392 pathB.close(); |
1398 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1393 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1399 } | 1394 } |
1400 | 1395 |
1401 static void cubicOp75d(skiatest::Reporter* reporter, const char* filename) { | 1396 static void cubicOp75d(skiatest::Reporter* reporter, const char* filename) { |
1402 SkPath path, pathB; | 1397 SkPath path, pathB; |
1403 path.setFillType(SkPath::kWinding_FillType); | 1398 path.setFillType(SkPath::kWinding_FillType); |
1404 path.moveTo(0,1); | 1399 path.moveTo(0,1); |
1405 path.cubicTo(0,4, 5,1, 6,4); | 1400 path.cubicTo(0,4, 5,1, 6,4); |
1406 path.lineTo(0,1); | 1401 path.lineTo(0,1); |
1407 path.close(); | 1402 path.close(); |
1408 pathB.setFillType(SkPath::kWinding_FillType); | 1403 pathB.setFillType(SkPath::kWinding_FillType); |
1409 pathB.moveTo(1,5); | 1404 pathB.moveTo(1,5); |
1410 pathB.cubicTo(4,6, 1,0, 4,0); | 1405 pathB.cubicTo(4,6, 1,0, 4,0); |
1411 pathB.lineTo(1,5); | 1406 pathB.lineTo(1,5); |
1412 pathB.close(); | 1407 pathB.close(); |
1413 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1408 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1414 } | 1409 } |
1415 | 1410 |
1416 static void cubicOp76u(skiatest::Reporter* reporter, const char* filename) { | 1411 static void cubicOp76u(skiatest::Reporter* reporter, const char* filename) { |
1417 SkPath path, pathB; | 1412 SkPath path, pathB; |
1418 path.setFillType(SkPath::kWinding_FillType); | 1413 path.setFillType(SkPath::kWinding_FillType); |
1419 path.moveTo(0,1); | 1414 path.moveTo(0,1); |
1420 path.cubicTo(0,2, 2,0, 5,3); | 1415 path.cubicTo(0,2, 2,0, 5,3); |
1421 path.close(); | 1416 path.close(); |
1422 pathB.setFillType(SkPath::kWinding_FillType); | 1417 pathB.setFillType(SkPath::kWinding_FillType); |
1423 pathB.moveTo(0,2); | 1418 pathB.moveTo(0,2); |
1424 pathB.cubicTo(3,5, 1,0, 2,0); | 1419 pathB.cubicTo(3,5, 1,0, 2,0); |
1425 pathB.close(); | 1420 pathB.close(); |
1426 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 1421 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
1427 } | 1422 } |
1428 | 1423 |
1429 static void cubicOp77i(skiatest::Reporter* reporter, const char* filename) { | 1424 static void cubicOp77i(skiatest::Reporter* reporter, const char* filename) { |
1430 SkPath path, pathB; | 1425 SkPath path, pathB; |
1431 path.setFillType(SkPath::kEvenOdd_FillType); | 1426 path.setFillType(SkPath::kEvenOdd_FillType); |
1432 path.moveTo(0,1); | 1427 path.moveTo(0,1); |
1433 path.cubicTo(1,3, 2,0, 3,2); | 1428 path.cubicTo(1,3, 2,0, 3,2); |
1434 path.lineTo(0,1); | 1429 path.lineTo(0,1); |
1435 path.close(); | 1430 path.close(); |
1436 pathB.setFillType(SkPath::kEvenOdd_FillType); | 1431 pathB.setFillType(SkPath::kEvenOdd_FillType); |
1437 pathB.moveTo(0,2); | 1432 pathB.moveTo(0,2); |
1438 pathB.cubicTo(2,3, 1,0, 3,1); | 1433 pathB.cubicTo(2,3, 1,0, 3,1); |
1439 pathB.lineTo(0,2); | 1434 pathB.lineTo(0,2); |
1440 pathB.close(); | 1435 pathB.close(); |
1441 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1436 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1442 } | 1437 } |
1443 | 1438 |
1444 static void cubicOp78u(skiatest::Reporter* reporter, const char* filename) { | 1439 static void cubicOp78u(skiatest::Reporter* reporter, const char* filename) { |
1445 SkPath path, pathB; | 1440 SkPath path, pathB; |
1446 path.setFillType(SkPath::kEvenOdd_FillType); | 1441 path.setFillType(SkPath::kEvenOdd_FillType); |
1447 path.moveTo(1,6); | 1442 path.moveTo(1,6); |
1448 path.cubicTo(1,6, 5,0, 6,1); | 1443 path.cubicTo(1,6, 5,0, 6,1); |
1449 path.lineTo(1,6); | 1444 path.lineTo(1,6); |
1450 path.close(); | 1445 path.close(); |
1451 pathB.setFillType(SkPath::kEvenOdd_FillType); | 1446 pathB.setFillType(SkPath::kEvenOdd_FillType); |
1452 pathB.moveTo(0,5); | 1447 pathB.moveTo(0,5); |
1453 pathB.cubicTo(1,6, 6,1, 6,1); | 1448 pathB.cubicTo(1,6, 6,1, 6,1); |
1454 pathB.lineTo(0,5); | 1449 pathB.lineTo(0,5); |
1455 pathB.close(); | 1450 pathB.close(); |
1456 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 1451 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
1457 } | 1452 } |
1458 | 1453 |
1459 static void cubicOp79u(skiatest::Reporter* reporter, const char* filename) { | 1454 static void cubicOp79u(skiatest::Reporter* reporter, const char* filename) { |
1460 SkPath path, pathB; | 1455 SkPath path, pathB; |
1461 path.setFillType(SkPath::kWinding_FillType); | 1456 path.setFillType(SkPath::kWinding_FillType); |
1462 path.moveTo(0,1); | 1457 path.moveTo(0,1); |
1463 path.cubicTo(1,3, 1,0, 6,4); | 1458 path.cubicTo(1,3, 1,0, 6,4); |
1464 path.close(); | 1459 path.close(); |
1465 pathB.setFillType(SkPath::kWinding_FillType); | 1460 pathB.setFillType(SkPath::kWinding_FillType); |
1466 pathB.moveTo(0,1); | 1461 pathB.moveTo(0,1); |
1467 pathB.cubicTo(4,6, 1,0, 3,1); | 1462 pathB.cubicTo(4,6, 1,0, 3,1); |
1468 pathB.close(); | 1463 pathB.close(); |
1469 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1464 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1470 } | 1465 } |
1471 | 1466 |
1472 static void cubicOp80i(skiatest::Reporter* reporter, const char* filename) { | 1467 static void cubicOp80i(skiatest::Reporter* reporter, const char* filename) { |
1473 SkPath path, pathB; | 1468 SkPath path, pathB; |
1474 path.setFillType(SkPath::kWinding_FillType); | 1469 path.setFillType(SkPath::kWinding_FillType); |
1475 path.moveTo(0,1); | 1470 path.moveTo(0,1); |
1476 path.cubicTo(2,3, 2,1, 4,3); | 1471 path.cubicTo(2,3, 2,1, 4,3); |
1477 path.lineTo(0,1); | 1472 path.lineTo(0,1); |
1478 path.close(); | 1473 path.close(); |
1479 pathB.setFillType(SkPath::kWinding_FillType); | 1474 pathB.setFillType(SkPath::kWinding_FillType); |
1480 pathB.moveTo(1,2); | 1475 pathB.moveTo(1,2); |
1481 pathB.cubicTo(3,4, 1,0, 3,2); | 1476 pathB.cubicTo(3,4, 1,0, 3,2); |
1482 pathB.lineTo(1,2); | 1477 pathB.lineTo(1,2); |
1483 pathB.close(); | 1478 pathB.close(); |
1484 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1479 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1485 } | 1480 } |
1486 | 1481 |
1487 static void cubicOp81d(skiatest::Reporter* reporter, const char* filename) { | 1482 static void cubicOp81d(skiatest::Reporter* reporter, const char* filename) { |
1488 SkPath path, pathB; | 1483 SkPath path, pathB; |
1489 path.setFillType(SkPath::kWinding_FillType); | 1484 path.setFillType(SkPath::kWinding_FillType); |
1490 path.moveTo(0,1); | 1485 path.moveTo(0,1); |
1491 path.cubicTo(4,6, 4,3, 5,4); | 1486 path.cubicTo(4,6, 4,3, 5,4); |
1492 path.close(); | 1487 path.close(); |
1493 pathB.setFillType(SkPath::kWinding_FillType); | 1488 pathB.setFillType(SkPath::kWinding_FillType); |
1494 pathB.moveTo(3,4); | 1489 pathB.moveTo(3,4); |
1495 pathB.cubicTo(4,5, 1,0, 6,4); | 1490 pathB.cubicTo(4,5, 1,0, 6,4); |
1496 pathB.close(); | 1491 pathB.close(); |
1497 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1492 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1498 } | 1493 } |
1499 | 1494 |
1500 static void cubicOp82i(skiatest::Reporter* reporter, const char* filename) { | 1495 static void cubicOp82i(skiatest::Reporter* reporter, const char* filename) { |
1501 SkPath path, pathB; | 1496 SkPath path, pathB; |
1502 path.setFillType(SkPath::kEvenOdd_FillType); | 1497 path.setFillType(SkPath::kEvenOdd_FillType); |
1503 path.moveTo(0,1); | 1498 path.moveTo(0,1); |
1504 path.cubicTo(2,3, 5,2, 3,0); | 1499 path.cubicTo(2,3, 5,2, 3,0); |
1505 path.lineTo(0,1); | 1500 path.lineTo(0,1); |
1506 path.close(); | 1501 path.close(); |
1507 pathB.setFillType(SkPath::kWinding_FillType); | 1502 pathB.setFillType(SkPath::kWinding_FillType); |
1508 pathB.moveTo(2,5); | 1503 pathB.moveTo(2,5); |
1509 pathB.cubicTo(0,3, 1,0, 3,2); | 1504 pathB.cubicTo(0,3, 1,0, 3,2); |
1510 pathB.lineTo(2,5); | 1505 pathB.lineTo(2,5); |
1511 pathB.close(); | 1506 pathB.close(); |
1512 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1507 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1513 } | 1508 } |
1514 | 1509 |
1515 static void cubicOp83i(skiatest::Reporter* reporter, const char* filename) { | 1510 static void cubicOp83i(skiatest::Reporter* reporter, const char* filename) { |
1516 SkPath path, pathB; | 1511 SkPath path, pathB; |
1517 path.setFillType(SkPath::kWinding_FillType); | 1512 path.setFillType(SkPath::kWinding_FillType); |
1518 path.moveTo(0,1); | 1513 path.moveTo(0,1); |
1519 path.cubicTo(0,3, 2,1, 4,1); | 1514 path.cubicTo(0,3, 2,1, 4,1); |
1520 path.lineTo(0,1); | 1515 path.lineTo(0,1); |
1521 path.close(); | 1516 path.close(); |
1522 pathB.setFillType(SkPath::kWinding_FillType); | 1517 pathB.setFillType(SkPath::kWinding_FillType); |
1523 pathB.moveTo(1,2); | 1518 pathB.moveTo(1,2); |
1524 pathB.cubicTo(1,4, 1,0, 3,0); | 1519 pathB.cubicTo(1,4, 1,0, 3,0); |
1525 pathB.lineTo(1,2); | 1520 pathB.lineTo(1,2); |
1526 pathB.close(); | 1521 pathB.close(); |
1527 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1522 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1528 } | 1523 } |
1529 | 1524 |
1530 static void cubicOp84d(skiatest::Reporter* reporter, const char* filename) { | 1525 static void cubicOp84d(skiatest::Reporter* reporter, const char* filename) { |
1531 SkPath path, pathB; | 1526 SkPath path, pathB; |
1532 path.setFillType(SkPath::kWinding_FillType); | 1527 path.setFillType(SkPath::kWinding_FillType); |
1533 path.moveTo(0,4); | 1528 path.moveTo(0,4); |
1534 path.cubicTo(2,3, 6,3, 3,2); | 1529 path.cubicTo(2,3, 6,3, 3,2); |
1535 path.close(); | 1530 path.close(); |
1536 pathB.setFillType(SkPath::kWinding_FillType); | 1531 pathB.setFillType(SkPath::kWinding_FillType); |
1537 pathB.moveTo(3,6); | 1532 pathB.moveTo(3,6); |
1538 pathB.cubicTo(2,3, 4,0, 3,2); | 1533 pathB.cubicTo(2,3, 4,0, 3,2); |
1539 pathB.close(); | 1534 pathB.close(); |
1540 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1535 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1541 } | 1536 } |
1542 | 1537 |
1543 static void skpClip1(skiatest::Reporter* reporter, const char* filename) { | 1538 static void skpClip1(skiatest::Reporter* reporter, const char* filename) { |
1544 SkPath path; | 1539 SkPath path; |
1545 path.setFillType(SkPath::kEvenOdd_FillType); | 1540 path.setFillType(SkPath::kEvenOdd_FillType); |
1546 path.moveTo(1126.17114f, 877.171204f); | 1541 path.moveTo(1126.17114f, 877.171204f); |
1547 path.quadTo(1127.34314f, 876.000000f, 1129.00000f, 876.000000f); | 1542 path.quadTo(1127.34314f, 876.000000f, 1129.00000f, 876.000000f); |
1548 path.lineTo(1243.00000f, 876.000000f); | 1543 path.lineTo(1243.00000f, 876.000000f); |
1549 path.quadTo(1244.65686f, 876.000000f, 1245.82886f, 877.171204f); | 1544 path.quadTo(1244.65686f, 876.000000f, 1245.82886f, 877.171204f); |
1550 path.quadTo(1247.00000f, 878.343140f, 1247.00000f, 880.000000f); | 1545 path.quadTo(1247.00000f, 878.343140f, 1247.00000f, 880.000000f); |
1551 path.lineTo(1247.00000f, 907.000000f); | 1546 path.lineTo(1247.00000f, 907.000000f); |
1552 path.lineTo(1246.00000f, 907.000000f); | 1547 path.lineTo(1246.00000f, 907.000000f); |
1553 path.lineTo(1246.00000f, 880.000000f); | 1548 path.lineTo(1246.00000f, 880.000000f); |
1554 path.cubicTo(1246.00000f, 878.343140f, 1244.65686f, 877.000000f, 1243.00000f
, 877.000000f); | 1549 path.cubicTo(1246.00000f, 878.343140f, 1244.65686f, 877.000000f, 1243.00000f
, 877.000000f); |
1555 path.lineTo(1129.00000f, 877.000000f); | 1550 path.lineTo(1129.00000f, 877.000000f); |
1556 path.cubicTo(1127.34314f, 877.000000f, 1126.00000f, 878.343140f, 1126.00000f
, 880.000000f); | 1551 path.cubicTo(1127.34314f, 877.000000f, 1126.00000f, 878.343140f, 1126.00000f
, 880.000000f); |
1557 path.lineTo(1126.00000f, 907.000000f); | 1552 path.lineTo(1126.00000f, 907.000000f); |
1558 path.lineTo(1125.00000f, 907.000000f); | 1553 path.lineTo(1125.00000f, 907.000000f); |
1559 path.lineTo(1125.00000f, 880.000000f); | 1554 path.lineTo(1125.00000f, 880.000000f); |
1560 path.quadTo(1125.00000f, 878.343140f, 1126.17114f, 877.171204f); | 1555 path.quadTo(1125.00000f, 878.343140f, 1126.17114f, 877.171204f); |
1561 path.close(); | 1556 path.close(); |
1562 SkPath pathB; | 1557 SkPath pathB; |
1563 pathB.setFillType(SkPath::kWinding_FillType); | 1558 pathB.setFillType(SkPath::kWinding_FillType); |
1564 pathB.moveTo(1247.00000f, 876.000000f); | 1559 pathB.moveTo(1247.00000f, 876.000000f); |
1565 pathB.lineTo(1231.00000f, 892.000000f); | 1560 pathB.lineTo(1231.00000f, 892.000000f); |
1566 pathB.lineTo(1246.00000f, 907.000000f); | 1561 pathB.lineTo(1246.00000f, 907.000000f); |
1567 pathB.lineTo(1247.00000f, 907.000000f); | 1562 pathB.lineTo(1247.00000f, 907.000000f); |
1568 pathB.lineTo(1247.00000f, 876.000000f); | 1563 pathB.lineTo(1247.00000f, 876.000000f); |
1569 pathB.close(); | 1564 pathB.close(); |
1570 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1565 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1571 } | 1566 } |
1572 | 1567 |
1573 static void skpClip2(skiatest::Reporter* reporter, const char* filename) { | 1568 static void skpClip2(skiatest::Reporter* reporter, const char* filename) { |
1574 SkPath path; | 1569 SkPath path; |
1575 path.setFillType(SkPath::kEvenOdd_FillType); | 1570 path.setFillType(SkPath::kEvenOdd_FillType); |
1576 path.moveTo(134.000000f, 11414.0000f); | 1571 path.moveTo(134.000000f, 11414.0000f); |
1577 path.cubicTo(131.990234f, 11414.0000f, 130.326660f, 11415.4824f, 130.042755f
, 11417.4131f); | 1572 path.cubicTo(131.990234f, 11414.0000f, 130.326660f, 11415.4824f, 130.042755f
, 11417.4131f); |
1578 path.cubicTo(130.233124f, 11418.3193f, 131.037079f, 11419.0000f, 132.000000f
, 11419.0000f); | 1573 path.cubicTo(130.233124f, 11418.3193f, 131.037079f, 11419.0000f, 132.000000f
, 11419.0000f); |
1579 path.lineTo(806.000000f, 11419.0000f); | 1574 path.lineTo(806.000000f, 11419.0000f); |
1580 path.cubicTo(806.962891f, 11419.0000f, 807.766907f, 11418.3193f, 807.957275f
, 11417.4131f); | 1575 path.cubicTo(806.962891f, 11419.0000f, 807.766907f, 11418.3193f, 807.957275f
, 11417.4131f); |
1581 path.cubicTo(807.673401f, 11415.4824f, 806.009766f, 11414.0000f, 804.000000f
, 11414.0000f); | 1576 path.cubicTo(807.673401f, 11415.4824f, 806.009766f, 11414.0000f, 804.000000f
, 11414.0000f); |
1582 path.lineTo(134.000000f, 11414.0000f); | 1577 path.lineTo(134.000000f, 11414.0000f); |
1583 path.close(); | 1578 path.close(); |
1584 SkPath pathB; | 1579 SkPath pathB; |
1585 pathB.setFillType(SkPath::kInverseWinding_FillType); | 1580 pathB.setFillType(SkPath::kInverseWinding_FillType); |
1586 pathB.moveTo(132.000000f, 11415.0000f); | 1581 pathB.moveTo(132.000000f, 11415.0000f); |
1587 pathB.lineTo(806.000000f, 11415.0000f); | 1582 pathB.lineTo(806.000000f, 11415.0000f); |
1588 pathB.cubicTo(807.104553f, 11415.0000f, 808.000000f, 11415.4473f, 808.000000
f, 11416.0000f); | 1583 pathB.cubicTo(807.104553f, 11415.0000f, 808.000000f, 11415.4473f, 808.000000
f, 11416.0000f); |
1589 pathB.lineTo(808.000000f, 11417.0000f); | 1584 pathB.lineTo(808.000000f, 11417.0000f); |
1590 pathB.cubicTo(808.000000f, 11418.1045f, 807.104553f, 11419.0000f, 806.000000
f, 11419.0000f); | 1585 pathB.cubicTo(808.000000f, 11418.1045f, 807.104553f, 11419.0000f, 806.000000
f, 11419.0000f); |
1591 pathB.lineTo(132.000000f, 11419.0000f); | 1586 pathB.lineTo(132.000000f, 11419.0000f); |
1592 pathB.cubicTo(130.895432f, 11419.0000f, 130.000000f, 11418.1045f, 130.000000
f, 11417.0000f); | 1587 pathB.cubicTo(130.895432f, 11419.0000f, 130.000000f, 11418.1045f, 130.000000
f, 11417.0000f); |
1593 pathB.lineTo(130.000000f, 11416.0000f); | 1588 pathB.lineTo(130.000000f, 11416.0000f); |
1594 pathB.cubicTo(130.000000f, 11415.4473f, 130.895432f, 11415.0000f, 132.000000
f, 11415.0000f); | 1589 pathB.cubicTo(130.000000f, 11415.4473f, 130.895432f, 11415.0000f, 132.000000
f, 11415.0000f); |
1595 pathB.close(); | 1590 pathB.close(); |
1596 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1591 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1597 } | 1592 } |
1598 | 1593 |
1599 static void skp96prezzi1(skiatest::Reporter* reporter, const char* filename) { | 1594 static void skp96prezzi1(skiatest::Reporter* reporter, const char* filename) { |
1600 SkPath path; | 1595 SkPath path; |
1601 path.setFillType(SkPath::kEvenOdd_FillType); | 1596 path.setFillType(SkPath::kEvenOdd_FillType); |
1602 path.moveTo(157.464005f, 670.463989f); | 1597 path.moveTo(157.464005f, 670.463989f); |
1603 path.quadTo(158.928925f, 669.000000f, 161.000000f, 669.000000f); | 1598 path.quadTo(158.928925f, 669.000000f, 161.000000f, 669.000000f); |
1604 path.lineTo(248.000000f, 669.000000f); | 1599 path.lineTo(248.000000f, 669.000000f); |
1605 path.quadTo(250.071075f, 669.000000f, 251.535995f, 670.463989f); | 1600 path.quadTo(250.071075f, 669.000000f, 251.535995f, 670.463989f); |
1606 path.quadTo(253.000000f, 671.928955f, 253.000000f, 674.000000f); | 1601 path.quadTo(253.000000f, 671.928955f, 253.000000f, 674.000000f); |
1607 path.lineTo(253.000000f, 706.000000f); | 1602 path.lineTo(253.000000f, 706.000000f); |
1608 path.lineTo(251.000000f, 706.000000f); | 1603 path.lineTo(251.000000f, 706.000000f); |
1609 path.lineTo(251.000000f, 675.000000f); | 1604 path.lineTo(251.000000f, 675.000000f); |
1610 path.cubicTo(251.000000f, 672.790833f, 249.209137f, 671.000000f, 247.000000f
, 671.000000f); | 1605 path.cubicTo(251.000000f, 672.790833f, 249.209137f, 671.000000f, 247.000000f
, 671.000000f); |
1611 path.lineTo(162.000000f, 671.000000f); | 1606 path.lineTo(162.000000f, 671.000000f); |
1612 path.cubicTo(159.790863f, 671.000000f, 158.000000f, 672.790833f, 158.000000f
, 675.000000f); | 1607 path.cubicTo(159.790863f, 671.000000f, 158.000000f, 672.790833f, 158.000000f
, 675.000000f); |
1613 path.lineTo(158.000000f, 706.000000f); | 1608 path.lineTo(158.000000f, 706.000000f); |
1614 path.lineTo(156.000000f, 706.000000f); | 1609 path.lineTo(156.000000f, 706.000000f); |
1615 path.lineTo(156.000000f, 674.000000f); | 1610 path.lineTo(156.000000f, 674.000000f); |
1616 path.quadTo(156.000000f, 671.928955f, 157.464005f, 670.463989f); | 1611 path.quadTo(156.000000f, 671.928955f, 157.464005f, 670.463989f); |
1617 path.close(); | 1612 path.close(); |
1618 SkPath pathB; | 1613 SkPath pathB; |
1619 pathB.setFillType(SkPath::kWinding_FillType); | 1614 pathB.setFillType(SkPath::kWinding_FillType); |
1620 pathB.moveTo(156.000000f, 669.000000f); | 1615 pathB.moveTo(156.000000f, 669.000000f); |
1621 pathB.lineTo(178.500000f, 691.500000f); | 1616 pathB.lineTo(178.500000f, 691.500000f); |
1622 pathB.lineTo(230.500000f, 691.500000f); | 1617 pathB.lineTo(230.500000f, 691.500000f); |
1623 pathB.lineTo(253.000000f, 669.000000f); | 1618 pathB.lineTo(253.000000f, 669.000000f); |
1624 pathB.lineTo(156.000000f, 669.000000f); | 1619 pathB.lineTo(156.000000f, 669.000000f); |
1625 pathB.close(); | 1620 pathB.close(); |
1626 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1621 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1627 } | 1622 } |
1628 | 1623 |
1629 static void skpancestry_com1(skiatest::Reporter* reporter, const char* filename)
{ | 1624 static void skpancestry_com1(skiatest::Reporter* reporter, const char* filename)
{ |
1630 SkPath path; | 1625 SkPath path; |
1631 path.setFillType(SkPath::kEvenOdd_FillType); | 1626 path.setFillType(SkPath::kEvenOdd_FillType); |
1632 path.moveTo(161.000000f, 925.000000f); | 1627 path.moveTo(161.000000f, 925.000000f); |
1633 path.cubicTo(159.874390f, 925.000000f, 158.835663f, 925.371948f, 158.000000f
, 925.999634f); | 1628 path.cubicTo(159.874390f, 925.000000f, 158.835663f, 925.371948f, 158.000000f
, 925.999634f); |
1634 path.lineTo(158.000000f, 926.000000f); | 1629 path.lineTo(158.000000f, 926.000000f); |
1635 path.lineTo(1108.00000f, 926.000000f); | 1630 path.lineTo(1108.00000f, 926.000000f); |
1636 path.lineTo(1108.00000f, 925.999634f); | 1631 path.lineTo(1108.00000f, 925.999634f); |
1637 path.cubicTo(1107.16443f, 925.371948f, 1106.12561f, 925.000000f, 1105.00000f
, 925.000000f); | 1632 path.cubicTo(1107.16443f, 925.371948f, 1106.12561f, 925.000000f, 1105.00000f
, 925.000000f); |
1638 path.lineTo(161.000000f, 925.000000f); | 1633 path.lineTo(161.000000f, 925.000000f); |
1639 path.close(); | 1634 path.close(); |
1640 SkPath pathB; | 1635 SkPath pathB; |
1641 pathB.setFillType(SkPath::kEvenOdd_FillType); | 1636 pathB.setFillType(SkPath::kEvenOdd_FillType); |
1642 pathB.moveTo(161.000000f, 926.000000f); | 1637 pathB.moveTo(161.000000f, 926.000000f); |
1643 pathB.lineTo(1105.00000f, 926.000000f); | 1638 pathB.lineTo(1105.00000f, 926.000000f); |
1644 pathB.cubicTo(1107.20911f, 926.000000f, 1109.00000f, 927.790833f, 1109.00000
f, 930.000000f); | 1639 pathB.cubicTo(1107.20911f, 926.000000f, 1109.00000f, 927.790833f, 1109.00000
f, 930.000000f); |
1645 pathB.lineTo(1109.00000f, 956.000000f); | 1640 pathB.lineTo(1109.00000f, 956.000000f); |
1646 pathB.cubicTo(1109.00000f, 958.209167f, 1107.20911f, 960.000000f, 1105.00000
f, 960.000000f); | 1641 pathB.cubicTo(1109.00000f, 958.209167f, 1107.20911f, 960.000000f, 1105.00000
f, 960.000000f); |
1647 pathB.lineTo(161.000000f, 960.000000f); | 1642 pathB.lineTo(161.000000f, 960.000000f); |
1648 pathB.cubicTo(158.790863f, 960.000000f, 157.000000f, 958.209167f, 157.000000
f, 956.000000f); | 1643 pathB.cubicTo(158.790863f, 960.000000f, 157.000000f, 958.209167f, 157.000000
f, 956.000000f); |
1649 pathB.lineTo(157.000000f, 930.000000f); | 1644 pathB.lineTo(157.000000f, 930.000000f); |
1650 pathB.cubicTo(157.000000f, 927.790833f, 158.790863f, 926.000000f, 161.000000
f, 926.000000f); | 1645 pathB.cubicTo(157.000000f, 927.790833f, 158.790863f, 926.000000f, 161.000000
f, 926.000000f); |
1651 pathB.close(); | 1646 pathB.close(); |
1652 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1647 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1653 } | 1648 } |
1654 | 1649 |
1655 static void skpeldorado_com_ua1(skiatest::Reporter* reporter, const char* filena
me) { | 1650 static void skpeldorado_com_ua1(skiatest::Reporter* reporter, const char* filena
me) { |
1656 SkPath path; | 1651 SkPath path; |
1657 path.setFillType(SkPath::kEvenOdd_FillType); | 1652 path.setFillType(SkPath::kEvenOdd_FillType); |
1658 path.moveTo(286.695129f, 291.000000f); | 1653 path.moveTo(286.695129f, 291.000000f); |
1659 path.lineTo(229.304855f, 561.000000f); | 1654 path.lineTo(229.304855f, 561.000000f); |
1660 path.lineTo(979.304871f, 561.000000f); | 1655 path.lineTo(979.304871f, 561.000000f); |
1661 path.lineTo(1036.69507f, 291.000000f); | 1656 path.lineTo(1036.69507f, 291.000000f); |
1662 path.lineTo(286.695129f, 291.000000f); | 1657 path.lineTo(286.695129f, 291.000000f); |
1663 path.close(); | 1658 path.close(); |
1664 SkPath pathB; | 1659 SkPath pathB; |
1665 pathB.setFillType(SkPath::kWinding_FillType); | 1660 pathB.setFillType(SkPath::kWinding_FillType); |
1666 pathB.moveTo(1006.69513f, 291.000000f); | 1661 pathB.moveTo(1006.69513f, 291.000000f); |
1667 pathB.cubicTo(1023.26367f, 291.000000f, 1033.84021f, 304.431458f, 1030.31836
f, 321.000000f); | 1662 pathB.cubicTo(1023.26367f, 291.000000f, 1033.84021f, 304.431458f, 1030.31836
f, 321.000000f); |
1668 pathB.lineTo(985.681519f, 531.000000f); | 1663 pathB.lineTo(985.681519f, 531.000000f); |
1669 pathB.cubicTo(982.159790f, 547.568542f, 965.873413f, 561.000000f, 949.304871
f, 561.000000f); | 1664 pathB.cubicTo(982.159790f, 547.568542f, 965.873413f, 561.000000f, 949.304871
f, 561.000000f); |
1670 pathB.lineTo(259.304871f, 561.000000f); | 1665 pathB.lineTo(259.304871f, 561.000000f); |
1671 pathB.cubicTo(242.736313f, 561.000000f, 232.159805f, 547.568542f, 235.681549
f, 531.000000f); | 1666 pathB.cubicTo(242.736313f, 561.000000f, 232.159805f, 547.568542f, 235.681549
f, 531.000000f); |
1672 pathB.lineTo(280.318420f, 321.000000f); | 1667 pathB.lineTo(280.318420f, 321.000000f); |
1673 pathB.cubicTo(283.840179f, 304.431458f, 300.126587f, 291.000000f, 316.695129
f, 291.000000f); | 1668 pathB.cubicTo(283.840179f, 304.431458f, 300.126587f, 291.000000f, 316.695129
f, 291.000000f); |
1674 pathB.lineTo(1006.69513f, 291.000000f); | 1669 pathB.lineTo(1006.69513f, 291.000000f); |
1675 pathB.close(); | 1670 pathB.close(); |
1676 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1671 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1677 } | 1672 } |
1678 | 1673 |
1679 static void skpbyte_com1(skiatest::Reporter* reporter, const char* filename) { | 1674 static void skpbyte_com1(skiatest::Reporter* reporter, const char* filename) { |
1680 SkPath path; | 1675 SkPath path; |
1681 path.setFillType(SkPath::kEvenOdd_FillType); | 1676 path.setFillType(SkPath::kEvenOdd_FillType); |
1682 path.moveTo(968.000000f, 14.0000000f); | 1677 path.moveTo(968.000000f, 14.0000000f); |
1683 path.cubicTo(965.238586f, 14.0000000f, 963.000000f, 16.2385769f, 963.000000f
, 19.0000000f); | 1678 path.cubicTo(965.238586f, 14.0000000f, 963.000000f, 16.2385769f, 963.000000f
, 19.0000000f); |
1684 path.lineTo(963.000000f, 32.0000000f); | 1679 path.lineTo(963.000000f, 32.0000000f); |
1685 path.cubicTo(963.000000f, 34.7614250f, 965.238586f, 37.0000000f, 968.000000f
, 37.0000000f); | 1680 path.cubicTo(963.000000f, 34.7614250f, 965.238586f, 37.0000000f, 968.000000f
, 37.0000000f); |
1686 path.lineTo(1034.00000f, 37.0000000f); | 1681 path.lineTo(1034.00000f, 37.0000000f); |
1687 path.cubicTo(1036.76147f, 37.0000000f, 1039.00000f, 34.7614250f, 1039.00000f
, 32.0000000f); | 1682 path.cubicTo(1036.76147f, 37.0000000f, 1039.00000f, 34.7614250f, 1039.00000f
, 32.0000000f); |
1688 path.lineTo(1039.00000f, 19.0000000f); | 1683 path.lineTo(1039.00000f, 19.0000000f); |
1689 path.cubicTo(1039.00000f, 16.2385769f, 1036.76147f, 14.0000000f, 1034.00000f
, 14.0000000f); | 1684 path.cubicTo(1039.00000f, 16.2385769f, 1036.76147f, 14.0000000f, 1034.00000f
, 14.0000000f); |
1690 path.lineTo(968.000000f, 14.0000000f); | 1685 path.lineTo(968.000000f, 14.0000000f); |
1691 path.close(); | 1686 path.close(); |
1692 SkPath pathB; | 1687 SkPath pathB; |
1693 pathB.setFillType(SkPath::kInverseWinding_FillType); | 1688 pathB.setFillType(SkPath::kInverseWinding_FillType); |
1694 pathB.moveTo(968.000000f, 14.0000000f); | 1689 pathB.moveTo(968.000000f, 14.0000000f); |
1695 pathB.lineTo(1034.00000f, 14.0000000f); | 1690 pathB.lineTo(1034.00000f, 14.0000000f); |
1696 pathB.cubicTo(1036.76147f, 14.0000000f, 1039.00000f, 16.2385750f, 1039.00000
f, 19.0000000f); | 1691 pathB.cubicTo(1036.76147f, 14.0000000f, 1039.00000f, 16.2385750f, 1039.00000
f, 19.0000000f); |
1697 pathB.lineTo(1039.00000f, 32.0000000f); | 1692 pathB.lineTo(1039.00000f, 32.0000000f); |
1698 pathB.cubicTo(1039.00000f, 34.2091408f, 1036.76147f, 36.0000000f, 1034.00000
f, 36.0000000f); | 1693 pathB.cubicTo(1039.00000f, 34.2091408f, 1036.76147f, 36.0000000f, 1034.00000
f, 36.0000000f); |
1699 pathB.lineTo(968.000000f, 36.0000000f); | 1694 pathB.lineTo(968.000000f, 36.0000000f); |
1700 pathB.cubicTo(965.238586f, 36.0000000f, 963.000000f, 34.2091408f, 963.000000
f, 32.0000000f); | 1695 pathB.cubicTo(965.238586f, 36.0000000f, 963.000000f, 34.2091408f, 963.000000
f, 32.0000000f); |
1701 pathB.lineTo(963.000000f, 19.0000000f); | 1696 pathB.lineTo(963.000000f, 19.0000000f); |
1702 pathB.cubicTo(963.000000f, 16.2385750f, 965.238586f, 14.0000000f, 968.000000
f, 14.0000000f); | 1697 pathB.cubicTo(963.000000f, 16.2385750f, 965.238586f, 14.0000000f, 968.000000
f, 14.0000000f); |
1703 pathB.close(); | 1698 pathB.close(); |
1704 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1699 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1705 } | 1700 } |
1706 | 1701 |
1707 static void skphealth_com76(skiatest::Reporter* reporter, const char* filename)
{ | 1702 static void skphealth_com76(skiatest::Reporter* reporter, const char* filename)
{ |
1708 SkPath path; | 1703 SkPath path; |
1709 path.setFillType(SkPath::kEvenOdd_FillType); | 1704 path.setFillType(SkPath::kEvenOdd_FillType); |
1710 path.moveTo(708.099182f, 7.09919119f); | 1705 path.moveTo(708.099182f, 7.09919119f); |
1711 path.lineTo(708.099182f, 7.09920025f); | 1706 path.lineTo(708.099182f, 7.09920025f); |
1712 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); | 1707 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f); |
1713 path.lineTo(704.000000f, 33.0000000f); | 1708 path.lineTo(704.000000f, 33.0000000f); |
1714 path.lineTo(705.000000f, 33.0000000f); | 1709 path.lineTo(705.000000f, 33.0000000f); |
1715 path.lineTo(705.000000f, 17.0000000f); | 1710 path.lineTo(705.000000f, 17.0000000f); |
1716 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f
, 7.80761385f); | 1711 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f
, 7.80761385f); |
1717 path.lineTo(708.099182f, 7.09919119f); | 1712 path.lineTo(708.099182f, 7.09919119f); |
1718 path.close(); | 1713 path.close(); |
1719 SkPath pathB; | 1714 SkPath pathB; |
1720 pathB.setFillType(SkPath::kWinding_FillType); | 1715 pathB.setFillType(SkPath::kWinding_FillType); |
1721 pathB.moveTo(704.000000f, 3.00000000f); | 1716 pathB.moveTo(704.000000f, 3.00000000f); |
1722 pathB.lineTo(704.000000f, 33.0000000f); | 1717 pathB.lineTo(704.000000f, 33.0000000f); |
1723 pathB.lineTo(705.000000f, 33.0000000f); | 1718 pathB.lineTo(705.000000f, 33.0000000f); |
1724 pathB.lineTo(719.500000f, 3.00000000f); | 1719 pathB.lineTo(719.500000f, 3.00000000f); |
1725 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1720 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1726 } | 1721 } |
1727 | 1722 |
1728 static void skpahrefs_com88(skiatest::Reporter* reporter, const char* filename)
{ | 1723 static void skpahrefs_com88(skiatest::Reporter* reporter, const char* filename)
{ |
1729 SkPath path; | 1724 SkPath path; |
1730 path.setFillType(SkPath::kEvenOdd_FillType); | 1725 path.setFillType(SkPath::kEvenOdd_FillType); |
1731 path.moveTo(1099.82886f, 7.17117119f); | 1726 path.moveTo(1099.82886f, 7.17117119f); |
1732 path.lineTo(1099.12134f, 7.87867832f); | 1727 path.lineTo(1099.12134f, 7.87867832f); |
1733 path.cubicTo(1099.66418f, 8.42157173f, 1100.00000f, 9.17157173f, 1100.00000f
, 10.0000000f); | 1728 path.cubicTo(1099.66418f, 8.42157173f, 1100.00000f, 9.17157173f, 1100.00000f
, 10.0000000f); |
1734 path.lineTo(1100.00000f, 28.0000000f); | 1729 path.lineTo(1100.00000f, 28.0000000f); |
1735 path.cubicTo(1100.00000f, 29.6568546f, 1098.65686f, 31.0000000f, 1097.00000f
, 31.0000000f); | 1730 path.cubicTo(1100.00000f, 29.6568546f, 1098.65686f, 31.0000000f, 1097.00000f
, 31.0000000f); |
1736 path.lineTo(1088.00000f, 31.0000000f); | 1731 path.lineTo(1088.00000f, 31.0000000f); |
1737 path.lineTo(1088.00000f, 32.0000000f); | 1732 path.lineTo(1088.00000f, 32.0000000f); |
1738 path.lineTo(1097.00000f, 32.0000000f); | 1733 path.lineTo(1097.00000f, 32.0000000f); |
1739 path.quadTo(1098.65686f, 32.0000000f, 1099.82886f, 30.8288002f); | 1734 path.quadTo(1098.65686f, 32.0000000f, 1099.82886f, 30.8288002f); |
1740 path.quadTo(1101.00000f, 29.6568546f, 1101.00000f, 28.0000000f); | 1735 path.quadTo(1101.00000f, 29.6568546f, 1101.00000f, 28.0000000f); |
1741 path.lineTo(1101.00000f, 10.0000000f); | 1736 path.lineTo(1101.00000f, 10.0000000f); |
1742 path.quadTo(1101.00000f, 8.34314537f, 1099.82886f, 7.17119980f); | 1737 path.quadTo(1101.00000f, 8.34314537f, 1099.82886f, 7.17119980f); |
1743 path.lineTo(1099.82886f, 7.17117119f); | 1738 path.lineTo(1099.82886f, 7.17117119f); |
1744 path.close(); | 1739 path.close(); |
1745 SkPath pathB; | 1740 SkPath pathB; |
1746 pathB.setFillType(SkPath::kWinding_FillType); | 1741 pathB.setFillType(SkPath::kWinding_FillType); |
1747 pathB.moveTo(1101.00000f, 6.00000000f); | 1742 pathB.moveTo(1101.00000f, 6.00000000f); |
1748 pathB.lineTo(1088.00000f, 6.00000000f); | 1743 pathB.lineTo(1088.00000f, 6.00000000f); |
1749 pathB.lineTo(1088.00000f, 19.0000000f); | 1744 pathB.lineTo(1088.00000f, 19.0000000f); |
1750 pathB.lineTo(1101.00000f, 32.0000000f); | 1745 pathB.lineTo(1101.00000f, 32.0000000f); |
1751 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1746 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1752 } | 1747 } |
1753 | 1748 |
1754 static void skpahrefs_com29(skiatest::Reporter* reporter, const char* filename)
{ | 1749 static void skpahrefs_com29(skiatest::Reporter* reporter, const char* filename)
{ |
1755 SkPath path; | 1750 SkPath path; |
1756 path.setFillType(SkPath::kEvenOdd_FillType); | 1751 path.setFillType(SkPath::kEvenOdd_FillType); |
1757 path.moveTo(1037.17114f, 7.17119980f); | 1752 path.moveTo(1037.17114f, 7.17119980f); |
1758 path.quadTo(1038.34314f, 6.00000000f, 1040.00000f, 6.00000000f); | 1753 path.quadTo(1038.34314f, 6.00000000f, 1040.00000f, 6.00000000f); |
1759 path.lineTo(1074.00000f, 6.00000000f); | 1754 path.lineTo(1074.00000f, 6.00000000f); |
1760 path.lineTo(1074.00000f, 32.0000000f); | 1755 path.lineTo(1074.00000f, 32.0000000f); |
1761 path.lineTo(1040.00000f, 32.0000000f); | 1756 path.lineTo(1040.00000f, 32.0000000f); |
1762 path.quadTo(1038.34314f, 32.0000000f, 1037.17114f, 30.8288002f); | 1757 path.quadTo(1038.34314f, 32.0000000f, 1037.17114f, 30.8288002f); |
1763 path.quadTo(1036.00000f, 29.6568546f, 1036.00000f, 28.0000000f); | 1758 path.quadTo(1036.00000f, 29.6568546f, 1036.00000f, 28.0000000f); |
1764 path.lineTo(1036.00000f, 10.0000000f); | 1759 path.lineTo(1036.00000f, 10.0000000f); |
1765 path.quadTo(1036.00000f, 8.34314537f, 1037.17114f, 7.17119980f); | 1760 path.quadTo(1036.00000f, 8.34314537f, 1037.17114f, 7.17119980f); |
1766 path.close(); | 1761 path.close(); |
1767 path.moveTo(1037.00000f, 10.0000000f); | 1762 path.moveTo(1037.00000f, 10.0000000f); |
1768 path.cubicTo(1037.00000f, 8.34314537f, 1038.34314f, 7.00000000f, 1040.00000f
, 7.00000000f); | 1763 path.cubicTo(1037.00000f, 8.34314537f, 1038.34314f, 7.00000000f, 1040.00000f
, 7.00000000f); |
1769 path.lineTo(1073.00000f, 7.00000000f); | 1764 path.lineTo(1073.00000f, 7.00000000f); |
1770 path.lineTo(1073.00000f, 31.0000000f); | 1765 path.lineTo(1073.00000f, 31.0000000f); |
1771 path.lineTo(1040.00000f, 31.0000000f); | 1766 path.lineTo(1040.00000f, 31.0000000f); |
1772 path.cubicTo(1038.34314f, 31.0000000f, 1037.00000f, 29.6568546f, 1037.00000f
, 28.0000000f); | 1767 path.cubicTo(1038.34314f, 31.0000000f, 1037.00000f, 29.6568546f, 1037.00000f
, 28.0000000f); |
1773 path.lineTo(1037.00000f, 10.0000000f); | 1768 path.lineTo(1037.00000f, 10.0000000f); |
1774 path.close(); | 1769 path.close(); |
1775 SkPath pathB; | 1770 SkPath pathB; |
1776 pathB.setFillType(SkPath::kWinding_FillType); | 1771 pathB.setFillType(SkPath::kWinding_FillType); |
1777 pathB.moveTo(1036.00000f, 32.0000000f); | 1772 pathB.moveTo(1036.00000f, 32.0000000f); |
1778 pathB.lineTo(1049.00000f, 19.0000000f); | 1773 pathB.lineTo(1049.00000f, 19.0000000f); |
1779 pathB.lineTo(1073.00000f, 31.0000000f); | 1774 pathB.lineTo(1073.00000f, 31.0000000f); |
1780 pathB.lineTo(1074.00000f, 32.0000000f); | 1775 pathB.lineTo(1074.00000f, 32.0000000f); |
1781 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1776 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1782 } | 1777 } |
1783 | 1778 |
1784 static void cubicOp85d(skiatest::Reporter* reporter, const char* filename) { | 1779 static void cubicOp85d(skiatest::Reporter* reporter, const char* filename) { |
1785 SkPath path; | 1780 SkPath path; |
1786 path.setFillType(SkPath::kWinding_FillType); | 1781 path.setFillType(SkPath::kWinding_FillType); |
1787 path.moveTo(0,1); | 1782 path.moveTo(0,1); |
1788 path.cubicTo(1,6, 1,0, 6,2); | 1783 path.cubicTo(1,6, 1,0, 6,2); |
1789 path.close(); | 1784 path.close(); |
1790 SkPath pathB; | 1785 SkPath pathB; |
1791 pathB.setFillType(SkPath::kWinding_FillType); | 1786 pathB.setFillType(SkPath::kWinding_FillType); |
1792 pathB.moveTo(0,1); | 1787 pathB.moveTo(0,1); |
1793 pathB.cubicTo(2,6, 1,0, 6,1); | 1788 pathB.cubicTo(2,6, 1,0, 6,1); |
1794 pathB.close(); | 1789 pathB.close(); |
1795 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 1790 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
1796 } | 1791 } |
1797 | 1792 |
1798 // this fails because the pair of nearly coincident cubics intersect at the ends | |
1799 // but the line connected to one of the cubics at the same point does not inters
ect | |
1800 // the other | |
1801 static void skpkkiste_to98(skiatest::Reporter* reporter, const char* filename) { | 1793 static void skpkkiste_to98(skiatest::Reporter* reporter, const char* filename) { |
1802 SkPath path; | 1794 SkPath path; |
1803 path.setFillType(SkPath::kEvenOdd_FillType); | 1795 path.setFillType(SkPath::kEvenOdd_FillType); |
1804 path.moveTo(96, 122); | 1796 path.moveTo(96, 122); |
1805 path.cubicTo(94.6192932f, 122, 93.3692932f, 122.559647f, 92.4644699f, 123.46
447f); | 1797 path.cubicTo(94.6192932f, 122, 93.3692932f, 122.559647f, 92.4644699f, 123.46
447f); |
1806 path.lineTo(94.1715698f, 125.17157f); | 1798 path.lineTo(94.1715698f, 125.17157f); |
1807 path.cubicTo(94.8954315f, 124.447708f, 95.8954315f, 124, 97, 124); | 1799 path.cubicTo(94.8954315f, 124.447708f, 95.8954315f, 124, 97, 124); |
1808 path.lineTo(257, 124); | 1800 path.lineTo(257, 124); |
1809 path.cubicTo(258.104553f, 124, 259.104584f, 124.447708f, 259.82843f, 125.171
57f); | 1801 path.cubicTo(258.104553f, 124, 259.104584f, 124.447708f, 259.82843f, 125.171
57f); |
1810 path.lineTo(261.535522f, 123.46447f); | 1802 path.lineTo(261.535522f, 123.46447f); |
1811 path.cubicTo(260.630707f, 122.559647f, 259.380707f, 122, 258, 122); | 1803 path.cubicTo(260.630707f, 122.559647f, 259.380707f, 122, 258, 122); |
1812 path.lineTo(96, 122); | 1804 path.lineTo(96, 122); |
1813 path.close(); | 1805 path.close(); |
1814 SkPath pathB; | 1806 SkPath pathB; |
1815 pathB.setFillType(SkPath::kWinding_FillType); | 1807 pathB.setFillType(SkPath::kWinding_FillType); |
1816 pathB.moveTo(258, 122); | 1808 pathB.moveTo(258, 122); |
1817 pathB.cubicTo(260.761414f, 122, 263, 124.238579f, 263, 127); | 1809 pathB.cubicTo(260.761414f, 122, 263, 124.238579f, 263, 127); |
1818 pathB.lineTo(263, 284); | 1810 pathB.lineTo(263, 284); |
1819 pathB.cubicTo(263, 286.761414f, 260.761414f, 289, 258, 289); | 1811 pathB.cubicTo(263, 286.761414f, 260.761414f, 289, 258, 289); |
1820 pathB.lineTo(96, 289); | 1812 pathB.lineTo(96, 289); |
1821 pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284); | 1813 pathB.cubicTo(93.2385788f, 289, 91, 286.761414f, 91, 284); |
1822 pathB.lineTo(91, 127); | 1814 pathB.lineTo(91, 127); |
1823 pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122); | 1815 pathB.cubicTo(91, 124.238579f, 93.2385788f, 122, 96, 122); |
1824 pathB.lineTo(258, 122); | 1816 pathB.lineTo(258, 122); |
1825 pathB.close(); | 1817 pathB.close(); |
1826 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1818 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1827 } | 1819 } |
1828 | 1820 |
1829 static void issue1417(skiatest::Reporter* reporter, const char* filename) { | 1821 static void issue1417(skiatest::Reporter* reporter, const char* filename) { |
1830 SkPath path1; | 1822 SkPath path1; |
1831 path1.moveTo(122.58908843994140625f, 82.2836456298828125f); | 1823 path1.moveTo(122.58908843994140625f, 82.2836456298828125f); |
1832 path1.quadTo(129.8215789794921875f, 80, 138, 80); | 1824 path1.quadTo(129.8215789794921875f, 80, 138, 80); |
1833 path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f
); | 1825 path1.quadTo(147.15692138671875f, 80, 155.1280364990234375f, 82.86279296875f
); |
1834 path1.lineTo(161.1764678955078125f, 100); | 1826 path1.lineTo(161.1764678955078125f, 100); |
1835 path1.lineTo(161.1764678955078125f, 100); | 1827 path1.lineTo(161.1764678955078125f, 100); |
1836 path1.lineTo(115.29412078857421875f, 100); | 1828 path1.lineTo(115.29412078857421875f, 100); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1927 path2.close(); | 1919 path2.close(); |
1928 path2.moveTo(113.232177734375f, 173.5789947509765625f); | 1920 path2.moveTo(113.232177734375f, 173.5789947509765625f); |
1929 path2.quadTo(116.8802642822265625f, 175.69805908203125f, 120.817977905273437
5f, 177.1177825927734375f); | 1921 path2.quadTo(116.8802642822265625f, 175.69805908203125f, 120.817977905273437
5f, 177.1177825927734375f); |
1930 path2.lineTo(132.2864990234375f, 169.6969757080078125f); | 1922 path2.lineTo(132.2864990234375f, 169.6969757080078125f); |
1931 path2.lineTo(132.2864990234375f, 169.6969757080078125f); | 1923 path2.lineTo(132.2864990234375f, 169.6969757080078125f); |
1932 path2.lineTo(118.68194580078125f, 160.343841552734375f); | 1924 path2.lineTo(118.68194580078125f, 160.343841552734375f); |
1933 path2.lineTo(118.68194580078125f, 160.343841552734375f); | 1925 path2.lineTo(118.68194580078125f, 160.343841552734375f); |
1934 path2.lineTo(113.232177734375f, 173.5789947509765625f); | 1926 path2.lineTo(113.232177734375f, 173.5789947509765625f); |
1935 path2.lineTo(113.232177734375f, 173.5789947509765625f); | 1927 path2.lineTo(113.232177734375f, 173.5789947509765625f); |
1936 path2.close(); | 1928 path2.close(); |
1937 | 1929 // FIXME : difficult data, circle back later |
1938 testPathOp(reporter, path1, path2, kUnion_PathOp, filename); | 1930 testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); |
1939 } | 1931 } |
1940 | 1932 |
1941 static void issue1418(skiatest::Reporter* reporter, const char* filename) { | 1933 static void issue1418(skiatest::Reporter* reporter, const char* filename) { |
1942 SkPath path1; | 1934 SkPath path1; |
1943 path1.moveTo(0, 0); | 1935 path1.moveTo(0, 0); |
1944 path1.lineTo(1, 0); | 1936 path1.lineTo(1, 0); |
1945 path1.lineTo(1, 0); | 1937 path1.lineTo(1, 0); |
1946 path1.lineTo(1, 1); | 1938 path1.lineTo(1, 1); |
1947 path1.lineTo(1, 1); | 1939 path1.lineTo(1, 1); |
1948 path1.lineTo(0, 1); | 1940 path1.lineTo(0, 1); |
1949 path1.lineTo(0, 1); | 1941 path1.lineTo(0, 1); |
1950 path1.lineTo(0, 0); | 1942 path1.lineTo(0, 0); |
1951 path1.lineTo(0, 0); | 1943 path1.lineTo(0, 0); |
1952 path1.close(); | 1944 path1.close(); |
1953 | 1945 |
1954 SkPath path2; | 1946 SkPath path2; |
1955 path2.moveTo(0.64644664525985717773f, -0.35355341434478759766f); | 1947 path2.moveTo(0.64644664525985717773f, -0.35355341434478759766f); |
1956 path2.quadTo(0.79289329051971435547f, -0.50000005960464477539f, 1.0000001192
092895508f, -0.50000005960464477539f); | 1948 path2.quadTo(0.79289329051971435547f, -0.50000005960464477539f, 1.0000001192
092895508f, -0.50000005960464477539f); |
1957 path2.quadTo(1.2071068286895751953f, -0.50000005960464477539f, 1.35355353355
40771484f, -0.35355341434478759766f); | 1949 path2.quadTo(1.2071068286895751953f, -0.50000005960464477539f, 1.35355353355
40771484f, -0.35355341434478759766f); |
1958 path2.quadTo(1.5000001192092895508f, -0.20710679888725280762f, 1.50000011920
92895508f, 0); | 1950 path2.quadTo(1.5000001192092895508f, -0.20710679888725280762f, 1.50000011920
92895508f, 0); |
1959 path2.quadTo(1.5000001192092895508f, 0.20710679888725280762f, 1.353553533554
0771484f, 0.35355341434478759766f); | 1951 path2.quadTo(1.5000001192092895508f, 0.20710679888725280762f, 1.353553533554
0771484f, 0.35355341434478759766f); |
1960 path2.quadTo(1.2071068286895751953f, 0.50000005960464477539f, 1.000000119209
2895508f, 0.50000005960464477539f); | 1952 path2.quadTo(1.2071068286895751953f, 0.50000005960464477539f, 1.000000119209
2895508f, 0.50000005960464477539f); |
1961 path2.quadTo(0.79289329051971435547f, 0.50000005960464477539f, 0.64644664525
985717773f, 0.35355341434478759766f); | 1953 path2.quadTo(0.79289329051971435547f, 0.50000005960464477539f, 0.64644664525
985717773f, 0.35355341434478759766f); |
1962 path2.quadTo(0.50000005960464477539f, 0.20710679888725280762f, 0.50000005960
464477539f, 0); | 1954 path2.quadTo(0.50000005960464477539f, 0.20710679888725280762f, 0.50000005960
464477539f, 0); |
1963 path2.quadTo(0.50000005960464477539f, -0.20710679888725280762f, 0.6464466452
5985717773f, -0.35355341434478759766f); | 1955 path2.quadTo(0.50000005960464477539f, -0.20710679888725280762f, 0.6464466452
5985717773f, -0.35355341434478759766f); |
1964 testPathOp(reporter, path1, path2, kIntersect_PathOp, filename); | 1956 testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); |
1965 } | 1957 } |
1966 | 1958 |
1967 static void cubicOp85i(skiatest::Reporter* reporter, const char* filename) { | 1959 static void cubicOp85i(skiatest::Reporter* reporter, const char* filename) { |
1968 SkPath path, pathB; | 1960 SkPath path, pathB; |
1969 path.setFillType(SkPath::kWinding_FillType); | 1961 path.setFillType(SkPath::kWinding_FillType); |
1970 path.moveTo(3, 4); | 1962 path.moveTo(3, 4); |
1971 path.cubicTo(1, 5, 4, 3, 6, 4); | 1963 path.cubicTo(1, 5, 4, 3, 6, 4); |
1972 path.close(); | 1964 path.close(); |
1973 pathB.setFillType(SkPath::kWinding_FillType); | 1965 pathB.setFillType(SkPath::kWinding_FillType); |
1974 pathB.moveTo(3, 4); | 1966 pathB.moveTo(3, 4); |
1975 pathB.cubicTo(4, 6, 4, 3, 5, 1); | 1967 pathB.cubicTo(4, 6, 4, 3, 5, 1); |
1976 pathB.close(); | 1968 pathB.close(); |
1977 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 1969 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
1978 } | 1970 } |
1979 | 1971 |
1980 static void issue1418b(skiatest::Reporter* reporter, const char* filename) { | 1972 static void issue1418b(skiatest::Reporter* reporter, const char* filename) { |
1981 SkPath path1; | 1973 SkPath path1; |
1982 path1.moveTo(0, 0); | 1974 path1.moveTo(0, 0); |
1983 path1.lineTo(1, 0); | 1975 path1.lineTo(1, 0); |
1984 path1.lineTo(1, 1); | 1976 path1.lineTo(1, 1); |
1985 path1.lineTo(0, 1); | 1977 path1.lineTo(0, 1); |
1986 path1.lineTo(0, 0); | 1978 path1.lineTo(0, 0); |
1987 path1.close(); | 1979 path1.close(); |
1988 path1.setFillType(SkPath::kWinding_FillType); | 1980 path1.setFillType(SkPath::kWinding_FillType); |
1989 SkPath path2; | 1981 SkPath path2; |
1990 path2.moveTo(0.646446645f, -0.353553414f); | 1982 path2.moveTo(0.646446645f, -0.353553414f); |
1991 path2.quadTo(0.792893291f, -0.50000006f, 1.00000012f, -0.50000006f); | 1983 path2.quadTo(0.792893291f, -0.50000006f, 1.00000012f, -0.50000006f); |
1992 path2.quadTo(1.20710683f, -0.50000006f, 1.35355353f, -0.353553414f); | 1984 path2.quadTo(1.20710683f, -0.50000006f, 1.35355353f, -0.353553414f); |
1993 path2.quadTo(1.50000012f, -0.207106799f, 1.50000012f, 0); | 1985 path2.quadTo(1.50000012f, -0.207106799f, 1.50000012f, 0); |
1994 path2.quadTo(1.50000012f, 0.207106799f, 1.35355353f, 0.353553414f); | 1986 path2.quadTo(1.50000012f, 0.207106799f, 1.35355353f, 0.353553414f); |
1995 path2.quadTo(1.20710683f, 0.50000006f, 1.00000012f, 0.50000006f); | 1987 path2.quadTo(1.20710683f, 0.50000006f, 1.00000012f, 0.50000006f); |
1996 path2.quadTo(0.792893291f, 0.50000006f, 0.646446645f, 0.353553414f); | 1988 path2.quadTo(0.792893291f, 0.50000006f, 0.646446645f, 0.353553414f); |
1997 path2.quadTo(0.50000006f, 0.207106799f, 0.50000006f, 0); | 1989 path2.quadTo(0.50000006f, 0.207106799f, 0.50000006f, 0); |
1998 path2.quadTo(0.50000006f, -0.207106799f, 0.646446645f, -0.353553414f); | 1990 path2.quadTo(0.50000006f, -0.207106799f, 0.646446645f, -0.353553414f); |
1999 path2.close(); | 1991 path2.close(); |
2000 path2.moveTo(1.00000012f, 0.50000006f); | 1992 path2.moveTo(1.00000012f, 0.50000006f); |
2001 path2.lineTo(1.00000012f, 1.00000012f); | 1993 path2.lineTo(1.00000012f, 1.00000012f); |
2002 path2.lineTo(0.50000006f, 1.00000012f); | 1994 path2.lineTo(0.50000006f, 1.00000012f); |
2003 path2.quadTo(0.50000006f, 0.792893291f, 0.646446645f, 0.646446645f); | 1995 path2.quadTo(0.50000006f, 0.792893291f, 0.646446645f, 0.646446645f); |
2004 path2.quadTo(0.792893291f, 0.50000006f, 1.00000012f, 0.50000006f); | 1996 path2.quadTo(0.792893291f, 0.50000006f, 1.00000012f, 0.50000006f); |
2005 path2.close(); | 1997 path2.close(); |
2006 path2.setFillType(SkPath::kEvenOdd_FillType); | 1998 path2.setFillType(SkPath::kEvenOdd_FillType); |
2007 testPathOp(reporter, path1, path2, kIntersect_PathOp, filename); | 1999 testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); |
2008 } | 2000 } |
2009 | 2001 |
2010 static void rectOp1i(skiatest::Reporter* reporter, const char* filename) { | 2002 static void rectOp1i(skiatest::Reporter* reporter, const char* filename) { |
2011 SkPath path, pathB; | 2003 SkPath path, pathB; |
2012 path.setFillType(SkPath::kWinding_FillType); | 2004 path.setFillType(SkPath::kWinding_FillType); |
2013 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 2005 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
2014 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); | 2006 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction); |
2015 pathB.setFillType(SkPath::kWinding_FillType); | 2007 pathB.setFillType(SkPath::kWinding_FillType); |
2016 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 2008 pathB.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
2017 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 2009 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
2018 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2010 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2019 } | 2011 } |
2020 | 2012 |
2021 static void rectOp2i(skiatest::Reporter* reporter, const char* filename) { | 2013 static void rectOp2i(skiatest::Reporter* reporter, const char* filename) { |
2022 SkPath path, pathB; | 2014 SkPath path, pathB; |
2023 path.setFillType(SkPath::kEvenOdd_FillType); | 2015 path.setFillType(SkPath::kEvenOdd_FillType); |
2024 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 2016 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
2025 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 2017 path.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
2026 pathB.setFillType(SkPath::kWinding_FillType); | 2018 pathB.setFillType(SkPath::kWinding_FillType); |
2027 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 2019 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
2028 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 2020 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
2029 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2021 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2030 } | 2022 } |
2031 | 2023 |
2032 static void rectOp3x(skiatest::Reporter* reporter, const char* filename) { | 2024 static void rectOp3x(skiatest::Reporter* reporter, const char* filename) { |
2033 SkPath path, pathB; | 2025 SkPath path, pathB; |
2034 path.setFillType(SkPath::kEvenOdd_FillType); | 2026 path.setFillType(SkPath::kEvenOdd_FillType); |
2035 path.moveTo(0, 0); | 2027 path.moveTo(0, 0); |
2036 path.lineTo(3, 0); | 2028 path.lineTo(3, 0); |
2037 path.lineTo(3, 3); | 2029 path.lineTo(3, 3); |
2038 path.lineTo(0, 3); | 2030 path.lineTo(0, 3); |
2039 path.close(); | 2031 path.close(); |
2040 path.moveTo(2, 2); | 2032 path.moveTo(2, 2); |
2041 path.lineTo(3, 2); | 2033 path.lineTo(3, 2); |
2042 path.lineTo(3, 3); | 2034 path.lineTo(3, 3); |
2043 path.lineTo(2, 3); | 2035 path.lineTo(2, 3); |
2044 path.close(); | 2036 path.close(); |
2045 pathB.setFillType(SkPath::kWinding_FillType); | 2037 pathB.setFillType(SkPath::kWinding_FillType); |
2046 pathB.moveTo(1, 1); | 2038 pathB.moveTo(1, 1); |
2047 pathB.lineTo(3, 1); | 2039 pathB.lineTo(3, 1); |
2048 pathB.lineTo(3, 3); | 2040 pathB.lineTo(3, 3); |
2049 pathB.lineTo(1, 3); | 2041 pathB.lineTo(1, 3); |
2050 pathB.close(); | 2042 pathB.close(); |
2051 pathB.moveTo(2, 2); | 2043 pathB.moveTo(2, 2); |
2052 pathB.lineTo(3, 2); | 2044 pathB.lineTo(3, 2); |
2053 pathB.lineTo(3, 3); | 2045 pathB.lineTo(3, 3); |
2054 pathB.lineTo(2, 3); | 2046 pathB.lineTo(2, 3); |
2055 pathB.close(); | 2047 pathB.close(); |
2056 testPathOp(reporter, path, pathB, kXOR_PathOp, filename); | 2048 testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); |
2057 } | 2049 } |
2058 | 2050 |
2059 // this fails to generate two interior line segments | |
2060 // an earlier pathops succeeded, but still failed to generate one interior line
segment | |
2061 // (but was saved by assemble, which works around a single line missing segment) | |
2062 static void issue1435(skiatest::Reporter* reporter, const char* filename) { | 2051 static void issue1435(skiatest::Reporter* reporter, const char* filename) { |
2063 SkPath path1; | 2052 SkPath path1; |
2064 path1.moveTo(160, 60); | 2053 path1.moveTo(160, 60); |
2065 path1.lineTo(220, 230); | 2054 path1.lineTo(220, 230); |
2066 path1.lineTo(60, 120); | 2055 path1.lineTo(60, 120); |
2067 path1.lineTo(260, 120); | 2056 path1.lineTo(260, 120); |
2068 path1.lineTo(90, 230); | 2057 path1.lineTo(90, 230); |
2069 path1.lineTo(160, 60); | 2058 path1.lineTo(160, 60); |
2070 path1.close(); | 2059 path1.close(); |
2071 path1.setFillType(SkPath::kEvenOdd_FillType); | 2060 path1.setFillType(SkPath::kEvenOdd_FillType); |
(...skipping 28 matching lines...) Expand all Loading... |
2100 path2.lineTo(195.830978f, 161.521133f); | 2089 path2.lineTo(195.830978f, 161.521133f); |
2101 path2.close(); | 2090 path2.close(); |
2102 path2.moveTo(195.830978f, 161.521133f); | 2091 path2.moveTo(195.830978f, 161.521133f); |
2103 path2.lineTo(207.878281f, 153.725815f); | 2092 path2.lineTo(207.878281f, 153.725815f); |
2104 path2.quadTo(208, 151.888062f, 208, 150); | 2093 path2.quadTo(208, 151.888062f, 208, 150); |
2105 path2.quadTo(208, 132.942657f, 198.066238f, 120); | 2094 path2.quadTo(208, 132.942657f, 198.066238f, 120); |
2106 path2.lineTo(181.176468f, 120); | 2095 path2.lineTo(181.176468f, 120); |
2107 path2.lineTo(195.830978f, 161.521133f); | 2096 path2.lineTo(195.830978f, 161.521133f); |
2108 path2.close(); | 2097 path2.close(); |
2109 path2.setFillType(SkPath::kEvenOdd_FillType); | 2098 path2.setFillType(SkPath::kEvenOdd_FillType); |
2110 testPathOp(reporter, path1, path2, kIntersect_PathOp, filename); | 2099 testPathOp(reporter, path1, path2, kIntersect_SkPathOp, filename); |
2111 } | 2100 } |
2112 | 2101 |
2113 static void skpkkiste_to716(skiatest::Reporter* reporter, const char* filename)
{ | 2102 static void skpkkiste_to716(skiatest::Reporter* reporter, const char* filename)
{ |
2114 SkPath path; | 2103 SkPath path; |
2115 path.setFillType(SkPath::kEvenOdd_FillType); | 2104 path.setFillType(SkPath::kEvenOdd_FillType); |
2116 path.moveTo(1173, 284); | 2105 path.moveTo(1173, 284); |
2117 path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f)
; | 2106 path.cubicTo(1173, 285.125824f, 1173.37207f, 286.164734f, 1174, 287.000488f)
; |
2118 path.lineTo(1174, 123.999496f); | 2107 path.lineTo(1174, 123.999496f); |
2119 path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127); | 2108 path.cubicTo(1173.37207f, 124.835243f, 1173, 125.874168f, 1173, 127); |
2120 path.lineTo(1173, 284); | 2109 path.lineTo(1173, 284); |
2121 path.close(); | 2110 path.close(); |
2122 SkPath pathB; | 2111 SkPath pathB; |
2123 pathB.setFillType(SkPath::kWinding_FillType); | 2112 pathB.setFillType(SkPath::kWinding_FillType); |
2124 pathB.moveTo(1340, 122); | 2113 pathB.moveTo(1340, 122); |
2125 pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127); | 2114 pathB.cubicTo(1342.76147f, 122, 1345, 124.238579f, 1345, 127); |
2126 pathB.lineTo(1345, 284); | 2115 pathB.lineTo(1345, 284); |
2127 pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289); | 2116 pathB.cubicTo(1345, 286.761414f, 1342.76147f, 289, 1340, 289); |
2128 pathB.lineTo(1178, 289); | 2117 pathB.lineTo(1178, 289); |
2129 pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284); | 2118 pathB.cubicTo(1175.23853f, 289, 1173, 286.761414f, 1173, 284); |
2130 pathB.lineTo(1173, 127); | 2119 pathB.lineTo(1173, 127); |
2131 pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122); | 2120 pathB.cubicTo(1173, 124.238579f, 1175.23853f, 122, 1178, 122); |
2132 pathB.lineTo(1340, 122); | 2121 pathB.lineTo(1340, 122); |
2133 pathB.close(); | 2122 pathB.close(); |
2134 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2123 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2135 } | 2124 } |
2136 | 2125 |
2137 static void loopEdge1(skiatest::Reporter* reporter, const char* filename) { | 2126 static void loopEdge1(skiatest::Reporter* reporter, const char* filename) { |
2138 SkPath path; | 2127 SkPath path; |
2139 path.setFillType(SkPath::kEvenOdd_FillType); | 2128 path.setFillType(SkPath::kEvenOdd_FillType); |
2140 path.moveTo(0,0); | 2129 path.moveTo(0,0); |
2141 path.lineTo(3,0); | 2130 path.lineTo(3,0); |
2142 path.lineTo(3,2); | 2131 path.lineTo(3,2); |
2143 path.lineTo(1,2); | 2132 path.lineTo(1,2); |
2144 path.lineTo(1,1); | 2133 path.lineTo(1,1); |
2145 path.lineTo(2,1); | 2134 path.lineTo(2,1); |
2146 path.lineTo(2,3); | 2135 path.lineTo(2,3); |
2147 path.lineTo(0,3); | 2136 path.lineTo(0,3); |
2148 path.close(); | 2137 path.close(); |
2149 SkPath pathB; | 2138 SkPath pathB; |
2150 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2139 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2151 pathB.moveTo(1,2); | 2140 pathB.moveTo(1,2); |
2152 pathB.lineTo(2,2); | 2141 pathB.lineTo(2,2); |
2153 pathB.lineTo(2,4); | 2142 pathB.lineTo(2,4); |
2154 pathB.lineTo(1,4); | 2143 pathB.lineTo(1,4); |
2155 pathB.close(); | 2144 pathB.close(); |
2156 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2145 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2157 } | 2146 } |
2158 | 2147 |
2159 static void loopEdge2(skiatest::Reporter* reporter, const char* filename) { | 2148 static void loopEdge2(skiatest::Reporter* reporter, const char* filename) { |
2160 SkPath path; | 2149 SkPath path; |
2161 path.setFillType(SkPath::kEvenOdd_FillType); | 2150 path.setFillType(SkPath::kEvenOdd_FillType); |
2162 path.moveTo(0,0); | 2151 path.moveTo(0,0); |
2163 path.lineTo(3,0); | 2152 path.lineTo(3,0); |
2164 path.lineTo(3,2); | 2153 path.lineTo(3,2); |
2165 path.lineTo(1,2); | 2154 path.lineTo(1,2); |
2166 path.lineTo(1,1); | 2155 path.lineTo(1,1); |
2167 path.lineTo(2,1); | 2156 path.lineTo(2,1); |
2168 path.lineTo(2,3); | 2157 path.lineTo(2,3); |
2169 path.lineTo(0,3); | 2158 path.lineTo(0,3); |
2170 path.close(); | 2159 path.close(); |
2171 SkPath pathB; | 2160 SkPath pathB; |
2172 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2161 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2173 pathB.moveTo(1 - 1e-6f,2); | 2162 pathB.moveTo(1 - 1e-6f,2); |
2174 pathB.lineTo(2 - 1e-6f,2); | 2163 pathB.lineTo(2 - 1e-6f,2); |
2175 pathB.lineTo(2 - 1e-6f,4); | 2164 pathB.lineTo(2 - 1e-6f,4); |
2176 pathB.lineTo(1 - 1e-6f,4); | 2165 pathB.lineTo(1 - 1e-6f,4); |
2177 pathB.close(); | 2166 pathB.close(); |
2178 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2167 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2179 } | 2168 } |
2180 | 2169 |
2181 static void cubicOp86i(skiatest::Reporter* reporter, const char* filename) { | 2170 static void cubicOp86i(skiatest::Reporter* reporter, const char* filename) { |
2182 SkPath path, pathB; | 2171 SkPath path, pathB; |
2183 path.setFillType(SkPath::kWinding_FillType); | 2172 path.setFillType(SkPath::kWinding_FillType); |
2184 path.moveTo(0, 4); | 2173 path.moveTo(0, 4); |
2185 path.cubicTo(3, 4, 6, 2, 5, 2); | 2174 path.cubicTo(3, 4, 6, 2, 5, 2); |
2186 path.close(); | 2175 path.close(); |
2187 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2176 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2188 pathB.moveTo(2, 6); | 2177 pathB.moveTo(2, 6); |
2189 pathB.cubicTo(2, 5, 4, 0, 4, 3); | 2178 pathB.cubicTo(2, 5, 4, 0, 4, 3); |
2190 pathB.close(); | 2179 pathB.close(); |
2191 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2180 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2192 } | 2181 } |
2193 | 2182 |
2194 static void cubicOp87u(skiatest::Reporter* reporter, const char* filename) { | 2183 static void cubicOp87u(skiatest::Reporter* reporter, const char* filename) { |
2195 SkPath path, pathB; | 2184 SkPath path, pathB; |
2196 path.setFillType(SkPath::kWinding_FillType); | 2185 path.setFillType(SkPath::kWinding_FillType); |
2197 path.moveTo(0,1); | 2186 path.moveTo(0,1); |
2198 path.cubicTo(0,2, 2,0, 6,4); | 2187 path.cubicTo(0,2, 2,0, 6,4); |
2199 path.close(); | 2188 path.close(); |
2200 pathB.setFillType(SkPath::kWinding_FillType); | 2189 pathB.setFillType(SkPath::kWinding_FillType); |
2201 pathB.moveTo(0,2); | 2190 pathB.moveTo(0,2); |
2202 pathB.cubicTo(4,6, 1,0, 2,0); | 2191 pathB.cubicTo(4,6, 1,0, 2,0); |
2203 pathB.close(); | 2192 pathB.close(); |
2204 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 2193 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
2205 } | 2194 } |
2206 | 2195 |
2207 static void cubicOp88u(skiatest::Reporter* reporter, const char* filename) { | 2196 static void cubicOp88u(skiatest::Reporter* reporter, const char* filename) { |
2208 SkPath path, pathB; | 2197 SkPath path, pathB; |
2209 path.setFillType(SkPath::kWinding_FillType); | 2198 path.setFillType(SkPath::kWinding_FillType); |
2210 path.moveTo(0,1); | 2199 path.moveTo(0,1); |
2211 path.cubicTo(2,5, 5,0, 6,4); | 2200 path.cubicTo(2,5, 5,0, 6,4); |
2212 path.close(); | 2201 path.close(); |
2213 pathB.setFillType(SkPath::kWinding_FillType); | 2202 pathB.setFillType(SkPath::kWinding_FillType); |
2214 pathB.moveTo(0,5); | 2203 pathB.moveTo(0,5); |
2215 pathB.cubicTo(4,6, 1,0, 5,2); | 2204 pathB.cubicTo(4,6, 1,0, 5,2); |
2216 pathB.close(); | 2205 pathB.close(); |
2217 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 2206 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
2218 } | 2207 } |
2219 | 2208 |
2220 static void cubicOp89u(skiatest::Reporter* reporter, const char* filename) { | 2209 static void cubicOp89u(skiatest::Reporter* reporter, const char* filename) { |
2221 SkPath path, pathB; | 2210 SkPath path, pathB; |
2222 path.setFillType(SkPath::kWinding_FillType); | 2211 path.setFillType(SkPath::kWinding_FillType); |
2223 path.moveTo(0, 3); | 2212 path.moveTo(0, 3); |
2224 path.cubicTo(1, 6, 5, 0, 6, 3); | 2213 path.cubicTo(1, 6, 5, 0, 6, 3); |
2225 path.close(); | 2214 path.close(); |
2226 pathB.setFillType(SkPath::kWinding_FillType); | 2215 pathB.setFillType(SkPath::kWinding_FillType); |
2227 pathB.moveTo(0, 5); | 2216 pathB.moveTo(0, 5); |
2228 pathB.cubicTo(3, 6, 3, 0, 6, 1); | 2217 pathB.cubicTo(3, 6, 3, 0, 6, 1); |
2229 pathB.close(); | 2218 pathB.close(); |
2230 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 2219 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
2231 } | 2220 } |
2232 | 2221 |
2233 static void cubicOp90u(skiatest::Reporter* reporter, const char* filename) { | 2222 static void cubicOp90u(skiatest::Reporter* reporter, const char* filename) { |
2234 SkPath path, pathB; | 2223 SkPath path, pathB; |
2235 path.setFillType(SkPath::kEvenOdd_FillType); | 2224 path.setFillType(SkPath::kEvenOdd_FillType); |
2236 path.moveTo(0, 5); | 2225 path.moveTo(0, 5); |
2237 path.cubicTo(1, 2, 5, 2, 4, 1); | 2226 path.cubicTo(1, 2, 5, 2, 4, 1); |
2238 path.close(); | 2227 path.close(); |
2239 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2228 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2240 pathB.moveTo(2, 5); | 2229 pathB.moveTo(2, 5); |
2241 pathB.cubicTo(1, 4, 5, 0, 2, 1); | 2230 pathB.cubicTo(1, 4, 5, 0, 2, 1); |
2242 pathB.close(); | 2231 pathB.close(); |
2243 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 2232 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
2244 } | 2233 } |
2245 | 2234 |
2246 static void cubicOp91u(skiatest::Reporter* reporter, const char* filename) { | 2235 static void cubicOp91u(skiatest::Reporter* reporter, const char* filename) { |
2247 SkPath path, pathB; | 2236 SkPath path, pathB; |
2248 path.setFillType(SkPath::kWinding_FillType); | 2237 path.setFillType(SkPath::kWinding_FillType); |
2249 path.moveTo(1, 6); | 2238 path.moveTo(1, 6); |
2250 path.cubicTo(0, 3, 6, 3, 5, 0); | 2239 path.cubicTo(0, 3, 6, 3, 5, 0); |
2251 path.close(); | 2240 path.close(); |
2252 pathB.setFillType(SkPath::kWinding_FillType); | 2241 pathB.setFillType(SkPath::kWinding_FillType); |
2253 pathB.moveTo(3, 6); | 2242 pathB.moveTo(3, 6); |
2254 pathB.cubicTo(0, 5, 6, 1, 3, 0); | 2243 pathB.cubicTo(0, 5, 6, 1, 3, 0); |
2255 pathB.close(); | 2244 pathB.close(); |
2256 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 2245 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
2257 } | 2246 } |
2258 | 2247 |
2259 static void skpaaalgarve_org53(skiatest::Reporter* reporter, const char* filenam
e) { // add t cancel | 2248 static void skpaaalgarve_org53(skiatest::Reporter* reporter, const char* filenam
e) { |
2260 SkPath path; | 2249 SkPath path; |
2261 path.setFillType(SkPath::kEvenOdd_FillType); | 2250 path.setFillType(SkPath::kEvenOdd_FillType); |
2262 path.moveTo(-1.24344979e-014f, 348); | 2251 path.moveTo(-1.24344979e-014f, 348); |
2263 path.lineTo(258, 348); | 2252 path.lineTo(258, 348); |
2264 path.lineTo(258, 322); | 2253 path.lineTo(258, 322); |
2265 path.quadTo(258, 317.857849f, 255.072006f, 314.928009f); | 2254 path.quadTo(258, 317.857849f, 255.072006f, 314.928009f); |
2266 path.quadTo(252.142136f, 312, 248, 312); | 2255 path.quadTo(252.142136f, 312, 248, 312); |
2267 path.lineTo(1.77635684e-015f, 312); | 2256 path.lineTo(1.77635684e-015f, 312); |
2268 path.lineTo(-1.24344979e-014f, 348); | 2257 path.lineTo(-1.24344979e-014f, 348); |
2269 path.close(); | 2258 path.close(); |
2270 SkPath pathB; | 2259 SkPath pathB; |
2271 pathB.setFillType(SkPath::kWinding_FillType); | 2260 pathB.setFillType(SkPath::kWinding_FillType); |
2272 pathB.moveTo(0, 312); | 2261 pathB.moveTo(0, 312); |
2273 pathB.lineTo(258, 312); | 2262 pathB.lineTo(258, 312); |
2274 pathB.lineTo(258, 348); | 2263 pathB.lineTo(258, 348); |
2275 pathB.lineTo(0, 348); | 2264 pathB.lineTo(0, 348); |
2276 pathB.close(); | 2265 pathB.close(); |
2277 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2266 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2278 } | 2267 } |
2279 | 2268 |
2280 static void skpabcspark_ca103(skiatest::Reporter* reporter, const char* filename
) { // add t cancel | 2269 static void skpabcspark_ca103(skiatest::Reporter* reporter, const char* filename
) { |
2281 SkPath path; | 2270 SkPath path; |
2282 path.setFillType(SkPath::kEvenOdd_FillType); | 2271 path.setFillType(SkPath::kEvenOdd_FillType); |
2283 path.moveTo(1.99840144e-015f, 494); | 2272 path.moveTo(1.99840144e-015f, 494); |
2284 path.lineTo(97, 494); | 2273 path.lineTo(97, 494); |
2285 path.quadTo(100.313705f, 494, 102.6576f, 491.657593f); | 2274 path.quadTo(100.313705f, 494, 102.6576f, 491.657593f); |
2286 path.quadTo(105, 489.313721f, 105, 486); | 2275 path.quadTo(105, 489.313721f, 105, 486); |
2287 path.lineTo(105, 425); | 2276 path.lineTo(105, 425); |
2288 path.quadTo(105, 421.686279f, 102.6576f, 419.342407f); | 2277 path.quadTo(105, 421.686279f, 102.6576f, 419.342407f); |
2289 path.quadTo(100.313705f, 417, 97, 417); | 2278 path.quadTo(100.313705f, 417, 97, 417); |
2290 path.lineTo(2.22044605e-016f, 417); | 2279 path.lineTo(2.22044605e-016f, 417); |
2291 path.lineTo(1.99840144e-015f, 494); | 2280 path.lineTo(1.99840144e-015f, 494); |
2292 path.close(); | 2281 path.close(); |
2293 SkPath pathB; | 2282 SkPath pathB; |
2294 pathB.setFillType(SkPath::kWinding_FillType); | 2283 pathB.setFillType(SkPath::kWinding_FillType); |
2295 pathB.moveTo(0, 417); | 2284 pathB.moveTo(0, 417); |
2296 pathB.lineTo(105, 417); | 2285 pathB.lineTo(105, 417); |
2297 pathB.lineTo(105, 494); | 2286 pathB.lineTo(105, 494); |
2298 pathB.lineTo(0, 494); | 2287 pathB.lineTo(0, 494); |
2299 pathB.close(); | 2288 pathB.close(); |
2300 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2289 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2301 } | 2290 } |
2302 | 2291 |
2303 static void skpacesoftech_com47(skiatest::Reporter* reporter, const char* filena
me) { // partial coincidence | 2292 static void skpacesoftech_com47(skiatest::Reporter* reporter, const char* filena
me) { |
2304 SkPath path; | 2293 SkPath path; |
2305 path.setFillType(SkPath::kEvenOdd_FillType); | 2294 path.setFillType(SkPath::kEvenOdd_FillType); |
2306 path.moveTo(670.537415f, 285); | 2295 path.moveTo(670.537415f, 285); |
2307 path.lineTo(670.387451f, 285); | 2296 path.lineTo(670.387451f, 285); |
2308 path.lineTo(596.315186f, 314.850708f); | 2297 path.lineTo(596.315186f, 314.850708f); |
2309 path.lineTo(626.19696f, 389); | 2298 path.lineTo(626.19696f, 389); |
2310 path.lineTo(626.346863f, 389); | 2299 path.lineTo(626.346863f, 389); |
2311 path.lineTo(700.419189f, 359.149261f); | 2300 path.lineTo(700.419189f, 359.149261f); |
2312 path.lineTo(670.537415f, 285); | 2301 path.lineTo(670.537415f, 285); |
2313 path.close(); | 2302 path.close(); |
2314 SkPath pathB; | 2303 SkPath pathB; |
2315 pathB.setFillType(SkPath::kWinding_FillType); | 2304 pathB.setFillType(SkPath::kWinding_FillType); |
2316 pathB.moveTo(663.318542f, 374.100616f); | 2305 pathB.moveTo(663.318542f, 374.100616f); |
2317 pathB.quadTo(647.950989f, 380.293671f, 632.705322f, 373.806305f); | 2306 pathB.quadTo(647.950989f, 380.293671f, 632.705322f, 373.806305f); |
2318 pathB.quadTo(617.459595f, 367.318909f, 611.266541f, 351.951355f); | 2307 pathB.quadTo(617.459595f, 367.318909f, 611.266541f, 351.951355f); |
2319 pathB.quadTo(605.073486f, 336.58374f, 611.560913f, 321.338074f); | 2308 pathB.quadTo(605.073486f, 336.58374f, 611.560913f, 321.338074f); |
2320 pathB.quadTo(618.048279f, 306.092407f, 633.415833f, 299.899353f); | 2309 pathB.quadTo(618.048279f, 306.092407f, 633.415833f, 299.899353f); |
2321 pathB.quadTo(648.783447f, 293.706299f, 664.029114f, 300.193665f); | 2310 pathB.quadTo(648.783447f, 293.706299f, 664.029114f, 300.193665f); |
2322 pathB.quadTo(679.27478f, 306.68103f, 685.467834f, 322.048645f); | 2311 pathB.quadTo(679.27478f, 306.68103f, 685.467834f, 322.048645f); |
2323 pathB.quadTo(691.660889f, 337.416199f, 685.173523f, 352.661896f); | 2312 pathB.quadTo(691.660889f, 337.416199f, 685.173523f, 352.661896f); |
2324 pathB.quadTo(678.686157f, 367.907562f, 663.318542f, 374.100616f); | 2313 pathB.quadTo(678.686157f, 367.907562f, 663.318542f, 374.100616f); |
2325 pathB.close(); | 2314 pathB.close(); |
2326 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2315 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2327 } | 2316 } |
2328 | 2317 |
2329 static void skpact_com43(skiatest::Reporter* reporter, const char* filename) {
// bridge op | 2318 static void skpact_com43(skiatest::Reporter* reporter, const char* filename) { |
2330 SkPath path; | 2319 SkPath path; |
2331 path.setFillType(SkPath::kEvenOdd_FillType); | 2320 path.setFillType(SkPath::kEvenOdd_FillType); |
2332 path.moveTo(1.45716772e-016f, 924.336121f); | 2321 path.moveTo(1.45716772e-016f, 924.336121f); |
2333 path.lineTo(-1.11022302e-016f, 920); | 2322 path.lineTo(-1.11022302e-016f, 920); |
2334 path.lineTo(6, 920); | 2323 path.lineTo(6, 920); |
2335 path.lineTo(6, 926); | 2324 path.lineTo(6, 926); |
2336 path.lineTo(1.66389287f, 926); | 2325 path.lineTo(1.66389287f, 926); |
2337 path.quadTo(1.18842196f, 925.674561f, 0.756800175f, 925.243225f); | 2326 path.quadTo(1.18842196f, 925.674561f, 0.756800175f, 925.243225f); |
2338 path.quadTo(0.325406998f, 924.811523f, 1.45716772e-016f, 924.336121f); | 2327 path.quadTo(0.325406998f, 924.811523f, 1.45716772e-016f, 924.336121f); |
2339 path.close(); | 2328 path.close(); |
2340 path.moveTo(1, 921); | 2329 path.moveTo(1, 921); |
2341 path.lineTo(5, 921); | 2330 path.lineTo(5, 921); |
2342 path.lineTo(5, 925); | 2331 path.lineTo(5, 925); |
2343 path.cubicTo(2.79086018f, 925, 1, 923.209167f, 1, 921); | 2332 path.cubicTo(2.79086018f, 925, 1, 923.209167f, 1, 921); |
2344 path.close(); | 2333 path.close(); |
2345 SkPath pathB; | 2334 SkPath pathB; |
2346 pathB.setFillType(SkPath::kWinding_FillType); | 2335 pathB.setFillType(SkPath::kWinding_FillType); |
2347 pathB.moveTo(-1, 920); | 2336 pathB.moveTo(-1, 920); |
2348 pathB.lineTo(0, 920); | 2337 pathB.lineTo(0, 920); |
2349 pathB.lineTo(3, 927); | 2338 pathB.lineTo(3, 927); |
2350 pathB.lineTo(-1, 927); | 2339 pathB.lineTo(-1, 927); |
2351 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2340 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2352 } | 2341 } |
2353 | 2342 |
2354 static void skpadbox_lt8(skiatest::Reporter* reporter, const char* filename) {
// zero span | 2343 static void skpadbox_lt8(skiatest::Reporter* reporter, const char* filename) { |
2355 SkPath path; | 2344 SkPath path; |
2356 path.setFillType(SkPath::kEvenOdd_FillType); | 2345 path.setFillType(SkPath::kEvenOdd_FillType); |
2357 path.moveTo(320.097229f, 628.573669f); | 2346 path.moveTo(320.097229f, 628.573669f); |
2358 path.lineTo(610.227173f, 85.7786865f); | 2347 path.lineTo(610.227173f, 85.7786865f); |
2359 path.lineTo(946.652588f, 265.601807f); | 2348 path.lineTo(946.652588f, 265.601807f); |
2360 path.lineTo(656.522644f, 808.39679f); | 2349 path.lineTo(656.522644f, 808.39679f); |
2361 path.lineTo(320.097229f, 628.573669f); | 2350 path.lineTo(320.097229f, 628.573669f); |
2362 path.close(); | 2351 path.close(); |
2363 SkPath pathB; | 2352 SkPath pathB; |
2364 pathB.setFillType(SkPath::kInverseWinding_FillType); | 2353 pathB.setFillType(SkPath::kInverseWinding_FillType); |
2365 pathB.moveTo(333.866608f, 623.496155f); | 2354 pathB.moveTo(333.866608f, 623.496155f); |
2366 pathB.lineTo(613.368042f, 100.585754f); | 2355 pathB.lineTo(613.368042f, 100.585754f); |
2367 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395
f, 100.085449f); | 2356 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395
f, 100.085449f); |
2368 pathB.lineTo(932.633057f, 269.854553f); | 2357 pathB.lineTo(932.633057f, 269.854553f); |
2369 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301
f, 271.503906f); | 2358 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301
f, 271.503906f); |
2370 pathB.lineTo(653.631897f, 794.414307f); | 2359 pathB.lineTo(653.631897f, 794.414307f); |
2371 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544
f, 794.914612f); | 2360 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544
f, 794.914612f); |
2372 pathB.lineTo(334.366943f, 625.145508f); | 2361 pathB.lineTo(334.366943f, 625.145508f); |
2373 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608
f, 623.496155f); | 2362 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608
f, 623.496155f); |
2374 pathB.close(); | 2363 pathB.close(); |
2375 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2364 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2376 } | 2365 } |
2377 | 2366 |
2378 static void skpadindex_de4(skiatest::Reporter* reporter, const char* filename) {
// find chase op | 2367 static void skpadindex_de4(skiatest::Reporter* reporter, const char* filename) { |
2379 SkPath path; | 2368 SkPath path; |
2380 path.setFillType(SkPath::kEvenOdd_FillType); | 2369 path.setFillType(SkPath::kEvenOdd_FillType); |
2381 path.moveTo(0, 926); | 2370 path.moveTo(0, 926); |
2382 path.lineTo(0, 0); | 2371 path.lineTo(0, 0); |
2383 path.lineTo(1280, 0); | 2372 path.lineTo(1280, 0); |
2384 path.lineTo(1280, 926); | 2373 path.lineTo(1280, 926); |
2385 path.lineTo(0, 926); | 2374 path.lineTo(0, 926); |
2386 path.close(); | 2375 path.close(); |
2387 SkPath pathB; | 2376 SkPath pathB; |
2388 pathB.setFillType(SkPath::kWinding_FillType); | 2377 pathB.setFillType(SkPath::kWinding_FillType); |
2389 pathB.moveTo(0, 312); | 2378 pathB.moveTo(0, 312); |
2390 pathB.lineTo(8.20486257e-015f, 178); | 2379 pathB.lineTo(8.20486257e-015f, 178); |
2391 pathB.lineTo(49, 178); | 2380 pathB.lineTo(49, 178); |
2392 pathB.lineTo(49, 312); | 2381 pathB.lineTo(49, 312); |
2393 pathB.close(); | 2382 pathB.close(); |
2394 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2383 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2395 } | 2384 } |
2396 | 2385 |
2397 static void skpadithya_putr4_blogspot_com551(skiatest::Reporter* reporter, const
char* filename) { // calc common | 2386 static void skpadithya_putr4_blogspot_com551(skiatest::Reporter* reporter, const
char* filename) { |
2398 SkPath path; | 2387 SkPath path; |
2399 path.setFillType(SkPath::kEvenOdd_FillType); | 2388 path.setFillType(SkPath::kEvenOdd_FillType); |
2400 path.moveTo(205.605804f, 142.334625f); | 2389 path.moveTo(205.605804f, 142.334625f); |
2401 path.lineTo(254.665359f, 85.6058044f); | 2390 path.lineTo(254.665359f, 85.6058044f); |
2402 path.lineTo(311.394196f, 134.665359f); | 2391 path.lineTo(311.394196f, 134.665359f); |
2403 path.lineTo(262.334625f, 191.39418f); | 2392 path.lineTo(262.334625f, 191.39418f); |
2404 path.lineTo(205.605804f, 142.334625f); | 2393 path.lineTo(205.605804f, 142.334625f); |
2405 path.close(); | 2394 path.close(); |
2406 SkPath pathB; | 2395 SkPath pathB; |
2407 pathB.setFillType(SkPath::kWinding_FillType); | 2396 pathB.setFillType(SkPath::kWinding_FillType); |
2408 pathB.moveTo(283.407959f, 110.462646f); | 2397 pathB.moveTo(283.407959f, 110.462646f); |
2409 pathB.cubicTo(298.864319f, 123.829437f, 300.558258f, 147.195221f, 287.191467
f, 162.651581f); | 2398 pathB.cubicTo(298.864319f, 123.829437f, 300.558258f, 147.195221f, 287.191467
f, 162.651581f); |
2410 pathB.lineTo(286.537354f, 163.407959f); | 2399 pathB.lineTo(286.537354f, 163.407959f); |
2411 pathB.cubicTo(273.170563f, 178.864334f, 249.804779f, 180.558258f, 234.348419
f, 167.191467f); | 2400 pathB.cubicTo(273.170563f, 178.864334f, 249.804779f, 180.558258f, 234.348419
f, 167.191467f); |
2412 pathB.lineTo(233.592026f, 166.537338f); | 2401 pathB.lineTo(233.592026f, 166.537338f); |
2413 pathB.cubicTo(218.135666f, 153.170547f, 216.441727f, 129.804779f, 229.808517
f, 114.348412f); | 2402 pathB.cubicTo(218.135666f, 153.170547f, 216.441727f, 129.804779f, 229.808517
f, 114.348412f); |
2414 pathB.lineTo(230.462646f, 113.592026f); | 2403 pathB.lineTo(230.462646f, 113.592026f); |
2415 pathB.cubicTo(243.829437f, 98.1356659f, 267.195221f, 96.4417267f, 282.651581
f, 109.808517f); | 2404 pathB.cubicTo(243.829437f, 98.1356659f, 267.195221f, 96.4417267f, 282.651581
f, 109.808517f); |
2416 pathB.lineTo(283.407959f, 110.462646f); | 2405 pathB.lineTo(283.407959f, 110.462646f); |
2417 pathB.close(); | 2406 pathB.close(); |
2418 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2407 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2419 } | 2408 } |
2420 | 2409 |
2421 static void skpadspert_de11(skiatest::Reporter* reporter, const char* filename)
{ // mark and chase winding | 2410 static void skpadspert_de11(skiatest::Reporter* reporter, const char* filename)
{ |
2422 SkPath path; | 2411 SkPath path; |
2423 path.setFillType(SkPath::kEvenOdd_FillType); | 2412 path.setFillType(SkPath::kEvenOdd_FillType); |
2424 path.moveTo(-4.4408921e-016f, 682.5f); | 2413 path.moveTo(-4.4408921e-016f, 682.5f); |
2425 path.lineTo(30.5f, 682.5f); | 2414 path.lineTo(30.5f, 682.5f); |
2426 path.cubicTo(32.709137f, 682.5f, 34.5f, 680.709167f, 34.5f, 678.5f); | 2415 path.cubicTo(32.709137f, 682.5f, 34.5f, 680.709167f, 34.5f, 678.5f); |
2427 path.lineTo(34.5f, 486.5f); | 2416 path.lineTo(34.5f, 486.5f); |
2428 path.cubicTo(34.5f, 484.290863f, 32.709137f, 482.5f, 30.5f, 482.5f); | 2417 path.cubicTo(34.5f, 484.290863f, 32.709137f, 482.5f, 30.5f, 482.5f); |
2429 path.lineTo(0, 482.5f); | 2418 path.lineTo(0, 482.5f); |
2430 path.lineTo(-4.4408921e-016f, 682.5f); | 2419 path.lineTo(-4.4408921e-016f, 682.5f); |
2431 path.close(); | 2420 path.close(); |
2432 SkPath pathB; | 2421 SkPath pathB; |
2433 pathB.setFillType(SkPath::kWinding_FillType); | 2422 pathB.setFillType(SkPath::kWinding_FillType); |
2434 pathB.moveTo(0, 482); | 2423 pathB.moveTo(0, 482); |
2435 pathB.lineTo(35, 482); | 2424 pathB.lineTo(35, 482); |
2436 pathB.lineTo(35, 683); | 2425 pathB.lineTo(35, 683); |
2437 pathB.lineTo(0, 683); | 2426 pathB.lineTo(0, 683); |
2438 pathB.close(); | 2427 pathB.close(); |
2439 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2428 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2440 } | 2429 } |
2441 | 2430 |
2442 static void skpaiaigames_com870(skiatest::Reporter* reporter, const char* filena
me) { // cubic/cubic intersect | 2431 static void skpaiaigames_com870(skiatest::Reporter* reporter, const char* filena
me) { |
2443 SkPath path; | 2432 SkPath path; |
2444 path.setFillType(SkPath::kEvenOdd_FillType); | 2433 path.setFillType(SkPath::kEvenOdd_FillType); |
2445 path.moveTo(324.071075f, 845.071045f); | 2434 path.moveTo(324.071075f, 845.071045f); |
2446 path.cubicTo(324.405151f, 844.737f, 324.715668f, 844.379395f, 325, 844.00097
7f); | 2435 path.cubicTo(324.405151f, 844.737f, 324.715668f, 844.379395f, 325, 844.00097
7f); |
2447 path.lineTo(325, 842.127197f); | 2436 path.lineTo(325, 842.127197f); |
2448 path.cubicTo(324.571411f, 842.956238f, 324.017761f, 843.710144f, 323.363953f
, 844.363953f); | 2437 path.cubicTo(324.571411f, 842.956238f, 324.017761f, 843.710144f, 323.363953f
, 844.363953f); |
2449 path.lineTo(324.071075f, 845.071045f); | 2438 path.lineTo(324.071075f, 845.071045f); |
2450 path.close(); | 2439 path.close(); |
2451 path.moveTo(323.363953f, 714.636047f); | 2440 path.moveTo(323.363953f, 714.636047f); |
2452 path.lineTo(324.071075f, 713.928955f); | 2441 path.lineTo(324.071075f, 713.928955f); |
2453 path.cubicTo(324.405151f, 714.263f, 324.715668f, 714.620605f, 325, 714.99902
3f); | 2442 path.cubicTo(324.405151f, 714.263f, 324.715668f, 714.620605f, 325, 714.99902
3f); |
2454 path.lineTo(325, 716.872803f); | 2443 path.lineTo(325, 716.872803f); |
2455 path.cubicTo(324.571411f, 716.043762f, 324.017761f, 715.289856f, 323.363953f
, 714.636047f); | 2444 path.cubicTo(324.571411f, 716.043762f, 324.017761f, 715.289856f, 323.363953f
, 714.636047f); |
2456 path.close(); | 2445 path.close(); |
2457 SkPath pathB; | 2446 SkPath pathB; |
2458 pathB.setFillType(SkPath::kWinding_FillType); | 2447 pathB.setFillType(SkPath::kWinding_FillType); |
2459 pathB.moveTo(317, 711); | 2448 pathB.moveTo(317, 711); |
2460 pathB.cubicTo(322.522858f, 711, 327, 715.477173f, 327, 721); | 2449 pathB.cubicTo(322.522858f, 711, 327, 715.477173f, 327, 721); |
2461 pathB.lineTo(327, 838); | 2450 pathB.lineTo(327, 838); |
2462 pathB.cubicTo(327, 843.522827f, 322.522858f, 848, 317, 848); | 2451 pathB.cubicTo(327, 843.522827f, 322.522858f, 848, 317, 848); |
2463 pathB.lineTo(155, 848); | 2452 pathB.lineTo(155, 848); |
2464 pathB.cubicTo(149.477158f, 848, 145, 843.522827f, 145, 838); | 2453 pathB.cubicTo(149.477158f, 848, 145, 843.522827f, 145, 838); |
2465 pathB.lineTo(145, 721); | 2454 pathB.lineTo(145, 721); |
2466 pathB.cubicTo(145, 715.477173f, 149.477158f, 711, 155, 711); | 2455 pathB.cubicTo(145, 715.477173f, 149.477158f, 711, 155, 711); |
2467 pathB.lineTo(317, 711); | 2456 pathB.lineTo(317, 711); |
2468 pathB.close(); | 2457 pathB.close(); |
2469 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2458 testPathOpCheck(reporter, path, pathB, kIntersect_SkPathOp, filename, FLAGS_
runFail); |
2470 } | 2459 } |
2471 | 2460 |
2472 static void cubicOp92i(skiatest::Reporter* reporter, const char* filename) { | 2461 static void cubicOp92i(skiatest::Reporter* reporter, const char* filename) { |
2473 SkPath path, pathB; | 2462 SkPath path, pathB; |
2474 path.setFillType(SkPath::kWinding_FillType); | 2463 path.setFillType(SkPath::kWinding_FillType); |
2475 path.moveTo(0, 1); | 2464 path.moveTo(0, 1); |
2476 path.cubicTo(2, 6, 4, 1, 5, 4); | 2465 path.cubicTo(2, 6, 4, 1, 5, 4); |
2477 path.close(); | 2466 path.close(); |
2478 pathB.setFillType(SkPath::kWinding_FillType); | 2467 pathB.setFillType(SkPath::kWinding_FillType); |
2479 pathB.moveTo(1, 4); | 2468 pathB.moveTo(1, 4); |
2480 pathB.cubicTo(4, 5, 1, 0, 6, 2); | 2469 pathB.cubicTo(4, 5, 1, 0, 6, 2); |
2481 pathB.close(); | 2470 pathB.close(); |
2482 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2471 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2483 } | 2472 } |
2484 | 2473 |
2485 static void cubicOp93d(skiatest::Reporter* reporter, const char* filename) { | 2474 static void cubicOp93d(skiatest::Reporter* reporter, const char* filename) { |
2486 SkPath path, pathB; | 2475 SkPath path, pathB; |
2487 path.setFillType(SkPath::kWinding_FillType); | 2476 path.setFillType(SkPath::kWinding_FillType); |
2488 path.moveTo(0, 1); | 2477 path.moveTo(0, 1); |
2489 path.cubicTo(1, 6, 4, 1, 4, 3); | 2478 path.cubicTo(1, 6, 4, 1, 4, 3); |
2490 path.close(); | 2479 path.close(); |
2491 pathB.setFillType(SkPath::kWinding_FillType); | 2480 pathB.setFillType(SkPath::kWinding_FillType); |
2492 pathB.moveTo(1, 4); | 2481 pathB.moveTo(1, 4); |
2493 pathB.cubicTo(3, 4, 1, 0, 6, 1); | 2482 pathB.cubicTo(3, 4, 1, 0, 6, 1); |
2494 pathB.close(); | 2483 pathB.close(); |
2495 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 2484 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
2496 } | 2485 } |
2497 | 2486 |
2498 static void cubicOp94u(skiatest::Reporter* reporter, const char* filename) { | 2487 static void cubicOp94u(skiatest::Reporter* reporter, const char* filename) { |
2499 SkPath path, pathB; | 2488 SkPath path, pathB; |
2500 path.setFillType(SkPath::kEvenOdd_FillType); | 2489 path.setFillType(SkPath::kEvenOdd_FillType); |
2501 path.moveTo(0, 3); | 2490 path.moveTo(0, 3); |
2502 path.cubicTo(2, 3, 5, 0, 5, 3); | 2491 path.cubicTo(2, 3, 5, 0, 5, 3); |
2503 path.close(); | 2492 path.close(); |
2504 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2493 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2505 pathB.moveTo(0, 5); | 2494 pathB.moveTo(0, 5); |
2506 pathB.cubicTo(3, 5, 3, 0, 3, 2); | 2495 pathB.cubicTo(3, 5, 3, 0, 3, 2); |
2507 pathB.close(); | 2496 pathB.close(); |
2508 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 2497 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
2509 } | 2498 } |
2510 | 2499 |
2511 static void skpadbox_lt15(skiatest::Reporter* reporter, const char* filename) { | 2500 static void skpadbox_lt15(skiatest::Reporter* reporter, const char* filename) { |
2512 SkPath path; | 2501 SkPath path; |
2513 path.setFillType(SkPath::kEvenOdd_FillType); | 2502 path.setFillType(SkPath::kEvenOdd_FillType); |
2514 path.moveTo(333.292084f, 624.570984f); | 2503 path.moveTo(333.292084f, 624.570984f); |
2515 path.lineTo(614.229797f, 98.9735107f); | 2504 path.lineTo(614.229797f, 98.9735107f); |
2516 path.lineTo(933.457764f, 269.604431f); | 2505 path.lineTo(933.457764f, 269.604431f); |
2517 path.lineTo(652.52002f, 795.201904f); | 2506 path.lineTo(652.52002f, 795.201904f); |
2518 path.lineTo(333.292084f, 624.570984f); | 2507 path.lineTo(333.292084f, 624.570984f); |
2519 path.close(); | 2508 path.close(); |
2520 SkPath pathB; | 2509 SkPath pathB; |
2521 pathB.setFillType(SkPath::kWinding_FillType); | 2510 pathB.setFillType(SkPath::kWinding_FillType); |
2522 pathB.moveTo(613.368042f, 100.585754f); | 2511 pathB.moveTo(613.368042f, 100.585754f); |
2523 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395
f, 100.085449f); | 2512 pathB.cubicTo(613.685303f, 99.9921265f, 614.423767f, 99.7681885f, 615.017395
f, 100.085449f); |
2524 pathB.lineTo(932.633057f, 269.854553f); | 2513 pathB.lineTo(932.633057f, 269.854553f); |
2525 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301
f, 271.503906f); | 2514 pathB.cubicTo(933.226685f, 270.171875f, 933.450623f, 270.910278f, 933.133301
f, 271.503906f); |
2526 pathB.lineTo(653.631897f, 794.414307f); | 2515 pathB.lineTo(653.631897f, 794.414307f); |
2527 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544
f, 794.914612f); | 2516 pathB.cubicTo(653.314636f, 795.007935f, 652.576172f, 795.231934f, 651.982544
f, 794.914612f); |
2528 pathB.lineTo(334.366943f, 625.145508f); | 2517 pathB.lineTo(334.366943f, 625.145508f); |
2529 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608
f, 623.496155f); | 2518 pathB.cubicTo(333.773315f, 624.828247f, 333.549286f, 624.089783f, 333.866608
f, 623.496155f); |
2530 pathB.lineTo(613.368042f, 100.585754f); | 2519 pathB.lineTo(613.368042f, 100.585754f); |
2531 pathB.close(); | 2520 pathB.close(); |
2532 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2521 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2533 } | 2522 } |
2534 | 2523 |
2535 static void skpadoption_org196(skiatest::Reporter* reporter, const char* filenam
e) { | 2524 static void skpadoption_org196(skiatest::Reporter* reporter, const char* filenam
e) { |
2536 SkPath path; | 2525 SkPath path; |
2537 path.setFillType(SkPath::kEvenOdd_FillType); | 2526 path.setFillType(SkPath::kEvenOdd_FillType); |
2538 path.moveTo(802, 367); | 2527 path.moveTo(802, 367); |
2539 path.lineTo(802, 324); | 2528 path.lineTo(802, 324); |
2540 path.lineTo(956, 324); | 2529 path.lineTo(956, 324); |
2541 path.lineTo(956, 371); | 2530 path.lineTo(956, 371); |
2542 path.quadTo(956, 373.071075f, 954.536011f, 374.536011f); | 2531 path.quadTo(956, 373.071075f, 954.536011f, 374.536011f); |
2543 path.quadTo(953.071045f, 376, 951, 376); | 2532 path.quadTo(953.071045f, 376, 951, 376); |
2544 path.lineTo(811, 376); | 2533 path.lineTo(811, 376); |
2545 path.cubicTo(806.029419f, 376, 802, 371.970551f, 802, 367); | 2534 path.cubicTo(806.029419f, 376, 802, 371.970551f, 802, 367); |
2546 path.close(); | 2535 path.close(); |
2547 SkPath pathB; | 2536 SkPath pathB; |
2548 pathB.setFillType(SkPath::kInverseWinding_FillType); | 2537 pathB.setFillType(SkPath::kInverseWinding_FillType); |
2549 pathB.moveTo(803, 326); | 2538 pathB.moveTo(803, 326); |
2550 pathB.lineTo(955, 326); | 2539 pathB.lineTo(955, 326); |
2551 pathB.lineTo(955, 370); | 2540 pathB.lineTo(955, 370); |
2552 pathB.cubicTo(955, 372.761414f, 952.761414f, 375, 950, 375); | 2541 pathB.cubicTo(955, 372.761414f, 952.761414f, 375, 950, 375); |
2553 pathB.lineTo(808, 375); | 2542 pathB.lineTo(808, 375); |
2554 pathB.cubicTo(805.238586f, 375, 803, 372.761414f, 803, 370); | 2543 pathB.cubicTo(805.238586f, 375, 803, 372.761414f, 803, 370); |
2555 pathB.lineTo(803, 326); | 2544 pathB.lineTo(803, 326); |
2556 pathB.close(); | 2545 pathB.close(); |
2557 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2546 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2558 } | 2547 } |
2559 | 2548 |
2560 static void skpadspert_net23(skiatest::Reporter* reporter, const char* filename)
{ | 2549 static void skpadspert_net23(skiatest::Reporter* reporter, const char* filename)
{ |
2561 SkPath path; | 2550 SkPath path; |
2562 path.setFillType(SkPath::kEvenOdd_FillType); | 2551 path.setFillType(SkPath::kEvenOdd_FillType); |
2563 path.moveTo(-2.220446e-018f, 483.5f); | 2552 path.moveTo(-2.220446e-018f, 483.5f); |
2564 path.lineTo(0, 482.5f); | 2553 path.lineTo(0, 482.5f); |
2565 path.lineTo(30.5f, 482.5f); | 2554 path.lineTo(30.5f, 482.5f); |
2566 path.cubicTo(32.709137f, 482.5f, 34.5f, 484.290863f, 34.5f, 486.5f); | 2555 path.cubicTo(32.709137f, 482.5f, 34.5f, 484.290863f, 34.5f, 486.5f); |
2567 path.lineTo(34.5f, 678.5f); | 2556 path.lineTo(34.5f, 678.5f); |
2568 path.cubicTo(34.5f, 680.709167f, 32.709137f, 682.5f, 30.5f, 682.5f); | 2557 path.cubicTo(34.5f, 680.709167f, 32.709137f, 682.5f, 30.5f, 682.5f); |
2569 path.lineTo(-4.4408921e-016f, 682.5f); | 2558 path.lineTo(-4.4408921e-016f, 682.5f); |
2570 path.lineTo(-4.41868766e-016f, 681.5f); | 2559 path.lineTo(-4.41868766e-016f, 681.5f); |
2571 path.lineTo(30.5f, 681.5f); | 2560 path.lineTo(30.5f, 681.5f); |
2572 path.cubicTo(32.1568565f, 681.5f, 33.5f, 680.15686f, 33.5f, 678.5f); | 2561 path.cubicTo(32.1568565f, 681.5f, 33.5f, 680.15686f, 33.5f, 678.5f); |
2573 path.lineTo(33.5f, 486.5f); | 2562 path.lineTo(33.5f, 486.5f); |
2574 path.cubicTo(33.5f, 484.84314f, 32.1568565f, 483.5f, 30.5f, 483.5f); | 2563 path.cubicTo(33.5f, 484.84314f, 32.1568565f, 483.5f, 30.5f, 483.5f); |
2575 path.lineTo(-2.220446e-018f, 483.5f); | 2564 path.lineTo(-2.220446e-018f, 483.5f); |
2576 path.close(); | 2565 path.close(); |
2577 SkPath pathB; | 2566 SkPath pathB; |
2578 pathB.setFillType(SkPath::kWinding_FillType); | 2567 pathB.setFillType(SkPath::kWinding_FillType); |
2579 pathB.moveTo(0, 482); | 2568 pathB.moveTo(0, 482); |
2580 pathB.lineTo(35, 482); | 2569 pathB.lineTo(35, 482); |
2581 pathB.lineTo(35, 683); | 2570 pathB.lineTo(35, 683); |
2582 pathB.lineTo(0, 683); | 2571 pathB.lineTo(0, 683); |
2583 pathB.close(); | 2572 pathB.close(); |
2584 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2573 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2585 } | 2574 } |
2586 | 2575 |
2587 static void skpadventistmission_org572(skiatest::Reporter* reporter, const char*
filename) { | 2576 static void skpadventistmission_org572(skiatest::Reporter* reporter, const char*
filename) { |
2588 SkPath path; | 2577 SkPath path; |
2589 path.setFillType(SkPath::kEvenOdd_FillType); | 2578 path.setFillType(SkPath::kEvenOdd_FillType); |
2590 path.moveTo(1182.00037f, 926); | 2579 path.moveTo(1182.00037f, 926); |
2591 path.cubicTo(1181.08813f, 924.785583f, 1179.63586f, 924, 1178, 924); | 2580 path.cubicTo(1181.08813f, 924.785583f, 1179.63586f, 924, 1178, 924); |
2592 path.lineTo(938, 924); | 2581 path.lineTo(938, 924); |
2593 path.cubicTo(936.364197f, 924, 934.911865f, 924.785583f, 933.999634f, 926); | 2582 path.cubicTo(936.364197f, 924, 934.911865f, 924.785583f, 933.999634f, 926); |
2594 path.lineTo(1182.00037f, 926); | 2583 path.lineTo(1182.00037f, 926); |
2595 path.close(); | 2584 path.close(); |
2596 SkPath pathB; | 2585 SkPath pathB; |
2597 pathB.setFillType(SkPath::kWinding_FillType); | 2586 pathB.setFillType(SkPath::kWinding_FillType); |
2598 pathB.moveTo(934, 924); | 2587 pathB.moveTo(934, 924); |
2599 pathB.lineTo(1182, 924); | 2588 pathB.lineTo(1182, 924); |
2600 pathB.lineTo(1182, 926); | 2589 pathB.lineTo(1182, 926); |
2601 pathB.lineTo(934, 926); | 2590 pathB.lineTo(934, 926); |
2602 pathB.close(); | 2591 pathB.close(); |
2603 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2592 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2604 } | 2593 } |
2605 | 2594 |
2606 static void skpagentxsites_com55(skiatest::Reporter* reporter, const char* filen
ame) { | 2595 static void skpagentxsites_com55(skiatest::Reporter* reporter, const char* filen
ame) { |
2607 SkPath path; | 2596 SkPath path; |
2608 path.setFillType(SkPath::kEvenOdd_FillType); | 2597 path.setFillType(SkPath::kEvenOdd_FillType); |
2609 path.moveTo(925, 27); | 2598 path.moveTo(925, 27); |
2610 path.cubicTo(924.447693f, 27, 924, 27.4477158f, 924, 28); | 2599 path.cubicTo(924.447693f, 27, 924, 27.4477158f, 924, 28); |
2611 path.lineTo(924, 55); | 2600 path.lineTo(924, 55); |
2612 path.cubicTo(924, 55.5522842f, 924.447693f, 56, 925, 56); | 2601 path.cubicTo(924, 55.5522842f, 924.447693f, 56, 925, 56); |
2613 path.lineTo(1103, 56); | 2602 path.lineTo(1103, 56); |
2614 path.cubicTo(1103.55225f, 56, 1104, 55.5522842f, 1104, 55); | 2603 path.cubicTo(1103.55225f, 56, 1104, 55.5522842f, 1104, 55); |
2615 path.lineTo(1104, 28); | 2604 path.lineTo(1104, 28); |
2616 path.cubicTo(1104, 27.4477158f, 1103.55225f, 27, 1103, 27); | 2605 path.cubicTo(1104, 27.4477158f, 1103.55225f, 27, 1103, 27); |
2617 path.lineTo(925, 27); | 2606 path.lineTo(925, 27); |
2618 path.close(); | 2607 path.close(); |
2619 SkPath pathB; | 2608 SkPath pathB; |
2620 pathB.setFillType(SkPath::kWinding_FillType); | 2609 pathB.setFillType(SkPath::kWinding_FillType); |
2621 pathB.moveTo(1103, 27); | 2610 pathB.moveTo(1103, 27); |
2622 pathB.cubicTo(1104.10461f, 27, 1105, 27.8954315f, 1105, 29); | 2611 pathB.cubicTo(1104.10461f, 27, 1105, 27.8954315f, 1105, 29); |
2623 pathB.lineTo(1105, 54); | 2612 pathB.lineTo(1105, 54); |
2624 pathB.cubicTo(1105, 55.1045685f, 1104.10461f, 56, 1103, 56); | 2613 pathB.cubicTo(1105, 55.1045685f, 1104.10461f, 56, 1103, 56); |
2625 pathB.lineTo(926, 56); | 2614 pathB.lineTo(926, 56); |
2626 pathB.cubicTo(924.895447f, 56, 924, 55.1045685f, 924, 54); | 2615 pathB.cubicTo(924.895447f, 56, 924, 55.1045685f, 924, 54); |
2627 pathB.lineTo(924, 29); | 2616 pathB.lineTo(924, 29); |
2628 pathB.cubicTo(924, 27.8954315f, 924.895447f, 27, 926, 27); | 2617 pathB.cubicTo(924, 27.8954315f, 924.895447f, 27, 926, 27); |
2629 pathB.lineTo(1103, 27); | 2618 pathB.lineTo(1103, 27); |
2630 pathB.close(); | 2619 pathB.close(); |
2631 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2620 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2632 } | 2621 } |
2633 | 2622 |
2634 static void skpbakosoft_com10(skiatest::Reporter* reporter, const char* filename
) { | 2623 static void skpbakosoft_com10(skiatest::Reporter* reporter, const char* filename
) { |
2635 SkPath path; | 2624 SkPath path; |
2636 path.setFillType(SkPath::kEvenOdd_FillType); | 2625 path.setFillType(SkPath::kEvenOdd_FillType); |
2637 path.moveTo(190, 170); | 2626 path.moveTo(190, 170); |
2638 path.cubicTo(178.9543f, 170, 170, 178.9543f, 170, 190); | 2627 path.cubicTo(178.9543f, 170, 170, 178.9543f, 170, 190); |
2639 path.cubicTo(170, 201.0457f, 178.9543f, 210, 190, 210); | 2628 path.cubicTo(170, 201.0457f, 178.9543f, 210, 190, 210); |
2640 path.lineTo(370, 210); | 2629 path.lineTo(370, 210); |
2641 path.cubicTo(381.045685f, 210, 390, 201.0457f, 390, 190); | 2630 path.cubicTo(381.045685f, 210, 390, 201.0457f, 390, 190); |
2642 path.cubicTo(390, 178.9543f, 381.045685f, 170, 370, 170); | 2631 path.cubicTo(390, 178.9543f, 381.045685f, 170, 370, 170); |
2643 path.lineTo(190, 170); | 2632 path.lineTo(190, 170); |
2644 path.close(); | 2633 path.close(); |
2645 SkPath pathB; | 2634 SkPath pathB; |
2646 pathB.setFillType(SkPath::kWinding_FillType); | 2635 pathB.setFillType(SkPath::kWinding_FillType); |
2647 pathB.moveTo(210, 190); | 2636 pathB.moveTo(210, 190); |
2648 pathB.quadTo(210, 198.284271f, 204.142136f, 204.142136f); | 2637 pathB.quadTo(210, 198.284271f, 204.142136f, 204.142136f); |
2649 pathB.quadTo(198.284271f, 210, 190, 210); | 2638 pathB.quadTo(198.284271f, 210, 190, 210); |
2650 pathB.quadTo(181.715729f, 210, 175.857864f, 204.142136f); | 2639 pathB.quadTo(181.715729f, 210, 175.857864f, 204.142136f); |
2651 pathB.quadTo(170, 198.284271f, 170, 190); | 2640 pathB.quadTo(170, 198.284271f, 170, 190); |
2652 pathB.quadTo(170, 181.715729f, 175.857864f, 175.857864f); | 2641 pathB.quadTo(170, 181.715729f, 175.857864f, 175.857864f); |
2653 pathB.quadTo(181.715729f, 170, 190, 170); | 2642 pathB.quadTo(181.715729f, 170, 190, 170); |
2654 pathB.quadTo(198.284271f, 170, 204.142136f, 175.857864f); | 2643 pathB.quadTo(198.284271f, 170, 204.142136f, 175.857864f); |
2655 pathB.quadTo(210, 181.715729f, 210, 190); | 2644 pathB.quadTo(210, 181.715729f, 210, 190); |
2656 pathB.close(); | 2645 pathB.close(); |
2657 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2646 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2658 } | 2647 } |
2659 | 2648 |
2660 static void skpbambootheme_com12(skiatest::Reporter* reporter, const char* filen
ame) { | 2649 static void skpbambootheme_com12(skiatest::Reporter* reporter, const char* filen
ame) { |
2661 SkPath path; | 2650 SkPath path; |
2662 path.setFillType(SkPath::kEvenOdd_FillType); | 2651 path.setFillType(SkPath::kEvenOdd_FillType); |
2663 path.moveTo(47.8780937f, 58); | 2652 path.moveTo(47.8780937f, 58); |
2664 path.lineTo(0, 58); | 2653 path.lineTo(0, 58); |
2665 path.lineTo(-8.65973959e-015f, 96.9914017f); | 2654 path.lineTo(-8.65973959e-015f, 96.9914017f); |
2666 path.quadTo(20.0654926f, 96.6451874f, 34.3553391f, 82.3553391f); | 2655 path.quadTo(20.0654926f, 96.6451874f, 34.3553391f, 82.3553391f); |
2667 path.quadTo(44.9466133f, 71.764061f, 47.8780937f, 58); | 2656 path.quadTo(44.9466133f, 71.764061f, 47.8780937f, 58); |
2668 path.close(); | 2657 path.close(); |
2669 SkPath pathB; | 2658 SkPath pathB; |
2670 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2659 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2671 pathB.moveTo(-1, -3); | 2660 pathB.moveTo(-1, -3); |
2672 pathB.lineTo(-1, -3); | 2661 pathB.lineTo(-1, -3); |
2673 pathB.cubicTo(26.6142502f, -3, 49, 19.3857498f, 49, 47); | 2662 pathB.cubicTo(26.6142502f, -3, 49, 19.3857498f, 49, 47); |
2674 pathB.lineTo(49, 47); | 2663 pathB.lineTo(49, 47); |
2675 pathB.cubicTo(49, 74.6142502f, 26.6142502f, 97, -1, 97); | 2664 pathB.cubicTo(49, 74.6142502f, 26.6142502f, 97, -1, 97); |
2676 pathB.lineTo(-1, 97); | 2665 pathB.lineTo(-1, 97); |
2677 pathB.cubicTo(-28.6142502f, 97, -51, 74.6142502f, -51, 47); | 2666 pathB.cubicTo(-28.6142502f, 97, -51, 74.6142502f, -51, 47); |
2678 pathB.lineTo(-51, 47); | 2667 pathB.lineTo(-51, 47); |
2679 pathB.cubicTo(-51, 19.3857498f, -28.6142502f, -3, -1, -3); | 2668 pathB.cubicTo(-51, 19.3857498f, -28.6142502f, -3, -1, -3); |
2680 pathB.close(); | 2669 pathB.close(); |
2681 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2670 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2682 } | 2671 } |
2683 | 2672 |
2684 static void skpakmmos_ru100(skiatest::Reporter* reporter, const char* filename)
{ | 2673 static void skpakmmos_ru100(skiatest::Reporter* reporter, const char* filename)
{ |
2685 SkPath path; | 2674 SkPath path; |
2686 path.setFillType(SkPath::kEvenOdd_FillType); | 2675 path.setFillType(SkPath::kEvenOdd_FillType); |
2687 path.moveTo(693.000488f, 926); | 2676 path.moveTo(693.000488f, 926); |
2688 path.cubicTo(692.164734f, 925.37207f, 691.125793f, 925, 690, 925); | 2677 path.cubicTo(692.164734f, 925.37207f, 691.125793f, 925, 690, 925); |
2689 path.lineTo(578, 925); | 2678 path.lineTo(578, 925); |
2690 path.cubicTo(576.874207f, 925, 575.835266f, 925.37207f, 574.999512f, 926); | 2679 path.cubicTo(576.874207f, 925, 575.835266f, 925.37207f, 574.999512f, 926); |
2691 path.lineTo(693.000488f, 926); | 2680 path.lineTo(693.000488f, 926); |
2692 path.close(); | 2681 path.close(); |
2693 SkPath pathB; | 2682 SkPath pathB; |
2694 pathB.setFillType(SkPath::kWinding_FillType); | 2683 pathB.setFillType(SkPath::kWinding_FillType); |
2695 pathB.moveTo(575, 925); | 2684 pathB.moveTo(575, 925); |
2696 pathB.lineTo(693, 925); | 2685 pathB.lineTo(693, 925); |
2697 pathB.lineTo(693, 926); | 2686 pathB.lineTo(693, 926); |
2698 pathB.lineTo(575, 926); | 2687 pathB.lineTo(575, 926); |
2699 pathB.close(); | 2688 pathB.close(); |
2700 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2689 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2701 } | 2690 } |
2702 | 2691 |
2703 static void skpcarpetplanet_ru22(skiatest::Reporter* reporter, const char* filen
ame) { | 2692 static void skpcarpetplanet_ru22(skiatest::Reporter* reporter, const char* filen
ame) { |
2704 SkPath path; | 2693 SkPath path; |
2705 path.setFillType(SkPath::kEvenOdd_FillType); | 2694 path.setFillType(SkPath::kEvenOdd_FillType); |
2706 path.moveTo(195, 785); | 2695 path.moveTo(195, 785); |
2707 path.cubicTo(124.307556f, 785, 67, 841.859863f, 67, 912); | 2696 path.cubicTo(124.307556f, 785, 67, 841.859863f, 67, 912); |
2708 path.lineTo(67, 913); | 2697 path.lineTo(67, 913); |
2709 path.cubicTo(67, 917.388916f, 67.2243805f, 921.725769f, 67.662384f, 926); | 2698 path.cubicTo(67, 917.388916f, 67.2243805f, 921.725769f, 67.662384f, 926); |
2710 path.lineTo(322, 926); | 2699 path.lineTo(322, 926); |
2711 path.lineTo(322, 896.048035f); | 2700 path.lineTo(322, 896.048035f); |
2712 path.cubicTo(314.09201f, 833.437622f, 260.247131f, 785, 195, 785); | 2701 path.cubicTo(314.09201f, 833.437622f, 260.247131f, 785, 195, 785); |
2713 path.close(); | 2702 path.close(); |
2714 SkPath pathB; | 2703 SkPath pathB; |
2715 pathB.setFillType(SkPath::kWinding_FillType); | 2704 pathB.setFillType(SkPath::kWinding_FillType); |
2716 pathB.moveTo(195, 785); | 2705 pathB.moveTo(195, 785); |
2717 pathB.cubicTo(265.140167f, 785, 322, 842.307556f, 322, 913); | 2706 pathB.cubicTo(265.140167f, 785, 322, 842.307556f, 322, 913); |
2718 pathB.cubicTo(322, 983.692444f, 265.140167f, 1041, 195, 1041); | 2707 pathB.cubicTo(322, 983.692444f, 265.140167f, 1041, 195, 1041); |
2719 pathB.lineTo(194, 1041); | 2708 pathB.lineTo(194, 1041); |
2720 pathB.cubicTo(123.85984f, 1041, 67, 983.692444f, 67, 913); | 2709 pathB.cubicTo(123.85984f, 1041, 67, 983.692444f, 67, 913); |
2721 pathB.cubicTo(67, 842.307556f, 123.85984f, 785, 194, 785); | 2710 pathB.cubicTo(67, 842.307556f, 123.85984f, 785, 194, 785); |
2722 pathB.lineTo(195, 785); | 2711 pathB.lineTo(195, 785); |
2723 pathB.close(); | 2712 pathB.close(); |
2724 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2713 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2725 } | 2714 } |
2726 | 2715 |
2727 // this fails because cubic/quad misses an intersection (failure is isolated in
c/q int test) | |
2728 static void skpcarrot_is24(skiatest::Reporter* reporter, const char* filename) { | 2716 static void skpcarrot_is24(skiatest::Reporter* reporter, const char* filename) { |
2729 SkPath path; | 2717 SkPath path; |
2730 path.setFillType(SkPath::kEvenOdd_FillType); | 2718 path.setFillType(SkPath::kEvenOdd_FillType); |
2731 path.moveTo(945, 597); | 2719 path.moveTo(945, 597); |
2732 path.quadTo(913.93396f, 597, 891.96698f, 618.96698f); | 2720 path.quadTo(913.93396f, 597, 891.96698f, 618.96698f); |
2733 path.quadTo(870, 640.93396f, 870, 672); | 2721 path.quadTo(870, 640.93396f, 870, 672); |
2734 path.quadTo(870, 703.06604f, 891.96698f, 725.03302f); | 2722 path.quadTo(870, 703.06604f, 891.96698f, 725.03302f); |
2735 path.quadTo(913.93396f, 747, 945, 747); | 2723 path.quadTo(913.93396f, 747, 945, 747); |
2736 path.quadTo(976.06604f, 747, 998.03302f, 725.03302f); | 2724 path.quadTo(976.06604f, 747, 998.03302f, 725.03302f); |
2737 path.quadTo(1020, 703.06604f, 1020, 672); | 2725 path.quadTo(1020, 703.06604f, 1020, 672); |
2738 path.quadTo(1020, 640.93396f, 998.03302f, 618.96698f); | 2726 path.quadTo(1020, 640.93396f, 998.03302f, 618.96698f); |
2739 path.quadTo(976.06604f, 597, 945, 597); | 2727 path.quadTo(976.06604f, 597, 945, 597); |
2740 path.close(); | 2728 path.close(); |
2741 SkPath pathB; | 2729 SkPath pathB; |
2742 pathB.setFillType(SkPath::kWinding_FillType); | 2730 pathB.setFillType(SkPath::kWinding_FillType); |
2743 pathB.moveTo(945.080994f, 597.161987f); | 2731 pathB.moveTo(945.080994f, 597.161987f); |
2744 pathB.cubicTo(903.659973f, 597.161987f, 870.080994f, 630.73999f, 870.080994f
, 672.161987f); | 2732 pathB.cubicTo(903.659973f, 597.161987f, 870.080994f, 630.73999f, 870.080994f
, 672.161987f); |
2745 pathB.cubicTo(870.080994f, 676.096008f, 870.387024f, 679.957031f, 870.971008
f, 683.726013f); | 2733 pathB.cubicTo(870.080994f, 676.096008f, 870.387024f, 679.957031f, 870.971008
f, 683.726013f); |
2746 pathB.cubicTo(876.53302f, 719.656006f, 907.593994f, 747.161987f, 945.080994f
, 747.161987f); | 2734 pathB.cubicTo(876.53302f, 719.656006f, 907.593994f, 747.161987f, 945.080994f
, 747.161987f); |
2747 pathB.cubicTo(982.567993f, 747.161987f, 1013.62903f, 719.656006f, 1019.19104
f, 683.726013f); | 2735 pathB.cubicTo(982.567993f, 747.161987f, 1013.62903f, 719.656006f, 1019.19104
f, 683.726013f); |
2748 pathB.cubicTo(1019.77502f, 679.955017f, 1020.08099f, 676.094971f, 1020.08099
f, 672.161987f); | 2736 pathB.cubicTo(1019.77502f, 679.955017f, 1020.08099f, 676.094971f, 1020.08099
f, 672.161987f); |
2749 pathB.cubicTo(1020.08002f, 630.73999f, 986.502014f, 597.161987f, 945.080994f
, 597.161987f); | 2737 pathB.cubicTo(1020.08002f, 630.73999f, 986.502014f, 597.161987f, 945.080994f
, 597.161987f); |
2750 pathB.close(); | 2738 pathB.close(); |
2751 testPathOpCheck(reporter, path, pathB, kIntersect_PathOp, filename, FLAGS_ru
nFail); | 2739 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2752 } | 2740 } |
2753 | 2741 |
2754 static void skpbangalorenest_com4(skiatest::Reporter* reporter, const char* file
name) { | 2742 static void skpbangalorenest_com4(skiatest::Reporter* reporter, const char* file
name) { |
2755 SkPath path; | 2743 SkPath path; |
2756 path.setFillType(SkPath::kEvenOdd_FillType); | 2744 path.setFillType(SkPath::kEvenOdd_FillType); |
2757 path.moveTo(0, 926); | 2745 path.moveTo(0, 926); |
2758 path.lineTo(0, 0); | 2746 path.lineTo(0, 0); |
2759 path.lineTo(1265, 0); | 2747 path.lineTo(1265, 0); |
2760 path.lineTo(1265, 926); | 2748 path.lineTo(1265, 926); |
2761 path.lineTo(0, 926); | 2749 path.lineTo(0, 926); |
2762 path.close(); | 2750 path.close(); |
2763 SkPath pathB; | 2751 SkPath pathB; |
2764 pathB.setFillType(SkPath::kWinding_FillType); | 2752 pathB.setFillType(SkPath::kWinding_FillType); |
2765 pathB.moveTo(0, 290); | 2753 pathB.moveTo(0, 290); |
2766 pathB.lineTo(-2.64514972e-014f, 146); | 2754 pathB.lineTo(-2.64514972e-014f, 146); |
2767 pathB.lineTo(30, 146); | 2755 pathB.lineTo(30, 146); |
2768 pathB.lineTo(30, 290); | 2756 pathB.lineTo(30, 290); |
2769 pathB.close(); | 2757 pathB.close(); |
2770 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2758 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2771 } | 2759 } |
2772 | 2760 |
2773 static void skpbenzoteh_ru152(skiatest::Reporter* reporter, const char* filename
) { | 2761 static void skpbenzoteh_ru152(skiatest::Reporter* reporter, const char* filename
) { |
2774 SkPath path; | 2762 SkPath path; |
2775 path.setFillType(SkPath::kEvenOdd_FillType); | 2763 path.setFillType(SkPath::kEvenOdd_FillType); |
2776 path.moveTo(883, 23); | 2764 path.moveTo(883, 23); |
2777 path.lineTo(883, 0); | 2765 path.lineTo(883, 0); |
2778 path.lineTo(1122.5f, 0); | 2766 path.lineTo(1122.5f, 0); |
2779 path.lineTo(1122.5f, 25.2136822f); | 2767 path.lineTo(1122.5f, 25.2136822f); |
2780 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); | 2768 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); |
2781 path.quadTo(1120.07104f, 28, 1118, 28); | 2769 path.quadTo(1120.07104f, 28, 1118, 28); |
2782 path.lineTo(888, 28); | 2770 path.lineTo(888, 28); |
2783 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2771 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2784 path.quadTo(883, 25.0710678f, 883, 23); | 2772 path.quadTo(883, 25.0710678f, 883, 23); |
2785 path.close(); | 2773 path.close(); |
2786 SkPath pathB; | 2774 SkPath pathB; |
2787 pathB.setFillType(SkPath::kWinding_FillType); | 2775 pathB.setFillType(SkPath::kWinding_FillType); |
2788 pathB.moveTo(883, 0); | 2776 pathB.moveTo(883, 0); |
2789 pathB.lineTo(1123, 0); | 2777 pathB.lineTo(1123, 0); |
2790 pathB.lineTo(1123, 23); | 2778 pathB.lineTo(1123, 23); |
2791 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); | 2779 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); |
2792 pathB.quadTo(1120.07104f, 28, 1118, 28); | 2780 pathB.quadTo(1120.07104f, 28, 1118, 28); |
2793 pathB.lineTo(888, 28); | 2781 pathB.lineTo(888, 28); |
2794 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2782 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2795 pathB.quadTo(883, 25.0710678f, 883, 23); | 2783 pathB.quadTo(883, 25.0710678f, 883, 23); |
2796 pathB.close(); | 2784 pathB.close(); |
2797 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2785 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2798 } | 2786 } |
2799 | 2787 |
2800 static void skpbestred_ru37(skiatest::Reporter* reporter, const char* filename)
{ | 2788 static void skpbestred_ru37(skiatest::Reporter* reporter, const char* filename)
{ |
2801 SkPath path; | 2789 SkPath path; |
2802 path.setFillType(SkPath::kEvenOdd_FillType); | 2790 path.setFillType(SkPath::kEvenOdd_FillType); |
2803 path.moveTo(883, 23); | 2791 path.moveTo(883, 23); |
2804 path.lineTo(883, 0); | 2792 path.lineTo(883, 0); |
2805 path.lineTo(1122.5f, 0); | 2793 path.lineTo(1122.5f, 0); |
2806 path.lineTo(1122.5f, 25.2136822f); | 2794 path.lineTo(1122.5f, 25.2136822f); |
2807 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); | 2795 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); |
2808 path.quadTo(1120.07104f, 28, 1118, 28); | 2796 path.quadTo(1120.07104f, 28, 1118, 28); |
2809 path.lineTo(888, 28); | 2797 path.lineTo(888, 28); |
2810 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2798 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2811 path.quadTo(883, 25.0710678f, 883, 23); | 2799 path.quadTo(883, 25.0710678f, 883, 23); |
2812 path.close(); | 2800 path.close(); |
2813 SkPath pathB; | 2801 SkPath pathB; |
2814 pathB.setFillType(SkPath::kWinding_FillType); | 2802 pathB.setFillType(SkPath::kWinding_FillType); |
2815 pathB.moveTo(883, 0); | 2803 pathB.moveTo(883, 0); |
2816 pathB.lineTo(1123, 0); | 2804 pathB.lineTo(1123, 0); |
2817 pathB.lineTo(1123, 23); | 2805 pathB.lineTo(1123, 23); |
2818 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); | 2806 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); |
2819 pathB.quadTo(1120.07104f, 28, 1118, 28); | 2807 pathB.quadTo(1120.07104f, 28, 1118, 28); |
2820 pathB.lineTo(888, 28); | 2808 pathB.lineTo(888, 28); |
2821 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2809 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2822 pathB.quadTo(883, 25.0710678f, 883, 23); | 2810 pathB.quadTo(883, 25.0710678f, 883, 23); |
2823 pathB.close(); | 2811 pathB.close(); |
2824 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2812 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2825 } | 2813 } |
2826 | 2814 |
2827 static void skpbingoentertainment_net189(skiatest::Reporter* reporter, const cha
r* filename) { | 2815 static void skpbingoentertainment_net189(skiatest::Reporter* reporter, const cha
r* filename) { |
2828 SkPath path; | 2816 SkPath path; |
2829 path.setFillType(SkPath::kEvenOdd_FillType); | 2817 path.setFillType(SkPath::kEvenOdd_FillType); |
2830 path.moveTo(896, 745.38678f); | 2818 path.moveTo(896, 745.38678f); |
2831 path.lineTo(896, 873.38678f); | 2819 path.lineTo(896, 873.38678f); |
2832 path.lineTo(922.567993f, 876.683716f); | 2820 path.lineTo(922.567993f, 876.683716f); |
2833 path.lineTo(922.567993f, 748.683716f); | 2821 path.lineTo(922.567993f, 748.683716f); |
2834 path.lineTo(896, 745.38678f); | 2822 path.lineTo(896, 745.38678f); |
2835 path.close(); | 2823 path.close(); |
2836 SkPath pathB; | 2824 SkPath pathB; |
2837 pathB.setFillType(SkPath::kWinding_FillType); | 2825 pathB.setFillType(SkPath::kWinding_FillType); |
2838 pathB.moveTo(899.200928f, 745.783997f); | 2826 pathB.moveTo(899.200928f, 745.783997f); |
2839 pathB.cubicTo(897.119385f, 745.525696f, 895.432007f, 752.031982f, 895.432007
f, 760.316284f); | 2827 pathB.cubicTo(897.119385f, 745.525696f, 895.432007f, 752.031982f, 895.432007
f, 760.316284f); |
2840 pathB.lineTo(895.432007f, 858.316284f); | 2828 pathB.lineTo(895.432007f, 858.316284f); |
2841 pathB.cubicTo(895.432007f, 866.600586f, 897.119385f, 873.525696f, 899.200928
f, 873.783997f); | 2829 pathB.cubicTo(895.432007f, 866.600586f, 897.119385f, 873.525696f, 899.200928
f, 873.783997f); |
2842 pathB.lineTo(918.799133f, 876.216003f); | 2830 pathB.lineTo(918.799133f, 876.216003f); |
2843 pathB.cubicTo(920.880615f, 876.474304f, 922.567993f, 869.968018f, 922.567993
f, 861.683716f); | 2831 pathB.cubicTo(920.880615f, 876.474304f, 922.567993f, 869.968018f, 922.567993
f, 861.683716f); |
2844 pathB.lineTo(922.567993f, 763.683716f); | 2832 pathB.lineTo(922.567993f, 763.683716f); |
2845 pathB.cubicTo(922.567993f, 755.399414f, 920.880615f, 748.474304f, 918.799133
f, 748.216003f); | 2833 pathB.cubicTo(922.567993f, 755.399414f, 920.880615f, 748.474304f, 918.799133
f, 748.216003f); |
2846 pathB.lineTo(899.200928f, 745.783997f); | 2834 pathB.lineTo(899.200928f, 745.783997f); |
2847 pathB.close(); | 2835 pathB.close(); |
2848 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2836 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2849 } | 2837 } |
2850 | 2838 |
2851 static void skpcarrefour_ro62(skiatest::Reporter* reporter, const char* filename
) { | 2839 static void skpcarrefour_ro62(skiatest::Reporter* reporter, const char* filename
) { |
2852 SkPath path; | 2840 SkPath path; |
2853 path.setFillType(SkPath::kEvenOdd_FillType); | 2841 path.setFillType(SkPath::kEvenOdd_FillType); |
2854 path.moveTo(1104, 453); | 2842 path.moveTo(1104, 453); |
2855 path.lineTo(399, 453); | 2843 path.lineTo(399, 453); |
2856 path.lineTo(399, 657); | 2844 path.lineTo(399, 657); |
2857 path.cubicTo(399, 661.970581f, 403.029449f, 666, 408, 666); | 2845 path.cubicTo(399, 661.970581f, 403.029449f, 666, 408, 666); |
2858 path.lineTo(1095, 666); | 2846 path.lineTo(1095, 666); |
2859 path.cubicTo(1099.97058f, 666, 1104, 661.970581f, 1104, 657); | 2847 path.cubicTo(1099.97058f, 666, 1104, 661.970581f, 1104, 657); |
2860 path.lineTo(1104, 453); | 2848 path.lineTo(1104, 453); |
2861 path.close(); | 2849 path.close(); |
2862 SkPath pathB; | 2850 SkPath pathB; |
2863 pathB.setFillType(SkPath::kInverseWinding_FillType); | 2851 pathB.setFillType(SkPath::kInverseWinding_FillType); |
2864 pathB.moveTo(400, 453); | 2852 pathB.moveTo(400, 453); |
2865 pathB.lineTo(1103, 453); | 2853 pathB.lineTo(1103, 453); |
2866 pathB.lineTo(1103, 666); | 2854 pathB.lineTo(1103, 666); |
2867 pathB.lineTo(406, 666); | 2855 pathB.lineTo(406, 666); |
2868 pathB.cubicTo(402.686279f, 666, 400, 663.313721f, 400, 660); | 2856 pathB.cubicTo(402.686279f, 666, 400, 663.313721f, 400, 660); |
2869 pathB.lineTo(400, 453); | 2857 pathB.lineTo(400, 453); |
2870 pathB.close(); | 2858 pathB.close(); |
2871 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2859 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2872 } | 2860 } |
2873 | 2861 |
2874 static void skpcaffelavazzait_com_ua21(skiatest::Reporter* reporter, const char*
filename) { | 2862 static void skpcaffelavazzait_com_ua21(skiatest::Reporter* reporter, const char*
filename) { |
2875 SkPath path; | 2863 SkPath path; |
2876 path.setFillType(SkPath::kEvenOdd_FillType); | 2864 path.setFillType(SkPath::kEvenOdd_FillType); |
2877 path.moveTo(883, 23); | 2865 path.moveTo(883, 23); |
2878 path.lineTo(883, 0); | 2866 path.lineTo(883, 0); |
2879 path.lineTo(1122.5f, 0); | 2867 path.lineTo(1122.5f, 0); |
2880 path.lineTo(1122.5f, 25.2136822f); | 2868 path.lineTo(1122.5f, 25.2136822f); |
2881 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); | 2869 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); |
2882 path.quadTo(1120.07104f, 28, 1118, 28); | 2870 path.quadTo(1120.07104f, 28, 1118, 28); |
2883 path.lineTo(888, 28); | 2871 path.lineTo(888, 28); |
2884 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2872 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2885 path.quadTo(883, 25.0710678f, 883, 23); | 2873 path.quadTo(883, 25.0710678f, 883, 23); |
2886 path.close(); | 2874 path.close(); |
2887 SkPath pathB; | 2875 SkPath pathB; |
2888 pathB.setFillType(SkPath::kWinding_FillType); | 2876 pathB.setFillType(SkPath::kWinding_FillType); |
2889 pathB.moveTo(883, 0); | 2877 pathB.moveTo(883, 0); |
2890 pathB.lineTo(1123, 0); | 2878 pathB.lineTo(1123, 0); |
2891 pathB.lineTo(1123, 23); | 2879 pathB.lineTo(1123, 23); |
2892 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); | 2880 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); |
2893 pathB.quadTo(1120.07104f, 28, 1118, 28); | 2881 pathB.quadTo(1120.07104f, 28, 1118, 28); |
2894 pathB.lineTo(888, 28); | 2882 pathB.lineTo(888, 28); |
2895 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2883 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2896 pathB.quadTo(883, 25.0710678f, 883, 23); | 2884 pathB.quadTo(883, 25.0710678f, 883, 23); |
2897 pathB.close(); | 2885 pathB.close(); |
2898 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2886 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2899 } | 2887 } |
2900 | 2888 |
2901 static void skpcamcorder_kz21(skiatest::Reporter* reporter, const char* filename
) { | 2889 static void skpcamcorder_kz21(skiatest::Reporter* reporter, const char* filename
) { |
2902 SkPath path; | 2890 SkPath path; |
2903 path.setFillType(SkPath::kEvenOdd_FillType); | 2891 path.setFillType(SkPath::kEvenOdd_FillType); |
2904 path.moveTo(883, 23); | 2892 path.moveTo(883, 23); |
2905 path.lineTo(883, 0); | 2893 path.lineTo(883, 0); |
2906 path.lineTo(1122.5f, 0); | 2894 path.lineTo(1122.5f, 0); |
2907 path.lineTo(1122.5f, 25.2136822f); | 2895 path.lineTo(1122.5f, 25.2136822f); |
2908 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); | 2896 path.quadTo(1122.14441f, 25.9271851f, 1121.53601f, 26.5359993f); |
2909 path.quadTo(1120.07104f, 28, 1118, 28); | 2897 path.quadTo(1120.07104f, 28, 1118, 28); |
2910 path.lineTo(888, 28); | 2898 path.lineTo(888, 28); |
2911 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2899 path.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2912 path.quadTo(883, 25.0710678f, 883, 23); | 2900 path.quadTo(883, 25.0710678f, 883, 23); |
2913 path.close(); | 2901 path.close(); |
2914 SkPath pathB; | 2902 SkPath pathB; |
2915 pathB.setFillType(SkPath::kWinding_FillType); | 2903 pathB.setFillType(SkPath::kWinding_FillType); |
2916 pathB.moveTo(883, 0); | 2904 pathB.moveTo(883, 0); |
2917 pathB.lineTo(1123, 0); | 2905 pathB.lineTo(1123, 0); |
2918 pathB.lineTo(1123, 23); | 2906 pathB.lineTo(1123, 23); |
2919 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); | 2907 pathB.quadTo(1123, 25.0710678f, 1121.53601f, 26.5359993f); |
2920 pathB.quadTo(1120.07104f, 28, 1118, 28); | 2908 pathB.quadTo(1120.07104f, 28, 1118, 28); |
2921 pathB.lineTo(888, 28); | 2909 pathB.lineTo(888, 28); |
2922 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); | 2910 pathB.quadTo(885.928955f, 28, 884.463989f, 26.5359993f); |
2923 pathB.quadTo(883, 25.0710678f, 883, 23); | 2911 pathB.quadTo(883, 25.0710678f, 883, 23); |
2924 pathB.close(); | 2912 pathB.close(); |
2925 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2913 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2926 } | 2914 } |
2927 | 2915 |
2928 static void skpcavablar_net563(skiatest::Reporter* reporter, const char* filenam
e) { | 2916 static void skpcavablar_net563(skiatest::Reporter* reporter, const char* filenam
e) { |
2929 SkPath path; | 2917 SkPath path; |
2930 path.setFillType(SkPath::kEvenOdd_FillType); | 2918 path.setFillType(SkPath::kEvenOdd_FillType); |
2931 path.moveTo(160.000488f, 918); | 2919 path.moveTo(160.000488f, 918); |
2932 path.cubicTo(159.164749f, 917.37207f, 158.125824f, 917, 157, 917); | 2920 path.cubicTo(159.164749f, 917.37207f, 158.125824f, 917, 157, 917); |
2933 path.lineTo(94, 917); | 2921 path.lineTo(94, 917); |
2934 path.cubicTo(92.874176f, 917, 91.8352661f, 917.37207f, 90.9995193f, 918); | 2922 path.cubicTo(92.874176f, 917, 91.8352661f, 917.37207f, 90.9995193f, 918); |
2935 path.lineTo(160.000488f, 918); | 2923 path.lineTo(160.000488f, 918); |
2936 path.close(); | 2924 path.close(); |
2937 SkPath pathB; | 2925 SkPath pathB; |
2938 pathB.setFillType(SkPath::kWinding_FillType); | 2926 pathB.setFillType(SkPath::kWinding_FillType); |
2939 pathB.moveTo(91, 917); | 2927 pathB.moveTo(91, 917); |
2940 pathB.lineTo(160, 917); | 2928 pathB.lineTo(160, 917); |
2941 pathB.lineTo(160, 918); | 2929 pathB.lineTo(160, 918); |
2942 pathB.lineTo(91, 918); | 2930 pathB.lineTo(91, 918); |
2943 pathB.close(); | 2931 pathB.close(); |
2944 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2932 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2945 } | 2933 } |
2946 | 2934 |
2947 static void skpinsomnia_gr72(skiatest::Reporter* reporter, const char* filename)
{ | 2935 static void skpinsomnia_gr72(skiatest::Reporter* reporter, const char* filename)
{ |
2948 SkPath path; | 2936 SkPath path; |
2949 path.setFillType(SkPath::kEvenOdd_FillType); | 2937 path.setFillType(SkPath::kEvenOdd_FillType); |
2950 path.moveTo(1138, 231); | 2938 path.moveTo(1138, 231); |
2951 path.lineTo(1137, 243.625748f); | 2939 path.lineTo(1137, 243.625748f); |
2952 path.lineTo(1137, 926); | 2940 path.lineTo(1137, 926); |
2953 path.lineTo(1139, 926); | 2941 path.lineTo(1139, 926); |
2954 path.lineTo(1139, 231); | 2942 path.lineTo(1139, 231); |
2955 path.lineTo(1138, 231); | 2943 path.lineTo(1138, 231); |
2956 path.close(); | 2944 path.close(); |
2957 SkPath pathB; | 2945 SkPath pathB; |
2958 pathB.setFillType(SkPath::kWinding_FillType); | 2946 pathB.setFillType(SkPath::kWinding_FillType); |
2959 pathB.moveTo(1139, 231); | 2947 pathB.moveTo(1139, 231); |
2960 pathB.lineTo(1138, 231); | 2948 pathB.lineTo(1138, 231); |
2961 pathB.lineTo(633, 6101); | 2949 pathB.lineTo(633, 6101); |
2962 pathB.lineTo(1139, 6607); | 2950 pathB.lineTo(1139, 6607); |
2963 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 2951 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
2964 } | 2952 } |
2965 | 2953 |
2966 static void cubicOp95u(skiatest::Reporter* reporter, const char* filename) { | 2954 static void cubicOp95u(skiatest::Reporter* reporter, const char* filename) { |
2967 SkPath path, pathB; | 2955 SkPath path, pathB; |
2968 path.setFillType(SkPath::kEvenOdd_FillType); | 2956 path.setFillType(SkPath::kEvenOdd_FillType); |
2969 path.moveTo(0, 2); | 2957 path.moveTo(0, 2); |
2970 path.cubicTo(2, 3, 5, 1, 3, 2); | 2958 path.cubicTo(2, 3, 5, 1, 3, 2); |
2971 path.close(); | 2959 path.close(); |
2972 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2960 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2973 pathB.moveTo(1, 5); | 2961 pathB.moveTo(1, 5); |
2974 pathB.cubicTo(2, 3, 2, 0, 3, 2); | 2962 pathB.cubicTo(2, 3, 2, 0, 3, 2); |
2975 pathB.close(); | 2963 pathB.close(); |
2976 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 2964 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
2977 } | 2965 } |
2978 | 2966 |
2979 static void cubicOp96d(skiatest::Reporter* reporter, const char* filename) { | 2967 static void cubicOp96d(skiatest::Reporter* reporter, const char* filename) { |
2980 SkPath path, pathB; | 2968 SkPath path, pathB; |
2981 path.setFillType(SkPath::kEvenOdd_FillType); | 2969 path.setFillType(SkPath::kEvenOdd_FillType); |
2982 path.moveTo(1, 6); | 2970 path.moveTo(1, 6); |
2983 path.cubicTo(0, 3, 6, 3, 5, 0); | 2971 path.cubicTo(0, 3, 6, 3, 5, 0); |
2984 path.close(); | 2972 path.close(); |
2985 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2973 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2986 pathB.moveTo(3, 6); | 2974 pathB.moveTo(3, 6); |
2987 pathB.cubicTo(0, 5, 6, 1, 3, 0); | 2975 pathB.cubicTo(0, 5, 6, 1, 3, 0); |
2988 pathB.close(); | 2976 pathB.close(); |
2989 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 2977 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
2990 } | 2978 } |
2991 | 2979 |
2992 static void cubicOp97x(skiatest::Reporter* reporter, const char* filename) { | 2980 static void cubicOp97x(skiatest::Reporter* reporter, const char* filename) { |
2993 SkPath path, pathB; | 2981 SkPath path, pathB; |
2994 path.setFillType(SkPath::kEvenOdd_FillType); | 2982 path.setFillType(SkPath::kEvenOdd_FillType); |
2995 path.moveTo(0, 2); | 2983 path.moveTo(0, 2); |
2996 path.cubicTo(0, 6, 2, 1, 2, 1); | 2984 path.cubicTo(0, 6, 2, 1, 2, 1); |
2997 path.close(); | 2985 path.close(); |
2998 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2986 pathB.setFillType(SkPath::kEvenOdd_FillType); |
2999 pathB.moveTo(1, 2); | 2987 pathB.moveTo(1, 2); |
3000 pathB.cubicTo(1, 2, 2, 0, 6, 0); | 2988 pathB.cubicTo(1, 2, 2, 0, 6, 0); |
3001 pathB.close(); | 2989 pathB.close(); |
3002 testPathOp(reporter, path, pathB, kXOR_PathOp, filename); | 2990 testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); |
3003 } | 2991 } |
3004 | 2992 |
3005 static void cubicOp98x(skiatest::Reporter* reporter, const char* filename) { | 2993 static void cubicOp98x(skiatest::Reporter* reporter, const char* filename) { |
3006 SkPath path, pathB; | 2994 SkPath path, pathB; |
3007 path.setFillType(SkPath::kEvenOdd_FillType); | 2995 path.setFillType(SkPath::kEvenOdd_FillType); |
3008 path.moveTo(0, 3); | 2996 path.moveTo(0, 3); |
3009 path.cubicTo(3, 6, 4, 1, 6, 3); | 2997 path.cubicTo(3, 6, 4, 1, 6, 3); |
3010 path.close(); | 2998 path.close(); |
3011 pathB.setFillType(SkPath::kEvenOdd_FillType); | 2999 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3012 pathB.moveTo(1, 4); | 3000 pathB.moveTo(1, 4); |
3013 pathB.cubicTo(3, 6, 3, 0, 6, 3); | 3001 pathB.cubicTo(3, 6, 3, 0, 6, 3); |
3014 pathB.close(); | 3002 pathB.close(); |
3015 testPathOp(reporter, path, pathB, kXOR_PathOp, filename); | 3003 testPathOp(reporter, path, pathB, kXOR_SkPathOp, filename); |
3016 } | 3004 } |
3017 | 3005 |
3018 static void cubicOp99(skiatest::Reporter* reporter, const char* filename) { | 3006 static void cubicOp99(skiatest::Reporter* reporter, const char* filename) { |
3019 SkPath path, pathB; | 3007 SkPath path, pathB; |
3020 path.setFillType(SkPath::kWinding_FillType); | 3008 path.setFillType(SkPath::kWinding_FillType); |
3021 path.moveTo(3,6); | 3009 path.moveTo(3,6); |
3022 path.cubicTo(0,3, 6,5, 5,4); | 3010 path.cubicTo(0,3, 6,5, 5,4); |
3023 path.close(); | 3011 path.close(); |
3024 pathB.setFillType(SkPath::kWinding_FillType); | 3012 pathB.setFillType(SkPath::kWinding_FillType); |
3025 pathB.moveTo(5,6); | 3013 pathB.moveTo(5,6); |
3026 pathB.cubicTo(4,5, 6,3, 3,0); | 3014 pathB.cubicTo(4,5, 6,3, 3,0); |
3027 pathB.close(); | 3015 pathB.close(); |
3028 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3016 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3029 } | 3017 } |
3030 | 3018 |
3031 static void cubicOp100(skiatest::Reporter* reporter, const char* filename) { | 3019 static void cubicOp100(skiatest::Reporter* reporter, const char* filename) { |
3032 SkPath path, pathB; | 3020 SkPath path, pathB; |
3033 path.setFillType(SkPath::kWinding_FillType); | 3021 path.setFillType(SkPath::kWinding_FillType); |
3034 path.moveTo(0,1); | 3022 path.moveTo(0,1); |
3035 path.cubicTo(0,2, 2,1, 4,2); | 3023 path.cubicTo(0,2, 2,1, 4,2); |
3036 path.close(); | 3024 path.close(); |
3037 pathB.setFillType(SkPath::kWinding_FillType); | 3025 pathB.setFillType(SkPath::kWinding_FillType); |
3038 pathB.moveTo(1,2); | 3026 pathB.moveTo(1,2); |
3039 pathB.cubicTo(2,4, 1,0, 2,0); | 3027 pathB.cubicTo(2,4, 1,0, 2,0); |
3040 pathB.close(); | 3028 pathB.close(); |
3041 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3029 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3042 } | 3030 } |
3043 | 3031 |
3044 static void cubicOp101(skiatest::Reporter* reporter, const char* filename) { | 3032 static void cubicOp101(skiatest::Reporter* reporter, const char* filename) { |
3045 SkPath path, pathB; | 3033 SkPath path, pathB; |
3046 path.setFillType(SkPath::kWinding_FillType); | 3034 path.setFillType(SkPath::kWinding_FillType); |
3047 path.moveTo(0, 1); | 3035 path.moveTo(0, 1); |
3048 path.cubicTo(2, 3, 2, 1, 5, 3); | 3036 path.cubicTo(2, 3, 2, 1, 5, 3); |
3049 path.close(); | 3037 path.close(); |
3050 pathB.setFillType(SkPath::kWinding_FillType); | 3038 pathB.setFillType(SkPath::kWinding_FillType); |
3051 pathB.moveTo(1, 2); | 3039 pathB.moveTo(1, 2); |
3052 pathB.cubicTo(3, 5, 1, 0, 3, 2); | 3040 pathB.cubicTo(3, 5, 1, 0, 3, 2); |
3053 pathB.close(); | 3041 pathB.close(); |
3054 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3042 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3055 } | 3043 } |
3056 | 3044 |
3057 static void cubicOp102(skiatest::Reporter* reporter, const char* filename) { | 3045 static void cubicOp102(skiatest::Reporter* reporter, const char* filename) { |
3058 SkPath path, pathB; | 3046 SkPath path, pathB; |
3059 path.setFillType(SkPath::kWinding_FillType); | 3047 path.setFillType(SkPath::kWinding_FillType); |
3060 path.moveTo(0,1); | 3048 path.moveTo(0,1); |
3061 path.cubicTo(1,2, 1,0, 3,0); | 3049 path.cubicTo(1,2, 1,0, 3,0); |
3062 path.close(); | 3050 path.close(); |
3063 pathB.setFillType(SkPath::kWinding_FillType); | 3051 pathB.setFillType(SkPath::kWinding_FillType); |
3064 pathB.moveTo(0,1); | 3052 pathB.moveTo(0,1); |
3065 pathB.cubicTo(0,3, 1,0, 2,1); | 3053 pathB.cubicTo(0,3, 1,0, 2,1); |
3066 pathB.close(); | 3054 pathB.close(); |
3067 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3055 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3068 } | 3056 } |
3069 | 3057 |
3070 static void cubicOp103(skiatest::Reporter* reporter, const char* filename) { | 3058 static void cubicOp103(skiatest::Reporter* reporter, const char* filename) { |
3071 SkPath path, pathB; | 3059 SkPath path, pathB; |
3072 path.setFillType(SkPath::kWinding_FillType); | 3060 path.setFillType(SkPath::kWinding_FillType); |
3073 path.moveTo(0,1); | 3061 path.moveTo(0,1); |
3074 path.cubicTo(1,5, 2,0, 2,1); | 3062 path.cubicTo(1,5, 2,0, 2,1); |
3075 path.close(); | 3063 path.close(); |
3076 pathB.setFillType(SkPath::kWinding_FillType); | 3064 pathB.setFillType(SkPath::kWinding_FillType); |
3077 pathB.moveTo(0,2); | 3065 pathB.moveTo(0,2); |
3078 pathB.cubicTo(1,2, 1,0, 5,1); | 3066 pathB.cubicTo(1,2, 1,0, 5,1); |
3079 pathB.close(); | 3067 pathB.close(); |
3080 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3068 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3081 } | 3069 } |
3082 | 3070 |
3083 static void cubicOp104(skiatest::Reporter* reporter, const char* filename) { | 3071 static void cubicOp104(skiatest::Reporter* reporter, const char* filename) { |
3084 SkPath path, pathB; | 3072 SkPath path, pathB; |
3085 path.setFillType(SkPath::kWinding_FillType); | 3073 path.setFillType(SkPath::kWinding_FillType); |
3086 path.moveTo(0,1); | 3074 path.moveTo(0,1); |
3087 path.cubicTo(0,6, 4,0, 6,1); | 3075 path.cubicTo(0,6, 4,0, 6,1); |
3088 path.close(); | 3076 path.close(); |
3089 pathB.setFillType(SkPath::kWinding_FillType); | 3077 pathB.setFillType(SkPath::kWinding_FillType); |
3090 pathB.moveTo(0,4); | 3078 pathB.moveTo(0,4); |
3091 pathB.cubicTo(1,6, 1,0, 6,0); | 3079 pathB.cubicTo(1,6, 1,0, 6,0); |
3092 pathB.close(); | 3080 pathB.close(); |
3093 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3081 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3094 } | 3082 } |
3095 | 3083 |
3096 static void cubicOp105(skiatest::Reporter* reporter, const char* filename) { | 3084 static void cubicOp105(skiatest::Reporter* reporter, const char* filename) { |
3097 SkPath path, pathB; | 3085 SkPath path, pathB; |
3098 path.setFillType(SkPath::kWinding_FillType); | 3086 path.setFillType(SkPath::kWinding_FillType); |
3099 path.moveTo(0,1); | 3087 path.moveTo(0,1); |
3100 path.cubicTo(0,4, 6,5, 2,0); | 3088 path.cubicTo(0,4, 6,5, 2,0); |
3101 path.close(); | 3089 path.close(); |
3102 pathB.setFillType(SkPath::kWinding_FillType); | 3090 pathB.setFillType(SkPath::kWinding_FillType); |
3103 pathB.moveTo(5,6); | 3091 pathB.moveTo(5,6); |
3104 pathB.cubicTo(0,2, 1,0, 4,0); | 3092 pathB.cubicTo(0,2, 1,0, 4,0); |
3105 pathB.close(); | 3093 pathB.close(); |
3106 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3094 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3107 } | 3095 } |
3108 | 3096 |
3109 static void cubicOp106(skiatest::Reporter* reporter, const char* filename) { | 3097 static void cubicOp106(skiatest::Reporter* reporter, const char* filename) { |
3110 SkPath path, pathB; | 3098 SkPath path, pathB; |
3111 path.setFillType(SkPath::kWinding_FillType); | 3099 path.setFillType(SkPath::kWinding_FillType); |
3112 path.moveTo(0, 1); | 3100 path.moveTo(0, 1); |
3113 path.cubicTo(4, 6, 2, 1, 2, 0); | 3101 path.cubicTo(4, 6, 2, 1, 2, 0); |
3114 path.close(); | 3102 path.close(); |
3115 pathB.setFillType(SkPath::kWinding_FillType); | 3103 pathB.setFillType(SkPath::kWinding_FillType); |
3116 pathB.moveTo(1, 2); | 3104 pathB.moveTo(1, 2); |
3117 pathB.cubicTo(0, 2, 1, 0, 6, 4); | 3105 pathB.cubicTo(0, 2, 1, 0, 6, 4); |
3118 pathB.close(); | 3106 pathB.close(); |
3119 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3107 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3120 } | 3108 } |
3121 | 3109 |
3122 static void cubicOp107(skiatest::Reporter* reporter, const char* filename) { | 3110 static void cubicOp107(skiatest::Reporter* reporter, const char* filename) { |
3123 SkPath path, pathB; | 3111 SkPath path, pathB; |
3124 path.setFillType(SkPath::kWinding_FillType); | 3112 path.setFillType(SkPath::kWinding_FillType); |
3125 path.moveTo(0, 1); | 3113 path.moveTo(0, 1); |
3126 path.cubicTo(4, 6, 2, 1, 2, 0); | 3114 path.cubicTo(4, 6, 2, 1, 2, 0); |
3127 path.close(); | 3115 path.close(); |
3128 pathB.setFillType(SkPath::kWinding_FillType); | 3116 pathB.setFillType(SkPath::kWinding_FillType); |
3129 pathB.moveTo(1, 2); | 3117 pathB.moveTo(1, 2); |
3130 pathB.cubicTo(0, 2, 1, 0, 6, 4); | 3118 pathB.cubicTo(0, 2, 1, 0, 6, 4); |
3131 pathB.close(); | 3119 pathB.close(); |
3132 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3120 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3133 } | 3121 } |
3134 | 3122 |
3135 static void cubicOp108(skiatest::Reporter* reporter, const char* filename) { | 3123 static void cubicOp108(skiatest::Reporter* reporter, const char* filename) { |
3136 SkPath path, pathB; | 3124 SkPath path, pathB; |
3137 path.setFillType(SkPath::kWinding_FillType); | 3125 path.setFillType(SkPath::kWinding_FillType); |
3138 path.moveTo(0, 1); | 3126 path.moveTo(0, 1); |
3139 path.cubicTo(4, 6, 2, 1, 2, 0); | 3127 path.cubicTo(4, 6, 2, 1, 2, 0); |
3140 path.close(); | 3128 path.close(); |
3141 pathB.setFillType(SkPath::kWinding_FillType); | 3129 pathB.setFillType(SkPath::kWinding_FillType); |
3142 pathB.moveTo(1, 2); | 3130 pathB.moveTo(1, 2); |
3143 pathB.cubicTo(0, 2, 1, 0, 6, 4); | 3131 pathB.cubicTo(0, 2, 1, 0, 6, 4); |
3144 pathB.close(); | 3132 pathB.close(); |
3145 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 3133 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
3146 } | 3134 } |
3147 | 3135 |
3148 static void cubicOp109(skiatest::Reporter* reporter, const char* filename) { | 3136 static void cubicOp109(skiatest::Reporter* reporter, const char* filename) { |
3149 SkPath path, pathB; | 3137 SkPath path, pathB; |
3150 path.setFillType(SkPath::kWinding_FillType); | 3138 path.setFillType(SkPath::kWinding_FillType); |
3151 path.moveTo(0,1); | 3139 path.moveTo(0,1); |
3152 path.cubicTo(4,5, 6,3, 5,4); | 3140 path.cubicTo(4,5, 6,3, 5,4); |
3153 path.close(); | 3141 path.close(); |
3154 pathB.setFillType(SkPath::kWinding_FillType); | 3142 pathB.setFillType(SkPath::kWinding_FillType); |
3155 pathB.moveTo(3,6); | 3143 pathB.moveTo(3,6); |
3156 pathB.cubicTo(4,5, 1,0, 5,4); | 3144 pathB.cubicTo(4,5, 1,0, 5,4); |
3157 pathB.close(); | 3145 pathB.close(); |
3158 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3146 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3159 } | 3147 } |
3160 | 3148 |
3161 static void cubicOp110(skiatest::Reporter* reporter, const char* filename) { | 3149 static void cubicOp110(skiatest::Reporter* reporter, const char* filename) { |
3162 SkPath path, pathB; | 3150 SkPath path, pathB; |
3163 path.setFillType(SkPath::kEvenOdd_FillType); | 3151 path.setFillType(SkPath::kEvenOdd_FillType); |
3164 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 3152 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
3165 path.addRect(0, 0, 4, 4, SkPath::kCW_Direction); | 3153 path.addRect(0, 0, 4, 4, SkPath::kCW_Direction); |
3166 pathB.setFillType(SkPath::kEvenOdd_FillType); | 3154 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3167 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 3155 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
3168 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 3156 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
3169 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3157 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3170 } | 3158 } |
3171 | 3159 |
3172 static void cubicOp111(skiatest::Reporter* reporter, const char* filename) { | 3160 static void cubicOp111(skiatest::Reporter* reporter, const char* filename) { |
3173 SkPath path, pathB; | 3161 SkPath path, pathB; |
3174 path.setFillType(SkPath::kWinding_FillType); | 3162 path.setFillType(SkPath::kWinding_FillType); |
3175 path.moveTo(1,4); | 3163 path.moveTo(1,4); |
3176 path.cubicTo(0,5, 4,1, 3,1); | 3164 path.cubicTo(0,5, 4,1, 3,1); |
3177 path.close(); | 3165 path.close(); |
3178 pathB.setFillType(SkPath::kWinding_FillType); | 3166 pathB.setFillType(SkPath::kWinding_FillType); |
3179 pathB.moveTo(1,4); | 3167 pathB.moveTo(1,4); |
3180 pathB.cubicTo(1,3, 4,1, 5,0); | 3168 pathB.cubicTo(1,3, 4,1, 5,0); |
3181 pathB.close(); | 3169 pathB.close(); |
3182 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3170 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3183 } | 3171 } |
3184 | 3172 |
3185 static void xOp1u(skiatest::Reporter* reporter, const char* filename) { | 3173 static void xOp1u(skiatest::Reporter* reporter, const char* filename) { |
3186 SkPath path, pathB; | 3174 SkPath path, pathB; |
3187 path.setFillType(SkPath::kEvenOdd_FillType); | 3175 path.setFillType(SkPath::kEvenOdd_FillType); |
3188 path.moveTo(1, 4); | 3176 path.moveTo(1, 4); |
3189 path.cubicTo(4, 5, 3, 2, 6, 3); | 3177 path.cubicTo(4, 5, 3, 2, 6, 3); |
3190 path.close(); | 3178 path.close(); |
3191 pathB.setFillType(SkPath::kEvenOdd_FillType); | 3179 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3192 pathB.moveTo(2, 3); | 3180 pathB.moveTo(2, 3); |
3193 pathB.cubicTo(3, 6, 4, 1, 5, 4); | 3181 pathB.cubicTo(3, 6, 4, 1, 5, 4); |
3194 pathB.close(); | 3182 pathB.close(); |
3195 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 3183 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
3196 } | 3184 } |
3197 | 3185 |
3198 static void xOp1i(skiatest::Reporter* reporter, const char* filename) { | 3186 static void xOp1i(skiatest::Reporter* reporter, const char* filename) { |
3199 SkPath path, pathB; | 3187 SkPath path, pathB; |
3200 path.setFillType(SkPath::kEvenOdd_FillType); | 3188 path.setFillType(SkPath::kEvenOdd_FillType); |
3201 path.moveTo(1, 4); | 3189 path.moveTo(1, 4); |
3202 path.cubicTo(1, 5, 6, 0, 5, 1); | 3190 path.cubicTo(1, 5, 6, 0, 5, 1); |
3203 path.close(); | 3191 path.close(); |
3204 pathB.setFillType(SkPath::kEvenOdd_FillType); | 3192 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3205 pathB.moveTo(0, 6); | 3193 pathB.moveTo(0, 6); |
3206 pathB.cubicTo(1, 5, 4, 1, 5, 1); | 3194 pathB.cubicTo(1, 5, 4, 1, 5, 1); |
3207 pathB.close(); | 3195 pathB.close(); |
3208 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3196 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3209 } | 3197 } |
3210 | 3198 |
3211 static void xOp2i(skiatest::Reporter* reporter, const char* filename) { | 3199 static void xOp2i(skiatest::Reporter* reporter, const char* filename) { |
3212 SkPath path, pathB; | 3200 SkPath path, pathB; |
3213 path.setFillType(SkPath::kEvenOdd_FillType); | 3201 path.setFillType(SkPath::kEvenOdd_FillType); |
3214 path.moveTo(1, 5); | 3202 path.moveTo(1, 5); |
3215 path.cubicTo(0, 4, 3, 2, 6, 1); | 3203 path.cubicTo(0, 4, 3, 2, 6, 1); |
3216 path.close(); | 3204 path.close(); |
3217 pathB.setFillType(SkPath::kEvenOdd_FillType); | 3205 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3218 pathB.moveTo(2, 3); | 3206 pathB.moveTo(2, 3); |
3219 pathB.cubicTo(1, 6, 5, 1, 4, 0); | 3207 pathB.cubicTo(1, 6, 5, 1, 4, 0); |
3220 pathB.close(); | 3208 pathB.close(); |
3221 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3209 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3222 } | 3210 } |
3223 | 3211 |
3224 static void xOp3i(skiatest::Reporter* reporter, const char* filename) { | 3212 static void xOp3i(skiatest::Reporter* reporter, const char* filename) { |
3225 SkPath path, pathB; | 3213 SkPath path, pathB; |
3226 path.setFillType(SkPath::kWinding_FillType); | 3214 path.setFillType(SkPath::kWinding_FillType); |
3227 path.moveTo(1,4); | 3215 path.moveTo(1,4); |
3228 path.cubicTo(0,5, 4,1, 3,1); | 3216 path.cubicTo(0,5, 4,1, 3,1); |
3229 path.close(); | 3217 path.close(); |
3230 pathB.setFillType(SkPath::kWinding_FillType); | 3218 pathB.setFillType(SkPath::kWinding_FillType); |
3231 pathB.moveTo(1,4); | 3219 pathB.moveTo(1,4); |
3232 pathB.cubicTo(1,3, 4,1, 5,0); | 3220 pathB.cubicTo(1,3, 4,1, 5,0); |
3233 pathB.close(); | 3221 pathB.close(); |
3234 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3222 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3235 } | 3223 } |
3236 | 3224 |
3237 static void findFirst1(skiatest::Reporter* reporter, const char* filename) { | 3225 static void findFirst1(skiatest::Reporter* reporter, const char* filename) { |
3238 SkPath path, pathB; | 3226 SkPath path, pathB; |
3239 path.setFillType(SkPath::kWinding_FillType); | 3227 path.setFillType(SkPath::kWinding_FillType); |
3240 path.moveTo(0,1); | 3228 path.moveTo(0,1); |
3241 path.cubicTo(1,6, 5,0, 2,1); | 3229 path.cubicTo(1,6, 5,0, 2,1); |
3242 path.close(); | 3230 path.close(); |
3243 pathB.setFillType(SkPath::kWinding_FillType); | 3231 pathB.setFillType(SkPath::kWinding_FillType); |
3244 pathB.moveTo(0,5); | 3232 pathB.moveTo(0,5); |
3245 pathB.cubicTo(1,2, 1,0, 6,1); | 3233 pathB.cubicTo(1,2, 1,0, 6,1); |
3246 pathB.close(); | 3234 pathB.close(); |
3247 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3235 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3248 } | 3236 } |
3249 | 3237 |
3250 // triggers addSimpleAngle with non-zero argument | |
3251 static void cubicOp112(skiatest::Reporter* reporter, const char* filename) { | 3238 static void cubicOp112(skiatest::Reporter* reporter, const char* filename) { |
3252 SkPath path, pathB; | 3239 SkPath path, pathB; |
3253 path.setFillType(SkPath::kWinding_FillType); | 3240 path.setFillType(SkPath::kWinding_FillType); |
3254 path.moveTo(2,4); | 3241 path.moveTo(2,4); |
3255 path.cubicTo(2,3, 6,4, 1,0); | 3242 path.cubicTo(2,3, 6,4, 1,0); |
3256 path.close(); | 3243 path.close(); |
3257 pathB.setFillType(SkPath::kWinding_FillType); | 3244 pathB.setFillType(SkPath::kWinding_FillType); |
3258 pathB.moveTo(4,6); | 3245 pathB.moveTo(4,6); |
3259 pathB.cubicTo(0,1, 4,2, 3,2); | 3246 pathB.cubicTo(0,1, 4,2, 3,2); |
3260 pathB.close(); | 3247 pathB.close(); |
3261 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3248 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3262 } | 3249 } |
3263 | 3250 |
3264 static void cubicOp113(skiatest::Reporter* reporter, const char* filename) { | 3251 static void cubicOp113(skiatest::Reporter* reporter, const char* filename) { |
3265 SkPath path, pathB; | 3252 SkPath path, pathB; |
3266 path.moveTo(2,4); | 3253 path.moveTo(2,4); |
3267 path.cubicTo(3,5, 2.33333325f,4.33333349f, 3.83333325f,3.83333349f); | 3254 path.cubicTo(3,5, 2.33333325f,4.33333349f, 3.83333325f,3.83333349f); |
3268 path.close(); | 3255 path.close(); |
3269 pathB.moveTo(3,5); | 3256 pathB.moveTo(3,5); |
3270 pathB.cubicTo(2.33333325f,4.33333349f, 3.83333325f,3.83333349f, 2,4); | 3257 pathB.cubicTo(2.33333325f,4.33333349f, 3.83333325f,3.83333349f, 2,4); |
3271 pathB.close(); | 3258 pathB.close(); |
3272 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3259 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3273 } | 3260 } |
3274 | 3261 |
3275 static void cubicOp114(skiatest::Reporter* reporter, const char* filename) { | 3262 static void cubicOp114(skiatest::Reporter* reporter, const char* filename) { |
3276 SkPath path, pathB; | 3263 SkPath path, pathB; |
3277 path.setFillType(SkPath::kWinding_FillType); | 3264 path.setFillType(SkPath::kWinding_FillType); |
3278 path.moveTo(0, 1); | 3265 path.moveTo(0, 1); |
3279 path.cubicTo(1, 3, -1, 2, 3.5f, 1.33333337f); | 3266 path.cubicTo(1, 3, -1, 2, 3.5f, 1.33333337f); |
3280 path.close(); | 3267 path.close(); |
3281 pathB.setFillType(SkPath::kWinding_FillType); | 3268 pathB.setFillType(SkPath::kWinding_FillType); |
3282 pathB.moveTo(1, 3); | 3269 pathB.moveTo(1, 3); |
3283 pathB.cubicTo(-1, 2, 3.5f, 1.33333337f, 0, 1); | 3270 pathB.cubicTo(-1, 2, 3.5f, 1.33333337f, 0, 1); |
3284 pathB.close(); | 3271 pathB.close(); |
3285 testPathOpCheck(reporter, path, pathB, kIntersect_PathOp, filename, FLAGS_ru
nFail); | 3272 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3286 } | 3273 } |
3287 | 3274 |
3288 static void cubicOp114asQuad(skiatest::Reporter* reporter, const char* filename)
{ | 3275 static void cubicOp114asQuad(skiatest::Reporter* reporter, const char* filename)
{ |
3289 SkPath path, pathB; | 3276 SkPath path, pathB; |
3290 path.setFillType(SkPath::kWinding_FillType); | 3277 path.setFillType(SkPath::kWinding_FillType); |
3291 path.moveTo(0, 1); | 3278 path.moveTo(0, 1); |
3292 path.cubicTo(1, 3, -1, 2, 3.5f, 1.33333337f); | 3279 path.cubicTo(1, 3, -1, 2, 3.5f, 1.33333337f); |
3293 path.close(); | 3280 path.close(); |
3294 pathB.setFillType(SkPath::kWinding_FillType); | 3281 pathB.setFillType(SkPath::kWinding_FillType); |
3295 pathB.moveTo(1, 3); | 3282 pathB.moveTo(1, 3); |
3296 pathB.cubicTo(-1, 2, 3.5f, 1.33333337f, 0, 1); | 3283 pathB.cubicTo(-1, 2, 3.5f, 1.33333337f, 0, 1); |
3297 pathB.close(); | 3284 pathB.close(); |
3298 SkPath qPath, qPathB; | 3285 SkPath qPath, qPathB; |
3299 CubicPathToQuads(path, &qPath); | 3286 CubicPathToQuads(path, &qPath); |
3300 CubicPathToQuads(pathB, &qPathB); | 3287 CubicPathToQuads(pathB, &qPathB); |
3301 testPathOp(reporter, qPath, qPathB, kIntersect_PathOp, filename); | 3288 testPathOp(reporter, qPath, qPathB, kIntersect_SkPathOp, filename); |
3302 } | 3289 } |
3303 | 3290 |
3304 static void quadOp10i(skiatest::Reporter* reporter, const char* filename) { | 3291 static void quadOp10i(skiatest::Reporter* reporter, const char* filename) { |
3305 SkPath path, pathB; | 3292 SkPath path, pathB; |
3306 path.moveTo(0, 0); | 3293 path.moveTo(0, 0); |
3307 path.quadTo(1, 8, 3, 5); | 3294 path.quadTo(1, 8, 3, 5); |
3308 path.lineTo(8, 1); | 3295 path.lineTo(8, 1); |
3309 path.close(); | 3296 path.close(); |
3310 pathB.moveTo(0, 0); | 3297 pathB.moveTo(0, 0); |
3311 pathB.quadTo(8, 1, 4, 8); | 3298 pathB.quadTo(8, 1, 4, 8); |
3312 pathB.close(); | 3299 pathB.close(); |
3313 testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); | 3300 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
3314 } | 3301 } |
3315 | 3302 |
3316 static void kari1(skiatest::Reporter* reporter, const char* filename) { | 3303 static void kari1(skiatest::Reporter* reporter, const char* filename) { |
3317 SkPath path1; | 3304 SkPath path1; |
3318 path1.moveTo(39.9375, -5.8359375); | 3305 path1.moveTo(39.9375, -5.8359375); |
3319 path1.lineTo(40.625, -5.7890625); | 3306 path1.lineTo(40.625, -5.7890625); |
3320 path1.lineTo(37.7109375, 1.3515625); | 3307 path1.lineTo(37.7109375, 1.3515625); |
3321 path1.lineTo(37.203125, 0.9609375); | 3308 path1.lineTo(37.203125, 0.9609375); |
3322 path1.close(); | 3309 path1.close(); |
3323 | 3310 |
3324 SkPath path2; | 3311 SkPath path2; |
3325 path2.moveTo(37.52734375f, -1.44140625f); | 3312 path2.moveTo(37.52734375f, -1.44140625f); |
3326 path2.cubicTo(37.8736991882324f, -1.69921875f, 38.1640625f, -2.140625f, 38.3
984375f, -2.765625f); | 3313 path2.cubicTo(37.8736991882324f, -1.69921875f, 38.1640625f, -2.140625f, 38.3
984375f, -2.765625f); |
3327 path2.lineTo(38.640625f, -2.609375f); | 3314 path2.lineTo(38.640625f, -2.609375f); |
3328 path2.cubicTo(38.53125f, -1.89583337306976f, 38.0664443969727f, -0.154893040
657043f, 38.0664443969727f, -0.154893040657043f); | 3315 path2.cubicTo(38.53125f, -1.89583337306976f, 38.0664443969727f, -0.154893040
657043f, 38.0664443969727f, -0.154893040657043f); |
3329 path2.cubicTo(38.0664443969727f, -0.154893040657043f, 37.1809883117676f, -1.
18359375f, 37.52734375, -1.44140625f); | 3316 path2.cubicTo(38.0664443969727f, -0.154893040657043f, 37.1809883117676f, -1.
18359375f, 37.52734375, -1.44140625f); |
3330 path2.close(); | 3317 path2.close(); |
3331 | 3318 |
3332 testPathOp(reporter, path1, path2, kDifference_PathOp, filename); | 3319 testPathOp(reporter, path1, path2, kDifference_SkPathOp, filename); |
3333 } | 3320 } |
3334 | 3321 |
3335 static void issue2504(skiatest::Reporter* reporter, const char* filename) { | 3322 static void issue2504(skiatest::Reporter* reporter, const char* filename) { |
3336 SkPath path1; | 3323 SkPath path1; |
3337 path1.moveTo(34.2421875, -5.976562976837158203125); | 3324 path1.moveTo(34.2421875, -5.976562976837158203125); |
3338 path1.lineTo(35.453121185302734375, 0); | 3325 path1.lineTo(35.453121185302734375, 0); |
3339 path1.lineTo(31.9375, 0); | 3326 path1.lineTo(31.9375, 0); |
3340 path1.close(); | 3327 path1.close(); |
3341 | 3328 |
3342 SkPath path2; | 3329 SkPath path2; |
3343 path2.moveTo(36.71843719482421875, 0.8886508941650390625); | 3330 path2.moveTo(36.71843719482421875, 0.8886508941650390625); |
3344 path2.cubicTo(36.71843719482421875, 0.8886508941650390625, | 3331 path2.cubicTo(36.71843719482421875, 0.8886508941650390625, |
3345 35.123386383056640625, 0.554015457630157470703125, | 3332 35.123386383056640625, 0.554015457630157470703125, |
3346 34.511409759521484375, -0.1152553558349609375); | 3333 34.511409759521484375, -0.1152553558349609375); |
3347 path2.cubicTo(33.899425506591796875, -0.7845261096954345703125, | 3334 path2.cubicTo(33.899425506591796875, -0.7845261096954345703125, |
3348 34.53484344482421875, -5.6777553558349609375, | 3335 34.53484344482421875, -5.6777553558349609375, |
3349 34.53484344482421875, -5.6777553558349609375); | 3336 34.53484344482421875, -5.6777553558349609375); |
3350 path2.close(); | 3337 path2.close(); |
3351 testPathOp(reporter, path1, path2, kUnion_PathOp, filename); | 3338 testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); |
3352 } | 3339 } |
3353 | 3340 |
3354 static void issue2540(skiatest::Reporter* reporter, const char* filename) { | 3341 static void issue2540(skiatest::Reporter* reporter, const char* filename) { |
3355 SkPath path1; | 3342 SkPath path1; |
3356 path1.moveTo(26.5054988861083984375, 85.73960113525390625); | 3343 path1.moveTo(26.5054988861083984375, 85.73960113525390625); |
3357 path1.cubicTo(84.19739532470703125, 17.77140045166015625, 16.939201354980468
75, 101.86199951171875, 12.631000518798828125, 105.24700164794921875); | 3344 path1.cubicTo(84.19739532470703125, 17.77140045166015625, 16.939201354980468
75, 101.86199951171875, 12.631000518798828125, 105.24700164794921875); |
3358 path1.cubicTo(11.0819997787475585937500000, 106.46399688720703125, 11.526000
0228881835937500000, 104.464996337890625, 11.5260000228881835937500000, 104.4649
96337890625); | 3345 path1.cubicTo(11.0819997787475585937500000, 106.46399688720703125, 11.526000
0228881835937500000, 104.464996337890625, 11.5260000228881835937500000, 104.4649
96337890625); |
3359 path1.lineTo(23.1654987335205078125, 89.72879791259765625); | 3346 path1.lineTo(23.1654987335205078125, 89.72879791259765625); |
3360 path1.cubicTo(23.1654987335205078125, 89.72879791259765625, -10.171300888061
5234375, 119.9160003662109375, -17.1620006561279296875, 120.8249969482421875); | 3347 path1.cubicTo(23.1654987335205078125, 89.72879791259765625, -10.171300888061
5234375, 119.9160003662109375, -17.1620006561279296875, 120.8249969482421875); |
3361 path1.cubicTo(-19.1149997711181640625, 121.07900238037109375, -18.0380001068
115234375, 119.79299163818359375, -18.0380001068115234375, 119.79299163818359375
); | 3348 path1.cubicTo(-19.1149997711181640625, 121.07900238037109375, -18.0380001068
115234375, 119.79299163818359375, -18.0380001068115234375, 119.79299163818359375
); |
3362 path1.cubicTo(-18.0380001068115234375, 119.79299163818359375, 14.22100067138
671875, 90.60700225830078125, 26.5054988861083984375, 85.73960113525390625); | 3349 path1.cubicTo(-18.0380001068115234375, 119.79299163818359375, 14.22100067138
671875, 90.60700225830078125, 26.5054988861083984375, 85.73960113525390625); |
3363 path1.close(); | 3350 path1.close(); |
3364 | 3351 |
3365 SkPath path2; | 3352 SkPath path2; |
3366 path2.moveTo(-25.077999114990234375, 124.9120025634765625); | 3353 path2.moveTo(-25.077999114990234375, 124.9120025634765625); |
3367 path2.cubicTo(-25.077999114990234375, 124.9120025634765625, -25.950998306274
4140625, 125.95400238037109375, -24.368999481201171875, 125.7480010986328125); | 3354 path2.cubicTo(-25.077999114990234375, 124.9120025634765625, -25.950998306274
4140625, 125.95400238037109375, -24.368999481201171875, 125.7480010986328125); |
3368 path2.cubicTo(-16.06999969482421875, 124.66899871826171875, 1.26800000667572
02148437500, 91.23999786376953125, 37.264003753662109375, 95.35400390625); | 3355 path2.cubicTo(-16.06999969482421875, 124.66899871826171875, 1.26800000667572
02148437500, 91.23999786376953125, 37.264003753662109375, 95.35400390625); |
3369 path2.cubicTo(37.264003753662109375, 95.35400390625, 11.3710002899169921875,
83.7339935302734375, -25.077999114990234375, 124.9120025634765625); | 3356 path2.cubicTo(37.264003753662109375, 95.35400390625, 11.3710002899169921875,
83.7339935302734375, -25.077999114990234375, 124.9120025634765625); |
3370 path2.close(); | 3357 path2.close(); |
3371 testPathOp(reporter, path1, path2, kUnion_PathOp, filename); | 3358 testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); |
3372 } | 3359 } |
3373 | 3360 |
3374 static void rects1(skiatest::Reporter* reporter, const char* filename) { | 3361 static void rects1(skiatest::Reporter* reporter, const char* filename) { |
3375 SkPath path, pathB; | 3362 SkPath path, pathB; |
3376 path.setFillType(SkPath::kEvenOdd_FillType); | 3363 path.setFillType(SkPath::kEvenOdd_FillType); |
3377 path.moveTo(0, 0); | 3364 path.moveTo(0, 0); |
3378 path.lineTo(1, 0); | 3365 path.lineTo(1, 0); |
3379 path.lineTo(1, 1); | 3366 path.lineTo(1, 1); |
3380 path.lineTo(0, 1); | 3367 path.lineTo(0, 1); |
3381 path.close(); | 3368 path.close(); |
3382 path.moveTo(0, 0); | 3369 path.moveTo(0, 0); |
3383 path.lineTo(6, 0); | 3370 path.lineTo(6, 0); |
3384 path.lineTo(6, 6); | 3371 path.lineTo(6, 6); |
3385 path.lineTo(0, 6); | 3372 path.lineTo(0, 6); |
3386 path.close(); | 3373 path.close(); |
3387 pathB.setFillType(SkPath::kEvenOdd_FillType); | 3374 pathB.setFillType(SkPath::kEvenOdd_FillType); |
3388 pathB.moveTo(0, 0); | 3375 pathB.moveTo(0, 0); |
3389 pathB.lineTo(1, 0); | 3376 pathB.lineTo(1, 0); |
3390 pathB.lineTo(1, 1); | 3377 pathB.lineTo(1, 1); |
3391 pathB.lineTo(0, 1); | 3378 pathB.lineTo(0, 1); |
3392 pathB.close(); | 3379 pathB.close(); |
3393 pathB.moveTo(0, 0); | 3380 pathB.moveTo(0, 0); |
3394 pathB.lineTo(2, 0); | 3381 pathB.lineTo(2, 0); |
3395 pathB.lineTo(2, 2); | 3382 pathB.lineTo(2, 2); |
3396 pathB.lineTo(0, 2); | 3383 pathB.lineTo(0, 2); |
3397 pathB.close(); | 3384 pathB.close(); |
3398 testPathOp(reporter, path, pathB, kUnion_PathOp, filename); | 3385 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
3399 } | 3386 } |
3400 | 3387 |
3401 static void rects2(skiatest::Reporter* reporter, const char* filename) { | 3388 static void rects2(skiatest::Reporter* reporter, const char* filename) { |
3402 SkPath path, pathB; | 3389 SkPath path, pathB; |
3403 path.setFillType(SkPath::kEvenOdd_FillType); | 3390 path.setFillType(SkPath::kEvenOdd_FillType); |
3404 path.moveTo(0, 0); | 3391 path.moveTo(0, 0); |
3405 path.lineTo(4, 0); | 3392 path.lineTo(4, 0); |
3406 path.lineTo(4, 4); | 3393 path.lineTo(4, 4); |
3407 path.lineTo(0, 4); | 3394 path.lineTo(0, 4); |
3408 path.close(); | 3395 path.close(); |
3409 path.moveTo(3, 3); | 3396 path.moveTo(3, 3); |
3410 path.lineTo(4, 3); | 3397 path.lineTo(4, 3); |
3411 path.lineTo(4, 4); | 3398 path.lineTo(4, 4); |
3412 path.lineTo(3, 4); | 3399 path.lineTo(3, 4); |
3413 path.close(); | 3400 path.close(); |
3414 pathB.setFillType(SkPath::kWinding_FillType); | 3401 pathB.setFillType(SkPath::kWinding_FillType); |
3415 pathB.moveTo(3, 3); | 3402 pathB.moveTo(3, 3); |
3416 pathB.lineTo(6, 3); | 3403 pathB.lineTo(6, 3); |
3417 pathB.lineTo(6, 6); | 3404 pathB.lineTo(6, 6); |
3418 pathB.lineTo(3, 6); | 3405 pathB.lineTo(3, 6); |
3419 pathB.close(); | 3406 pathB.close(); |
3420 pathB.moveTo(3, 3); | 3407 pathB.moveTo(3, 3); |
3421 pathB.lineTo(4, 3); | 3408 pathB.lineTo(4, 3); |
3422 pathB.lineTo(4, 4); | 3409 pathB.lineTo(4, 4); |
3423 pathB.lineTo(3, 4); | 3410 pathB.lineTo(3, 4); |
3424 pathB.close(); | 3411 pathB.close(); |
3425 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3412 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3426 } | 3413 } |
3427 | 3414 |
3428 static void rects3(skiatest::Reporter* reporter, const char* filename) { | 3415 static void rects3(skiatest::Reporter* reporter, const char* filename) { |
3429 SkPath path, pathB; | 3416 SkPath path, pathB; |
3430 path.setFillType(SkPath::kEvenOdd_FillType); | 3417 path.setFillType(SkPath::kEvenOdd_FillType); |
3431 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 3418 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
3432 path.addRect(0, 0, 4, 4, SkPath::kCW_Direction); | 3419 path.addRect(0, 0, 4, 4, SkPath::kCW_Direction); |
3433 pathB.setFillType(SkPath::kWinding_FillType); | 3420 pathB.setFillType(SkPath::kWinding_FillType); |
3434 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 3421 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
3435 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 3422 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
3436 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3423 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3437 } | 3424 } |
3438 | 3425 |
3439 static void rects4(skiatest::Reporter* reporter, const char* filename) { | 3426 static void rects4(skiatest::Reporter* reporter, const char* filename) { |
3440 SkPath path, pathB; | 3427 SkPath path, pathB; |
3441 path.setFillType(SkPath::kEvenOdd_FillType); | 3428 path.setFillType(SkPath::kEvenOdd_FillType); |
3442 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); | 3429 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
3443 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 3430 path.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
3444 pathB.setFillType(SkPath::kWinding_FillType); | 3431 pathB.setFillType(SkPath::kWinding_FillType); |
3445 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); | 3432 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
3446 pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction); | 3433 pathB.addRect(0, 0, 3, 3, SkPath::kCW_Direction); |
3447 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3434 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3448 } | 3435 } |
3449 | 3436 |
3450 static void issue2753(skiatest::Reporter* reporter, const char* filename) { | 3437 static void issue2753(skiatest::Reporter* reporter, const char* filename) { |
3451 SkPath path1; | 3438 SkPath path1; |
3452 path1.moveTo(142.701f, 110.568f); | 3439 path1.moveTo(142.701f, 110.568f); |
3453 path1.lineTo(142.957f, 100); | 3440 path1.lineTo(142.957f, 100); |
3454 path1.lineTo(153.835f, 100); | 3441 path1.lineTo(153.835f, 100); |
3455 path1.lineTo(154.592f, 108.188f); | 3442 path1.lineTo(154.592f, 108.188f); |
3456 path1.cubicTo(154.592f, 108.188f, 153.173f, 108.483f, 152.83f, 109.412f); | 3443 path1.cubicTo(154.592f, 108.188f, 153.173f, 108.483f, 152.83f, 109.412f); |
3457 path1.cubicTo(152.83f, 109.412f, 142.701f, 110.568f, 142.701f, 110.568f); | 3444 path1.cubicTo(152.83f, 109.412f, 142.701f, 110.568f, 142.701f, 110.568f); |
3458 path1.close(); | 3445 path1.close(); |
3459 | 3446 |
3460 SkPath path2; | 3447 SkPath path2; |
3461 path2.moveTo(39, 124.001f); | 3448 path2.moveTo(39, 124.001f); |
3462 path2.cubicTo(39, 124.001f, 50.6f, 117.001f, 50.6f, 117.001f); | 3449 path2.cubicTo(39, 124.001f, 50.6f, 117.001f, 50.6f, 117.001f); |
3463 path2.cubicTo(50.6f, 117.001f, 164.601f, 85.2f, 188.201f, 117.601f); | 3450 path2.cubicTo(50.6f, 117.001f, 164.601f, 85.2f, 188.201f, 117.601f); |
3464 path2.cubicTo(188.201f, 117.601f, 174.801f, 93, 39, 124.001f); | 3451 path2.cubicTo(188.201f, 117.601f, 174.801f, 93, 39, 124.001f); |
3465 path2.close(); | 3452 path2.close(); |
3466 | 3453 |
3467 testPathOpCheck(reporter, path1, path2, kUnion_PathOp, filename, FLAGS_runFa
il); | 3454 testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); |
3468 } | 3455 } |
3469 | 3456 |
3470 static void issue2808(skiatest::Reporter* reporter, const char* filename) { | 3457 static void issue2808(skiatest::Reporter* reporter, const char* filename) { |
3471 SkPath path1, path2; | 3458 SkPath path1, path2; |
3472 | 3459 |
3473 path1.moveTo(509.20300293f, 385.601989746f); | 3460 path1.moveTo(509.20300293f, 385.601989746f); |
3474 path1.quadTo(509.20300293f, 415.68838501f, 487.928710938f, 436.96270752f
); | 3461 path1.quadTo(509.20300293f, 415.68838501f, 487.928710938f, 436.96270752f
); |
3475 path1.quadTo(466.654388428f, 458.236999512f, 436.567993164f, 458.2369995
12f); | 3462 path1.quadTo(466.654388428f, 458.236999512f, 436.567993164f, 458.2369995
12f); |
3476 path1.quadTo(406.4815979f, 458.236999512f, 385.207275391f, 436.96270752f
); | 3463 path1.quadTo(406.4815979f, 458.236999512f, 385.207275391f, 436.96270752f
); |
3477 path1.quadTo(363.932983398f, 415.68838501f, 363.932983398f, 385.60198974
6f); | 3464 path1.quadTo(363.932983398f, 415.68838501f, 363.932983398f, 385.60198974
6f); |
3478 path1.quadTo(363.932983398f, 355.515594482f, 385.207275391f, 334.2412719
73f); | 3465 path1.quadTo(363.932983398f, 355.515594482f, 385.207275391f, 334.2412719
73f); |
3479 path1.quadTo(406.4815979f, 312.96697998f, 436.567993164f, 312.96697998f)
; | 3466 path1.quadTo(406.4815979f, 312.96697998f, 436.567993164f, 312.96697998f)
; |
3480 path1.quadTo(466.654388428f, 312.96697998f, 487.928710938f, 334.24127197
3f); | 3467 path1.quadTo(466.654388428f, 312.96697998f, 487.928710938f, 334.24127197
3f); |
3481 path1.quadTo(509.20300293f, 355.515594482f, 509.20300293f, 385.601989746
f); | 3468 path1.quadTo(509.20300293f, 355.515594482f, 509.20300293f, 385.601989746
f); |
3482 path1.close(); | 3469 path1.close(); |
3483 | 3470 |
3484 path2.moveTo(449.033996582f, 290.87298584f); | 3471 path2.moveTo(449.033996582f, 290.87298584f); |
3485 path2.quadTo(449.033996582f, 301.028259277f, 441.853149414f, 308.2091064
45f); | 3472 path2.quadTo(449.033996582f, 301.028259277f, 441.853149414f, 308.2091064
45f); |
3486 path2.quadTo(434.672271729f, 315.389984131f, 424.516998291f, 315.3899841
31f); | 3473 path2.quadTo(434.672271729f, 315.389984131f, 424.516998291f, 315.3899841
31f); |
3487 path2.quadTo(414.361724854f, 315.389984131f, 407.180847168f, 308.2091064
45f); | 3474 path2.quadTo(414.361724854f, 315.389984131f, 407.180847168f, 308.2091064
45f); |
3488 path2.quadTo(400, 301.028259277f, 400, 290.87298584f); | 3475 path2.quadTo(400, 301.028259277f, 400, 290.87298584f); |
3489 path2.quadTo(400, 280.717712402f, 407.180847168f, 273.536865234f); | 3476 path2.quadTo(400, 280.717712402f, 407.180847168f, 273.536865234f); |
3490 path2.quadTo(414.361724854f, 266.355987549f, 424.516998291f, 266.3559875
49f); | 3477 path2.quadTo(414.361724854f, 266.355987549f, 424.516998291f, 266.3559875
49f); |
3491 path2.quadTo(434.672271729f, 266.355987549f, 441.853149414f, 273.5368652
34f); | 3478 path2.quadTo(434.672271729f, 266.355987549f, 441.853149414f, 273.5368652
34f); |
3492 path2.quadTo(449.033996582f, 280.717712402f, 449.033996582f, 290.8729858
4f); | 3479 path2.quadTo(449.033996582f, 280.717712402f, 449.033996582f, 290.8729858
4f); |
3493 path2.close(); | 3480 path2.close(); |
3494 | 3481 |
3495 testPathOp(reporter, path1, path2, kUnion_PathOp, filename); | 3482 testPathOp(reporter, path1, path2, kUnion_SkPathOp, filename); |
3496 } | 3483 } |
3497 | 3484 |
3498 static void cubicOp115(skiatest::Reporter* reporter, const char* filename) { | 3485 static void cubicOp115(skiatest::Reporter* reporter, const char* filename) { |
3499 SkPath path, pathB; | 3486 SkPath path, pathB; |
3500 path.setFillType(SkPath::kWinding_FillType); | 3487 path.setFillType(SkPath::kWinding_FillType); |
3501 path.moveTo(0,1); | 3488 path.moveTo(0,1); |
3502 path.cubicTo(3,4, 2,1, 5,3); | 3489 path.cubicTo(3,4, 2,1, 5,3); |
3503 path.close(); | 3490 path.close(); |
3504 pathB.setFillType(SkPath::kWinding_FillType); | 3491 pathB.setFillType(SkPath::kWinding_FillType); |
3505 pathB.moveTo(1,2); | 3492 pathB.moveTo(1,2); |
3506 pathB.cubicTo(3,5, 1,0, 4,3); | 3493 pathB.cubicTo(3,5, 1,0, 4,3); |
3507 pathB.close(); | 3494 pathB.close(); |
3508 SkPath path2(path); | 3495 SkPath path2(path); |
3509 testPathOp(reporter, path, pathB, kDifference_PathOp, filename); | 3496 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
3510 } | 3497 } |
3511 | 3498 |
| 3499 static void testRect1(skiatest::Reporter* reporter, const char* filename) { |
| 3500 SkPath path, path2; |
| 3501 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction); |
| 3502 path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction); |
| 3503 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction); |
| 3504 // path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction); |
| 3505 testPathOp(reporter, path, path2, kUnion_SkPathOp, filename); |
| 3506 } |
| 3507 |
| 3508 static void testRect2(skiatest::Reporter* reporter, const char* filename) { |
| 3509 SkPath path, pathB; |
| 3510 path.setFillType(SkPath::kWinding_FillType); |
| 3511 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 3512 path.addRect(4, 4, 5, 5, SkPath::kCW_Direction); |
| 3513 pathB.setFillType(SkPath::kEvenOdd_FillType); |
| 3514 pathB.addRect(0, 0, 2, 2, SkPath::kCW_Direction); |
| 3515 pathB.addRect(0, 0, 6, 6, SkPath::kCW_Direction); |
| 3516 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3517 } |
| 3518 |
| 3519 static void cubicOp116(skiatest::Reporter* reporter, const char* filename) { |
| 3520 SkPath path, pathB; |
| 3521 path.setFillType(SkPath::kWinding_FillType); |
| 3522 path.moveTo(0,1); |
| 3523 path.cubicTo(4,6, 2,0, 2,0); |
| 3524 path.close(); |
| 3525 pathB.setFillType(SkPath::kWinding_FillType); |
| 3526 pathB.moveTo(0,2); |
| 3527 pathB.cubicTo(0,2, 1,0, 6,4); |
| 3528 pathB.close(); |
| 3529 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3530 } |
| 3531 |
| 3532 static void cubicOp117(skiatest::Reporter* reporter, const char* filename) { |
| 3533 SkPath path, pathB; |
| 3534 path.setFillType(SkPath::kWinding_FillType); |
| 3535 path.moveTo(0,1); |
| 3536 path.cubicTo(4,5, 6,0, 1,0); |
| 3537 path.close(); |
| 3538 pathB.setFillType(SkPath::kWinding_FillType); |
| 3539 pathB.moveTo(0,6); |
| 3540 pathB.cubicTo(0,1, 1,0, 5,4); |
| 3541 pathB.close(); |
| 3542 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3543 } |
| 3544 |
| 3545 static void cubicOp118(skiatest::Reporter* reporter, const char* filename) { |
| 3546 SkPath path, pathB; |
| 3547 path.setFillType(SkPath::kWinding_FillType); |
| 3548 path.moveTo(0,1); |
| 3549 path.cubicTo(4,6, 5,1, 6,2); |
| 3550 path.close(); |
| 3551 pathB.setFillType(SkPath::kWinding_FillType); |
| 3552 pathB.moveTo(1,5); |
| 3553 pathB.cubicTo(2,6, 1,0, 6,4); |
| 3554 pathB.close(); |
| 3555 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3556 } |
| 3557 |
| 3558 static void loop1(skiatest::Reporter* reporter, const char* filename) { |
| 3559 SkPath path, pathB; |
| 3560 path.moveTo(0,1); |
| 3561 path.cubicTo(1,5, -5.66666651f,3.33333349f, 8.83333302f,2.33333349f); |
| 3562 path.close(); |
| 3563 pathB.moveTo(1,5); |
| 3564 pathB.cubicTo(-5.66666651f,3.33333349f, 8.83333302f,2.33333349f, 0,1); |
| 3565 pathB.close(); |
| 3566 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3567 } |
| 3568 |
| 3569 #include "SkPathOpsCubic.h" |
| 3570 |
| 3571 static void loop1asQuad(skiatest::Reporter* reporter, const char* filename) { |
| 3572 SkDCubic c1 = {{{0,1}, {1,5}, {-5.66666651f,3.33333349f}, {8.83333302f,2.333
33349f}}}; |
| 3573 SkDCubic c2 = {{{1,5}, {-5.66666651f,3.33333349f}, {8.83333302f,2.33333349f}
, {0,1}}}; |
| 3574 double c1InflectionTs[2], c2InflectionTs[2]; |
| 3575 SkDEBUGCODE(int c1InfTCount =) c1.findInflections(c1InflectionTs); |
| 3576 SkASSERT(c1InfTCount == 2); |
| 3577 SkDEBUGCODE(int c2InfTCount =) c2.findInflections(c2InflectionTs); |
| 3578 SkASSERT(c2InfTCount == 1); |
| 3579 SkASSERT(c1InflectionTs[0] > c1InflectionTs[1]); |
| 3580 SkDCubicPair c1pair = c1.chopAt(c1InflectionTs[0]); |
| 3581 SkDCubicPair c1apair = c1pair.first().chopAt(c1InflectionTs[1]); |
| 3582 SkDCubicPair c2pair = c2.chopAt(c2InflectionTs[0]); |
| 3583 SkDQuad q1[2] = { c1pair.first().toQuad(), c1pair.second().toQuad() }; |
| 3584 SkDQuad q1a[2] = { c1apair.first().toQuad(), c1apair.second().toQuad() }; |
| 3585 SkDQuad q2[2] = { c2pair.first().toQuad(), c2pair.second().toQuad() }; |
| 3586 SkPath path, pathB; |
| 3587 path.moveTo(q1a[0].fPts[0].asSkPoint()); |
| 3588 path.quadTo(q1a[0].fPts[1].asSkPoint(), q1a[0].fPts[2].asSkPoint()); |
| 3589 path.quadTo(q1a[1].fPts[1].asSkPoint(), q1a[1].fPts[2].asSkPoint()); |
| 3590 path.quadTo(q1[1].fPts[1].asSkPoint(), q1[1].fPts[2].asSkPoint()); |
| 3591 path.close(); |
| 3592 pathB.moveTo(q2[0].fPts[0].asSkPoint()); |
| 3593 pathB.quadTo(q2[0].fPts[1].asSkPoint(), q2[0].fPts[2].asSkPoint()); |
| 3594 pathB.quadTo(q2[1].fPts[1].asSkPoint(), q2[1].fPts[2].asSkPoint()); |
| 3595 pathB.close(); |
| 3596 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3597 } |
| 3598 |
| 3599 static void loop2(skiatest::Reporter* reporter, const char* filename) { |
| 3600 SkPath path, pathB; |
| 3601 path.moveTo(0,1); |
| 3602 path.cubicTo(3,4, 3.f,4.f, 4.5f,1.5f); |
| 3603 path.close(); |
| 3604 pathB.moveTo(3,4); |
| 3605 pathB.cubicTo(3.f,4.f, 4.5f,1.5f, 0,1); |
| 3606 pathB.close(); |
| 3607 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3608 } |
| 3609 |
| 3610 static void loop3(skiatest::Reporter* reporter, const char* filename) { |
| 3611 SkPath path, pathB; |
| 3612 path.moveTo(0,1); |
| 3613 path.cubicTo(3,5, -3.66666651f,0, 10.5f,-1.66666651f); |
| 3614 path.close(); |
| 3615 pathB.moveTo(3,5); |
| 3616 pathB.cubicTo(-3.66666651f,0, 10.5f,-1.66666651f, 0,1); |
| 3617 pathB.close(); |
| 3618 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3619 } |
| 3620 |
| 3621 static void loop4(skiatest::Reporter* reporter, const char* filename) { |
| 3622 SkPath path, pathB; |
| 3623 path.moveTo(0,5); |
| 3624 path.cubicTo(1,5, 1,4, 0.833333313f,3); |
| 3625 path.close(); |
| 3626 pathB.moveTo(1,5); |
| 3627 pathB.cubicTo(1,4, 0.833333313f,3, 0,5); |
| 3628 pathB.close(); |
| 3629 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3630 } |
| 3631 |
| 3632 #include "SkParsePath.h" |
| 3633 |
| 3634 static void issue3517(skiatest::Reporter* reporter, const char* filename) { |
| 3635 SkPath path, pathB; |
| 3636 |
| 3637 const char str[] = "M31.35 57.75L31.35 57.75C31.9 57.7486 32.45 57.7948 33 5
7.7413C33.55 57.6878 34.1 57.5014 34.65 57.4291C35.2 57.3569 35.75 57.3223 36.3
57.3079C36.85 57.2935 37.4 57.3143 37.95 57.3428C38.5 57.3712 39.05 57.4112 39.6
57.4786C40.15 57.546 40.7 57.7029 41.25 57.7472C41.8 57.7916 42.35 57.7962 42.9
57.7445C43.45 57.6928 44 57.5345 44.55 57.4373C45.1 57.34 45.65 57.2115 46.2 57
.1611C46.75 57.1107 47.3 57.1371 47.85 57.1349C48.4 57.1327 48.95 57.144 49.5 57
.1478C50.05 57.1516 50.6 57.1553 51.15 57.1579C51.7 57.1605 52.25 57.1601 52.8 5
7.1634C53.35 57.1667 53.9 57.1731 54.45 57.1776C55 57.182 55.55 57.1916 56.1 57.
19C56.65 57.1884 57.2 57.178 57.75 57.168C58.3 57.158 58.85 57.1355 59.4 57.1299
C59.95 57.1243 60.5 57.1338 61.05 57.1345C61.6 57.1352 62.15 57.124 62.7 57.134C
63.25 57.1441 63.8 57.1731 64.35 57.195C64.9 57.2169 65.45 57.2532 66 57.2655C66
.55 57.2778 67.1 57.2647 67.65 57.2687C68.2 57.2728 68.75 57.267 69.3 57.2896C69
.85 57.3122 70.4 57.371 70.95 57.4044C71.5 57.4377 72.05 57.4668 72.6 57.4896C73
.15 57.5123 73.7 57.545 74.25 57.5408C74.8 57.5365 75.35 57.5068 75.9 57.4641C76
.45 57.4213 77 57.3244 77.55 57.2842C78.1 57.244 78.65 57.2163 79.2 57.2228C79.7
5 57.2293 80.3 57.29 80.85 57.3232C81.4 57.3563 81.95 57.396 82.5 57.4219C83.05
57.4478 83.6 57.4637 84.15 57.4787C84.7 57.4937 85.25 57.5011 85.8 57.5121C86.35
57.523 86.9 57.5411 87.45 57.5444C88 57.5477 88.55 57.5663 89.1 57.5318C89.65 5
7.4972 90.2 57.3126 90.75 57.337C91.3 57.3613 91.85 57.6088 92.4 57.6776C92.95 5
7.7465 93.5 57.7379 94.05 57.75C94.6 57.7621 95.15 57.75 95.7 57.75L95.7 57.75L3
1.35 57.75Z"; |
| 3638 SkParsePath::FromSVGString(str, &path); |
| 3639 |
| 3640 const char strB[] = "M31.35 57.75L31.35 57.75C31.9 57.7514 32.45 57.7052 33
57.7587C33.55 57.8122 34.1 57.9986 34.65 58.0709C35.2 58.1431 35.75 58.1777 36.3
58.1921C36.85 58.2065 37.4 58.1857 37.95 58.1572C38.5 58.1288 39.05 58.0888 39.
6 58.0214C40.15 57.954 40.7 57.7971 41.25 57.7528C41.8 57.7084 42.35 57.7038 42.
9 57.7555C43.45 57.8072 44 57.9655 44.55 58.0627C45.1 58.16 45.65 58.2885 46.2 5
8.3389C46.75 58.3893 47.3 58.3629 47.85 58.3651C48.4 58.3673 48.95 58.356 49.5 5
8.3522C50.05 58.3484 50.6 58.3447 51.15 58.3421C51.7 58.3395 52.25 58.3399 52.8
58.3366C53.35 58.3333 53.9 58.3269 54.45 58.3224C55 58.318 55.55 58.3084 56.1 58
.31C56.65 58.3116 57.2 58.322 57.75 58.332C58.3 58.342 58.85 58.3645 59.4 58.370
1C59.95 58.3757 60.5 58.3662 61.05 58.3655C61.6 58.3648 62.15 58.376 62.7 58.366
C63.25 58.3559 63.8 58.3269 64.35 58.305C64.9 58.2831 65.45 58.2468 66 58.2345C6
6.55 58.2222 67.1 58.2353 67.65 58.2313C68.2 58.2272 68.75 58.233 69.3 58.2104C6
9.85 58.1878 70.4 58.129 70.95 58.0956C71.5 58.0623 72.05 58.0332 72.6 58.0104C7
3.15 57.9877 73.7 57.955 74.25 57.9592C74.8 57.9635 75.35 57.9932 75.9 58.0359C7
6.45 58.0787 77 58.1756 77.55 58.2158C78.1 58.256 78.65 58.2837 79.2 58.2772C79.
75 58.2707 80.3 58.21 80.85 58.1768C81.4 58.1437 81.95 58.104 82.5 58.0781C83.05
58.0522 83.6 58.0363 84.15 58.0213C84.7 58.0063 85.25 57.9989 85.8 57.9879C86.3
5 57.977 86.9 57.9589 87.45 57.9556C88 57.9523 88.55 57.9337 89.1 57.9682C89.65
58.0028 90.2 58.1874 90.75 58.163C91.3 58.1387 91.85 57.8912 92.4 57.8224C92.95
57.7535 93.5 57.7621 94.05 57.75C94.6 57.7379 95.15 57.75 95.7 57.75L95.7 57.75L
31.35 57.75Z"; |
| 3641 SkParsePath::FromSVGString(strB, &pathB); |
| 3642 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
| 3643 } |
| 3644 |
| 3645 static void cubicOp119(skiatest::Reporter* reporter, const char* filename) { |
| 3646 SkPath path, pathB; |
| 3647 path.setFillType(SkPath::kWinding_FillType); |
| 3648 path.moveTo(0,1); |
| 3649 path.cubicTo(3,5, 2,1, 3,1); |
| 3650 path.close(); |
| 3651 pathB.setFillType(SkPath::kWinding_FillType); |
| 3652 pathB.moveTo(1,2); |
| 3653 pathB.cubicTo(1,3, 1,0, 5,3); |
| 3654 pathB.close(); |
| 3655 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3656 } |
| 3657 |
| 3658 static void cubicOp120(skiatest::Reporter* reporter, const char* filename) { |
| 3659 SkPath path, pathB; |
| 3660 path.setFillType(SkPath::kWinding_FillType); |
| 3661 path.moveTo(0,1); |
| 3662 path.cubicTo(2,4, 2,1, 4,0); |
| 3663 path.close(); |
| 3664 pathB.setFillType(SkPath::kWinding_FillType); |
| 3665 pathB.moveTo(1,2); |
| 3666 pathB.cubicTo(0,4, 1,0, 4,2); |
| 3667 pathB.close(); |
| 3668 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3669 } |
| 3670 |
| 3671 static void cubicOp121(skiatest::Reporter* reporter, const char* filename) { |
| 3672 SkPath path, pathB; |
| 3673 path.setFillType(SkPath::kWinding_FillType); |
| 3674 path.moveTo(0,1); |
| 3675 path.cubicTo(3,4, 3,2, 4,3); |
| 3676 path.close(); |
| 3677 pathB.setFillType(SkPath::kWinding_FillType); |
| 3678 pathB.moveTo(2,3); |
| 3679 pathB.cubicTo(3,4, 1,0, 4,3); |
| 3680 pathB.close(); |
| 3681 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3682 } |
| 3683 |
| 3684 // FIXME : haven't debugged this failure yet |
| 3685 static void cubicOp122(skiatest::Reporter* reporter, const char* filename) { |
| 3686 SkPath path, pathB; |
| 3687 path.setFillType(SkPath::kWinding_FillType); |
| 3688 path.moveTo(0,1); |
| 3689 path.cubicTo(3,5, 4,1, 4,0); |
| 3690 path.close(); |
| 3691 pathB.setFillType(SkPath::kWinding_FillType); |
| 3692 pathB.moveTo(1,4); |
| 3693 pathB.cubicTo(0,4, 1,0, 5,3); |
| 3694 pathB.close(); |
| 3695 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3696 } |
| 3697 |
| 3698 static void cubicOp123(skiatest::Reporter* reporter, const char* filename) { |
| 3699 SkPath path, pathB; |
| 3700 path.setFillType(SkPath::kWinding_FillType); |
| 3701 path.moveTo(0,1); |
| 3702 path.cubicTo(1,5, 2,0, 6,0); |
| 3703 path.close(); |
| 3704 pathB.setFillType(SkPath::kWinding_FillType); |
| 3705 pathB.moveTo(0,2); |
| 3706 pathB.cubicTo(0,6, 1,0, 5,1); |
| 3707 pathB.close(); |
| 3708 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3709 } |
| 3710 |
| 3711 static void loop5(skiatest::Reporter* reporter, const char* filename) { |
| 3712 SkPath path, pathB; |
| 3713 path.moveTo(0,2); |
| 3714 path.cubicTo(1,2, 1,1.66666663f, 0.833333313f,1.33333325f); |
| 3715 path.close(); |
| 3716 pathB.moveTo(1,2); |
| 3717 pathB.cubicTo(1,1.66666663f, 0.833333313f,1.33333325f, 0,2); |
| 3718 pathB.close(); |
| 3719 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3720 } |
| 3721 |
| 3722 static void loop6(skiatest::Reporter* reporter, const char* filename) { |
| 3723 SkPath path, pathB; |
| 3724 path.moveTo(0,1); |
| 3725 path.cubicTo(1,3, -1.66666675f,1.66666663f, 4.16666651f,1.00000012f); |
| 3726 path.close(); |
| 3727 pathB.moveTo(1,3); |
| 3728 pathB.cubicTo(-1.66666675f,1.66666663f, 4.16666651f,1.00000012f, 0,1); |
| 3729 pathB.close(); |
| 3730 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3731 } |
| 3732 |
| 3733 static void cubicOp124(skiatest::Reporter* reporter, const char* filename) { |
| 3734 SkPath path, pathB; |
| 3735 path.setFillType(SkPath::kWinding_FillType); |
| 3736 path.moveTo(0,1); |
| 3737 path.cubicTo(1,5, 6,0, 3,0); |
| 3738 path.close(); |
| 3739 pathB.setFillType(SkPath::kWinding_FillType); |
| 3740 pathB.moveTo(0,6); |
| 3741 pathB.cubicTo(0,3, 1,0, 5,1); |
| 3742 pathB.close(); |
| 3743 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3744 } |
| 3745 |
| 3746 static void cubicOp125(skiatest::Reporter* reporter, const char* filename) { |
| 3747 SkPath path, pathB; |
| 3748 path.setFillType(SkPath::kWinding_FillType); |
| 3749 path.moveTo(0,1); |
| 3750 path.cubicTo(3,6, 3,1, 6,2); |
| 3751 path.close(); |
| 3752 pathB.setFillType(SkPath::kWinding_FillType); |
| 3753 pathB.moveTo(1,3); |
| 3754 pathB.cubicTo(2,6, 1,0, 6,3); |
| 3755 pathB.close(); |
| 3756 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3757 } |
| 3758 |
| 3759 static void cubicOp126(skiatest::Reporter* reporter, const char* filename) { |
| 3760 SkPath path, pathB; |
| 3761 path.setFillType(SkPath::kWinding_FillType); |
| 3762 path.moveTo(0,1); |
| 3763 path.cubicTo(0,3, 6,0, 2,1); |
| 3764 path.close(); |
| 3765 pathB.setFillType(SkPath::kWinding_FillType); |
| 3766 pathB.moveTo(0,6); |
| 3767 pathB.cubicTo(1,2, 1,0, 3,0); |
| 3768 pathB.close(); |
| 3769 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3770 } |
| 3771 |
| 3772 static void cubicOp127(skiatest::Reporter* reporter, const char* filename) { |
| 3773 SkPath path, pathB; |
| 3774 path.setFillType(SkPath::kWinding_FillType); |
| 3775 path.moveTo(0,1); |
| 3776 path.cubicTo(1,5, 6,0, 3,0); |
| 3777 path.close(); |
| 3778 pathB.setFillType(SkPath::kWinding_FillType); |
| 3779 pathB.moveTo(0,6); |
| 3780 pathB.cubicTo(0,3, 1,0, 5,1); |
| 3781 pathB.close(); |
| 3782 testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); |
| 3783 } |
| 3784 |
| 3785 static void cubicOp128(skiatest::Reporter* reporter, const char* filename) { |
| 3786 SkPath path, pathB; |
| 3787 path.setFillType(SkPath::kWinding_FillType); |
| 3788 path.moveTo(0,1); |
| 3789 path.cubicTo(0,3, 3,2, 5,2); |
| 3790 path.close(); |
| 3791 pathB.setFillType(SkPath::kWinding_FillType); |
| 3792 pathB.moveTo(2,3); |
| 3793 pathB.cubicTo(2,5, 1,0, 3,0); |
| 3794 pathB.close(); |
| 3795 testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename); |
| 3796 } |
| 3797 |
| 3798 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; |
3512 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; | 3799 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; |
3513 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; | 3800 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; |
3514 | 3801 |
3515 static struct TestDesc tests[] = { | 3802 static struct TestDesc tests[] = { |
| 3803 TEST(cubicOp128), |
| 3804 TEST(cubicOp127), |
| 3805 TEST(cubicOp126), |
| 3806 TEST(cubicOp125), |
| 3807 TEST(cubicOp124), |
| 3808 TEST(loop6), |
| 3809 TEST(loop5), |
| 3810 TEST(cubicOp123), |
| 3811 TEST(cubicOp122), |
| 3812 TEST(cubicOp121), |
| 3813 TEST(cubicOp120), |
| 3814 TEST(cubicOp119), |
| 3815 TEST(loop4), |
| 3816 TEST(loop3), |
| 3817 TEST(loop2), |
| 3818 TEST(loop1asQuad), |
| 3819 TEST(loop1), |
| 3820 TEST(issue3517), |
| 3821 TEST(cubicOp118), |
| 3822 TEST(cubicOp117), |
| 3823 TEST(cubicOp116), |
| 3824 TEST(testRect2), |
| 3825 TEST(testRect1), |
3516 TEST(cubicOp115), | 3826 TEST(cubicOp115), |
3517 TEST(issue2753), // FIXME: pair of cubics miss intersection | 3827 TEST(issue2753), |
3518 TEST(cubicOp114), // FIXME: curve with inflection is ordered the wrong way | 3828 TEST(cubicOp114), // FIXME: curve with inflection is ordered the wrong way |
3519 TEST(issue2808), | 3829 TEST(issue2808), |
3520 TEST(cubicOp114asQuad), | 3830 TEST(cubicOp114asQuad), |
3521 TEST(rects4), | 3831 TEST(rects4), |
3522 TEST(rects3), | 3832 TEST(rects3), |
3523 TEST(rects2), | 3833 TEST(rects2), |
3524 TEST(rects1), | 3834 TEST(rects1), |
3525 TEST(issue2540), | 3835 TEST(issue2540), |
3526 TEST(issue2504), | 3836 TEST(issue2504), |
3527 TEST(kari1), | 3837 TEST(kari1), |
3528 TEST(quadOp10i), | 3838 TEST(quadOp10i), |
3529 TEST(cubicOp113), | 3839 TEST(cubicOp113), |
3530 // fails because a cubic/quadratic intersection is missed | |
3531 // the internal quad/quad is far enough away from the real cubic/quad that i
t is rejected | |
3532 TEST(skpcarrot_is24), | 3840 TEST(skpcarrot_is24), |
3533 TEST(issue1417), | 3841 TEST(issue1417), |
3534 TEST(cubicOp112), | 3842 TEST(cubicOp112), |
3535 TEST(skpadspert_net23), | 3843 TEST(skpadspert_net23), |
3536 TEST(skpadspert_de11), | 3844 TEST(skpadspert_de11), |
3537 TEST(findFirst1), | 3845 TEST(findFirst1), |
3538 TEST(xOp2i), | 3846 TEST(xOp2i), |
3539 TEST(xOp3i), | 3847 TEST(xOp3i), |
3540 TEST(xOp1u), | 3848 TEST(xOp1u), |
3541 TEST(xOp1i), | 3849 TEST(xOp1i), |
3542 TEST(cubicOp111), | 3850 TEST(cubicOp111), |
3543 TEST(cubicOp110), | 3851 TEST(cubicOp110), |
3544 TEST(cubicOp109), | 3852 TEST(cubicOp109), |
3545 TEST(cubicOp108), | 3853 TEST(cubicOp108), |
3546 TEST(cubicOp107), | 3854 TEST(cubicOp107), |
3547 TEST(cubicOp106), | 3855 TEST(cubicOp106), |
3548 TEST(cubicOp105), | 3856 TEST(cubicOp105), |
3549 TEST(cubicOp104), | 3857 TEST(cubicOp104), |
3550 TEST(cubicOp103), | 3858 TEST(cubicOp103), |
3551 TEST(cubicOp102), | 3859 TEST(cubicOp102), |
3552 TEST(cubicOp101), | 3860 TEST(cubicOp101), |
3553 TEST(cubicOp100), | 3861 TEST(cubicOp100), |
3554 TEST(cubicOp99), | 3862 TEST(cubicOp99), |
3555 TEST(issue1435), | 3863 TEST(issue1435), |
3556 TEST(cubicOp98x), | 3864 TEST(cubicOp98x), |
3557 TEST(cubicOp97x), | 3865 TEST(cubicOp97x), |
3558 TEST(skpcarpetplanet_ru22), // cubic/cubic intersect detects unwanted coinc
idence | 3866 TEST(skpcarpetplanet_ru22), |
3559 TEST(cubicOp96d), | 3867 TEST(cubicOp96d), |
3560 TEST(cubicOp95u), | 3868 TEST(cubicOp95u), |
3561 TEST(skpadbox_lt15), | 3869 TEST(skpadbox_lt15), |
3562 TEST(skpagentxsites_com55), | 3870 TEST(skpagentxsites_com55), |
3563 TEST(skpadventistmission_org572), | 3871 TEST(skpadventistmission_org572), |
3564 TEST(skpadoption_org196), | 3872 TEST(skpadoption_org196), |
3565 TEST(skpbambootheme_com12), | 3873 TEST(skpbambootheme_com12), |
3566 TEST(skpbakosoft_com10), | 3874 TEST(skpbakosoft_com10), |
3567 TEST(skpakmmos_ru100), | 3875 TEST(skpakmmos_ru100), |
3568 TEST(skpbangalorenest_com4), | 3876 TEST(skpbangalorenest_com4), |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3740 | 4048 |
3741 static bool runSubTests = false; | 4049 static bool runSubTests = false; |
3742 static bool runSubTestsFirst = false; | 4050 static bool runSubTestsFirst = false; |
3743 static bool runReverse = false; | 4051 static bool runReverse = false; |
3744 | 4052 |
3745 DEF_TEST(PathOpsOp, reporter) { | 4053 DEF_TEST(PathOpsOp, reporter) { |
3746 #if DEBUG_SHOW_TEST_NAME | 4054 #if DEBUG_SHOW_TEST_NAME |
3747 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 4055 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
3748 #endif | 4056 #endif |
3749 if (runSubTests && runSubTestsFirst) { | 4057 if (runSubTests && runSubTestsFirst) { |
3750 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 4058 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
3751 } | 4059 } |
3752 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse); | 4060 RunTestSet(reporter, tests, testCount, firstTest, skipTest, stopTest, runRev
erse); |
3753 if (runSubTests && !runSubTestsFirst) { | 4061 if (runSubTests && !runSubTestsFirst) { |
3754 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 4062 RunTestSet(reporter, subTests, subTestCount, firstSubTest, NULL, stopTes
t, runReverse); |
3755 } | 4063 } |
3756 } | 4064 } |
3757 | 4065 |
3758 static void bufferOverflow(skiatest::Reporter* reporter, const char* filename) { | 4066 static void bufferOverflow(skiatest::Reporter* reporter, const char* filename) { |
3759 SkPath path; | 4067 SkPath path; |
3760 path.addRect(0,0, 300,170141183460469231731687303715884105728.f); | 4068 path.addRect(0,0, 300,170141183460469231731687303715884105728.f); |
3761 SkPath pathB; | 4069 SkPath pathB; |
3762 pathB.addRect(0,0, 300,16); | 4070 pathB.addRect(0,0, 300,16); |
3763 testPathFailOp(reporter, path, pathB, kUnion_PathOp, filename); | 4071 testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename); |
3764 } | 4072 } |
3765 | 4073 |
3766 // m 100,0 60,170 -160,-110 200,0 -170,11000000000 z | 4074 // m 100,0 60,170 -160,-110 200,0 -170,11000000000 z |
3767 static void fuzz433(skiatest::Reporter* reporter, const char* filename) { | 4075 static void fuzz433(skiatest::Reporter* reporter, const char* filename) { |
3768 SkPath path1, path2; | 4076 SkPath path1, path2; |
3769 path1.moveTo(100,0); | 4077 path1.moveTo(100,0); |
3770 path1.lineTo(60,170); | 4078 path1.lineTo(60,170); |
3771 path1.lineTo(-160,-110); | 4079 path1.lineTo(-160,-110); |
3772 path1.lineTo(200,0); | 4080 path1.lineTo(200,0); |
3773 path1.lineTo(-170,11000000000.0f); | 4081 path1.lineTo(-170,11000000000.0f); |
3774 path1.close(); | 4082 path1.close(); |
3775 | 4083 |
3776 path2.moveTo(100 + 20,0 + 20); | 4084 path2.moveTo(100 + 20,0 + 20); |
3777 path2.lineTo(60 + 20,170 + 20); | 4085 path2.lineTo(60 + 20,170 + 20); |
3778 path2.lineTo(-160 + 20,-110 + 20); | 4086 path2.lineTo(-160 + 20,-110 + 20); |
3779 path2.lineTo(200 + 20,0 + 20); | 4087 path2.lineTo(200 + 20,0 + 20); |
3780 path2.lineTo(-170 + 20,11000000000.0f + 20); | 4088 path2.lineTo(-170 + 20,11000000000.0f + 20); |
3781 path2.close(); | 4089 path2.close(); |
3782 | 4090 |
3783 testPathFailOp(reporter, path1, path2, kIntersect_PathOp, filename); | 4091 testPathOpCheck(reporter, path1, path2, kIntersect_SkPathOp, filename, FLAGS
_runFail); |
3784 } | 4092 } |
3785 | 4093 |
3786 static void fuzz433b(skiatest::Reporter* reporter, const char* filename) { | 4094 static void fuzz433b(skiatest::Reporter* reporter, const char* filename) { |
3787 SkPath path1, path2; | 4095 SkPath path1, path2; |
3788 path1.setFillType(SkPath::kEvenOdd_FillType); | 4096 path1.setFillType(SkPath::kEvenOdd_FillType); |
3789 path1.moveTo(140, 40); | 4097 path1.moveTo(140, 40); |
3790 path1.lineTo(200, 210); | 4098 path1.lineTo(200, 210); |
3791 path1.lineTo(40, 100); | 4099 path1.lineTo(40, 100); |
3792 path1.lineTo(240, 100); | 4100 path1.lineTo(240, 100); |
3793 path1.lineTo(70, 1.1e+10f); | 4101 path1.lineTo(70, 1.1e+10f); |
3794 path1.lineTo(140, 40); | 4102 path1.lineTo(140, 40); |
3795 path1.close(); | 4103 path1.close(); |
3796 | 4104 |
3797 path1.setFillType(SkPath::kWinding_FillType); | 4105 path1.setFillType(SkPath::kWinding_FillType); |
3798 path2.moveTo(190, 60); | 4106 path2.moveTo(190, 60); |
3799 path2.lineTo(250, 230); | 4107 path2.lineTo(250, 230); |
3800 path2.lineTo(90, 120); | 4108 path2.lineTo(90, 120); |
3801 path2.lineTo(290, 120); | 4109 path2.lineTo(290, 120); |
3802 path2.lineTo(120, 1.1e+10f); | 4110 path2.lineTo(120, 1.1e+10f); |
3803 path2.lineTo(190, 60); | 4111 path2.lineTo(190, 60); |
3804 path2.close(); | 4112 path2.close(); |
3805 | 4113 |
3806 testPathFailOp(reporter, path1, path2, kUnion_PathOp, filename); | 4114 testPathOpCheck(reporter, path1, path2, kUnion_SkPathOp, filename, FLAGS_run
Fail); |
3807 } | 4115 } |
3808 | 4116 |
3809 static void fuzz487a(skiatest::Reporter* reporter, const char* filename) { | 4117 static void fuzz487a(skiatest::Reporter* reporter, const char* filename) { |
3810 SkPath path; | 4118 SkPath path; |
3811 path.setFillType((SkPath::FillType) 0); | 4119 path.setFillType((SkPath::FillType) 0); |
3812 path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); | 4120 path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); |
3813 path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000)); | 4121 path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000)); |
3814 path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x429a6666), SkBits2Float(0x
42f9999a), SkBits2Float(0x4275999a), SkBits2Float(0x42d70001), SkBits2Float(0x42
633333)); | 4122 path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x429a6666), SkBits2Float(0x
42f9999a), SkBits2Float(0x4275999a), SkBits2Float(0x42d70001), SkBits2Float(0x42
633333)); |
3815 path.lineTo(SkBits2Float(0x42e90001), SkBits2Float(0x41b8cccc)); | 4123 path.lineTo(SkBits2Float(0x42e90001), SkBits2Float(0x41b8cccc)); |
3816 path.cubicTo(SkBits2Float(0x42dc6667), SkBits2Float(0x41ab3332), SkBits2Float(0x
42cf3334), SkBits2Float(0x41a3ffff), SkBits2Float(0x42c20001), SkBits2Float(0x41
a3ffff)); | 4124 path.cubicTo(SkBits2Float(0x42dc6667), SkBits2Float(0x41ab3332), SkBits2Float(0x
42cf3334), SkBits2Float(0x41a3ffff), SkBits2Float(0x42c20001), SkBits2Float(0x41
a3ffff)); |
(...skipping 25 matching lines...) Expand all Loading... |
3842 path.cubicTo(SkBits2Float(0x4272cccc), SkBits2Float(0x4303199a), SkBits2Float(0x
423d3332), SkBits2Float(0x430de667), SkBits2Float(0x422d9999), SkBits2Float(0x43
1cb334)); | 4150 path.cubicTo(SkBits2Float(0x4272cccc), SkBits2Float(0x4303199a), SkBits2Float(0x
423d3332), SkBits2Float(0x430de667), SkBits2Float(0x422d9999), SkBits2Float(0x43
1cb334)); |
3843 path.lineTo(SkBits2Float(0x7086a1dc), SkBits2Float(0x42eecccd)); | 4151 path.lineTo(SkBits2Float(0x7086a1dc), SkBits2Float(0x42eecccd)); |
3844 path.lineTo(SkBits2Float(0x41eb3333), SkBits2Float(0xc12ccccd)); | 4152 path.lineTo(SkBits2Float(0x41eb3333), SkBits2Float(0xc12ccccd)); |
3845 path.lineTo(SkBits2Float(0x42053333), SkBits2Float(0xc1cccccd)); | 4153 path.lineTo(SkBits2Float(0x42053333), SkBits2Float(0xc1cccccd)); |
3846 path.lineTo(SkBits2Float(0x42780000), SkBits2Float(0xc18f3334)); | 4154 path.lineTo(SkBits2Float(0x42780000), SkBits2Float(0xc18f3334)); |
3847 path.cubicTo(SkBits2Float(0x43206666), SkBits2Float(0x43134ccd), SkBits2Float(0x
43213333), SkBits2Float(0x430db333), SkBits2Float(0x43213333), SkBits2Float(0x43
080000)); | 4155 path.cubicTo(SkBits2Float(0x43206666), SkBits2Float(0x43134ccd), SkBits2Float(0x
43213333), SkBits2Float(0x430db333), SkBits2Float(0x43213333), SkBits2Float(0x43
080000)); |
3848 path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); | 4156 path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); |
3849 path.close(); | 4157 path.close(); |
3850 | 4158 |
3851 SkPath path2(path); | 4159 SkPath path2(path); |
3852 testPathFailOp(reporter, path1, path2, (SkPathOp) 2, filename); | 4160 testPathOpCheck(reporter, path1, path2, (SkPathOp) 2, filename, FLAGS_runFai
l); |
3853 } | 4161 } |
3854 | 4162 |
3855 static void fuzz487b(skiatest::Reporter* reporter, const char* filename) { | 4163 static void fuzz487b(skiatest::Reporter* reporter, const char* filename) { |
3856 SkPath path; | 4164 SkPath path; |
3857 path.setFillType((SkPath::FillType) 0); | 4165 path.setFillType((SkPath::FillType) 0); |
3858 path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); | 4166 path.moveTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); |
3859 path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000)); | 4167 path.lineTo(SkBits2Float(0x4309999a), SkBits2Float(0x42c00000)); |
3860 path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x429a6666), SkBits2Float(0x
42f9999a), SkBits2Float(0x4275999a), SkBits2Float(0x42d70001), SkBits2Float(0x42
633333)); | 4168 path.cubicTo(SkBits2Float(0x4309999a), SkBits2Float(0x429a6666), SkBits2Float(0x
42f9999a), SkBits2Float(0x4275999a), SkBits2Float(0x42d70001), SkBits2Float(0x42
633333)); |
3861 path.lineTo(SkBits2Float(0x42e90001), SkBits2Float(0x41b8cccc)); | 4169 path.lineTo(SkBits2Float(0x42e90001), SkBits2Float(0x41b8cccc)); |
3862 path.cubicTo(SkBits2Float(0x42dc6667), SkBits2Float(0x41ab3332), SkBits2Float(0x
42cf3334), SkBits2Float(0x41a3ffff), SkBits2Float(0x42c20001), SkBits2Float(0x41
a3ffff)); | 4170 path.cubicTo(SkBits2Float(0x42dc6667), SkBits2Float(0x41ab3332), SkBits2Float(0x
42cf3334), SkBits2Float(0x41a3ffff), SkBits2Float(0x42c20001), SkBits2Float(0x41
a3ffff)); |
(...skipping 25 matching lines...) Expand all Loading... |
3888 path.cubicTo(SkBits2Float(0x4272cccc), SkBits2Float(0x4303199a), SkBits2Float(0x
423d3332), SkBits2Float(0x430de667), SkBits2Float(0x422d9999), SkBits2Float(0x43
1cb334)); | 4196 path.cubicTo(SkBits2Float(0x4272cccc), SkBits2Float(0x4303199a), SkBits2Float(0x
423d3332), SkBits2Float(0x430de667), SkBits2Float(0x422d9999), SkBits2Float(0x43
1cb334)); |
3889 path.lineTo(SkBits2Float(0x7086a1dc), SkBits2Float(0x42eecccd)); | 4197 path.lineTo(SkBits2Float(0x7086a1dc), SkBits2Float(0x42eecccd)); |
3890 path.lineTo(SkBits2Float(0x41eb3333), SkBits2Float(0xc12ccccd)); | 4198 path.lineTo(SkBits2Float(0x41eb3333), SkBits2Float(0xc12ccccd)); |
3891 path.lineTo(SkBits2Float(0x42053333), SkBits2Float(0xc1cccccd)); | 4199 path.lineTo(SkBits2Float(0x42053333), SkBits2Float(0xc1cccccd)); |
3892 path.lineTo(SkBits2Float(0x42780000), SkBits2Float(0xc18f3334)); | 4200 path.lineTo(SkBits2Float(0x42780000), SkBits2Float(0xc18f3334)); |
3893 path.cubicTo(SkBits2Float(0x43206666), SkBits2Float(0x43134ccd), SkBits2Float(0x
43213333), SkBits2Float(0x430db333), SkBits2Float(0x43213333), SkBits2Float(0x43
080000)); | 4201 path.cubicTo(SkBits2Float(0x43206666), SkBits2Float(0x43134ccd), SkBits2Float(0x
43213333), SkBits2Float(0x430db333), SkBits2Float(0x43213333), SkBits2Float(0x43
080000)); |
3894 path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); | 4202 path.lineTo(SkBits2Float(0x432c8000), SkBits2Float(0x42c00000)); |
3895 path.close(); | 4203 path.close(); |
3896 | 4204 |
3897 SkPath path2(path); | 4205 SkPath path2(path); |
3898 testPathFailOp(reporter, path1, path2, (SkPathOp) 2, filename); | 4206 testPathOpCheck(reporter, path1, path2, (SkPathOp) 2, filename, FLAGS_runFai
l); |
3899 } | 4207 } |
3900 | 4208 |
3901 static void fuzz714(skiatest::Reporter* reporter, const char* filename) { | 4209 static void fuzz714(skiatest::Reporter* reporter, const char* filename) { |
3902 SkPath path; | 4210 SkPath path; |
3903 path.setFillType((SkPath::FillType) 1); | 4211 path.setFillType((SkPath::FillType) 1); |
3904 path.moveTo(SkBits2Float(0x430c0000), SkBits2Float(0x42200000)); | 4212 path.moveTo(SkBits2Float(0x430c0000), SkBits2Float(0x42200000)); |
3905 path.lineTo(SkBits2Float(0x43480000), SkBits2Float(0x43520000)); | 4213 path.lineTo(SkBits2Float(0x43480000), SkBits2Float(0x43520000)); |
3906 path.lineTo(SkBits2Float(0x42200000), SkBits2Float(0x42c80000)); | 4214 path.lineTo(SkBits2Float(0x42200000), SkBits2Float(0x42c80000)); |
3907 path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x42c80000)); | 4215 path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x42c80000)); |
3908 path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x43520000)); | 4216 path.lineTo(SkBits2Float(0x64969569), SkBits2Float(0x43520000)); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3955 TEST(fuzz433), | 4263 TEST(fuzz433), |
3956 TEST(bufferOverflow), | 4264 TEST(bufferOverflow), |
3957 }; | 4265 }; |
3958 | 4266 |
3959 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); | 4267 static const size_t failTestCount = SK_ARRAY_COUNT(failTests); |
3960 | 4268 |
3961 DEF_TEST(PathOpsFailOp, reporter) { | 4269 DEF_TEST(PathOpsFailOp, reporter) { |
3962 #if DEBUG_SHOW_TEST_NAME | 4270 #if DEBUG_SHOW_TEST_NAME |
3963 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); | 4271 strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH); |
3964 #endif | 4272 #endif |
3965 RunTestSet(reporter, failTests, failTestCount, 0, 0, false); | 4273 RunTestSet(reporter, failTests, failTestCount, NULL, NULL, NULL, false); |
3966 } | 4274 } |
OLD | NEW |