blob: d6ff6f98a9125d56df64f80d9f894178c8b01f95 [file] [log] [blame]
caryclark@google.com32546db2012-08-31 20:55:07 +00001<!-- path visualizer -->
caryclark@google.com752b60e2012-03-22 21:11:17 +00002<html>
3<head>
4<div style="height:0">
caryclark@google.comfa0588f2012-04-26 21:01:06 +00005
6<div id="testSimplifyQuadratic1">
7 SkPath path, out;
8 path.moveTo(0, 0);
9 path.quadTo(1, 0, 1, 1);
10 path.close();
11 path.moveTo(1, 0);
12 path.quadTo(0, 0, 0, 1);
13 path.close();
14 testSimplify(path, true, out, bitmap);
15}
caryclark@google.com752b60e2012-03-22 21:11:17 +000016</div>
caryclark@google.comfa0588f2012-04-26 21:01:06 +000017
18<div id="testSimplifyQuadratic2">
19 SkPath path, out;
20 path.moveTo(0, 0);
21 path.quadTo(20, 0, 20, 20);
22 path.close();
23 path.moveTo(20, 0);
24 path.quadTo(0, 0, 0, 20);
25 path.close();
26 testSimplify(path, true, out, bitmap);
27}
caryclark@google.comd88e0892012-03-27 13:23:51 +000028</div>
caryclark@google.comfa0588f2012-04-26 21:01:06 +000029
30<div id="testSimplifyQuadratic3">
31 SkPath path, out;
32 path.moveTo(0, 0);
33 path.quadTo(20, 0, 20, 20);
34 path.close();
35 path.moveTo(0, 20);
36 path.quadTo(0, 0, 20, 0);
37 path.close();
38 testSimplify(path, true, out, bitmap);
39}
caryclark@google.comd88e0892012-03-27 13:23:51 +000040</div>
caryclark@google.comfa0588f2012-04-26 21:01:06 +000041
42<div id="testSimplifyQuadratic4">
43 SkPath path, out;
44 path.moveTo(0, 20);
45 path.quadTo(20, 0, 40, 20);
46 path.close();
47 path.moveTo(40, 10);
48 path.quadTo(20, 30, 0, 10);
49 path.close();
50 testSimplify(path, true, out, bitmap);
51 drawAsciiPaths(path, out, true);
52}
caryclark@google.comd88e0892012-03-27 13:23:51 +000053</div>
caryclark@google.comfa0588f2012-04-26 21:01:06 +000054
55<div id="testSimplifyQuadratic5">
56 SkPath path, out;
57 path.moveTo(0, 0);
58 path.quadTo(0, 0, 0, 0);
59 path.lineTo(0, 0);
60 path.close();
61 path.moveTo(0, 0);
62 path.lineTo(0, 0);
63 path.quadTo(0, 0, 0, 1);
64 path.close();
65 testSimplify(path, true, out, bitmap);
66 drawAsciiPaths(path, out, true);
67}
caryclark@google.comfb173422012-04-10 18:28:55 +000068</div>
caryclark@google.comfa0588f2012-04-26 21:01:06 +000069
70<div id="testSimplifyQuadratic6">
71 SkPath path, out;
72 path.moveTo(0, 0);
73 path.quadTo(0, 0, 0, 0);
74 path.lineTo(1, 0);
75 path.close();
76 path.moveTo(0, 0);
77 path.lineTo(0, 0);
78 path.quadTo(1, 0, 0, 1);
79 path.close();
80 testSimplify(path, true, out, bitmap);
81 drawAsciiPaths(path, out, true);
82}
caryclark@google.comfb173422012-04-10 18:28:55 +000083</div>
caryclark@google.comfa0588f2012-04-26 21:01:06 +000084
85<div id="testSimplifyQuadratic7">
86 SkPath path, out;
87 path.moveTo(0, 0);
88 path.quadTo(0, 0, 0, 0);
89 path.lineTo(0, 1);
90 path.close();
91 path.moveTo(0, 0);
92 path.lineTo(0, 0);
93 path.quadTo(1, 0, 0, 2);
94 path.close();
95 testSimplify(path, true, out, bitmap);
96 drawAsciiPaths(path, out, true);
97}
98</div>
99
100<div id="testSimplifyQuadratic8">
101 SkPath path, out;
102 path.moveTo(0, 0);
103 path.quadTo(0, 0, 0, 0);
104 path.lineTo(0, 0);
105 path.close();
106 path.moveTo(0, 0);
107 path.lineTo(0, 0);
108 path.quadTo(1, 0, 0, 2);
109 path.close();
110 testSimplify(path, true, out, bitmap);
111 drawAsciiPaths(path, out, true);
112}
113</div>
114
115<div id="testSimplifyQuadratic9">
116 SkPath path, out;
117 path.moveTo(0, 0);
118 path.quadTo(0, 0, 0, 0);
119 path.lineTo(1, 1);
120 path.close();
121 path.moveTo(0, 0);
122 path.lineTo(0, 0);
123 path.quadTo(1, 0, 2, 2);
124 path.close();
125 testSimplify(path, true, out, bitmap);
126 drawAsciiPaths(path, out, true);
127}
128</div>
129
130<div id="testSimplifyQuadratic10">
131 SkPath path, out;
caryclark@google.com78e17132012-04-17 11:40:34 +0000132 path.moveTo(0, 0);
133 path.quadTo(0, 0, 0, 0);
134 path.lineTo(0, 0);
135 path.close();
136 path.moveTo(0, 0);
137 path.lineTo(0, 1);
138 path.quadTo(1, 1, 1, 2);
caryclark@google.com78e17132012-04-17 11:40:34 +0000139 path.close();
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000140 testSimplify(path, true, out, bitmap);
141 drawAsciiPaths(path, out, true);
142}
caryclark@google.com78e17132012-04-17 11:40:34 +0000143</div>
144
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000145<div id="testSimplifyQuadratic11">
146 SkPath path, out;
caryclark@google.com78e17132012-04-17 11:40:34 +0000147 path.moveTo(0, 0);
148 path.quadTo(0, 0, 0, 0);
149 path.lineTo(0, 2);
caryclark@google.com78e17132012-04-17 11:40:34 +0000150 path.close();
151 path.moveTo(0, 0);
152 path.lineTo(2, 1);
153 path.quadTo(2, 2, 3, 3);
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000154 path.close();
155 testSimplify(path, true, out, bitmap);
156 drawAsciiPaths(path, out, true);
157}
158</div>
159
160<div id="testSimplifyQuadratic12">
161 SkPath path, out;
162 path.moveTo(0, 0);
163 path.lineTo(0, 2);
caryclark@google.com78e17132012-04-17 11:40:34 +0000164 path.lineTo(0, 0);
165 path.close();
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000166 path.moveTo(3, 0);
167 path.quadTo(1, 1, 0, 2);
168 path.lineTo(3, 0);
169 path.close();
170 testSimplify(path, true, out, bitmap);
171 drawAsciiPaths(path, out, true);
172}
caryclark@google.com78e17132012-04-17 11:40:34 +0000173</div>
174
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000175<div id="testSimplifyQuadratic13">
176 SkPath path, out;
caryclark@google.com78e17132012-04-17 11:40:34 +0000177path.moveTo(0, 0);
178path.quadTo(0, 0, 1, 0);
179path.lineTo(1, 1);
180path.lineTo(0, 0);
181path.close();
182path.moveTo(0, 0);
183path.quadTo(3, 0, 1, 1);
184path.lineTo(0, 0);
185path.close();
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000186 testSimplify(path, true, out, bitmap);
187 drawAsciiPaths(path, out, true);
188}
caryclark@google.com78e17132012-04-17 11:40:34 +0000189</div>
190
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000191<div id="testSimplifyQuadratic14">
192 SkPath path, out;
caryclark@google.com78e17132012-04-17 11:40:34 +0000193 path.moveTo(0, 0);
194 path.quadTo(0, 0, 0, 0);
195 path.lineTo(1, 1);
caryclark@google.com78e17132012-04-17 11:40:34 +0000196 path.close();
197 path.moveTo(0, 0);
198 path.lineTo(0, 0);
199 path.quadTo(0, 1, 2, 1);
caryclark@google.com78e17132012-04-17 11:40:34 +0000200 path.close();
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000201 testSimplify(path, true, out, bitmap);
202 drawAsciiPaths(path, out, true);
203}
caryclark@google.com78e17132012-04-17 11:40:34 +0000204</div>
205
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000206<div id="testSimplifyQuadratic15">
207 SkPath path, out;
208 path.moveTo(0, 0);
209 path.quadTo(0, 0, 1, 3);
210 path.lineTo(3, 3);
211 path.close();
212 path.moveTo(0, 1);
213 path.lineTo(1, 1);
214 path.quadTo(0, 3, 3, 3);
215 path.close();
216 testSimplify(path, true, out, bitmap);
217 drawAsciiPaths(path, out, true);
218}
219</div>
220
221<div id="testSimplifyQuadratic16">
222 SkPath path, out;
223 path.moveTo(0, 0);
224 path.quadTo(0, 0, 0, 0);
225 path.lineTo(0, 1);
226 path.close();
227 path.moveTo(0, 0);
228 path.lineTo(0, 0);
229 path.quadTo(1, 0, 0, 1);
230 path.close();
231 testSimplify(path, true, out, bitmap);
232 drawAsciiPaths(path, out, true);
233}
234</div>
235
236<div id="testSimplifyQuadratic17">
237 SkPath path, out;
caryclark@google.comb45a1b42012-05-18 20:50:33 +0000238 path.moveTo(8, 8);
239 path.quadTo(10, 10, 8, -10);
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000240 path.close();
caryclark@google.comb45a1b42012-05-18 20:50:33 +0000241 path.moveTo(8, 8);
242 path.quadTo(12, 12, 14, 4);
243 path.close();
244 path.moveTo(8, 8);
245 path.quadTo(9, 9, 10, 8);
caryclark@google.comfa0588f2012-04-26 21:01:06 +0000246 path.close();
247 testSimplify(path, true, out, bitmap);
248 drawAsciiPaths(path, out, true);
249}
caryclark@google.com78e17132012-04-17 11:40:34 +0000250</div>
caryclark@google.comfb173422012-04-10 18:28:55 +0000251
caryclark@google.comb45a1b42012-05-18 20:50:33 +0000252<div id="testSimplifyQuadratic18">
253 SkPath path, out;
254 path.moveTo(8.0000000000000071, 8.0000000000000071);
255 path.quadTo(8.7289570079366854, 8.7289570079366889, 9.3914917259458743, 9.0593802763083691);
256 path.close();
257 path.moveTo(8.0000000000000142, 8.0000000000000142);
258 path.quadTo(8.1250000000000107, 8.1250000000000071, 8.2500000000000071, 8.2187500000000053);
259 path.close();
260 testSimplify(path, true, out, bitmap);
261 drawAsciiPaths(path, out, true);
262</div>
caryclark@google.com8dcf1142012-07-02 20:27:02 +0000263
264<div id="testSimplifyQuadratic19">
265 SkPath path, simple;
266 path.moveTo(0,4);
267 path.lineTo(6,4);
268 path.lineTo(3,1);
269 path.close();
270 path.moveTo(2,3);
271 path.lineTo(3,2);
272 path.lineTo(4,3);
273 path.close();
274 testSimplifyx(path);
275</div>
276
277<div id="testSimplifyQuadratic20">
278 SkPath path, simple;
279 path.moveTo(0,4);
280 path.lineTo(6,4);
281 path.lineTo(3,1);
282 path.close();
283 path.moveTo(2,3);
284 path.lineTo(4,3);
285 path.lineTo(3,2);
286 path.close();
287 testSimplifyx(path);
288</div>
289
290<div id="testSimplifyQuadratic21">
291 SkPath path, simple;
292 path.moveTo(0,4);
293 path.lineTo(8,4);
294 path.lineTo(4,0);
295 path.close();
296 path.moveTo(2,2);
297 path.lineTo(3,3);
298 path.lineTo(4,2);
299 path.close();
300 testSimplifyx(path);
301</div>
302
303<div id="testLine6">
304 SkPath path, simple;
305 path.moveTo(0,0);
306 path.lineTo(4,0);
307 path.lineTo(2,2);
308 path.close();
309 path.moveTo(2,0);
310 path.lineTo(6,0);
311 path.lineTo(4,2);
312 path.close();
313 testSimplifyx(path);
314</div>
315
caryclark@google.comfa4a6e92012-07-11 17:52:32 +0000316<div id="testLine7">
317 SkPath path, simple;
318 path.moveTo(0,0);
319 path.lineTo(4,0);
320 path.lineTo(2,2);
321 path.close();
322 path.moveTo(6,0);
323 path.lineTo(2,0);
324 path.lineTo(4,2);
325 path.close();
326 testSimplifyx(path);
327</div>
328
caryclark@google.comcc905052012-07-25 20:59:42 +0000329<div id="testLine7b">
330 path.moveTo(0,0);
331 path.lineTo(4,0);
332 path.close();
333 path.moveTo(6,0);
334 path.lineTo(2,0);
335 path.lineTo(4,2);
336 path.close();
337</div>
338
caryclark@google.comfa4a6e92012-07-11 17:52:32 +0000339<div id="testLine9">
340 SkPath path, simple;
341 path.moveTo(0,4);
342 path.lineTo(4,4);
343 path.lineTo(2,2);
344 path.close();
345 path.moveTo(6,4);
346 path.lineTo(2,4);
347 path.lineTo(4,2);
348 path.close();
349 testSimplifyx(path);
350</div>
351
caryclark@google.come21cb182012-07-23 21:26:31 +0000352<div id="testLine12">
353 path.moveTo(0,4);
354 path.lineTo(6,4);
355 path.lineTo(3,1);
356 path.close();
357 path.moveTo(2,3);
358 path.lineTo(3,2);
359 path.lineTo(4,3);
360 path.close();
361</div>
362
363<div id="testLine13">
364 path.moveTo(6,4);
365 path.lineTo(0,4);
366 path.lineTo(3,1);
367 path.close();
368 path.moveTo(3,2);
369 path.lineTo(2,3);
370 path.lineTo(4,3);
371 path.close();
372</div>
373
caryclark@google.com8dcf1142012-07-02 20:27:02 +0000374<div id="testLine17">
375 SkPath path, simple;
376 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
377 path.addRect(4, 12, 13, 13, (SkPath::Direction) 0);
378 testSimplifyx(path);
379</div>
380
caryclark@google.com47580692012-07-23 12:14:49 +0000381<div id="testLine19">
382 SkPath path, simple;
383 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
384 path.addRect(12, 16, 21, 21, (SkPath::Direction) 0);
385 testSimplifyx(path);
386</div>
387
caryclark@google.comcc905052012-07-25 20:59:42 +0000388<div id="testLine22">
389 path.addRect(0, 12, 12, 12, (SkPath::Direction) 0);
390 path.addRect(4, 12, 13, 13, (SkPath::Direction) 0);
391</div>
392
caryclark@google.com47580692012-07-23 12:14:49 +0000393<div id="testLine24">
394 path.addRect(0, 18, 12, 12, (SkPath::Direction) 0);
395 path.addRect(4, 12, 13, 13, (SkPath::Direction) 0);
396</div>
397
caryclark@google.comfa4a6e92012-07-11 17:52:32 +0000398<div id="testLine28">
399 SkPath path, simple;
400 path.addRect(0, 6, 12, 12, (SkPath::Direction) 0);
401 path.addRect(0, 0, 9, 9, (SkPath::Direction) 0);
402 testSimplifyx(path);
403</div>
404
405<div id="testLine29">
406 SkPath path, simple;
407 path.addRect(0, 18, 12, 12, (SkPath::Direction) 0);
408 path.addRect(12, 12, 21, 21, (SkPath::Direction) 0);
409 testSimplifyx(path);
410</div>
411
412<div id="testLine30">
413 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
414 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
415 path.addRect(4, 4, 13, 13, (SkPath::Direction) 0);
416</div>
417
418<div id="testLine31">
419 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
420 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
421 path.addRect(0, 4, 9, 9, (SkPath::Direction) 0);
422</div>
423
424<div id="testLine32">
425 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
426 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
427 path.addRect(4, 12, 13, 13, (SkPath::Direction) 0);
428</div>
429
caryclark@google.com9764cc62012-07-12 19:29:45 +0000430<div id="testLine33">
431 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
432 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
433 path.addRect(4, 16, 13, 13, (SkPath::Direction) 0);
434</div>
435
caryclark@google.com210acaf2012-07-12 21:05:13 +0000436<div id="testLine34">
437 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
438 path.addRect(0, 6, 12, 12, (SkPath::Direction) 0);
439 path.addRect(4, 12, 13, 13, (SkPath::Direction) 0);
440</div>
441
442<div id="testLine35">
443 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
444 path.addRect(6, 0, 18, 18, (SkPath::Direction) 0);
445 path.addRect(4, 16, 13, 13, (SkPath::Direction) 0);
446</div>
447
caryclark@google.com0e08a192012-07-13 21:07:52 +0000448<div id="testLine36">
449 path.addRect(0, 10, 20, 20, (SkPath::Direction) 0);
450 path.addRect(6, 12, 18, 18, (SkPath::Direction) 0);
451 path.addRect(4, 16, 13, 13, (SkPath::Direction) 0);
452</div>
453
caryclark@google.com47580692012-07-23 12:14:49 +0000454<div id="testLine37">
455 path.addRect(0, 20, 20, 20, (SkPath::Direction) 0);
456 path.addRect(18, 24, 30, 30, (SkPath::Direction) 0);
457 path.addRect(0, 0, 9, 9, (SkPath::Direction) 0);
458</div>
459
460<div id="testLine38">
461 path.addRect(10, 0, 30, 30, (SkPath::Direction) 0);
462 path.addRect(6, 12, 18, 18, (SkPath::Direction) 0);
463 path.addRect(12, 12, 21, 21, (SkPath::Direction) 0);
464</div>
465
466<div id="testLine39">
467 path.addRect(10, 0, 30, 30, (SkPath::Direction) 0);
468 path.addRect(12, 6, 24, 24, (SkPath::Direction) 0);
469 path.addRect(12, 4, 21, 21, (SkPath::Direction) 0);
470</div>
471
472<div id="testLine40">
473 path.addRect(10, 0, 30, 30, (SkPath::Direction) 0);
474 path.addRect(12, 18, 24, 24, (SkPath::Direction) 0);
475 path.addRect(4, 16, 13, 13, (SkPath::Direction) 0);
476</div>
477
478<div id="testLine41">
479 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
480 path.addRect(18, 24, 30, 30, (SkPath::Direction) 0);
481 path.addRect(12, 0, 21, 21, (SkPath::Direction) 0);
482</div>
483
484<div id="testLine42">
485 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
486 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
487 path.addRect(8, 16, 17, 17, (SkPath::Direction) 0);
488</div>
489
490<div id="testLine43">
491 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
492 path.addRect(6, 24, 18, 18, (SkPath::Direction) 0);
493 path.addRect(0, 32, 9, 36, (SkPath::Direction) 1);
494</div>
495
496<div id="testLine44">
497 path.addRect(10, 40, 30, 30, (SkPath::Direction) 0);
498 path.addRect(18, 0, 30, 30, (SkPath::Direction) 0);
499 path.addRect(18, 32, 27, 36, (SkPath::Direction) 1);
500</div>
501
502<div id="testLine45">
503 path.addRect(10, 0, 30, 30, (SkPath::Direction) 0);
504 path.addRect(18, 0, 30, 30, (SkPath::Direction) 0);
505 path.addRect(24, 32, 33, 36, (SkPath::Direction) 0);
506</div>
507
508<div id="testLine46">
509 path.addRect(10, 40, 30, 30, (SkPath::Direction) 0);
510 path.addRect(24, 0, 36, 36, (SkPath::Direction) 0);
511 path.addRect(24, 32, 33, 36, (SkPath::Direction) 0);
512</div>
513
514<div id="testLine47">
515 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
516 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
517 path.addRect(0, 0, 9, 9, (SkPath::Direction) 1);
518</div>
519
520<div id="testLine48">
521 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
522 path.addRect(0, 6, 12, 12, (SkPath::Direction) 0);
523 path.addRect(0, 0, 9, 9, (SkPath::Direction) 1);
524</div>
525
526<div id="testLine49">
527 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
528 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
529 path.addRect(0, 0, 9, 9, (SkPath::Direction) 0);
530</div>
531
532<div id="testLine50">
533 path.addRect(10, 30, 30, 30, (SkPath::Direction) 0);
534 path.addRect(24, 20, 36, 30, (SkPath::Direction) 0);
535</div>
536
537<div id="testLine51">
538 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
539 path.addRect(0, 12, 12, 12, (SkPath::Direction) 0);
540 path.addRect(4, 12, 13, 13, (SkPath::Direction) 1);
541</div>
542
caryclark@google.come21cb182012-07-23 21:26:31 +0000543<div id="testLine52">
544 path.addRect(0, 30, 20, 20, (SkPath::Direction) 0);
545 path.addRect(6, 20, 18, 30, (SkPath::Direction) 0);
546 path.addRect(32, 0, 36, 41, (SkPath::Direction) 0);
547</div>
548
549<div id="testLine53">
550 path.addRect(10, 30, 30, 30, (SkPath::Direction) 0);
551 path.addRect(12, 20, 24, 30, (SkPath::Direction) 0);
552 path.addRect(12, 32, 21, 36, (SkPath::Direction) 1);
553</div>
554
555<div id="testLine54">
556 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
557 path.addRect(6, 0, 18, 18, (SkPath::Direction) 0);
558 path.addRect(8, 4, 17, 17, (SkPath::Direction) 1);
559</div>
560
561<div id="testLine55">
562 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
563 path.addRect(6, 6, 18, 18, (SkPath::Direction) 0);
564 path.addRect(4, 4, 13, 13, (SkPath::Direction) 1);
565</div>
566
caryclark@google.com18063442012-07-25 12:05:18 +0000567<div id="testLine56">
568 path.addRect(0, 20, 20, 20, (SkPath::Direction) 0);
569 path.addRect(18, 20, 30, 30, (SkPath::Direction) 0);
570 path.addRect(12, 0, 21, 21, (SkPath::Direction) 1);
571</div>
572
573<div id="testLine57">
574 path.addRect(20, 0, 40, 40, (SkPath::Direction) 0);
575 path.addRect(20, 0, 30, 40, (SkPath::Direction) 0);
576 path.addRect(12, 0, 21, 21, (SkPath::Direction) 1);
577</div>
578
caryclark@google.comcc905052012-07-25 20:59:42 +0000579<div id="testLine58">
580 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
581 path.addRect(0, 0, 12, 12, (SkPath::Direction) 1);
582 path.addRect(0, 12, 9, 9, (SkPath::Direction) 1);
583</div>
584
585<div id="testLine59">
586 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
587 path.addRect(6, 6, 18, 18, (SkPath::Direction) 1);
588 path.addRect(4, 4, 13, 13, (SkPath::Direction) 1);
589</div>
590
caryclark@google.com27c449a2012-07-27 18:26:38 +0000591<div id="testLine60">
592 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
593 path.addRect(6, 12, 18, 18, (SkPath::Direction) 1);
594 path.addRect(4, 12, 13, 13, (SkPath::Direction) 1);
595</div>
596
597<div id="testLine61">
598 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
599 path.addRect(12, 0, 24, 24, (SkPath::Direction) 1);
600 path.addRect(12, 0, 21, 21, (SkPath::Direction) 1);
601</div>
602
603<div id="testLine62">
604 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
605 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
606 path.addRect(0, 12, 12, 12, (SkPath::Direction) 0);
607 path.addRect(4, 12, 13, 13, (SkPath::Direction) 1);
608</div>
609
610<div id="testLine63">
611 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
612 path.addRect(0, 10, 20, 20, (SkPath::Direction) 0);
613 path.addRect(0, 6, 12, 12, (SkPath::Direction) 1);
614 path.addRect(0, 32, 9, 36, (SkPath::Direction) 1);
615</div>
616
617<div id="testLine64">
618 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
619 path.addRect(10, 40, 30, 30, (SkPath::Direction) 0);
620 path.addRect(18, 6, 30, 30, (SkPath::Direction) 0);
621</div>
622
623<div id="testLine65">
624 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
625 path.addRect(10, 0, 30, 30, (SkPath::Direction) 0);
626 path.addRect(24, 0, 36, 36, (SkPath::Direction) 0);
627 path.addRect(32, 6, 36, 41, (SkPath::Direction) 1);
628</div>
629
630<div id="testLine66">
631 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
632 path.addRect(0, 30, 20, 20, (SkPath::Direction) 0);
633 path.addRect(12, 20, 24, 30, (SkPath::Direction) 0);
634</div>
635
caryclark@google.com534aa5b2012-08-02 20:08:21 +0000636<div id="testLine67">
637 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
638 path.addRect(10, 40, 30, 30, (SkPath::Direction) 0);
639 path.addRect(24, 20, 36, 30, (SkPath::Direction) 0);
640 path.addRect(32, 0, 36, 41, (SkPath::Direction) 0);
641</div>
642
643<div id="testLine68a">
644 path.addRect(0, 0, 8, 8, (SkPath::Direction) 0);
645 path.addRect(2, 2, 6, 6, (SkPath::Direction) 0);
646 path.addRect(1, 2, 4, 2, (SkPath::Direction) 0);
647</div>
648
649<div id="testLine68b">
650 path.addRect(0, 0, 8, 8, (SkPath::Direction) 0);
651 path.addRect(2, 2, 6, 6, (SkPath::Direction) 1);
652 path.addRect(1, 2, 4, 2, (SkPath::Direction) 0);
653</div>
654
655<div id="testLine68c">
656 path.addRect(0, 0, 8, 8, (SkPath::Direction) 1);
657 path.addRect(2, 2, 6, 6, (SkPath::Direction) 0);
658 path.addRect(1, 2, 4, 2, (SkPath::Direction) 0);
659</div>
660
661<div id="testLine68d">
662 path.addRect(0, 0, 8, 8, (SkPath::Direction) 1);
663 path.addRect(2, 2, 6, 6, (SkPath::Direction) 1);
664 path.addRect(1, 2, 4, 2, (SkPath::Direction) 0);
665</div>
666
667<div id="testLine68e">
668 path.addRect(0, 0, 8, 8, (SkPath::Direction) 0);
669 path.addRect(0, 0, 8, 8, (SkPath::Direction) 0);
670 path.addRect(2, 2, 6, 6, (SkPath::Direction) 1);
671 path.addRect(1, 2, 2, 2, (SkPath::Direction) 0);
672</div>
673
674<div id="testLine68f">
675 path.addRect(0, 0, 8, 8, (SkPath::Direction) 0);
676 path.addRect(2, 2, 6, 6, (SkPath::Direction) 1);
677 path.addRect(2, 2, 6, 6, (SkPath::Direction) 1);
678 path.addRect(1, 2, 2, 2, (SkPath::Direction) 0);
679</div>
680
681<div id="testLine69">
682 path.addRect(0, 20, 20, 20, (SkPath::Direction) 0);
683 path.addRect(0, 20, 12, 30, (SkPath::Direction) 0);
684 path.addRect(12, 32, 21, 36, (SkPath::Direction) 0);
685</div>
686
687<div id="testLine70">
688 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
689 path.addRect(0, 24, 12, 12, (SkPath::Direction) 0);
690 path.addRect(12, 32, 21, 36, (SkPath::Direction) 1);
691</div>
692
693<div id="testLine71">
694 path.addRect(0, 0, 20, 20, (SkPath::Direction) 0);
695 path.addRect(12, 0, 24, 24, (SkPath::Direction) 0);
696 path.addRect(12, 32, 21, 36, (SkPath::Direction) 0);
697</div>
698
caryclark@google.com200c2112012-08-03 15:05:04 +0000699<div id="testLine72">
700 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
701 path.addRect(10, 40, 30, 30, (SkPath::Direction) 0);
702 path.addRect(6, 20, 18, 30, (SkPath::Direction) 0);
703</div>
704
705<div id="testLine73">
706 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
707 path.addRect(0, 40, 20, 20, (SkPath::Direction) 0);
708 path.addRect(0, 20, 12, 30, (SkPath::Direction) 0);
709 path.addRect(0, 0, 9, 9, (SkPath::Direction) 1);
710</div>
711
caryclark@google.com0c803d02012-08-06 11:15:47 +0000712<div id="testLine74">
713 path.addRect(20, 30, 40, 40, (SkPath::Direction) 0);
714 path.addRect(24, 20, 36, 30, (SkPath::Direction) 1);
715 path.addRect(32, 24, 36, 41, (SkPath::Direction) 1);
716</div>
717
caryclark@google.com2ddff932012-08-07 21:25:27 +0000718<div id="testLine75">
719 path.addRect(0, 0, 60, 60, (SkPath::Direction) 0);
720 path.addRect(10, 0, 30, 30, (SkPath::Direction) 1);
721 path.addRect(18, 0, 30, 30, (SkPath::Direction) 1);
722 path.addRect(12, 0, 21, 21, (SkPath::Direction) 1);
723</div>
724
725<div id="testLine76">
726 path.addRect(36, 0, 66, 60, (SkPath::Direction) 0);
727 path.addRect(10, 20, 40, 30, (SkPath::Direction) 0);
728 path.addRect(24, 20, 36, 30, (SkPath::Direction) 1);
729 path.addRect(32, 6, 36, 41, (SkPath::Direction) 1);
730</div>
731
732<div id="testLine77">
733 path.addRect(20, 0, 40, 40, (SkPath::Direction) 0);
734 path.addRect(24, 6, 36, 36, (SkPath::Direction) 1);
735 path.addRect(24, 32, 33, 36, (SkPath::Direction) 1);
736</div>
737
738<div id="testLine78">
739 path.addRect(0, 0, 30, 60, (SkPath::Direction) 0);
740 path.addRect(10, 20, 30, 30, (SkPath::Direction) 1);
741 path.addRect(18, 20, 30, 30, (SkPath::Direction) 1);
742 path.addRect(32, 0, 36, 41, (SkPath::Direction) 1);
743</div>
744
745<div id="testLine79">
746 path.addRect(0, 36, 60, 30, (SkPath::Direction) 0);
747 path.addRect(10, 30, 40, 30, (SkPath::Direction) 0);
748 path.addRect(0, 20, 12, 30, (SkPath::Direction) 1);
749 path.addRect(0, 32, 9, 36, (SkPath::Direction) 1);
750</div>
751
caryclark@google.com59823f72012-08-09 18:17:47 +0000752<div id="testDegenerate1">
753 path.moveTo(0, 0);
754 path.lineTo(0, 0);
755 path.lineTo(2, 0);
756 path.close();
757 path.moveTo(0, 0);
758 path.lineTo(1, 0);
759 path.lineTo(2, 0);
760 path.close();
761</div>
762
763<div id="testDegenerate2">
764 path.moveTo(0, 0);
765 path.lineTo(0, 0);
766 path.lineTo(0, 0);
767 path.close();
768 path.moveTo(0, 0);
769 path.lineTo(1, 0);
770 path.lineTo(0, 1);
771 path.close();
772</div>
773
774<div id="testDegenerate3">
775 path.moveTo(0, 0);
776 path.lineTo(2, 0);
777 path.lineTo(1, 0);
778 path.close();
779 path.moveTo(0, 0);
780 path.lineTo(0, 0);
781 path.lineTo(3, 0);
782 path.close();
783</div>
784
785<div id="testDegenerate4">
786 path.moveTo(0, 0);
787 path.lineTo(1, 0);
788 path.lineTo(1, 3);
789 path.close();
790 path.moveTo(1, 0);
791 path.lineTo(1, 1);
792 path.lineTo(1, 2);
793 path.close();
794</div>
795
796<div id="testNondegenerate1">
797 path.moveTo(0, 0);
798 path.lineTo(3, 0);
799 path.lineTo(1, 3);
800 path.close();
801 path.moveTo(1, 1);
802 path.lineTo(2, 1);
803 path.lineTo(1, 2);
804 path.close();
805</div>
806
807<div id="testNondegenerate2">
808 path.moveTo(1, 0);
809 path.lineTo(0, 1);
810 path.lineTo(1, 1);
811 path.close();
812 path.moveTo(0, 2);
813 path.lineTo(0, 3);
814 path.lineTo(1, 2);
815 path.close();
816</div>
817
818<div id="testNondegenerate3">
819 path.moveTo(0, 0);
820 path.lineTo(1, 0);
821 path.lineTo(2, 1);
822 path.close();
823 path.moveTo(0, 1);
824 path.lineTo(1, 1);
825 path.lineTo(0, 2);
826 path.close();
827</div>
828
829<div id="testNondegenerate4">
830 path.moveTo(1, 0);
831 path.lineTo(0, 1);
832 path.lineTo(1, 2);
833 path.close();
834 path.moveTo(0, 2);
835 path.lineTo(0, 3);
836 path.lineTo(1, 3);
837 path.close();
838</div>
839
840<div id="testQuadralateral5">
841 path.moveTo(0, 0);
842 path.lineTo(0, 0);
843 path.lineTo(1, 0);
844 path.lineTo(1, 1);
845 path.close();
846 path.moveTo(0, 0);
847 path.lineTo(2, 2);
848 path.lineTo(3, 2);
849 path.lineTo(3, 3);
850 path.close();
851</div>
852
853<div id="testQuadralateral6">
854 path.moveTo(0, 0);
855 path.lineTo(0, 0);
856 path.lineTo(1, 0);
857 path.lineTo(1, 1);
858 path.close();
859 path.moveTo(1, 0);
860 path.lineTo(2, 0);
861 path.lineTo(0, 2);
862 path.lineTo(2, 2);
863 path.close();
864</div>
865
caryclark@google.com24bec792012-08-20 12:43:57 +0000866<div id="testFauxQuadralateral6">
867 path.moveTo(0, 0);
868 path.lineTo(1, 0);
869 path.lineTo(1, 1);
870 path.close();
871 path.moveTo(1, 0);
872 path.lineTo(2, 0);
873 path.lineTo(1.333, 0.667);
874 path.close();
875 path.moveTo(1.333, 0.667);
876 path.lineTo(0, 2);
877 path.lineTo(2, 2);
878 path.close();
879</div>
880
881<div id="testFauxQuadralateral6a">
882 path.moveTo(0, 0);
883 path.lineTo(3, 0);
884 path.lineTo(3, 3);
885 path.close();
886 path.moveTo(3, 0);
887 path.lineTo(6, 0);
888 path.lineTo(4, 2);
889 path.close();
890 path.moveTo(4, 2);
891 path.lineTo(0, 6);
892 path.lineTo(6, 6);
893 path.close();
894</div>
895
896<div id="testFauxQuadralateral6b">
897 path.moveTo(0, 0);
898 path.lineTo(3, 0);
899 path.lineTo(3, 3);
900 path.close();
901 path.moveTo(3, 0);
902 path.lineTo(6, 0);
903 path.lineTo(4, 2);
904 path.close();
905 path.moveTo(4, 2);
906 path.lineTo(6, 6);
907 path.lineTo(0, 6);
908 path.close();
909</div>
910
911<div id="testFauxQuadralateral6c">
912 path.moveTo(0, 0);
913 path.lineTo(3, 3);
914 path.lineTo(3, 0);
915 path.close();
916 path.moveTo(3, 0);
917 path.lineTo(6, 0);
918 path.lineTo(4, 2);
919 path.close();
920 path.moveTo(4, 2);
921 path.lineTo(0, 6);
922 path.lineTo(6, 6);
923 path.close();
924</div>
925
926<div id="testFauxQuadralateral6d">
927 path.moveTo(0, 0);
928 path.lineTo(3, 3);
929 path.lineTo(3, 0);
930 path.close();
931 path.moveTo(3, 0);
932 path.lineTo(6, 0);
933 path.lineTo(4, 2);
934 path.close();
935 path.moveTo(4, 2);
936 path.lineTo(6, 6);
937 path.lineTo(0, 6);
938</div>
939
940<div id="testQuadralateral6a">
941 path.moveTo(0, 0);
942 path.lineTo(0, 0);
943 path.lineTo(3, 0);
944 path.lineTo(3, 3);
945 path.close();
946 path.moveTo(3, 0);
947 path.lineTo(6, 0);
948 path.lineTo(0, 6);
949 path.lineTo(6, 6);
950</div>
951
952<div id="testQuadralateral7">
953 path.moveTo(0, 0);
954 path.lineTo(0, 0);
955 path.lineTo(1, 0);
956 path.lineTo(2, 1);
957 path.close();
958 path.moveTo(1, 0);
959 path.lineTo(1, 1);
960 path.lineTo(2, 2);
961 path.lineTo(1, 3);
962 path.close();
963</div>
964
965<div id="testQuadralateral8">
966 path.moveTo(0, 0);
967 path.lineTo(3, 1);
968 path.lineTo(1, 3);
969 path.lineTo(3, 3);
970 path.close();
971 path.moveTo(2, 1);
972 path.lineTo(0, 2);
973 path.lineTo(3, 2);
974 path.lineTo(2, 3);
975 path.close();
976</div>
977
978<div id="testQuadralateral9">
979 path.moveTo(0, 0);
980 path.lineTo(1, 0);
981 path.lineTo(1, 2);
982 path.lineTo(2, 2);
983 path.close();
984 path.moveTo(1, 1);
985 path.lineTo(2, 1);
986 path.lineTo(1, 3);
987 path.lineTo(2, 3);
988 path.close();
989</div>
990
991<div id="testLine1x">
992 path.setFillType(SkPath::kEvenOdd_FillType);
993 path.addRect(0, 0, 12, 12, (SkPath::Direction) 0);
994 path.addRect(4, 0, 13, 13, (SkPath::Direction) 0);
995</div>
996
997<div id="testLine2x">
998 path.setFillType(SkPath::kEvenOdd_FillType);
999 path.addRect(0, 20, 20, 20, (SkPath::Direction) 0);
1000 path.addRect(0, 20, 12, 30, (SkPath::Direction) 0);
1001 path.addRect(12, 0, 21, 21, (SkPath::Direction) 1);
1002</div>
1003
1004<div id="testLine3x">
1005 path.setFillType(SkPath::kEvenOdd_FillType);
1006 path.addRect(10, 30, 30, 30, (SkPath::Direction) 0);
1007 path.addRect(18, 20, 30, 30, (SkPath::Direction) 1);
1008 path.addRect(0, 32, 9, 36, (SkPath::Direction) 1);
1009</div>
1010
1011<div id="testLine4x">
1012 path.setFillType(SkPath::kEvenOdd_FillType);
1013 path.addRect(10, 30, 30, 30, (SkPath::Direction) 0);
1014 path.addRect(24, 20, 36, 30, (SkPath::Direction) 1);
1015 path.addRect(0, 32, 9, 36, (SkPath::Direction) 1);
1016</div>
1017
1018<div id="testQuadratic1">
1019 path.moveTo(0, 0);
1020 path.quadTo(0, 0, 0, 0);
1021 path.lineTo(1, 0);
1022 path.close();
1023 path.moveTo(0, 0);
1024 path.lineTo(0, 0);
1025 path.quadTo(0, 0, 0, 0);
1026 path.close();
1027</div>
1028
1029<div id="testQuadratic2">
1030 path.moveTo(0, 0);
1031 path.quadTo(0, 0, 0, 0);
1032 path.lineTo(3, 0);
1033 path.close();
1034 path.moveTo(0, 0);
1035 path.lineTo(0, 0);
1036 path.quadTo(1, 0, 0, 1);
1037 path.close();
1038</div>
1039
caryclark@google.com03f97062012-08-21 13:13:52 +00001040<div id="testQuadratic3">
1041 path.moveTo(0, 0);
1042 path.quadTo(0, 0, 1, 0);
1043 path.lineTo(0, 2);
1044 path.close();
1045 path.moveTo(0, 0);
1046 path.lineTo(0, 0);
1047 path.quadTo(1, 0, 0, 1);
1048 path.close();
1049</div>
1050
caryclark@google.comc899ad92012-08-23 15:24:42 +00001051<div id="testQuadratic4x">
1052 path.setFillType(SkPath::kEvenOdd_FillType);
1053 path.moveTo(0, 0);
1054 path.quadTo(0, 0, 1, 0);
1055 path.lineTo(0, 2);
1056 path.close();
1057 path.moveTo(0, 0);
1058 path.lineTo(0, 0);
1059 path.quadTo(1, 0, 0, 2);
1060 path.close();
1061</div>
1062
1063<div id="testQuadratic5">
1064 path.moveTo(0, 0);
1065 path.quadTo(0, 0, 0, 0);
1066 path.lineTo(0, 1);
1067 path.close();
1068 path.moveTo(0, 0);
1069 path.lineTo(1, 0);
1070 path.quadTo(0, 1, 0, 2);
1071 path.close();
1072</div>
1073
1074<div id="testQuadratic6">
1075 path.moveTo(0, 0);
1076 path.quadTo(0, 0, 1, 0);
1077 path.lineTo(2, 1);
1078 path.close();
1079 path.moveTo(0, 0);
1080 path.lineTo(0, 0);
1081 path.quadTo(2, 0, 0, 1);
1082 path.close();
1083</div>
1084
1085<div id="testQuadratic7">
1086 path.moveTo(0, 0);
1087 path.quadTo(0, 0, 1, 0);
1088 path.lineTo(3, 1);
1089 path.close();
1090 path.moveTo(0, 0);
1091 path.lineTo(0, 0);
1092 path.quadTo(3, 0, 1, 2);
1093 path.close();
1094</div>
1095
1096<div id="testQuadratic8">
1097 path.moveTo(0, 0);
1098 path.quadTo(0, 0, 1, 0);
1099 path.lineTo(0, 2);
1100 path.close();
1101 path.moveTo(0, 0);
1102 path.lineTo(1, 0);
1103 path.quadTo(0, 1, 1, 2);
1104 path.close();
1105</div>
1106
1107<div id="testQuadratic9">
1108 path.moveTo(0, 0);
1109 path.quadTo(0, 0, 1, 0);
1110 path.lineTo(3, 1);
1111 path.close();
1112 path.moveTo(0, 0);
1113 path.lineTo(1, 0);
1114 path.quadTo(1, 2, 3, 2);
1115 path.close();
1116</div>
1117
1118<div id="testQuadratic9a">
1119 path.moveTo(1.08000004, 0.720000029);
1120 path.lineTo(0, 0);
1121 path.lineTo(1, 0);
1122 path.lineTo(3, 1);
1123 path.lineTo(1.01568651, 0.338562161);
1124 path.quadTo(1.03542483, 0.541699469, 1.08000004, 0.720000029);
1125 path.close();
1126 path.moveTo(1.08000004, 0.720000029);
1127 path.lineTo(3, 2);
1128 path.quadTo(1.39999998, 2, 1.08000004, 0.720000029);
1129 path.close();
1130
1131</div>
1132
1133<div id="testQuadratic10a">
1134path.moveTo(15.5, 15.5);
1135path.lineTo(46.5, 15.5);
1136path.quadTo(0, 31, 0, 46.5);
1137path.lineTo(15.5, 15.5);
1138path.close();
1139</div>
1140
1141<div id="testQuadratic10b">
1142path.moveTo(5.16666698, 36.1666641);
1143path.lineTo(15.5, 15.5);
1144path.lineTo(46.5, 15.5);
1145path.quadTo(15.5, 25.8333321, 5.16666698, 36.1666641);
1146path.close();
1147path.moveTo(5.16666698, 36.1666641);
1148path.lineTo(0, 46.5);
1149path.quadTo(0, 41.3333359, 5.16666698, 36.1666641);
1150path.close();
1151</div>
1152
1153<div id="testQuadratic11a">
1154path.moveTo(0, 0);
1155path.lineTo(15.5, 31);
1156path.lineTo(0, 0);
1157path.close();
1158path.moveTo(0, 15.5);
1159path.lineTo(15.5, 15.5);
1160path.quadTo(15.5, 15.5, 46.5, 31);
1161path.lineTo(0, 15.5);
1162path.close();
1163</div>
1164
1165<div id="testQuadratic11b">
1166path.moveTo(9.30000019, 18.6000004);
1167path.lineTo(0, 15.5);
1168path.lineTo(7.75, 15.5);
1169path.lineTo(15.5, 15.5);
1170path.lineTo(46.5, 31);
1171path.lineTo(9.30000019, 18.6000004);
1172path.close();
1173</div>
1174
1175<div id="testQuadratic12">
1176 path.moveTo(0, 0);
1177 path.quadTo(0, 0, 0, 0);
1178 path.lineTo(1, 3);
1179 path.close();
1180 path.moveTo(1, 0);
1181 path.lineTo(0, 1);
1182 path.quadTo(1, 1, 0, 3);
1183 path.close();
1184</div>
1185
1186<div id="testQuadratic13a">
1187path.moveTo(0, 0);
1188path.quadTo(0, 0, 15.5, 0);
1189path.lineTo(15.5, 31);
1190path.lineTo(0, 0);
1191path.close();
1192path.moveTo(0, 0);
1193path.quadTo(15.5, 46.5, 46.5, 46.5);
1194path.lineTo(0, 0);
1195path.close();
1196</div>
1197
1198<div id="testQuadratic13b">
1199path.moveTo(14.8800001, 29.7600002);
1200path.quadTo(6.20000029, 18.6000004, 0, 0);
1201path.lineTo(14.8800001, 29.7600002);
1202path.close();
1203path.moveTo(15.5, 30.5437222);
1204path.lineTo(15.5, 31);
1205path.lineTo(14.8800001, 29.7600002);
1206path.quadTo(15.1884346, 30.156559, 15.5, 30.5437222);
1207path.close();
1208path.moveTo(15.5, 15.5);
1209path.lineTo(0, 0);
1210path.lineTo(15.5, 0);
1211path.lineTo(15.5, 15.5);
1212path.close();
1213path.moveTo(15.5, 30.5437222);
1214path.lineTo(15.5, 15.5);
1215path.lineTo(46.5, 46.5);
1216path.quadTo(28.34062, 46.5, 15.5, 30.5437222);
1217path.close();
1218</div>
1219
1220<div id="testQuadratic14">
1221 path.moveTo(0, 0);
1222 path.quadTo(0, 0, 1, 0);
1223 path.lineTo(3, 2);
1224 path.close();
1225 path.moveTo(0, 0);
1226 path.lineTo(1, 0);
1227 path.quadTo(3, 2, 3, 3);
1228 path.close();
1229</div>
1230
caryclark@google.com3350c3c2012-08-24 15:24:36 +00001231<div id="testQuadratic15">
1232 path.moveTo(0, 0);
1233 path.quadTo(0, 0, 1, 0);
1234 path.lineTo(1, 3);
1235 path.close();
1236 path.moveTo(1, 0);
1237 path.lineTo(0, 1);
1238 path.quadTo(1, 1, 0, 3);
1239 path.close();
1240</div>
1241
1242<div id="testQuadratic16a">
1243path.moveTo(0, 0);
1244path.quadTo(0, 0, 31, 0);
1245path.lineTo(46.5, 31);
1246path.lineTo(0, 0);
1247path.close();
1248path.moveTo(46.5, 15.5);
1249path.lineTo(0, 31);
1250path.quadTo(0, 31, 15.5, 31);
1251path.lineTo(46.5, 15.5);
1252path.close();
1253</div>
1254
1255<div id="testQuadratic16b">
1256path.moveTo(31, 20.6666679);
1257path.lineTo(0, 0);
1258path.lineTo(31, 0);
1259path.lineTo(39.8571434, 17.7142868);
1260path.lineTo(31, 20.6666679);
1261path.close();
1262path.moveTo(33.214283, 22.1428585);
1263path.lineTo(15.5, 31);
1264path.lineTo(0, 31);
1265path.lineTo(31, 20.6666679);
1266path.lineTo(33.214283, 22.1428585);
1267path.close();
1268path.moveTo(40.2999992, 18.6000004);
1269path.lineTo(46.5, 31);
1270path.lineTo(33.214283, 22.1428585);
1271path.lineTo(40.2999992, 18.6000004);
1272path.close();
1273path.moveTo(39.8571434, 17.7142868);
1274path.lineTo(46.5, 15.5);
1275path.lineTo(40.2999992, 18.6000004);
1276path.lineTo(39.8571434, 17.7142868);
1277path.close();
1278</div>
1279
1280<div id="testQuadratic17x">
1281 path.setFillType(SkPath::kEvenOdd_FillType);
1282 path.moveTo(0, 0);
1283 path.quadTo(0, 0, 3, 1);
1284 path.lineTo(0, 2);
1285 path.close();
1286 path.moveTo(0, 0);
1287 path.lineTo(1, 0);
1288 path.quadTo(3, 1, 0, 2);
1289 path.close();
1290</div>
1291
1292<div id="testQuadratic18">
1293 path.moveTo(0, 0);
1294 path.quadTo(1, 0, 0, 1);
1295 path.lineTo(0, 1);
1296 path.close();
1297 path.moveTo(0, 0);
1298 path.lineTo(0, 0);
1299 path.quadTo(1, 0, 1, 1);
1300 path.close();
1301</div>
1302
caryclark@google.coma7e483d2012-08-28 20:44:43 +00001303<div id="testQuadratic19">
1304 path.moveTo(0, 0);
1305 path.quadTo(1, 0, 0, 1);
1306 path.lineTo(0, 1);
1307 path.close();
1308 path.moveTo(0, 0);
1309 path.lineTo(0, 0);
1310 path.quadTo(2, 0, 0, 1);
1311 path.close();
1312</div>
1313
caryclark@google.com32546db2012-08-31 20:55:07 +00001314<div id="testQuadratic20">
1315 path.moveTo(0, 0);
1316 path.quadTo(1, 0, 0, 1);
1317 path.lineTo(0, 1);
1318 path.close();
1319 path.moveTo(0, 0);
1320 path.lineTo(0, 0);
1321 path.quadTo(1, 0, 0, 1);
1322 path.close();
1323</div>
1324
caryclark@google.com235f56a2012-09-14 14:19:30 +00001325<div id="testQuadratic21">
1326 path.moveTo(0, 0);
1327 path.quadTo(1, 0, 0, 1);
1328 path.lineTo(0, 1);
1329 path.close();
1330 path.moveTo(0, 0);
1331 path.lineTo(0, 0);
1332 path.quadTo(1, 0, 0, 2);
1333 path.close();
1334</div>
1335
1336<div id="testQuadratic22">
1337 path.moveTo(0, 0);
1338 path.quadTo(1, 0, 0, 1);
1339 path.lineTo(0, 1);
1340 path.close();
1341 path.moveTo(0, 0);
1342 path.lineTo(0, 0);
1343 path.quadTo(0, 1, 2, 1);
1344 path.close();
1345</div>
1346
1347<div id="testQuadratic23">
1348 path.moveTo(0, 0);
1349 path.quadTo(1, 0, 0, 1);
1350 path.lineTo(0, 1);
1351 path.close();
1352 path.moveTo(0, 0);
1353 path.lineTo(0, 0);
1354 path.quadTo(0, 2, 1, 2);
1355 path.close();
1356</div>
1357
1358<div id="testQuadratic24">
1359 path.moveTo(0, 0);
1360 path.quadTo(1, 0, 0, 1);
1361 path.lineTo(0, 1);
1362 path.close();
1363 path.moveTo(0, 0);
1364 path.lineTo(1, 0);
1365 path.quadTo(2, 0, 0, 1);
1366 path.close();
1367</div>
1368
1369<div id="testQuadratic25">
1370 path.moveTo(0, 0);
1371 path.quadTo(1, 0, 1, 1);
1372 path.lineTo(1, 1);
1373 path.close();
1374 path.moveTo(0, 0);
1375 path.lineTo(0, 0);
1376 path.quadTo(2, 1, 0, 2);
1377 path.close();
1378</div>
1379
1380<div id="testQuadratic26">
1381 path.moveTo(0, 0);
1382 path.quadTo(1, 0, 1, 1);
1383 path.lineTo(0, 2);
1384 path.close();
1385 path.moveTo(0, 0);
1386 path.lineTo(0, 0);
1387 path.quadTo(1, 0, 0, 1);
1388 path.close();
1389</div>
1390
1391<div id="testQuadratic27">
1392 path.moveTo(0, 0);
1393 path.quadTo(1, 0, 1, 1);
1394 path.lineTo(2, 1);
1395 path.close();
1396 path.moveTo(0, 0);
1397 path.lineTo(0, 0);
1398 path.quadTo(2, 1, 0, 2);
1399 path.close();
1400</div>
1401
1402<div id="testQuadratic28">
1403 path.moveTo(0, 0);
1404 path.quadTo(1, 0, 0, 1);
1405 path.lineTo(0, 1);
1406 path.close();
1407 path.moveTo(0, 0);
1408 path.lineTo(0, 2);
1409 path.quadTo(1, 2, 0, 3);
1410 path.close();
1411</div>
1412
caryclark@google.comd1688742012-09-18 20:08:37 +00001413<div id="testQuadratic29">
1414 path.moveTo(0, 0);
1415 path.quadTo(1, 0, 2, 1);
1416 path.lineTo(0, 2);
1417 path.close();
1418 path.moveTo(0, 0);
1419 path.lineTo(0, 0);
1420 path.quadTo(1, 0, 0, 1);
1421 path.close();
1422</div>
1423
1424<div id="testQuadratic30">
1425 path.moveTo(0, 0);
1426 path.quadTo(1, 0, 1, 2);
1427 path.lineTo(1, 2);
1428 path.close();
1429 path.moveTo(0, 0);
1430 path.lineTo(1, 0);
1431 path.quadTo(0, 1, 1, 2);
1432 path.close();
1433</div>
1434
1435<div id="testQuadratic31">
1436 path.moveTo(0, 0);
1437 path.quadTo(1, 0, 1, 2);
1438 path.lineTo(1, 2);
1439 path.close();
1440 path.moveTo(0, 0);
1441 path.lineTo(1, 0);
1442 path.quadTo(0, 1, 1, 3);
1443 path.close();
1444</div>
1445
1446<div id="testQuadratic32">
1447 path.moveTo(0, 0);
1448 path.quadTo(1, 0, 2, 3);
1449 path.lineTo(2, 3);
1450 path.close();
1451 path.moveTo(0, 0);
1452 path.lineTo(0, 0);
1453 path.quadTo(3, 1, 0, 2);
1454 path.close();
1455</div>
1456
1457<div id="testQuadratic33">
1458 path.moveTo(0, 0);
1459 path.quadTo(2, 0, 0, 1);
1460 path.lineTo(0, 1);
1461 path.close();
1462 path.moveTo(0, 0);
1463 path.lineTo(1, 1);
1464 path.quadTo(2, 1, 2, 2);
1465 path.close();
1466</div>
1467
1468<div id="testQuadratic34">
1469 path.moveTo(0, 0);
1470 path.quadTo(2, 0, 0, 1);
1471 path.lineTo(0, 1);
1472 path.close();
1473 path.moveTo(1, 0);
1474 path.lineTo(1, 1);
1475 path.quadTo(2, 1, 1, 2);
1476 path.close();
1477</div>
1478
1479<div id="testQuadratic35">
1480 path.moveTo(0, 0);
1481 path.quadTo(0, 1, 1, 1);
1482 path.lineTo(1, 3);
1483 path.close();
1484 path.moveTo(2, 0);
1485 path.lineTo(3, 0);
1486 path.quadTo(0, 1, 1, 1);
1487 path.close();
1488</div>
1489
1490<div id="testQuadratic36">
1491 path.moveTo(0, 0);
1492 path.quadTo(2, 1, 2, 3);
1493 path.lineTo(2, 3);
1494 path.close();
1495 path.moveTo(3, 1);
1496 path.lineTo(1, 2);
1497 path.quadTo(3, 2, 1, 3);
1498 path.close();
1499</div>
1500
1501<div id="testQuadratic37">
1502 path.moveTo(0, 0);
1503 path.quadTo(0, 2, 1, 2);
1504 path.lineTo(1, 2);
1505 path.close();
1506 path.moveTo(0, 0);
1507 path.lineTo(3, 1);
1508 path.quadTo(0, 2, 1, 2);
1509 path.close();
1510</div>
1511
1512<div id="testQuadratic38">
1513 path.moveTo(1, 0);
1514 path.quadTo(0, 1, 1, 1);
1515 path.lineTo(1, 1);
1516 path.close();
1517 path.moveTo(1, 0);
1518 path.lineTo(1, 2);
1519 path.quadTo(2, 2, 1, 3);
1520 path.close();
1521</div>
1522
1523<div id="testQuadratic39">
1524path.moveTo(15.5, 0);
1525path.quadTo(46.5, 15.5, 46.5, 31);
1526path.lineTo(15.5, 0);
1527path.close();
1528path.moveTo(46.5, 15.5);
1529path.lineTo(0, 31);
1530path.quadTo(0, 31, 15.5, 31);
1531path.lineTo(46.5, 15.5);
1532 path.close();
1533</div>
1534
1535<div id="testQuadratic39a">
1536path.moveTo(34.875, 19.375);
1537path.lineTo(15.5, 0);
1538path.quadTo(32.9687576, 8.73437881, 40.5937271, 17.4687576);
1539path.lineTo(34.875, 19.375);
1540path.close();
1541path.moveTo(36.1666641, 20.6666679);
1542path.lineTo(15.5, 31);
1543path.lineTo(0, 31);
1544path.lineTo(34.875, 19.375);
1545path.lineTo(36.1666641, 20.6666679);
1546path.close();
1547path.moveTo(41.1812401, 18.15938);
1548path.quadTo(46.5, 24.5796909, 46.5, 31);
1549path.lineTo(36.1666641, 20.6666679);
1550path.lineTo(41.1812401, 18.15938);
1551path.close();
1552path.moveTo(40.5937271, 17.4687576);
1553path.lineTo(46.5, 15.5);
1554path.lineTo(41.1812401, 18.15938);
1555path.quadTo(40.8951759, 17.8140678, 40.5937271, 17.4687576);
1556 path.close();
1557</div>
1558
caryclark@google.com6aea33f2012-10-09 14:11:58 +00001559<div id="testQuadratic40x">
1560 path.setFillType(SkPath::kEvenOdd_FillType);
1561 path.moveTo(2, 0);
1562 path.quadTo(3, 0, 2, 2);
1563 path.lineTo(3, 2);
1564 path.close();
1565 path.moveTo(3, 1);
1566 path.lineTo(0, 2);
1567 path.quadTo(0, 2, 1, 2);
1568 path.close();
1569</div>
1570
1571<div id="testQuadratic40xa">
1572path.moveTo(31, 0);
1573path.quadTo(41.3333359, 0, 37.8888893, 13.7777777);
1574path.lineTo(31, 0);
1575path.close();
1576path.moveTo(37.8888893, 13.7777777);
1577path.quadTo(37.2993202, 16.1360455, 36.3061028, 18.8979664);
1578path.lineTo(0, 31);
1579path.lineTo(15.5, 31);
1580path.lineTo(35.5182915, 20.9908543);
1581path.quadTo(33.7454262, 25.5091457, 31, 31);
1582path.lineTo(46.5, 31);
1583path.lineTo(40.2999992, 18.6000004);
1584path.lineTo(46.5, 15.5);
1585path.lineTo(39.8571434, 17.7142868);
1586path.lineTo(37.8888893, 13.7777777);
1587path.close();
1588path.moveTo(36.3061028, 18.8979664);
1589path.quadTo(35.9396667, 19.9169388, 35.5182915, 20.9908543);
1590path.lineTo(40.2999992, 18.6000004);
1591path.lineTo(39.8571434, 17.7142868);
1592path.lineTo(36.3061028, 18.8979664);
1593</div>
1594
1595<div id="testQuadratic40xb">
1596path.moveTo(31, 0);
1597path.quadTo(46.5, 0, 31, 31);
1598path.lineTo(46.5, 31);
1599path.lineTo(31, 0);
1600path.close();
1601path.moveTo(46.5, 15.5);
1602path.lineTo(0, 31);
1603path.quadTo(0, 31, 15.5, 31);
1604path.lineTo(46.5, 15.5);
1605path.close();
1606</div>
1607
1608<div id="testQuadratic41o">
1609path.moveTo(419.33905, 236.377808);
1610path.quadTo(398.847778, 242.58728, 384.255524, 242.58728);
1611path.quadTo(359.417633, 242.58728, 343.738708, 226.080429);
1612path.quadTo(328.059784, 209.573578, 328.059784, 183.286819);
1613path.quadTo(328.059784, 157.724487, 341.875854, 141.372879);
1614path.quadTo(355.691956, 125.021263, 377.218109, 125.021263);
1615path.quadTo(397.605896, 125.021263, 408.731201, 139.51004);
1616path.quadTo(419.856506, 153.99881, 419.856506, 180.699539);
1617path.lineTo(419.752991, 187.012497);
1618path.lineTo(348.861511, 187.012497);
1619path.quadTo(353.311646, 227.063599, 388.084686, 227.063599);
1620path.quadTo(400.814117, 227.063599, 419.33905, 220.233185);
1621path.lineTo(419.33905, 236.377808);
1622path.close();
1623path.moveTo(349.792938, 171.695801);
1624path.lineTo(399.365234, 171.695801);
1625path.quadTo(399.365234, 140.337967, 375.976227, 140.337967);
1626path.quadTo(352.483704, 140.337967, 349.792938, 171.695801);
1627path.close();
1628path.moveTo(378.682587, 277.360321);
1629path.lineTo(381.062897, 259.66333);
1630path.quadTo(398.759888, 268.046112, 415.939423, 268.046112);
1631path.quadTo(450.402008, 268.046112, 450.402008, 231.513718);
1632path.lineTo(450.402008, 213.816727);
1633path.quadTo(439.12146, 237.41272, 413.352142, 237.41272);
1634path.quadTo(393.171356, 237.41272, 381.269867, 222.716965);
1635path.quadTo(369.368378, 208.02121, 369.368378, 183.079834);
1636path.quadTo(369.368378, 157.414017, 382.92572, 141.269379);
1637path.quadTo(396.483093, 125.124756, 418.009247, 125.124756);
1638path.quadTo(436.844666, 125.124756, 450.402008, 140.441467);
1639path.lineTo(450.402008, 127.608543);
1640path.lineTo(470.89325, 127.608543);
1641path.lineTo(470.89325, 209.366608);
1642path.quadTo(470.89325, 235.756866, 468.150757, 248.43454);
1643path.quadTo(465.408234, 261.112213, 457.853363, 269.184509);
1644path.quadTo(444.502991, 283.362823, 416.353394, 283.362823);
1645path.quadTo(396.690063, 283.362823, 378.682587, 277.360321);
1646path.close();
1647path.moveTo(450.402008, 201.087311);
1648path.lineTo(450.402008, 154.412781);
1649path.quadTo(436.948151, 140.441467, 421.113983, 140.441467);
1650path.quadTo(407.039185, 140.441467, 399.070374, 151.722);
1651path.quadTo(391.101532, 163.002533, 391.101532, 182.665863);
1652path.quadTo(391.101532, 219.612228, 417.07782, 219.612228);
1653path.quadTo(434.774841, 219.612228, 450.402008, 201.087311);
1654path.close();
1655path.moveTo(482.9328, 236.377808);
1656path.quadTo(462.441528, 242.58728, 447.849274, 242.58728);
1657path.quadTo(423.011383, 242.58728, 407.332458, 226.080429);
1658path.quadTo(391.653534, 209.573578, 391.653534, 183.286819);
1659path.quadTo(391.653534, 157.724487, 405.469604, 141.372879);
1660path.quadTo(419.285706, 125.021263, 440.811859, 125.021263);
1661path.quadTo(461.199646, 125.021263, 472.324951, 139.51004);
1662path.quadTo(483.450256, 153.99881, 483.450256, 180.699539);
1663path.lineTo(483.346741, 187.012497);
1664path.lineTo(412.455261, 187.012497);
1665path.quadTo(416.905396, 227.063599, 451.678436, 227.063599);
1666path.quadTo(464.407867, 227.063599, 482.9328, 220.233185);
1667path.lineTo(482.9328, 236.377808);
1668path.close();
1669path.moveTo(413.386688, 171.695801);
1670path.lineTo(462.958984, 171.695801);
1671path.quadTo(462.958984, 140.337967, 439.569977, 140.337967);
1672path.quadTo(416.077454, 140.337967, 413.386688, 171.695801);
1673path.close();
1674</div>
1675
1676<div id="testQuadratic41s">
1677path.moveTo(341.875854, 141.372879);
1678path.quadTo(355.691956,125.021263, 377.218109,125.021263);
1679path.quadTo(388.787811,125.021263, 397.374664,129.687164);
1680path.quadTo(406.565979,125.124756, 418.009247,125.124756);
1681path.quadTo(423.583374,125.124756, 428.695251,126.466187);
1682path.quadTo(434.412903,125.021263, 440.811859,125.021263);
1683path.quadTo(449.427277,125.021263, 456.388672,127.608543);
1684path.lineTo(470.89325,127.608543);
1685path.lineTo(470.89325,137.749908);
1686path.quadTo(471.627319,138.601486, 472.324951,139.51004);
1687path.quadTo(483.450256,153.99881, 483.450256,180.699539);
1688path.lineTo(483.346741,187.012497);
1689path.lineTo(470.89325,187.012497);
1690path.lineTo(470.89325,209.366608);
1691path.quadTo(470.89325,217.414856, 470.638184,224.187729);
1692path.quadTo(476.428223,222.631516, 482.9328,220.233185);
1693path.lineTo(482.9328,236.377808);
1694path.quadTo(475.87207,238.517426, 469.511749,239.919785);
1695path.quadTo(468.946777,244.754791, 468.150757,248.43454);
1696path.quadTo(465.408234,261.112213, 457.853363,269.184509);
1697path.quadTo(444.502991,283.362823, 416.353394,283.362823);
1698path.quadTo(396.690063,283.362823, 378.682587,277.360321);
1699path.lineTo(381.062897,259.66333);
1700path.quadTo(398.759888,268.046112, 415.939423,268.046112);
1701path.quadTo(444.719147,268.046112, 449.464905,242.568665);
1702path.quadTo(448.648254,242.58728, 447.849274,242.58728);
1703path.quadTo(433.084625,242.58728, 421.556366,236.754425);
1704path.quadTo(418.89566,237.203537, 416.046783,237.346252);
1705path.quadTo(397.661652,242.58728, 384.255524,242.58728);
1706path.quadTo(359.417633,242.58728, 343.738708,226.080429);
1707path.quadTo(328.059784,209.573578, 328.059784,183.286819);
1708path.quadTo(328.059784,157.724487, 341.875854,141.372879);
1709path.close();
1710path.moveTo(442.014923, 226.179474);
1711path.quadTo(445.951935,226.953491, 450.402008,227.049881);
1712path.lineTo(450.402008,213.816727);
1713path.quadTo(446.904755,221.132065, 442.014923,226.179474);
1714path.close();
1715path.moveTo(395.347717, 206.501785);
1716path.quadTo(392.200165,197.593536, 391.734406,187.012497);
1717path.lineTo(391.197113,187.012497);
1718path.quadTo(391.738647,198.938644, 395.347717,206.501785);
1719path.close();
1720path.moveTo(391.808533, 171.695801);
1721path.lineTo(392.428436,171.695801);
1722path.quadTo(393.693451,162.656265, 397.02359,154.9935);
1723path.quadTo(397.023804,154.992996, 397.024048,154.992493);
1724path.quadTo(393.175995,143.845093, 383.003235,141.177292);
1725path.quadTo(382.964447,141.223267, 382.92572,141.269379);
1726</div>
1727
1728<div id="testQuadratic42o">
1729path.moveTo(421.962158, 236.285355);
1730path.quadTo(400.947845, 242.65332, 385.983124, 242.65332);
1731path.quadTo(360.511261, 242.65332, 344.432129, 225.725143);
1732path.quadTo(328.352997, 208.796951, 328.352997, 181.839218);
1733path.quadTo(328.352997, 155.62442, 342.521729, 138.855438);
1734path.quadTo(356.69046, 122.086449, 378.766083, 122.086449);
1735path.quadTo(399.674255, 122.086449, 411.083527, 136.945038);
1736path.quadTo(422.492798, 151.803635, 422.492798, 179.185898);
1737path.lineTo(422.386688, 185.660004);
1738path.lineTo(349.685699, 185.660004);
1739path.quadTo(354.24942, 226.733398, 389.910034, 226.733398);
1740path.quadTo(402.964386, 226.733398, 421.962158, 219.728638);
1741path.lineTo(421.962158, 236.285355);
1742path.close();
1743path.moveTo(350.6409, 169.952347);
1744path.lineTo(401.478516, 169.952347);
1745path.quadTo(401.478516, 137.794098, 377.492493, 137.794098);
1746path.quadTo(353.40036, 137.794098, 350.6409, 169.952347);
1747path.close();
1748path.moveTo(379.213562, 278.313934);
1749path.lineTo(381.654602, 260.165222);
1750path.quadTo(399.803314, 268.761993, 417.421356, 268.761993);
1751path.quadTo(452.763611, 268.761993, 452.763611, 231.297104);
1752path.lineTo(452.763611, 213.148392);
1753path.quadTo(441.195129, 237.34668, 414.768036, 237.34668);
1754path.quadTo(394.072144, 237.34668, 381.866882, 222.275818);
1755path.quadTo(369.661591, 207.204956, 369.661591, 181.626953);
1756path.quadTo(369.661591, 155.306015, 383.565002, 138.749298);
1757path.quadTo(397.468384, 122.192581, 419.544037, 122.192581);
1758path.quadTo(438.860199, 122.192581, 452.763611, 137.900238);
1759path.lineTo(452.763611, 124.739769);
1760path.lineTo(473.777893, 124.739769);
1761path.lineTo(473.777893, 208.584686);
1762path.quadTo(473.777893, 235.64856, 470.965363, 248.649826);
1763path.quadTo(468.152863, 261.651093, 460.405151, 269.929443);
1764path.quadTo(446.71402, 284.469666, 417.845886, 284.469666);
1765path.quadTo(397.680664, 284.469666, 379.213562, 278.313934);
1766path.close();
1767path.moveTo(452.763611, 200.094055);
1768path.lineTo(452.763611, 152.228165);
1769path.quadTo(438.966339, 137.900238, 422.727997, 137.900238);
1770path.quadTo(408.293945, 137.900238, 400.121704, 149.468719);
1771path.quadTo(391.949493, 161.037186, 391.949493, 181.202423);
1772path.quadTo(391.949493, 219.091827, 418.588837, 219.091827);
1773path.quadTo(436.737549, 219.091827, 452.763611, 200.094055);
1774path.close();
1775path.moveTo(485.555908, 236.285355);
1776path.quadTo(464.541595, 242.65332, 449.576874, 242.65332);
1777path.quadTo(424.105011, 242.65332, 408.025879, 225.725143);
1778path.quadTo(391.946747, 208.796951, 391.946747, 181.839218);
1779path.quadTo(391.946747, 155.62442, 406.115479, 138.855438);
1780path.quadTo(420.28421, 122.086449, 442.359833, 122.086449);
1781path.quadTo(463.268005, 122.086449, 474.677277, 136.945038);
1782path.quadTo(486.086548, 151.803635, 486.086548, 179.185898);
1783path.lineTo(485.980438, 185.660004);
1784path.lineTo(413.279449, 185.660004);
1785path.quadTo(417.84317, 226.733398, 453.503784, 226.733398);
1786path.quadTo(466.558136, 226.733398, 485.555908, 219.728638);
1787path.lineTo(485.555908, 236.285355);
1788path.close();
1789path.moveTo(414.23465, 169.952347);
1790path.lineTo(465.072266, 169.952347);
1791path.quadTo(465.072266, 137.794098, 441.086243, 137.794098);
1792path.quadTo(416.99411, 137.794098, 414.23465, 169.952347);
1793path.close();
1794</div>
1795
1796<div id="testQuadratic42s">
1797path.moveTo(342.521729, 138.855438);
1798path.quadTo(356.69046,122.086449, 378.766083,122.086449);
1799path.quadTo(390.293488,122.086449, 398.933502,126.603004);
1800path.quadTo(408.150299,122.192581, 419.544037,122.192581);
1801path.quadTo(425.108429,122.192581, 430.223633,123.496056);
1802path.quadTo(435.959412,122.086449, 442.359833,122.086449);
1803path.quadTo(451.19516,122.086449, 458.334229,124.739769);
1804path.lineTo(473.777893,124.739769);
1805path.lineTo(473.777893,135.814713);
1806path.quadTo(474.234741,136.368698, 474.677277,136.945038);
1807path.quadTo(486.086548,151.803635, 486.086548,179.185898);
1808path.lineTo(485.980438,185.660004);
1809path.lineTo(473.777893,185.660004);
1810path.lineTo(473.777893,208.584686);
1811path.quadTo(473.777893,216.745773, 473.522156,223.628113);
1812path.quadTo(479.207153,222.069519, 485.555908,219.728638);
1813path.lineTo(485.555908,236.285355);
1814path.quadTo(478.638306,238.381592, 472.376221,239.787796);
1815path.quadTo(471.792389,244.826782, 470.965363,248.649826);
1816path.quadTo(468.152863,261.651093, 460.405151,269.929443);
1817path.quadTo(446.71402,284.469666, 417.845886,284.469666);
1818path.quadTo(397.680664,284.469666, 379.213562,278.313934);
1819path.lineTo(381.654602,260.165222);
1820path.quadTo(399.803314,268.761993, 417.421356,268.761993);
1821path.quadTo(446.944275,268.761993, 451.80542,242.619034);
1822path.quadTo(450.674866,242.65332, 449.576874,242.65332);
1823path.quadTo(434.524628,242.65332, 422.75238,236.741913);
1824path.quadTo(420.864227,237.041901, 418.884674,237.193085);
1825path.quadTo(399.840271,242.65332, 385.983124,242.65332);
1826path.quadTo(360.511261,242.65332, 344.432129,225.725143);
1827path.quadTo(328.352997,208.796951, 328.352997,181.839218);
1828path.quadTo(328.352997,155.62442, 342.521729,138.855438);
1829path.close();
1830path.moveTo(383.823944, 138.443222);
1831path.quadTo(380.900299,137.794098, 377.492493,137.794098);
1832path.quadTo(353.40036,137.794098, 350.6409,169.952347);
1833path.lineTo(370.408203,169.952347);
1834path.quadTo(372.883484,151.469254, 383.565002,138.749298);
1835path.quadTo(383.694122,138.595551, 383.823944,138.443222);
1836path.close();
1837path.moveTo(369.740021, 185.660004);
1838path.lineTo(349.685699,185.660004);
1839path.quadTo(353.983734,224.342361, 385.863525,226.594208);
1840path.quadTo(383.762756,224.616837, 381.866882,222.275818);
1841path.quadTo(370.639954,208.41301, 369.740021,185.660004);
1842path.close();
1843path.moveTo(413.279449, 185.660004);
1844path.quadTo(415.737305,207.780716, 427.214905,217.987976);
1845path.quadTo(440.600586,214.512451, 452.763611,200.094055);
1846path.lineTo(452.763611,185.660004);
1847</div>
1848
1849<div id="testQuadratic43o">
1850path.moveTo(288.755981, 240);
1851path.lineTo(288.755981, 102.232819);
1852path.lineTo(315.843994, 102.232819);
1853path.lineTo(354.009216, 208.816208);
1854path.lineTo(393.291473, 102.232819);
1855path.lineTo(417.493835, 102.232819);
1856path.lineTo(417.493835, 240);
1857path.lineTo(399.248962, 240);
1858path.lineTo(399.248962, 127.92453);
1859path.lineTo(361.269928, 230.784485);
1860path.lineTo(342.373474, 230.784485);
1861path.lineTo(305.511444, 127.645271);
1862path.lineTo(305.511444, 240);
1863path.lineTo(288.755981, 240);
1864path.close();
1865path.moveTo(397.864014, 236.741989);
1866path.quadTo(379.433014, 242.327148, 366.307892, 242.327148);
1867path.quadTo(343.967255, 242.327148, 329.864746, 227.479935);
1868path.quadTo(315.762238, 212.632736, 315.762238, 188.988907);
1869path.quadTo(315.762238, 165.996674, 328.189209, 151.289093);
1870path.quadTo(340.61618, 136.581512, 359.978058, 136.581512);
1871path.quadTo(378.315979, 136.581512, 388.322723, 149.613556);
1872path.quadTo(398.329468, 162.645584, 398.329468, 186.661758);
1873path.lineTo(398.236359, 192.339996);
1874path.lineTo(334.472504, 192.339996);
1875path.quadTo(338.475189, 228.364258, 369.752075, 228.364258);
1876path.quadTo(381.20163, 228.364258, 397.864014, 222.220581);
1877path.lineTo(397.864014, 236.741989);
1878path.close();
1879path.moveTo(335.310272, 178.563278);
1880path.lineTo(379.898438, 178.563278);
1881path.quadTo(379.898438, 150.358246, 358.861023, 150.358246);
1882path.quadTo(337.730499, 150.358246, 335.310272, 178.563278);
1883path.close();
1884path.moveTo(346.052765, 240);
1885path.lineTo(346.052765, 138.908661);
1886path.lineTo(364.390686, 138.908661);
1887path.lineTo(364.390686, 157.898193);
1888path.quadTo(375.281769, 136.674606, 396.039917, 136.674606);
1889path.quadTo(398.832489, 136.674606, 401.904327, 137.140045);
1890path.lineTo(401.904327, 154.267853);
1891path.quadTo(397.156952, 152.685394, 393.526611, 152.685394);
1892path.quadTo(376.119537, 152.685394, 364.390686, 173.350464);
1893path.lineTo(364.390686, 240);
1894path.lineTo(346.052765, 240);
1895path.close();
1896path.moveTo(362.792297, 273.604034);
1897path.lineTo(364.933289, 257.68634);
1898path.quadTo(380.850983, 265.226288, 396.303253, 265.226288);
1899path.quadTo(427.300842, 265.226288, 427.300842, 232.366959);
1900path.lineTo(427.300842, 216.449265);
1901path.quadTo(417.15448, 237.672852, 393.976105, 237.672852);
1902path.quadTo(375.824341, 237.672852, 365.119446, 224.454651);
1903path.quadTo(354.414581, 211.23645, 354.414581, 188.802734);
1904path.quadTo(354.414581, 165.717422, 366.608826, 151.196014);
1905path.quadTo(378.803101, 136.674606, 398.164948, 136.674606);
1906path.quadTo(415.106598, 136.674606, 427.300842, 150.451324);
1907path.lineTo(427.300842, 138.908661);
1908path.lineTo(445.731873, 138.908661);
1909path.lineTo(445.731873, 212.446564);
1910path.quadTo(445.731873, 236.183472, 443.265106, 247.586502);
1911path.quadTo(440.798309, 258.989532, 434.003052, 266.250244);
1912path.quadTo(421.994965, 279.002991, 396.675598, 279.002991);
1913path.quadTo(378.989258, 279.002991, 362.792297, 273.604034);
1914path.close();
1915path.moveTo(427.300842, 204.999695);
1916path.lineTo(427.300842, 163.017929);
1917path.quadTo(415.199677, 150.451324, 400.95755, 150.451324);
1918path.quadTo(388.297852, 150.451324, 381.130249, 160.597687);
1919path.quadTo(373.962616, 170.744064, 373.962616, 188.430389);
1920path.quadTo(373.962616, 221.662079, 397.327179, 221.662079);
1921path.quadTo(413.244873, 221.662079, 427.300842, 204.999695);
1922path.close();
1923path.moveTo(461.457764, 236.741989);
1924path.quadTo(443.026764, 242.327148, 429.901642, 242.327148);
1925path.quadTo(407.561005, 242.327148, 393.458496, 227.479935);
1926path.quadTo(379.355988, 212.632736, 379.355988, 188.988907);
1927path.quadTo(379.355988, 165.996674, 391.782959, 151.289093);
1928path.quadTo(404.20993, 136.581512, 423.571808, 136.581512);
1929path.quadTo(441.909729, 136.581512, 451.916473, 149.613556);
1930path.quadTo(461.923218, 162.645584, 461.923218, 186.661758);
1931path.lineTo(461.830109, 192.339996);
1932path.lineTo(398.066254, 192.339996);
1933path.quadTo(402.068939, 228.364258, 433.345825, 228.364258);
1934path.quadTo(444.79538, 228.364258, 461.457764, 222.220581);
1935path.lineTo(461.457764, 236.741989);
1936path.close();
1937path.moveTo(398.904022, 178.563278);
1938path.lineTo(443.492188, 178.563278);
1939path.quadTo(443.492188, 150.358246, 422.454773, 150.358246);
1940path.quadTo(401.324249, 150.358246, 398.904022, 178.563278);
1941path.close();
1942</div>
1943
1944<div id="testQuadratic43s">
1945path.moveTo(288.755981, 240);
1946path.lineTo(288.755981,102.232819);
1947path.lineTo(315.843994,102.232819);
1948path.lineTo(331.979736,147.294876);
1949path.quadTo(343.453125,136.581512, 359.978058,136.581512);
1950path.quadTo(370.869446,136.581512, 378.822021,141.178574);
1951path.quadTo(378.893585,141.140915, 378.965302,141.103577);
1952path.lineTo(393.291473,102.232819);
1953path.lineTo(417.493835,102.232819);
1954path.lineTo(417.493835,136.965759);
1955path.quadTo(420.44223,136.581512, 423.571808,136.581512);
1956path.quadTo(431.320984,136.581512, 437.582458,138.908661);
1957path.lineTo(445.731873,138.908661);
1958path.lineTo(445.731873,143.392502);
1959path.quadTo(449.143951,146.002823, 451.916473,149.613556);
1960path.quadTo(461.923218,162.645584, 461.923218,186.661758);
1961path.lineTo(461.830109,192.339996);
1962path.lineTo(445.731873,192.339996);
1963path.lineTo(445.731873,212.446564);
1964path.quadTo(445.731873,220.39856, 445.455017,226.966339);
1965path.quadTo(452.7435,225.43367, 461.457764,222.220581);
1966path.lineTo(461.457764,236.741989);
1967path.quadTo(452.250824,239.531982, 444.367889,240.928268);
1968path.quadTo(443.897583,244.662796, 443.265106,247.586502);
1969path.quadTo(440.798309,258.989532, 434.003052,266.250244);
1970path.quadTo(421.994965,279.002991, 396.675598,279.002991);
1971path.quadTo(378.989258,279.002991, 362.792297,273.604034);
1972path.lineTo(364.933289,257.68634);
1973path.quadTo(380.850983,265.226288, 396.303253,265.226288);
1974path.quadTo(422.230743,265.226288, 426.471558,242.237076);
1975path.quadTo(419.570892,241.869324, 413.503387,240);
1976path.lineTo(399.248962,240);
1977path.lineTo(399.248962,237.37915);
1978path.quadTo(397.047638,237.633072, 394.711517,237.667465);
1979path.quadTo(378.296356,242.327148, 366.307892,242.327148);
1980path.quadTo(357.463165,242.327148, 349.909637,240);
1981path.lineTo(346.052765,240);
1982path.lineTo(346.052765,238.625916);
1983path.quadTo(336.926056,234.914124, 329.864746,227.479935);
1984path.quadTo(315.762238,212.632736, 315.762238,188.988907);
1985path.quadTo(315.762238,176.540054, 319.405273,166.519882);
1986path.lineTo(305.511444,127.645271);
1987path.lineTo(305.511444,240);
1988path.lineTo(288.755981,240);
1989path.close();
1990path.moveTo(375.464813, 192.339996);
1991path.lineTo(374.267029,195.583939);
1992path.quadTo(375.987579,214.575378, 387.432068,219.736267);
1993path.quadTo(380.122528,208.101486, 379.428741,192.339996);
1994path.lineTo(375.464813,192.339996);
1995path.close();
1996path.moveTo(427.300842, 178.563278);
1997path.lineTo(427.300842,163.017929);
1998path.quadTo(422.561523,158.096329, 417.493835,155.102234);
1999path.lineTo(417.493835,178.563278);
2000path.lineTo(427.300842,178.563278);
2001path.close();
2002path.moveTo(427.300842, 192.339996);
2003path.lineTo(417.493835,192.339996);
2004path.lineTo(417.493835,214.429169);
2005path.quadTo(422.505676,210.684036, 427.300842,204.999695);
2006path.lineTo(427.300842,192.339996);
2007path.close();
2008path.moveTo(420.700134, 226.556015);
2009path.quadTo(423.794342,227.54834, 427.300842,227.996094);
2010path.lineTo(427.300842,216.449265);
2011path.quadTo(424.497772,222.312531, 420.700134,226.556015);
2012path.close();
2013path.moveTo(368.744965, 228.354782);
2014path.quadTo(366.836426,226.574738, 365.119446,224.454651);
2015path.quadTo(364.748657,223.996796, 364.390686,223.527878);
2016path.lineTo(364.390686,228.077774);
2017path.quadTo(366.495239,228.312164, 368.744965,228.354782);
2018path.close();
2019path.moveTo(399.248962, 199.701065);
2020path.lineTo(399.248962,192.339996);
2021path.lineTo(398.236359,192.339996);
2022path.lineTo(398.066254,192.339996);
2023path.quadTo(398.498535,196.230621, 399.248962,199.701065);
2024path.close();
2025path.moveTo(399.248962, 178.563278);
2026path.lineTo(399.248962,175.376892);
2027path.quadTo(399.04483,176.922348, 398.904022,178.563278);
2028path.lineTo(399.248962,178.563278);
2029path.close();
2030path.moveTo(399.248962, 136.688828);
2031path.lineTo(399.248962,127.92453);
2032path.lineTo(396.018158,136.674606);
2033path.quadTo(396.029053,136.674606, 396.039917,136.674606);
2034path.quadTo(396.513672,136.674606, 396.995453,136.688004);
2035path.quadTo(397.576904,136.674606, 398.164948,136.674606);
2036path.quadTo(398.709412,136.674606, 399.248962,136.688828);
2037path.close();
2038path.moveTo(346.052765, 178.563278);
2039path.lineTo(346.052765,154.02713);
2040path.quadTo(340.97113,157.621338, 338.22525,164.736588);
2041path.lineTo(343.1763,178.563278);
2042path.lineTo(346.052765,178.563278);
2043path.close();
2044path.moveTo(364.390686, 150.922379);
2045path.lineTo(364.390686,154.048065);
2046path.quadTo(365.340851,152.726639, 366.38147,151.468765);
2047path.quadTo(365.420258,151.14975, 364.390686,150.922379);
2048path.close();
2049path.moveTo(367.863586, 152.032623);
2050path.quadTo(367.144043,151.721848, 366.38147,151.468765);
2051</div>
2052
2053<div id="testQuadratic44o">
2054path.moveTo(354.009216, 208.816208);
2055path.lineTo(393.291473, 102.232819);
2056path.lineTo(399.248962, 127.92453);
2057path.lineTo(361.269928, 230.784485);
2058path.lineTo(354.009216, 208.816208);
2059path.close();
2060path.moveTo(328.189209, 151.289093);
2061path.quadTo(340.61618, 136.581512, 359.978058, 136.581512);
2062path.quadTo(378.315979, 136.581512, 388.322723, 149.613556);
2063path.lineTo(328.189209, 151.289093);
2064path.close();
2065path.moveTo(346.052765, 138.908661);
2066path.lineTo(364.390686, 138.908661);
2067path.lineTo(364.390686, 157.898193);
2068path.quadTo(375.281769, 136.674606, 396.039917, 136.674606);
2069path.lineTo(346.052765, 138.908661);
2070path.close();
2071</div>
2072
2073<div id="testQuadratic44s">
2074path.moveTo(380.33902, 137.376312);
2075path.lineTo(393.291473,102.232819);
2076path.lineTo(399.248962,127.92453);
2077path.lineTo(396.018158,136.674606);
2078path.quadTo(396.029053,136.674606, 396.039917,136.674606);
2079path.lineTo(396.017792,136.675598);
2080path.lineTo(361.269928,230.784485);
2081path.lineTo(354.009216,208.816208);
2082path.lineTo(375.699249,149.965286);
2083path.lineTo(369.22699,150.14563);
2084path.quadTo(373.524384,144.511566, 378.917297,141.233871);
2085path.lineTo(380.33902,137.376312);
2086path.close();
caryclark@google.coma461ff02012-10-11 12:54:23 +00002087path.moveTo(380.33902, 137.376312);
2088path.lineTo(378.917297,141.233856);
2089path.quadTo(375.048248,138.978912, 370.480499,137.816925);
2090path.lineTo(380.33902,137.376312);
2091path.close();
caryclark@google.com6aea33f2012-10-09 14:11:58 +00002092path.moveTo(392.55661, 136.830276);
caryclark@google.coma461ff02012-10-11 12:54:23 +00002093path.lineTo(380.33902,137.376312);
2094</div>
2095
2096<div id="testQuadratic45o">
2097path.moveTo(315.843994, 102.232819);
2098path.lineTo(354.009216, 208.816208);
2099path.lineTo(393.291473, 102.232819);
2100path.lineTo(399.248962, 127.92453);
2101path.lineTo(361.269928, 230.784485);
2102path.lineTo(342.373474, 230.784485);
2103path.lineTo(305.511444, 127.645271);
2104path.lineTo(315.843994, 102.232819);
2105path.close();
2106path.moveTo(366.307892, 242.327148);
2107path.quadTo(343.967255, 242.327148, 329.864746, 227.479935);
2108path.quadTo(315.762238, 212.632736, 315.762238, 188.988907);
2109path.quadTo(315.762238, 165.996674, 328.189209, 151.289093);
2110path.quadTo(340.61618, 136.581512, 359.978058, 136.581512);
2111path.quadTo(378.315979, 136.581512, 388.322723, 149.613556);
2112path.quadTo(398.329468, 162.645584, 398.329468, 186.661758);
2113path.lineTo(398.236359, 192.339996);
2114path.lineTo(334.472504, 192.339996);
2115path.quadTo(338.475189, 228.364258, 369.752075, 228.364258);
2116path.quadTo(381.20163, 228.364258, 397.864014, 222.220581);
2117path.lineTo(366.307892, 242.327148);
2118path.close();
2119path.moveTo(335.310272, 178.563278);
2120path.lineTo(379.898438, 178.563278);
2121path.quadTo(379.898438, 150.358246, 358.861023, 150.358246);
2122path.quadTo(337.730499, 150.358246, 335.310272, 178.563278);
2123path.close();
2124path.moveTo(346.052765, 240);
2125path.lineTo(346.052765, 138.908661);
2126path.lineTo(364.390686, 138.908661);
2127path.lineTo(364.390686, 157.898193);
2128path.quadTo(375.281769, 136.674606, 396.039917, 136.674606);
2129path.lineTo(401.904327, 154.267853);
2130path.quadTo(397.156952, 152.685394, 393.526611, 152.685394);
2131path.quadTo(376.119537, 152.685394, 364.390686, 173.350464);
2132path.lineTo(364.390686, 240);
2133path.lineTo(346.052765, 240);
2134path.close();
2135path.moveTo(396.303253, 265.226288);
2136path.quadTo(427.300842, 265.226288, 427.300842, 232.366959);
2137path.lineTo(427.300842, 216.449265);
2138path.quadTo(417.15448, 237.672852, 393.976105, 237.672852);
2139path.quadTo(375.824341, 237.672852, 365.119446, 224.454651);
2140path.quadTo(354.414581, 211.23645, 354.414581, 188.802734);
2141path.quadTo(354.414581, 165.717422, 366.608826, 151.196014);
2142path.quadTo(378.803101, 136.674606, 398.164948, 136.674606);
2143path.lineTo(396.303253, 265.226288);
2144path.close();
2145path.moveTo(400.95755, 150.451324);
2146path.quadTo(388.297852, 150.451324, 381.130249, 160.597687);
2147path.quadTo(373.962616, 170.744064, 373.962616, 188.430389);
2148path.quadTo(373.962616, 221.662079, 397.327179, 221.662079);
2149path.lineTo(400.95755, 150.451324);
2150path.close();
2151path.moveTo(429.901642, 242.327148);
2152path.quadTo(407.561005, 242.327148, 393.458496, 227.479935);
2153path.quadTo(379.355988, 212.632736, 379.355988, 188.988907);
2154path.quadTo(379.355988, 165.996674, 391.782959, 151.289093);
2155path.quadTo(404.20993, 136.581512, 423.571808, 136.581512);
2156path.lineTo(429.901642, 242.327148);
2157path.close();
2158</div>
2159
2160<div id="testQuadratic45s">
2161path.moveTo(305.511444, 127.645271);
2162path.lineTo(315.843994,102.232819);
2163path.lineTo(331.979736,147.294876);
2164path.quadTo(343.453125,136.581512, 359.978058,136.581512);
2165path.quadTo(370.869446,136.581512, 378.822021,141.178574);
2166path.quadTo(378.893585,141.140915, 378.965302,141.103577);
2167path.lineTo(393.291473,102.232819);
2168path.lineTo(399.248962,127.92453);
2169path.lineTo(396.018158,136.674606);
2170path.quadTo(396.029053,136.674606, 396.039917,136.674606);
2171path.lineTo(396.054596,136.718628);
2172path.quadTo(397.098907,136.674606, 398.164948,136.674606);
2173path.lineTo(398.076477,142.784256);
2174path.lineTo(398.697632,144.647751);
2175path.quadTo(409.233032,136.581512, 423.571808,136.581512);
2176path.lineTo(429.901642,242.327148);
2177path.quadTo(428.161621,242.327148, 426.471558,242.237076);
2178path.quadTo(427.300842,237.741562, 427.300842,232.366959);
2179path.lineTo(427.300842,216.449265);
2180path.quadTo(419.710114,232.327133, 404.8255,236.326401);
2181path.quadTo(400.557983,233.971252, 396.803375,230.691772);
2182path.lineTo(396.7034,237.596863);
2183path.quadTo(395.363068,237.672852, 393.976105,237.672852);
2184path.quadTo(385.309937,237.672852, 378.341187,234.659912);
2185path.lineTo(366.307892,242.327148);
2186path.quadTo(357.463165,242.327148, 349.909637,240);
2187path.lineTo(346.052765,240);
2188path.lineTo(346.052765,238.625916);
2189path.quadTo(336.926056,234.914124, 329.864746,227.479935);
2190path.quadTo(315.762238,212.632736, 315.762238,188.988907);
2191path.quadTo(315.762238,176.540054, 319.405273,166.519882);
2192path.lineTo(305.511444,127.645271);
2193path.close();
2194path.moveTo(375.464813, 192.339996);
2195path.lineTo(374.267029,195.583939);
2196path.quadTo(375.987579,214.575378, 387.432068,219.736267);
2197path.quadTo(380.122528,208.101486, 379.428741,192.339996);
2198path.lineTo(375.464813,192.339996);
2199path.close();
2200path.moveTo(397.925934, 153.178131);
2201path.lineTo(397.615479,174.615356);
2202path.quadTo(398.329468,180.246704, 398.329468,186.661758);
2203path.lineTo(398.236359,192.339996);
2204path.lineTo(397.358795,192.339996);
2205path.lineTo(396.934174,221.659714);
2206path.quadTo(397.129852,221.662079, 397.327179,221.662079);
2207path.lineTo(400.781189,153.910889);
2208path.quadTo(399.295654,153.462463, 397.925934,153.178131);
2209path.close();
2210path.moveTo(400.914398, 151.298019);
2211path.lineTo(400.632721,150.453003);
2212path.quadTo(400.794678,150.451324, 400.95755,150.451324);
2213path.lineTo(400.914398,151.298019);
2214path.close();
2215path.moveTo(368.744965, 228.354782);
2216path.quadTo(366.836426,226.574738, 365.119446,224.454651);
2217path.quadTo(364.748657,223.996796, 364.390686,223.527878);
2218path.lineTo(364.390686,228.077774);
2219path.quadTo(366.495239,228.312164, 368.744965,228.354782);
2220path.close();
2221path.moveTo(346.052765, 178.563278);
2222path.lineTo(346.052765,154.02713);
2223path.quadTo(340.97113,157.621338, 338.22525,164.736588);
2224path.lineTo(343.1763,178.563278);
2225path.lineTo(346.052765,178.563278);
2226path.close();
2227path.moveTo(364.390686, 150.922379);
2228path.lineTo(364.390686,154.048065);
2229path.quadTo(365.340851,152.726639, 366.38147,151.468765);
2230path.quadTo(365.420258,151.14975, 364.390686,150.922379);
2231path.close();
2232path.moveTo(367.863586, 152.032623);
2233path.quadTo(367.144043,151.721848, 366.38147,151.468765);
2234</div>
2235
2236<div id="testQuadratic46o">
2237path.moveTo(366.608826, 151.196014);
2238path.quadTo(378.803101, 136.674606, 398.164948, 136.674606);
2239path.lineTo(354.009216, 208.816208);
2240path.lineTo(393.291473, 102.232819);
2241path.lineTo(359.978058, 136.581512);
2242path.quadTo(378.315979, 136.581512, 388.322723, 149.613556);
2243path.lineTo(364.390686, 157.898193);
2244path.quadTo(375.281769, 136.674606, 396.039917, 136.674606);
2245path.lineTo(350, 120);
2246path.lineTo(366.608826, 151.196014);
2247path.close();
2248</div>
2249
2250<div id="testQuadratic46s">
2251path.moveTo(369.285553, 126.984779);
2252path.lineTo(393.291473,102.232819);
2253path.lineTo(382.416199,131.740402);
2254path.lineTo(396.039917,136.674606);
2255path.quadTo(387.290802,136.674606, 380.294495,140.44487);
2256path.quadTo(379.623352,140.760971, 378.965302,141.103577);
2257path.lineTo(378.917297,141.233856);
2258path.quadTo(378.86972,141.206131, 378.822021,141.178574);
2259path.quadTo(372.011871,144.761871, 366.608826,151.196014);
2260path.lineTo(350,120);
2261path.lineTo(369.285553,126.984779);
2262path.close();
2263path.moveTo(374.00174, 154.571106);
2264path.lineTo(378.917297,141.233871);
2265path.quadTo(378.917297,141.233871, 378.917297,141.233856);
2266path.quadTo(384.294891,144.368011, 388.322723,149.613556);
2267path.lineTo(374.00174,154.571106);
2268path.close();
2269path.moveTo(378.917297, 141.233871);
2270path.quadTo(370.233887,146.511475, 364.390686,157.898193);
2271path.lineTo(374.00174,154.571106);
2272path.lineTo(354.009216,208.816208);
2273path.lineTo(398.164948,136.674606);
2274path.quadTo(388.299255,136.674606, 380.294495,140.44487);
caryclark@google.com6aea33f2012-10-09 14:11:58 +00002275</div>
2276
caryclark@google.com752b60e2012-03-22 21:11:17 +00002277</div>
2278
2279<script type="text/javascript">
2280
2281var testDivs = [
caryclark@google.coma461ff02012-10-11 12:54:23 +00002282 testQuadratic46o,
2283 testQuadratic46s,
2284 testQuadratic45o,
2285 testQuadratic45s,
caryclark@google.com6aea33f2012-10-09 14:11:58 +00002286 testQuadratic44o,
2287 testQuadratic44s,
2288 testQuadratic43o,
2289 testQuadratic43s,
2290 testQuadratic42o,
2291 testQuadratic42s,
2292 testQuadratic41o,
2293 testQuadratic41s,
2294 testQuadratic40xb,
2295 testQuadratic40xa,
2296 testQuadratic40x,
caryclark@google.comd1688742012-09-18 20:08:37 +00002297 testQuadratic39,
2298 testQuadratic39a,
2299 testQuadratic38,
2300 testQuadratic37,
2301 testQuadratic36,
2302 testQuadratic35,
2303 testQuadratic34,
2304 testQuadratic33,
2305 testQuadratic32,
2306 testQuadratic31,
2307 testQuadratic30,
2308 testQuadratic29,
caryclark@google.com235f56a2012-09-14 14:19:30 +00002309 testQuadratic28,
2310 testQuadratic27,
2311 testQuadratic26,
2312 testQuadratic25,
2313 testQuadratic24,
2314 testQuadratic23,
2315 testQuadratic22,
2316 testQuadratic21,
caryclark@google.com32546db2012-08-31 20:55:07 +00002317 testQuadratic20,
caryclark@google.coma7e483d2012-08-28 20:44:43 +00002318 testQuadratic19,
caryclark@google.com3350c3c2012-08-24 15:24:36 +00002319 testQuadratic18,
2320 testQuadratic17x,
2321 testQuadratic16b,
2322 testQuadratic16a,
2323 testQuadratic15,
caryclark@google.comc899ad92012-08-23 15:24:42 +00002324 testQuadratic14,
2325 testQuadratic13b,
2326 testQuadratic13a,
2327 testQuadratic12,
2328 testQuadratic11b,
2329 testQuadratic11a,
2330 testQuadratic10b,
2331 testQuadratic10a,
2332 testQuadratic9a,
2333 testQuadratic9,
2334 testQuadratic8,
2335 testQuadratic7,
2336 testQuadratic6,
2337 testQuadratic5,
2338 testQuadratic4x,
caryclark@google.com03f97062012-08-21 13:13:52 +00002339 testQuadratic3,
caryclark@google.com24bec792012-08-20 12:43:57 +00002340 testQuadratic2,
2341 testQuadratic1,
2342 testLine4x,
2343 testLine3x,
2344 testLine2x,
2345 testLine1x,
2346 testQuadralateral9,
2347 testQuadralateral8,
2348 testQuadralateral7,
2349 testFauxQuadralateral6d,
2350 testFauxQuadralateral6c,
2351 testFauxQuadralateral6b,
2352 testFauxQuadralateral6a,
2353 testFauxQuadralateral6,
2354 testQuadralateral6a,
caryclark@google.com59823f72012-08-09 18:17:47 +00002355 testQuadralateral6,
2356 testQuadralateral5,
2357 testNondegenerate4,
2358 testNondegenerate3,
2359 testNondegenerate2,
2360 testNondegenerate1,
2361 testDegenerate4,
2362 testDegenerate3,
2363 testDegenerate2,
2364 testDegenerate1,
caryclark@google.com2ddff932012-08-07 21:25:27 +00002365 testLine79,
2366 testLine78,
2367 testLine77,
2368 testLine76,
2369 testLine75,
caryclark@google.com0c803d02012-08-06 11:15:47 +00002370 testLine74,
caryclark@google.com200c2112012-08-03 15:05:04 +00002371 testLine73,
2372 testLine72,
caryclark@google.com534aa5b2012-08-02 20:08:21 +00002373 testLine71,
2374 testLine70,
2375 testLine69,
2376 testLine68f,
2377 testLine68e,
2378 testLine68d,
2379 testLine68c,
2380 testLine68b,
2381 testLine68a,
2382 testLine67,
caryclark@google.com27c449a2012-07-27 18:26:38 +00002383 testLine66,
2384 testLine65,
2385 testLine64,
2386 testLine63,
2387 testLine62,
2388 testLine61,
2389 testLine60,
caryclark@google.comcc905052012-07-25 20:59:42 +00002390 testLine59,
2391 testLine58,
caryclark@google.com18063442012-07-25 12:05:18 +00002392 testLine57,
2393 testLine56,
caryclark@google.come21cb182012-07-23 21:26:31 +00002394 testLine55,
2395 testLine54,
2396 testLine53,
2397 testLine52,
caryclark@google.com47580692012-07-23 12:14:49 +00002398 testLine51,
2399 testLine50,
2400 testLine49,
2401 testLine48,
2402 testLine47,
2403 testLine46,
2404 testLine45,
2405 testLine44,
2406 testLine43,
2407 testLine42,
2408 testLine41,
2409 testLine40,
2410 testLine39,
2411 testLine38,
2412 testLine37,
caryclark@google.com0e08a192012-07-13 21:07:52 +00002413 testLine36,
caryclark@google.com210acaf2012-07-12 21:05:13 +00002414 testLine35,
2415 testLine34,
caryclark@google.com9764cc62012-07-12 19:29:45 +00002416 testLine33,
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002417 testLine32,
2418 testLine31,
caryclark@google.com534aa5b2012-08-02 20:08:21 +00002419 testLine30,
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002420 testLine29,
2421 testLine28,
caryclark@google.com47580692012-07-23 12:14:49 +00002422 testLine24,
caryclark@google.comcc905052012-07-25 20:59:42 +00002423 testLine22,
caryclark@google.com47580692012-07-23 12:14:49 +00002424 testLine19,
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002425 testLine17,
caryclark@google.come21cb182012-07-23 21:26:31 +00002426 testLine13,
2427 testLine12,
caryclark@google.com47580692012-07-23 12:14:49 +00002428 testLine9,
caryclark@google.comcc905052012-07-25 20:59:42 +00002429 testLine7b,
caryclark@google.com47580692012-07-23 12:14:49 +00002430 testLine7,
caryclark@google.com8dcf1142012-07-02 20:27:02 +00002431 testSimplifyQuadratic21,
2432 testSimplifyQuadratic20,
2433 testSimplifyQuadratic19,
caryclark@google.comb45a1b42012-05-18 20:50:33 +00002434 testSimplifyQuadratic18,
caryclark@google.comfa0588f2012-04-26 21:01:06 +00002435 testSimplifyQuadratic17,
2436 testSimplifyQuadratic16,
2437 testSimplifyQuadratic15,
2438 testSimplifyQuadratic14,
2439 testSimplifyQuadratic13,
2440 testSimplifyQuadratic12,
2441 testSimplifyQuadratic11,
2442 testSimplifyQuadratic10,
2443 testSimplifyQuadratic9,
2444 testSimplifyQuadratic8,
2445 testSimplifyQuadratic7,
2446 testSimplifyQuadratic6,
2447 testSimplifyQuadratic5,
2448 testSimplifyQuadratic4,
2449 testSimplifyQuadratic3,
2450 testSimplifyQuadratic2,
2451 testSimplifyQuadratic1,
caryclark@google.com752b60e2012-03-22 21:11:17 +00002452];
2453
2454var scale, columns, rows, xStart, yStart;
2455
2456var ticks = 0.1;
2457var at_x = 13 + 0.5;
2458var at_y = 13 + 0.5;
caryclark@google.com2ddff932012-08-07 21:25:27 +00002459var decimal_places = 0; // make this 3 to show more precision
caryclark@google.com752b60e2012-03-22 21:11:17 +00002460
2461var tests = [];
caryclark@google.com0e08a192012-07-13 21:07:52 +00002462var testTitles = [];
caryclark@google.com752b60e2012-03-22 21:11:17 +00002463var testIndex = 0;
caryclark@google.com24bec792012-08-20 12:43:57 +00002464var hasXor = false;
caryclark@google.com6aea33f2012-10-09 14:11:58 +00002465var draw_labels = true;
caryclark@google.com752b60e2012-03-22 21:11:17 +00002466
2467var ctx;
2468
caryclark@google.com0e08a192012-07-13 21:07:52 +00002469function parse(test, title) {
caryclark@google.com752b60e2012-03-22 21:11:17 +00002470 var contours = [];
2471 var contourStrs = test.split("path.close();");
caryclark@google.comd88e0892012-03-27 13:23:51 +00002472 var pattern = /-?\d+\.*\d*/g;
caryclark@google.com24bec792012-08-20 12:43:57 +00002473 hasXor = test.split("kEvenOdd_FillType").length > 1;
caryclark@google.com752b60e2012-03-22 21:11:17 +00002474 for (var c in contourStrs) {
caryclark@google.comfb173422012-04-10 18:28:55 +00002475 var contour = contourStrs[c];
2476 var verbStrs = contour.split("path");
2477 var verbs = [];
2478 for (var v in verbStrs) {
2479 var verbStr = verbStrs[v];
2480 var points = verbStr.match(pattern);
2481 var pts = [];
2482 for (var wd in points) {
2483 var num = parseFloat(points[wd]);
2484 if (isNaN(num)) continue;
2485 pts.push(num);
2486 }
2487 if (pts.length > 0)
2488 verbs.push(pts);
caryclark@google.com752b60e2012-03-22 21:11:17 +00002489 }
caryclark@google.comfa0588f2012-04-26 21:01:06 +00002490 if (verbs.length > 0) {
2491 var lastIndex = verbs.length - 1;
2492 var lastVerb = verbs[lastIndex];
2493 var lastLen = lastVerb.length;
2494 if (verbs[0][0] != lastVerb[lastLen - 2] && verbs[0][1] != lastVerb[lastLen - 1]) {
2495 var lastPts = [];
2496 lastPts.push(verbs[0][0]);
2497 lastPts.push(verbs[0][1]);
2498 verbs.push(lastPts);
2499 }
caryclark@google.comfb173422012-04-10 18:28:55 +00002500 contours.push(verbs);
caryclark@google.comfa0588f2012-04-26 21:01:06 +00002501 }
caryclark@google.com752b60e2012-03-22 21:11:17 +00002502 }
caryclark@google.com0e08a192012-07-13 21:07:52 +00002503 if (contours.length > 0) {
caryclark@google.comfb173422012-04-10 18:28:55 +00002504 tests.push(contours);
caryclark@google.com0e08a192012-07-13 21:07:52 +00002505 testTitles.push(title);
2506 }
caryclark@google.com752b60e2012-03-22 21:11:17 +00002507}
2508
caryclark@google.com0e08a192012-07-13 21:07:52 +00002509function parseRect(test, title) {
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002510 var contours = [];
2511 var rectStrs = test.split("path.addRect");
2512 var pattern = /-?\d+\.*\d*/g;
caryclark@google.com24bec792012-08-20 12:43:57 +00002513 hasXor = test.split("kEvenOdd_FillType").length > 1;
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002514 for (var r in rectStrs) {
2515 var rect = rectStrs[r];
2516 var sideStrs = rect.match(pattern);
2517 var sides = [];
2518 for (var wd in sideStrs) {
2519 var num = parseFloat(sideStrs[wd]);
2520 if (isNaN(num)) continue;
2521 sides.push(num);
2522 }
2523 if (sides.length == 0)
2524 continue;
2525 var verbs = [];
2526 var topLeft = [];
2527 topLeft.push(sides[0]); topLeft.push(sides[1]);
2528 var topRight = [];
2529 topRight.push(sides[2]); topRight.push(sides[1]);
2530 var botLeft = [];
2531 botLeft.push(sides[0]); botLeft.push(sides[3]);
2532 var botRight = [];
2533 botRight.push(sides[2]); botRight.push(sides[3]);
2534 verbs.push(topLeft);
2535 if (sides[4] == 0) {
2536 verbs.push(topRight);
2537 verbs.push(botRight);
2538 verbs.push(botLeft);
2539 } else {
2540 verbs.push(botLeft);
2541 verbs.push(botRight);
2542 verbs.push(topRight);
2543 }
2544 verbs.push(topLeft);
2545 contours.push(verbs);
2546 }
caryclark@google.com0e08a192012-07-13 21:07:52 +00002547 if (contours.length > 0) {
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002548 tests.push(contours);
caryclark@google.com0e08a192012-07-13 21:07:52 +00002549 testTitles.push(title);
2550 }
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002551}
2552
caryclark@google.com752b60e2012-03-22 21:11:17 +00002553function init(test) {
2554 var canvas = document.getElementById('canvas');
2555 if (!canvas.getContext) return;
caryclark@google.com534aa5b2012-08-02 20:08:21 +00002556 canvas.width = window.innerWidth - at_x;
2557 canvas.height = window.innerHeight - at_y;
caryclark@google.com752b60e2012-03-22 21:11:17 +00002558 ctx = canvas.getContext('2d');
2559 var xmin = Infinity;
2560 var xmax = -Infinity;
2561 var ymin = Infinity;
2562 var ymax = -Infinity;
caryclark@google.comfb173422012-04-10 18:28:55 +00002563 for (var contours in test) {
2564 var contour = test[contours];
2565 for (var verbs in contour) {
2566 var verb = contour[verbs];
2567 var last = verb.length;
caryclark@google.comb45a1b42012-05-18 20:50:33 +00002568 for (var idx = 0; idx < last; idx += 2) {
2569 xmin = Math.min(xmin, verb[idx]);
2570 xmax = Math.max(xmax, verb[idx]);
2571 ymin = Math.min(ymin, verb[idx + 1]);
2572 ymax = Math.max(ymax, verb[idx + 1]);
2573 }
caryclark@google.com752b60e2012-03-22 21:11:17 +00002574 }
2575 }
2576 var subscale = 1;
2577 while ((xmax - xmin) * subscale < 0.1 && (ymax - ymin) * subscale < 0.1) {
2578 subscale *= 10;
2579 }
2580 columns = Math.ceil(xmax) - Math.floor(xmin) + 1;
2581 rows = Math.ceil(ymax) - Math.floor(ymin) + 1;
2582 xStart = Math.floor(xmin);
2583 yStart = Math.floor(ymin);
2584 var hscale = ctx.canvas.width / columns / ticks;
2585 var vscale = ctx.canvas.height / rows / ticks;
2586 scale = Math.floor(Math.min(hscale, vscale)) * subscale;
2587}
2588
2589function drawPoint(px, py, xoffset, yoffset, unit) {
caryclark@google.com2ddff932012-08-07 21:25:27 +00002590 var label = px.toFixed(decimal_places) + ", " + py.toFixed(decimal_places);
caryclark@google.com752b60e2012-03-22 21:11:17 +00002591 var _px = px * unit + xoffset;
2592 var _py = py * unit + yoffset;
2593 ctx.beginPath();
2594 ctx.arc(_px, _py, 3, 0, Math.PI*2, true);
2595 ctx.closePath();
2596 ctx.fill();
2597 ctx.fillText(label, _px + 5, _py);
2598}
2599
caryclark@google.com0e08a192012-07-13 21:07:52 +00002600function draw(test, title, _at_x, _at_y, scale) {
2601 ctx.fillStyle = "rgba(0,0,0, 0.1)";
2602 ctx.font = "normal 50px Arial";
2603 ctx.fillText(title, 50, 50);
2604 ctx.font = "normal 10px Arial";
2605
caryclark@google.com752b60e2012-03-22 21:11:17 +00002606 var unit = scale * ticks;
2607 ctx.lineWidth = 1;
2608 var i;
2609 for (i = 0; i <= rows * ticks; ++i) {
2610 ctx.strokeStyle = (i % ticks) != 0 ? "rgb(160,160,160)" : "black";
2611 ctx.beginPath();
2612 ctx.moveTo(_at_x + 0, _at_y + i * scale);
2613 ctx.lineTo(_at_x + unit * columns, _at_y + i * scale);
2614 ctx.stroke();
2615 }
2616 for (i = 0; i <= columns * ticks; ++i) {
2617 ctx.strokeStyle = (i % ticks) != 0 ? "rgb(160,160,160)" : "black";
2618 ctx.beginPath();
2619 ctx.moveTo(_at_x + i * scale, _at_y + 0);
2620 ctx.lineTo(_at_x + i * scale, _at_y + unit * rows);
2621 ctx.stroke();
2622 }
2623
2624 var xoffset = xStart * -unit + _at_x;
2625 var yoffset = yStart * -unit + _at_y;
2626
2627 ctx.fillStyle = "rgb(40,80,60)"
2628 for (i = 0; i <= columns; i += (1 / ticks))
2629 {
2630 num = (xoffset - _at_x) / -unit + i;
2631 ctx.fillText(num.toFixed(0), i * unit + _at_y - 5, 10);
2632 }
2633 for (i = 0; i <= rows; i += (1 / ticks))
2634 {
2635 num = (yoffset - _at_x) / -unit + i;
2636 ctx.fillText(num.toFixed(0), 0, i * unit + _at_y + 0);
2637 }
caryclark@google.com32546db2012-08-31 20:55:07 +00002638
caryclark@google.com752b60e2012-03-22 21:11:17 +00002639 ctx.strokeStyle = "red";
caryclark@google.comfb173422012-04-10 18:28:55 +00002640 var contours, verbs, pts;
caryclark@google.com8dcf1142012-07-02 20:27:02 +00002641 ctx.beginPath();
caryclark@google.comfb173422012-04-10 18:28:55 +00002642 for (contours in test) {
2643 var contour = test[contours];
2644 if (contours == 2) ctx.strokeStyle = "blue";
caryclark@google.comfb173422012-04-10 18:28:55 +00002645 var first = true;
2646 for (verbs in contour) {
2647 var verb = contour[verbs];
2648 switch (verb.length) {
2649 case 2:
2650 if (first) {
2651 ctx.moveTo(xoffset + verb[0] * unit, yoffset + verb[1] * unit);
2652 first = false;
2653 } else
2654 ctx.lineTo(xoffset + verb[0] * unit, yoffset + verb[1] * unit);
2655 break;
2656 case 4:
2657 ctx.quadraticCurveTo(xoffset + verb[0] * unit, yoffset + verb[1] * unit,
2658 xoffset + verb[2] * unit, yoffset + verb[3] * unit);
2659 break;
2660 case 6:
2661 ctx.bezierCurveTo(xoffset + verb[0] * unit, yoffset + verb[1] * unit,
2662 xoffset + verb[2] * unit, yoffset + verb[3] * unit,
2663 xoffset + verb[4] * unit, yoffset + verb[5] * unit);
2664 break;
2665 }
caryclark@google.com752b60e2012-03-22 21:11:17 +00002666 }
caryclark@google.com8dcf1142012-07-02 20:27:02 +00002667 ctx.closePath();
caryclark@google.com752b60e2012-03-22 21:11:17 +00002668 }
caryclark@google.com24bec792012-08-20 12:43:57 +00002669 if (hasXor) {
2670 ctx.fillType=xor; // how is this done?
2671 }
caryclark@google.com8dcf1142012-07-02 20:27:02 +00002672 ctx.stroke();
2673 ctx.fillStyle="rgba(192,192,255, 0.3)";
2674 ctx.fill();
caryclark@google.com752b60e2012-03-22 21:11:17 +00002675
caryclark@google.com6aea33f2012-10-09 14:11:58 +00002676 if (!draw_labels) {
2677 return;
2678 }
caryclark@google.com752b60e2012-03-22 21:11:17 +00002679 ctx.fillStyle="blue";
caryclark@google.comfb173422012-04-10 18:28:55 +00002680 for (contours in test) {
2681 var contour = test[contours];
2682 for (verbs in contour) {
2683 var verb = contour[verbs];
2684 for (i = 0; i < verb.length; i += 2) {
2685 x = verb[i];
2686 y = verb[i + 1];
2687 drawPoint(x, y, xoffset, yoffset, unit);
2688 }
caryclark@google.com752b60e2012-03-22 21:11:17 +00002689 }
2690 }
2691}
2692
2693var mouseX = Infinity, mouseY;
2694
2695function calcXY() {
2696 var e = window.event;
2697 var tgt = e.target || e.srcElement;
2698 var left = tgt.offsetLeft;
2699 var top = tgt.offsetTop;
2700 var unit = scale * ticks;
2701 mouseX = (e.clientX - left - Math.ceil(at_x) + 1) / unit + xStart;
2702 mouseY = (e.clientY - top - Math.ceil(at_y)) / unit + yStart;
2703}
2704
2705function handleMouseOver() {
2706 calcXY();
2707 var num = mouseX.toFixed(3) + ", " + mouseY.toFixed(3);
2708 ctx.beginPath();
2709 ctx.rect(300,100,200,10);
2710 ctx.fillStyle="white";
2711 ctx.fill();
2712 ctx.fillStyle="black";
2713 ctx.fillText(num, 300, 108);
2714}
2715
2716function handleMouseClick() {
2717 calcXY();
2718// drawInset();
2719}
2720
2721function drawTop() {
2722 init(tests[testIndex]);
2723 redraw();
2724}
2725
2726function redraw() {
2727 ctx.beginPath();
2728 ctx.rect(0, 0, ctx.canvas.width, ctx.canvas.height);
2729 ctx.fillStyle="white";
2730 ctx.fill();
caryclark@google.com0e08a192012-07-13 21:07:52 +00002731 draw(tests[testIndex], testTitles[testIndex], at_x, at_y, scale);
caryclark@google.com752b60e2012-03-22 21:11:17 +00002732// if (insetScale != scale && mouseX != Infinity)
2733// drawInset();
2734}
2735
2736function doKeyPress(evt) {
2737 var char = String.fromCharCode(evt.charCode);
2738 switch (char) {
2739 case 'N':
caryclark@google.com534aa5b2012-08-02 20:08:21 +00002740 testIndex += 9;
caryclark@google.com752b60e2012-03-22 21:11:17 +00002741 case 'n':
2742 if (++testIndex >= tests.length)
2743 testIndex = 0;
caryclark@google.comfa0588f2012-04-26 21:01:06 +00002744 mouseX = Infinity;
2745 drawTop();
2746 break;
2747 case 'P':
caryclark@google.com534aa5b2012-08-02 20:08:21 +00002748 testIndex -= 9;
caryclark@google.comfa0588f2012-04-26 21:01:06 +00002749 case 'p':
2750 if (--testIndex < 0)
2751 testIndex = tests.length - 1;
caryclark@google.com752b60e2012-03-22 21:11:17 +00002752 mouseX = Infinity;
2753 drawTop();
2754 break;
2755 case 'T':
2756 case 't':
caryclark@google.com752b60e2012-03-22 21:11:17 +00002757 break;
2758 case '-':
caryclark@google.com534aa5b2012-08-02 20:08:21 +00002759 drawTop();
caryclark@google.com752b60e2012-03-22 21:11:17 +00002760 break;
2761 case '=':
2762 case '+':
caryclark@google.com534aa5b2012-08-02 20:08:21 +00002763 drawTop();
caryclark@google.com752b60e2012-03-22 21:11:17 +00002764 break;
caryclark@google.com6aea33f2012-10-09 14:11:58 +00002765 case 'x':
2766 draw_labels ^= true;
2767 drawTop();
2768 break;
caryclark@google.com752b60e2012-03-22 21:11:17 +00002769 }
2770}
2771
2772function start() {
2773 for (i = 0; i < testDivs.length; ++i) {
caryclark@google.com0e08a192012-07-13 21:07:52 +00002774 var title = testDivs[i].id.toString();
caryclark@google.com752b60e2012-03-22 21:11:17 +00002775 var str = testDivs[i].firstChild.data;
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002776 if (str.split("addRect").length > 1) {
caryclark@google.com0e08a192012-07-13 21:07:52 +00002777 parseRect(str, title);
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002778 } else {
caryclark@google.com0e08a192012-07-13 21:07:52 +00002779 parse(str, title);
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002780 }
caryclark@google.com752b60e2012-03-22 21:11:17 +00002781 }
2782 drawTop();
2783 window.addEventListener('keypress', doKeyPress, true);
caryclark@google.com534aa5b2012-08-02 20:08:21 +00002784 window.onresize = function() {
2785 drawTop();
2786 }
caryclark@google.com752b60e2012-03-22 21:11:17 +00002787}
2788
2789</script>
2790</head>
2791
2792<body onLoad="start();">
caryclark@google.comfa4a6e92012-07-11 17:52:32 +00002793<canvas id="canvas" width="750" height="500"
caryclark@google.com752b60e2012-03-22 21:11:17 +00002794 onmousemove="handleMouseOver()"
2795 onclick="handleMouseClick()"
2796 ></canvas >
2797</body>
2798</html>