aboutsummaryrefslogtreecommitdiff
path: root/docs/SkPath_Reference.bmh
blob: 11d0b5308a17dd90b5cadfabea671488b9bb92d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
#Topic Path
#Alias Path_Reference ##
#Alias Paths ##

#Class SkPath

#Code
#Populate
##

Paths contain geometry. Paths may be empty, or contain one or more Verbs that
outline a figure. Path always starts with a move verb to a Cartesian_Coordinate,
and may be followed by additional verbs that add lines or curves.
Adding a close verb makes the geometry into a continuous loop, a closed contour.
Paths may contain any number of contours, each beginning with a move verb.

Path contours may contain only a move verb, or may also contain lines,
Quadratic_Beziers, Conics, and Cubic_Beziers. Path contours may be open or
closed.

When used to draw a filled area, Path describes whether the fill is inside or
outside the geometry. Path also describes the winding rule used to fill
overlapping contours.

Internally, Path lazily computes metrics likes bounds and convexity. Call
SkPath::updateBoundsCache to make Path thread safe.

#Subtopic Verb
#Alias Verbs ##
#Line # line and curve type ##
#Enum Verb
#Line # controls how Path Points are interpreted ##

#Code
    enum Verb {
        kMove_Verb,
        kLine_Verb,
        kQuad_Verb,
        kConic_Verb,
        kCubic_Verb,
        kClose_Verb,
        kDone_Verb,
    };
##

Verb instructs Path how to interpret one or more Point and optional Conic_Weight;
manage Contour, and terminate Path.

#Const kMove_Verb 0
#Line # starts new Contour at next Point ##
    Consecutive kMove_Verb are preserved but all but the last kMove_Verb is
    ignored. kMove_Verb after other Verbs implicitly closes the previous Contour
    if SkPaint::kFill_Style is set when drawn; otherwise, stroke is drawn open.
    kMove_Verb as the last Verb is preserved but ignored.
##
#Const kLine_Verb 1
#Line # adds Line from Last_Point to next Point ##
    Line is a straight segment from Point to Point. Consecutive kLine_Verb
    extend Contour. kLine_Verb at same position as prior kMove_Verb is
    preserved, and draws Point if SkPaint::kStroke_Style is set, and
    SkPaint::Cap is SkPaint::kSquare_Cap or SkPaint::kRound_Cap. kLine_Verb
    at same position as prior line or curve Verb is preserved but is ignored.
##
#Const kQuad_Verb 2
#Line # adds Quad from Last_Point ##
    Adds Quad from Last_Point, using control Point, and end Point.
    Quad is a parabolic section within tangents from Last_Point to control Point,
    and control Point to end Point.
##
#Const kConic_Verb 3
#Line # adds Conic from Last_Point ##
    Adds Conic from Last_Point, using control Point, end Point, and Conic_Weight.
    Conic is a elliptical, parabolic, or hyperbolic section within tangents
    from Last_Point to control Point, and control Point to end Point, constrained
    by Conic_Weight. Conic_Weight less than one is elliptical; equal to one is
    parabolic (and identical to Quad); greater than one hyperbolic.
##
#Const kCubic_Verb 4
#Line # adds Cubic from Last_Point ##
    Adds Cubic from Last_Point, using two control Points, and end Point.
    Cubic is a third-order Bezier_Curve section within tangents from Last_Point
    to first control Point, and from second control Point to end Point.
##
#Const kClose_Verb 5
#Line # closes Contour ##
    Closes Contour, connecting Last_Point to kMove_Verb Point. Consecutive
    kClose_Verb are preserved but only first has an effect. kClose_Verb after
    kMove_Verb has no effect.
##
#Const kDone_Verb 6
#Line # terminates Path ##
    Not in Verb_Array, but returned by Path iterator.
##

Each Verb has zero or more Points stored in Path.
Path iterator returns complete curve descriptions, duplicating shared Points
for consecutive entries.

#Table
#Legend
# Verb        # Allocated Points # Iterated Points # Weights ##
##
# kMove_Verb  # 1                # 1               # 0       ##
# kLine_Verb  # 1                # 2               # 0       ##
# kQuad_Verb  # 2                # 3               # 0       ##
# kConic_Verb # 2                # 3               # 1       ##
# kCubic_Verb # 3                # 4               # 0       ##
# kClose_Verb # 0                # 1               # 0       ##
# kDone_Verb  # --               # 0               # 0       ##
##

#Example
void draw(SkCanvas* canvas) {
    SkPath path;
    path.lineTo(20, 20);
    path.quadTo(-10, -10, 30, 30);
    path.close();
    path.cubicTo(1, 2, 3, 4, 5, 6);
    path.conicTo(0, 0, 0, 0, 2);
    uint8_t verbs[7];
    int count = path.getVerbs(verbs, (int) SK_ARRAY_COUNT(verbs));
    const char* verbStr[] = { "Move", "Line", "Quad", "Conic", "Cubic", "Close" };
    SkDebugf("verb count: %d\nverbs: ", count);
    for (int i = 0; i < count; ++i) {
        SkDebugf("k%s_Verb ", verbStr[verbs[i]]);
    }
    SkDebugf("\n");
}
#StdOut
verb count: 7
verbs: kMove_Verb kLine_Verb kQuad_Verb kClose_Verb kMove_Verb kCubic_Verb kConic_Verb
##
##

#Enum Verb ##
#Subtopic Verb ##

# ------------------------------------------------------------------------------
#Subtopic Direction
#Line # contour orientation, clockwise or counterclockwise ##
#Alias Directions ##

#Enum Direction
#Line # sets Contour clockwise or counterclockwise ##

#Code
    enum Direction : int {
        kCW_Direction,
        kCCW_Direction,
    };
##

Direction describes whether Contour is clockwise or counterclockwise.
When Path contains multiple overlapping Contours, Direction together with
Fill_Type determines whether overlaps are filled or form holes.

Direction also determines how Contour is measured. For instance, dashing
measures along Path to determine where to start and stop stroke; Direction
will change dashed results as it steps clockwise or counterclockwise.

Closed Contours like Rect, Round_Rect, Circle, and Oval added with
kCW_Direction travel clockwise; the same added with kCCW_Direction
travel counterclockwise.

#Const kCW_Direction 0
#Line # contour travels clockwise ##
##
#Const kCCW_Direction 1
#Line # contour travels counterclockwise ##
##


#Example
#Height 100
void draw(SkCanvas* canvas) {
    const SkPoint arrow[] = { {40, -5}, {45, 0}, {40, 5} };
    const SkRect rect = {10, 10, 90, 90};
    SkPaint rectPaint;
    rectPaint.setAntiAlias(true);
    SkPaint textPaint(rectPaint);
    rectPaint.setStyle(SkPaint::kStroke_Style);
    SkPaint arrowPaint(rectPaint);
    SkPath arrowPath;
    arrowPath.addPoly(arrow, SK_ARRAY_COUNT(arrow), true);
    arrowPaint.setPathEffect(SkPath1DPathEffect::Make(arrowPath, 320, 0,
                             SkPath1DPathEffect::kRotate_Style));
    for (auto direction : { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
        canvas->drawRect(rect, rectPaint);
        for (unsigned start : { 0, 1, 2, 3 } ) {
           SkPath path;
           path.addRect(rect, direction, start);
           canvas->drawPath(path, arrowPaint);
       }
       canvas->drawString(SkPath::kCW_Direction == direction ? "CW" : "CCW",  rect.centerX(),
            rect.centerY(), textPaint);
       canvas->translate(120, 0);
    }
}
##

#SeeAlso arcTo rArcTo isRect isNestedFillRects addRect addOval

#Enum Direction ##
#Subtopic Direction ##

# ------------------------------------------------------------------------------

#Method SkPath()
#In Constructors
#Line # constructs with default values ##
#Populate

#Example
    SkPath path;
    SkDebugf("path is " "%s" "empty", path.isEmpty() ? "" : "not ");
#StdOut
path is empty
##
##

#SeeAlso reset rewind

##

# ------------------------------------------------------------------------------

#Method SkPath(const SkPath& path)
#In Constructors
#Line # makes a shallow copy ##
#Populate

#Example
#Description
    Modifying one path does not effect another, even if they started as copies
    of each other.
##
    SkPath path;
    path.lineTo(20, 20);
    SkPath path2(path);
    path2.close();
    SkDebugf("path verbs: %d\n", path.countVerbs());
    SkDebugf("path2 verbs: %d\n", path2.countVerbs());
    path.reset();
    SkDebugf("after reset\n" "path verbs: %d\n", path.countVerbs());
    SkDebugf("path2 verbs: %d\n", path2.countVerbs());
#StdOut
path verbs: 2
path2 verbs: 3
after reset
path verbs: 0
path2 verbs: 3
##
##

#SeeAlso operator=(const SkPath& path)

##

# ------------------------------------------------------------------------------

#Method ~SkPath()

#Line # decreases Reference_Count of owned objects ##
#Populate

#Example
#Description
delete calls Path destructor, but copy of original in path2 is unaffected.
##
void draw(SkCanvas* canvas) {
    SkPath* path = new SkPath();
    path->lineTo(20, 20);
    SkPath path2(*path);
    delete path;
    SkDebugf("path2 is " "%s" "empty", path2.isEmpty() ? "" : "not ");
}
##

#SeeAlso SkPath() SkPath(const SkPath& path) operator=(const SkPath& path)

##

# ------------------------------------------------------------------------------

#Method SkPath& operator=(const SkPath& path)

#Line # makes a shallow copy ##
#Populate

#Example
SkPath path1;
path1.addRect({10, 20, 30, 40});
SkPath path2 = path1;
const SkRect& b1 = path1.getBounds();
SkDebugf("path1 bounds = %g, %g, %g, %g\n", b1.fLeft, b1.fTop, b1.fRight, b1.fBottom);
const SkRect& b2 = path2.getBounds();
SkDebugf("path2 bounds = %g, %g, %g, %g\n", b2.fLeft, b2.fTop, b2.fRight, b2.fBottom);
#StdOut
path1 bounds = 10, 20, 30, 40
path2 bounds = 10, 20, 30, 40
#StdOut ##
##

#SeeAlso swap SkPath(const SkPath& path)

##

# ------------------------------------------------------------------------------

#Method bool operator==(const SkPath& a, const SkPath& b)

#Line # compares Paths for equality ##
#Populate

#Example
#Description
rewind() removes Verb_Array but leaves storage; since storage is not compared,
Path pair are equivalent.
##
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& a, const SkPath& b) -> void {
                SkDebugf("%s one %c= two\n", prefix, a == b ? '=' : '!');
    };
    SkPath one;
    SkPath two;
    debugster("empty", one, two);
    one.moveTo(0, 0);
    debugster("moveTo", one, two);
    one.rewind();
    debugster("rewind", one, two);
    one.moveTo(0, 0);
    one.reset();
    debugster("reset", one, two);
}
#StdOut
empty one == two
moveTo one != two
rewind one == two
reset one == two
##
##

#SeeAlso operator!=(const SkPath& a, const SkPath& b) operator=(const SkPath& path)

##

# ------------------------------------------------------------------------------

#Method bool operator!=(const SkPath& a, const SkPath& b)

#Line # compares paths for inequality ##
#Populate

#Example
#Description
Path pair are equal though their convexity is not equal.
##
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& a, const SkPath& b) -> void {
                SkDebugf("%s one %c= two\n", prefix, a != b ? '!' : '=');
    };
    SkPath one;
    SkPath two;
    debugster("empty", one, two);
    one.addRect({10, 20, 30, 40});
    two.addRect({10, 20, 30, 40});
    debugster("add rect", one, two);
    one.setConvexity(SkPath::kConcave_Convexity);
    debugster("setConvexity", one, two);
    SkDebugf("convexity %c=\n", one.getConvexity() == two.getConvexity() ? '=' : '!');
}
#StdOut
empty one == two
add rect one == two
setConvexity one == two
convexity !=
##
##

##

# ------------------------------------------------------------------------------

#Subtopic Property
#Line # metrics and attributes ##
##

#Method bool isInterpolatable(const SkPath& compare) const
#In Property
#In Interpolate
#Line # returns if pair contains equal counts of Verb_Array and Weights ##
#Populate

#Example
    SkPath path, path2;
    path.moveTo(20, 20);
    path.lineTo(40, 40);
    path.lineTo(20, 20);
    path.lineTo(40, 40);
    path.close();
    path2.addRect({20, 20, 40, 40});
    SkDebugf("paths are " "%s" "interpolatable", path.isInterpolatable(path2) ? "" : "not ");
#StdOut
paths are interpolatable
##
##

#SeeAlso isInterpolatable

##

# ------------------------------------------------------------------------------

#Subtopic Interpolate
#Line # weighted average of Path pair ##
##

#Method bool interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const
#In Interpolate
#Line # interpolates between Path pair ##
Interpolates between Paths with Point_Array of equal size.
Copy Verb_Array and Weights to out, and set out Point_Array to a weighted
average of this Point_Array and ending Point_Array, using the formula:
#Formula # (Path Point * weight) + ending Point * (1 - weight) ##.

weight is most useful when between zero (ending Point_Array) and
one (this Point_Array); will work with values outside of this
range.

interpolate() returns false and leaves out unchanged if Point_Array is not
the same size as ending Point_Array. Call isInterpolatable to check Path
compatibility prior to calling interpolate().

#Param ending  Point_Array averaged with this Point_Array ##
#Param weight  contribution of this Point_Array, and
               one minus contribution of ending Point_Array
##
#Param out     Path replaced by interpolated averages ##

#Return  true if Paths contain same number of Points ##

#Example
#Height 60
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkPath path, path2;
    path.moveTo(20, 20);
    path.lineTo(40, 40);
    path.lineTo(20, 40);
    path.lineTo(40, 20);
    path.close();
    path2.addRect({20, 20, 40, 40});
    for (SkScalar i = 0; i <= 1; i += 1.f / 6) {
      SkPath interp;
      path.interpolate(path2, i, &interp);
      canvas->drawPath(interp, paint);
      canvas->translate(30, 0);
    }
}
##

#SeeAlso isInterpolatable

##

# ------------------------------------------------------------------------------
#Subtopic Fill_Type
#Line # fill rule, normal and inverted ##

#Enum FillType
#Line # sets winding rule and inverse fill ##

#Code
    enum FillType {
        kWinding_FillType,
        kEvenOdd_FillType,
        kInverseWinding_FillType,
        kInverseEvenOdd_FillType,
    };
##

Fill_Type selects the rule used to fill Path. Path set to kWinding_FillType
fills if the sum of Contour edges is not zero, where clockwise edges add one, and
counterclockwise edges subtract one. Path set to kEvenOdd_FillType fills if the
number of Contour edges is odd. Each Fill_Type has an inverse variant that
reverses the rule:
kInverseWinding_FillType fills where the sum of Contour edges is zero;
kInverseEvenOdd_FillType fills where the number of Contour edges is even.

#Example
#Height 100
#Description
The top row has two clockwise rectangles. The second row has one clockwise and
one counterclockwise rectangle. The even-odd variants draw the same. The
winding variants draw the top rectangle overlap, which has a winding of 2, the
same as the outer parts of the top rectangles, which have a winding of 1.
##
void draw(SkCanvas* canvas) {
   SkPath path;
   path.addRect({10, 10, 30, 30}, SkPath::kCW_Direction);
   path.addRect({20, 20, 40, 40}, SkPath::kCW_Direction);
   path.addRect({10, 60, 30, 80}, SkPath::kCW_Direction);
   path.addRect({20, 70, 40, 90}, SkPath::kCCW_Direction);
   SkPaint strokePaint;
   strokePaint.setStyle(SkPaint::kStroke_Style);
   SkRect clipRect = {0, 0, 51, 100};
   canvas->drawPath(path, strokePaint);
   SkPaint fillPaint;
   for (auto fillType : { SkPath::kWinding_FillType, SkPath::kEvenOdd_FillType,
                      SkPath::kInverseWinding_FillType, SkPath::kInverseEvenOdd_FillType } ) {
        canvas->translate(51, 0);
        canvas->save();
        canvas->clipRect(clipRect);
        path.setFillType(fillType);
        canvas->drawPath(path, fillPaint);
        canvas->restore();
    }
}
##

#Const kWinding_FillType 0
#Line # is enclosed by a non-zero sum of Contour Directions ##
##
#Const kEvenOdd_FillType 1
#Line # is enclosed by an odd number of Contours ##
##
#Const kInverseWinding_FillType 2
#Line # is enclosed by a zero sum of Contour Directions ##
##
#Const kInverseEvenOdd_FillType 3
#Line # is enclosed by an even number of Contours ##
##

#Example
#Height 230
void draw(SkCanvas* canvas) {
   SkPath path;
   path.addRect({20, 10, 80, 70}, SkPath::kCW_Direction);
   path.addRect({40, 30, 100, 90}, SkPath::kCW_Direction);
   SkPaint strokePaint;
   strokePaint.setStyle(SkPaint::kStroke_Style);
   SkRect clipRect = {0, 0, 128, 128};
   canvas->drawPath(path, strokePaint);
   canvas->drawLine({0, 50}, {120, 50}, strokePaint);
   SkPaint textPaint;
   textPaint.setAntiAlias(true);
   SkScalar textHPos[] = { 10, 30, 60, 90, 110 };
   canvas->drawPosTextH("01210", 5, textHPos, 48, textPaint);
   textPaint.setTextSize(18);
   canvas->translate(0, 128);
   canvas->scale(.5f, .5f);
   canvas->drawString("inverse", 384, 150, textPaint);
   SkPaint fillPaint;
   for (auto fillType : { SkPath::kWinding_FillType, SkPath::kEvenOdd_FillType,
                      SkPath::kInverseWinding_FillType, SkPath::kInverseEvenOdd_FillType } ) {
        canvas->save();
        canvas->clipRect(clipRect);
        path.setFillType(fillType);
        canvas->drawPath(path, fillPaint);
        canvas->restore();
        canvas->drawString(fillType & 1 ? "even-odd" : "winding", 64, 170, textPaint);
        canvas->translate(128, 0);
    }
}
##

#SeeAlso SkPaint::Style Direction getFillType setFillType

##

# ------------------------------------------------------------------------------

#Method FillType getFillType() const

#In Fill_Type
#Line # returns Fill_Type: winding, even-odd, inverse ##
#Populate

#Example
    SkPath path;
    SkDebugf("default path fill type is %s\n",
            path.getFillType() == SkPath::kWinding_FillType ? "kWinding_FillType" :
            path.getFillType() == SkPath::kEvenOdd_FillType ? "kEvenOdd_FillType" :
            path.getFillType() == SkPath::kInverseWinding_FillType ? "kInverseWinding_FillType" :
                                                                     "kInverseEvenOdd_FillType");
#StdOut
default path fill type is kWinding_FillType
##
##

#SeeAlso FillType setFillType isInverseFillType

##

# ------------------------------------------------------------------------------

#Method void setFillType(FillType ft)

#In Fill_Type
#Line # sets Fill_Type: winding, even-odd, inverse ##
#Populate

#Example
#Description
If empty Path is set to inverse FillType, it fills all pixels.
##
#Height 64
     SkPath path;
     path.setFillType(SkPath::kInverseWinding_FillType);
     SkPaint paint;
     paint.setColor(SK_ColorBLUE);
     canvas->drawPath(path, paint);
##

#SeeAlso FillType getFillType toggleInverseFillType

##

# ------------------------------------------------------------------------------

#Method bool isInverseFillType() const

#In Fill_Type
#Line # returns if Fill_Type fills outside geometry ##
#Populate

#Example
    SkPath path;
    SkDebugf("default path fill type is inverse: %s\n",
            path.isInverseFillType() ? "true" : "false");
#StdOut
default path fill type is inverse: false
##
##

#SeeAlso FillType getFillType setFillType toggleInverseFillType

##

# ------------------------------------------------------------------------------

#Method void toggleInverseFillType()

#In Fill_Type
#Line # toggles Fill_Type between inside and outside geometry ##
Replaces FillType with its inverse. The inverse of FillType describes the area
unmodified by the original FillType.

#Table
#Legend
# FillType                 # toggled FillType         ##
##
# kWinding_FillType        # kInverseWinding_FillType ##
# kEvenOdd_FillType        # kInverseEvenOdd_FillType ##
# kInverseWinding_FillType # kWinding_FillType        ##
# kInverseEvenOdd_FillType # kEvenOdd_FillType        ##
##

#Example
#Description
Path drawn normally and through its inverse touches every pixel once.
##
#Height 100
SkPath path;
SkPaint paint;
paint.setColor(SK_ColorRED);
paint.setTextSize(80);
paint.getTextPath("ABC", 3, 20, 80, &path);
canvas->drawPath(path, paint);
path.toggleInverseFillType();
paint.setColor(SK_ColorGREEN);
canvas->drawPath(path, paint);
##

#SeeAlso FillType getFillType setFillType isInverseFillType

##

#Subtopic Fill_Type ##

# ------------------------------------------------------------------------------

#Subtopic Convexity
#Line # if Path is concave or convex ##

#Enum Convexity
#Line # returns if Path is convex or concave ##

#Code
    enum Convexity : uint8_t {
        kUnknown_Convexity,
        kConvex_Convexity,
        kConcave_Convexity,
    };
##

Path is convex if it contains one Contour and Contour loops no more than
360 degrees, and Contour angles all have same Direction. Convex Path
may have better performance and require fewer resources on GPU_Surface.

Path is concave when either at least one Direction change is clockwise and
another is counterclockwise, or the sum of the changes in Direction is not 360
degrees.

Initially Path Convexity is kUnknown_Convexity. Path Convexity is computed
if needed by destination Surface.

#Const kUnknown_Convexity 0
#Line # indicates Convexity has not been determined ##
##
#Const kConvex_Convexity 1
#Line # one Contour made of a simple geometry without indentations ##
##
#Const kConcave_Convexity 2
#Line # more than one Contour, or a geometry with indentations ##
##

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    SkPoint quad[] = {{70, 70}, {20, 20}, {120, 20}, {120, 120}};
    const char* labels[] = { "unknown", "convex", "concave" };
    for (SkScalar x : { 40, 100 } ) {
        SkPath path;
        quad[0].fX = x;
        path.addPoly(quad, SK_ARRAY_COUNT(quad), true);
        canvas->drawPath(path, paint);
        canvas->drawString(labels[(int) path.getConvexity()], 30, 100, paint);
        canvas->translate(100, 100);
    }
}
##

#SeeAlso Contour Direction getConvexity getConvexityOrUnknown setConvexity isConvex

#Enum Convexity ##

#Method Convexity getConvexity() const

#In Convexity
#Line # returns geometry convexity, computing if necessary ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
        SkDebugf("%s path convexity is %s\n", prefix,
                SkPath::kUnknown_Convexity == path.getConvexity() ? "unknown" :
                SkPath::kConvex_Convexity == path.getConvexity() ? "convex" : "concave"); };
    SkPath path;
    debugster("initial", path);
    path.lineTo(50, 0);
    debugster("first line", path);
    path.lineTo(50, 50);
    debugster("second line", path);
    path.lineTo(100, 50);
    debugster("third line", path);
}
##

#SeeAlso Convexity Contour Direction getConvexityOrUnknown setConvexity isConvex

##

# ------------------------------------------------------------------------------

#Method Convexity getConvexityOrUnknown() const

#In Convexity
#Line # returns geometry convexity if known ##
#Populate

#Example
#Description
Convexity is unknown unless getConvexity is called without a subsequent call
that alters the path.
##
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
        SkDebugf("%s path convexity is %s\n", prefix,
            SkPath::kUnknown_Convexity == path.getConvexityOrUnknown() ? "unknown" :
            SkPath::kConvex_Convexity == path.getConvexityOrUnknown() ? "convex" : "concave"); };
    SkPath path;
    debugster("initial", path);
    path.lineTo(50, 0);
    debugster("first line", path);
    path.getConvexity();
    path.lineTo(50, 50);
    debugster("second line", path);
    path.lineTo(100, 50);
    path.getConvexity();
    debugster("third line", path);
}
##

#SeeAlso Convexity Contour Direction getConvexity setConvexity isConvex

##

# ------------------------------------------------------------------------------

#Method void setConvexity(Convexity convexity)

#In Convexity
#Line # sets if geometry is convex to avoid future computation ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
        SkDebugf("%s path convexity is %s\n", prefix,
                SkPath::kUnknown_Convexity == path.getConvexity() ? "unknown" :
                SkPath::kConvex_Convexity == path.getConvexity() ? "convex" : "concave"); };
        SkPoint quad[] = {{70, 70}, {20, 20}, {120, 20}, {120, 120}};
        SkPath path;
        path.addPoly(quad, SK_ARRAY_COUNT(quad), true);
        debugster("initial", path);
        path.setConvexity(SkPath::kConcave_Convexity);
        debugster("after forcing concave", path);
        path.setConvexity(SkPath::kUnknown_Convexity);
        debugster("after forcing unknown", path);
}
##

#SeeAlso Convexity Contour Direction getConvexity getConvexityOrUnknown isConvex

##

# ------------------------------------------------------------------------------

#Method bool isConvex() const

#In Convexity
#Line # returns if geometry is convex ##
#Populate

#Example
#Description
Concave shape is erroneously considered convex after a forced call to
setConvexity.
##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    SkPoint quad[] = {{70, 70}, {20, 20}, {120, 20}, {120, 120}};
    for (SkScalar x : { 40, 100 } ) {
        SkPath path;
        quad[0].fX = x;
        path.addPoly(quad, SK_ARRAY_COUNT(quad), true);
        path.setConvexity(SkPath::kConvex_Convexity);
        canvas->drawPath(path, paint);
        canvas->drawString(path.isConvex() ? "convex" : "not convex", 30, 100, paint);
        canvas->translate(100, 100);
    }
}
##

#SeeAlso Convexity Contour Direction getConvexity getConvexityOrUnknown setConvexity

##

#Subtopic Convexity ##

# ------------------------------------------------------------------------------

#Method bool isOval(SkRect* bounds) const
#In Property
#Line # returns if describes Oval ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    SkPath path;
    path.addOval({20, 20, 220, 220});
    SkRect bounds;
    if (path.isOval(&bounds)) {
        paint.setColor(0xFF9FBFFF);
        canvas->drawRect(bounds, paint);
    }
    paint.setColor(0x3f000000);
    canvas->drawPath(path, paint);
}
##

#SeeAlso Oval addCircle addOval

##

# ------------------------------------------------------------------------------

#Method bool isRRect(SkRRect* rrect) const
#In Property
#Line # returns if describes Round_Rect ##
#Populate

#Example
#Description
Draw rounded rectangle and its bounds.
##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    SkPath path;
    path.addRRect(SkRRect::MakeRectXY({20, 20, 220, 220}, 30, 50));
    SkRRect rrect;
    if (path.isRRect(&rrect)) {
        const SkRect& bounds = rrect.rect();
        paint.setColor(0xFF9FBFFF);
        canvas->drawRect(bounds, paint);
    }
    paint.setColor(0x3f000000);
    canvas->drawPath(path, paint);
}
##

#SeeAlso Round_Rect addRoundRect addRRect

##

# ------------------------------------------------------------------------------

#Method SkPath& reset()
#In Constructors
#Line # removes Verb_Array, Point_Array, and Weights; frees memory ##
#Populate

#Example
   SkPath path1, path2;
   path1.setFillType(SkPath::kInverseWinding_FillType);
   path1.addRect({10, 20, 30, 40});
   SkDebugf("path1 %c= path2\n", path1 == path2 ? '=' : '!');
   path1.reset();
   SkDebugf("path1 %c= path2\n", path1 == path2 ? '=' : '!');
##

#SeeAlso rewind()

##

# ------------------------------------------------------------------------------

#Method SkPath& rewind()
#In Constructors
#Line # removes Verb_Array, Point_Array, and Weights, keeping memory ##
#Populate

#Example
#Description
Although path1 retains its internal storage, it is indistinguishable from
a newly initialized path.
##
   SkPath path1, path2;
   path1.setFillType(SkPath::kInverseWinding_FillType);
   path1.addRect({10, 20, 30, 40});
   SkDebugf("path1 %c= path2\n", path1 == path2 ? '=' : '!');
   path1.rewind();
   SkDebugf("path1 %c= path2\n", path1 == path2 ? '=' : '!');
##

#SeeAlso reset()

##

# ------------------------------------------------------------------------------

#Method bool isEmpty() const
#In Property
#Line # returns if verb count is zero ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
        SkDebugf("%s path is %s" "empty\n", prefix, path.isEmpty() ? "" : "not ");
    };
    SkPath path;
    debugster("initial", path);
    path.moveTo(0, 0);
    debugster("after moveTo", path);
    path.rewind();
    debugster("after rewind", path);
    path.lineTo(0, 0);
    debugster("after lineTo", path);
    path.reset();
    debugster("after reset", path);
}
#StdOut
initial path is empty
after moveTo path is not empty
after rewind path is empty
after lineTo path is not empty
after reset path is empty
##
##

#SeeAlso SkPath() reset() rewind()

##

# ------------------------------------------------------------------------------

#Method bool isLastContourClosed() const
#In Property
#Line # returns if final Contour forms a loop ##
#Populate

#Example
#Description
close() has no effect if Path is empty; isLastContourClosed() returns
false until Path has geometry followed by close().
##
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
        SkDebugf("%s last contour is %s" "closed\n", prefix,
                 path.isLastContourClosed() ? "" : "not ");
    };
    SkPath path;
    debugster("initial", path);
    path.close();
    debugster("after close", path);
    path.lineTo(0, 0);
    debugster("after lineTo", path);
    path.close();
    debugster("after close", path);
}
#StdOut
initial last contour is not closed
after close last contour is not closed
after lineTo last contour is not closed
after close last contour is closed
##
##

#SeeAlso close()

##

# ------------------------------------------------------------------------------

#Method bool isFinite() const
#In Property
#Line # returns if all Point values are finite ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
        SkDebugf("%s path is %s" "finite\n", prefix, path.isFinite() ? "" : "not ");
    };
    SkPath path;
    debugster("initial", path);
    path.lineTo(SK_ScalarMax, SK_ScalarMax);
    debugster("after line", path);
    SkMatrix matrix;
    matrix.setScale(2, 2);
    path.transform(matrix);
    debugster("after scale", path);
}
#StdOut
initial path is finite
after line path is finite
after scale path is not finite
##
##

#SeeAlso SkScalar
##

# ------------------------------------------------------------------------------

#Method bool isVolatile() const
#In Property
#In Volatile
#Line # returns if Device should not cache ##
#Populate

#Example
    SkPath path;
    SkDebugf("volatile by default is %s\n", path.isVolatile() ? "true" : "false");
#StdOut
volatile by default is false
##
##

#SeeAlso setIsVolatile

##

# ------------------------------------------------------------------------------
#Subtopic Volatile
#Line # caching attribute ##
##

#Method void setIsVolatile(bool isVolatile)
#In Volatile
#Line # sets if Device should not cache ##
#Populate

#Example
#Height 50
#Width 50
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    SkPath path;
    path.setIsVolatile(true);
    path.lineTo(40, 40);
    canvas->drawPath(path, paint);
    path.rewind();
    path.moveTo(0, 40);
    path.lineTo(40, 0);
    canvas->drawPath(path, paint);
##

#ToDo tie example to bench to show how volatile affects speed or dm to show resource usage ##

#SeeAlso isVolatile

##

# ------------------------------------------------------------------------------

#Method static bool IsLineDegenerate(const SkPoint& p1, const SkPoint& p2, bool exact)
#In Property
#Line # returns if Line is very small ##
#Populate

#Example
#Description
As single precision floats, 100 and 100.000001 have the same bit representation,
and are exactly equal. 100 and 100.0001 have different bit representations, and
are not exactly equal, but are nearly equal.
##
void draw(SkCanvas* canvas) {
    SkPoint points[] = { {100, 100}, {100.000001f, 100.000001f}, {100.0001f, 100.0001f} };
    for (size_t i = 0; i < SK_ARRAY_COUNT(points) - 1; ++i) {
        for (bool exact : { false, true } ) {
            SkDebugf("line from (%1.8g,%1.8g) to (%1.8g,%1.8g) is %s" "degenerate, %s\n",
                    points[i].fX, points[i].fY, points[i + 1].fX, points[i + 1].fY,
                    SkPath::IsLineDegenerate(points[i], points[i + 1], exact)
                    ? "" : "not ", exact ? "exactly" : "nearly");
        }
    }
}
#StdOut
line from (100,100) to (100,100) is degenerate, nearly
line from (100,100) to (100,100) is degenerate, exactly
line from (100,100) to (100.0001,100.0001) is degenerate, nearly
line from (100,100) to (100.0001,100.0001) is not degenerate, exactly
#StdOut ##
##

#SeeAlso IsQuadDegenerate IsCubicDegenerate
##

# ------------------------------------------------------------------------------

#Method static bool IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2,
                                 const SkPoint& p3, bool exact)
#In Property
#Line # returns if Quad is very small ##
#Populate

#Example
#Description
As single precision floats: 100, 100.00001, and 100.00002 have different bit representations
but nearly the same value. Translating all three by 1000 gives them the same bit representation;
the fractional portion of the number can not be represented by the float and is lost.
##
void draw(SkCanvas* canvas) {
    auto debugster = [](const SkPath& path, bool exact) -> void {
        SkDebugf("quad (%1.8g,%1.8g), (%1.8g,%1.8g), (%1.8g,%1.8g) is %s" "degenerate, %s\n",
            path.getPoint(0).fX, path.getPoint(0).fY, path.getPoint(1).fX,
            path.getPoint(1).fY, path.getPoint(2).fX, path.getPoint(2).fY,
            SkPath::IsQuadDegenerate(path.getPoint(0), path.getPoint(1), path.getPoint(2), exact) ?
            "" : "not ", exact ? "exactly" : "nearly");
    };
    SkPath path, offset;
    path.moveTo({100, 100});
    path.quadTo({100.00001f, 100.00001f}, {100.00002f, 100.00002f});
    offset.addPath(path, 1000, 1000);
    for (bool exact : { false, true } ) {
        debugster(path, exact);
        debugster(offset, exact);
    }
}
#StdOut
quad (100,100), (100.00001,100.00001), (100.00002,100.00002) is degenerate, nearly
quad (1100,1100), (1100,1100), (1100,1100) is degenerate, nearly
quad (100,100), (100.00001,100.00001), (100.00002,100.00002) is not degenerate, exactly
quad (1100,1100), (1100,1100), (1100,1100) is degenerate, exactly
#StdOut ##
##

#SeeAlso IsLineDegenerate IsCubicDegenerate
##

# ------------------------------------------------------------------------------

#Method static bool IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2,
                                  const SkPoint& p3, const SkPoint& p4, bool exact)
#In Property
#Line # returns if Cubic is very small ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPoint points[] = {{1, 0}, {0, 0}, {0, 0}, {0, 0}};
    SkScalar step = 1;
    SkScalar prior, length = 0, degenerate = 0;
    do {
        prior = points[0].fX;
        step /= 2;
        if (SkPath::IsCubicDegenerate(points[0], points[1], points[2], points[3], false)) {
            degenerate = prior;
            points[0].fX += step;
        } else {
            length = prior;
            points[0].fX -= step;
        }
    } while (prior != points[0].fX);
    SkDebugf("%1.8g is degenerate\n", degenerate);
    SkDebugf("%1.8g is length\n", length);
}
#StdOut
0.00024414062 is degenerate
0.00024414065 is length
#StdOut ##
##

##

# ------------------------------------------------------------------------------

#Method bool isLine(SkPoint line[2]) const
#In Property
#Line # returns if describes Line ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
        SkPoint line[2];
        if (path.isLine(line)) {
            SkDebugf("%s is line (%1.8g,%1.8g) (%1.8g,%1.8g)\n", prefix,
                 line[0].fX, line[0].fY, line[1].fX, line[1].fY);
        } else {
            SkDebugf("%s is not line\n", prefix);
        }
    };
    SkPath path;
    debugster("empty", path);
    path.lineTo(0, 0);
    debugster("zero line", path);
    path.rewind();
    path.moveTo(10, 10);
    path.lineTo(20, 20);
    debugster("line", path);
    path.moveTo(20, 20);
    debugster("second move", path);
}
#StdOut
empty is not line
zero line is line (0,0) (0,0)
line is line (10,10) (20,20)
second move is not line
##
##

##

# ------------------------------------------------------------------------------

#Subtopic Point_Array
#Line # end points and control points for lines and curves ##
#Substitute SkPoint array

Point_Array contains Points satisfying the allocated Points for
each Verb in Verb_Array. For instance, Path containing one Contour with Line
and Quad is described by Verb_Array: kMove_Verb, kLine_Verb, kQuad_Verb; and
one Point for move, one Point for Line, two Points for Quad; totaling four Points.

Point_Array may be read directly from Path with getPoints, or inspected with
getPoint, with Iter, or with RawIter.

#Method int getPoints(SkPoint points[], int max) const

#In Point_Array
#Line # returns Point_Array ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path, SkPoint* points, int max) -> void {
         int count = path.getPoints(points, max);
         SkDebugf("%s point count: %d  ", prefix, count);
         for (int i = 0; i < SkTMin(count, max) && points; ++i) {
             SkDebugf("(%1.8g,%1.8g) ", points[i].fX, points[i].fY);
         }
         SkDebugf("\n");
    };
    SkPath path;
    path.lineTo(20, 20);
    path.lineTo(-10, -10);
    SkPoint points[3];
    debugster("no points",  path, nullptr, 0);
    debugster("zero max",  path, points, 0);
    debugster("too small",  path, points, 2);
    debugster("just right",  path, points, path.countPoints());
}
#StdOut
no points point count: 3
zero max point count: 3
too small point count: 3  (0,0) (20,20)
just right point count: 3  (0,0) (20,20) (-10,-10)
##
##

#SeeAlso countPoints getPoint
##

#Method int countPoints() const

#In Point_Array
#Line # returns Point_Array length ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
         SkDebugf("%s point count: %d\n", prefix, path.countPoints());
    };
    SkPath path;
    debugster("empty", path);
    path.lineTo(0, 0);
    debugster("zero line", path);
    path.rewind();
    path.moveTo(10, 10);
    path.lineTo(20, 20);
    debugster("line", path);
    path.moveTo(20, 20);
    debugster("second move", path);
}
#StdOut
empty point count: 0
zero line point count: 2
line point count: 2
second move point count: 3
##
##

#SeeAlso getPoints
##

#Method SkPoint getPoint(int index) const

#In Point_Array
#Line # returns entry from Point_Array ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPath path;
    path.lineTo(20, 20);
    path.offset(-10, -10);
    for (int i= 0; i < path.countPoints(); ++i) {
         SkDebugf("point %d: (%1.8g,%1.8g)\n", i, path.getPoint(i).fX, path.getPoint(i).fY);
    }
}
#StdOut
point 0: (-10,-10)
point 1: (10,10)
##
##

#SeeAlso countPoints getPoints
##


#Subtopic Point_Array ##

# ------------------------------------------------------------------------------
#Subtopic Verb_Array
#Line # line and curve type for points ##

Verb_Array always starts with kMove_Verb.
If kClose_Verb is not the last entry, it is always followed by kMove_Verb;
the quantity of kMove_Verb equals the Contour count.
Verb_Array does not include or count kDone_Verb; it is a convenience
returned when iterating through Verb_Array.

Verb_Array may be read directly from Path with getVerbs, or inspected with Iter,
or with RawIter.

#Method int countVerbs() const

#In Verb_Array
#Line # returns Verb_Array length ##
#Populate

#Example
SkPath path;
SkDebugf("empty verb count: %d\n", path.countVerbs());
path.addRoundRect({10, 20, 30, 40}, 5, 5);
SkDebugf("round rect verb count: %d\n", path.countVerbs());
#StdOut
empty verb count: 0
round rect verb count: 10
##
##

#SeeAlso getVerbs Iter RawIter

##

#Method int getVerbs(uint8_t verbs[], int max) const

#In Verb_Array
#Line # returns Verb_Array ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path, uint8_t* verbs, int max) -> void {
         int count = path.getVerbs(verbs, max);
         SkDebugf("%s verb count: %d  ", prefix, count);
         const char* verbStr[] = { "move", "line", "quad", "conic", "cubic", "close" };
         for (int i = 0; i < SkTMin(count, max) && verbs; ++i) {
             SkDebugf("%s ", verbStr[verbs[i]]);
         }
         SkDebugf("\n");
    };
    SkPath path;
    path.lineTo(20, 20);
    path.lineTo(-10, -10);
    uint8_t verbs[3];
    debugster("no verbs",  path, nullptr, 0);
    debugster("zero max",  path, verbs, 0);
    debugster("too small",  path, verbs, 2);
    debugster("just right",  path, verbs, path.countVerbs());
}
#StdOut
no verbs verb count: 3
zero max verb count: 3
too small verb count: 3  move line
just right verb count: 3  move line line
##
##

#SeeAlso countVerbs getPoints Iter RawIter
##

#Subtopic Verb_Array ##

# ------------------------------------------------------------------------------

#Method void swap(SkPath& other)
#In Operators
#Line # exchanges Path pair ##
#Populate

#Example
SkPath path1, path2;
path1.addRect({10, 20, 30, 40});
path1.swap(path2);
const SkRect& b1 = path1.getBounds();
SkDebugf("path1 bounds = %g, %g, %g, %g\n", b1.fLeft, b1.fTop, b1.fRight, b1.fBottom);
const SkRect& b2 = path2.getBounds();
SkDebugf("path2 bounds = %g, %g, %g, %g\n", b2.fLeft, b2.fTop, b2.fRight, b2.fBottom);
#StdOut
path1 bounds = 0, 0, 0, 0
path2 bounds = 10, 20, 30, 40
#StdOut ##
##

#SeeAlso operator=(const SkPath& path)

##

# ------------------------------------------------------------------------------

#Method const SkRect& getBounds() const
#In Property
#Line # returns maximum and minimum of Point_Array ##
#Populate

#Example
#Description
Bounds of upright Circle can be predicted from center and radius.
Bounds of rotated Circle includes control Points outside of filled area.
##
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
            const SkRect& bounds = path.getBounds();
            SkDebugf("%s bounds = %g, %g, %g, %g\n", prefix,
                     bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
    };
    SkPath path;
    debugster("empty", path);
    path.addCircle(50, 45, 25);
    debugster("circle", path);
    SkMatrix matrix;
    matrix.setRotate(45, 50, 45);
    path.transform(matrix);
    debugster("rotated circle", path);
#StdOut
empty bounds = 0, 0, 0, 0
circle bounds = 25, 20, 75, 70
rotated circle bounds = 14.6447, 9.64466, 85.3553, 80.3553
##
##

#SeeAlso computeTightBounds updateBoundsCache

##

# ------------------------------------------------------------------------------
#Subtopic Utility
#Line # rarely called management functions ##
##

#Method void updateBoundsCache() const
#In Utility
#Line # refreshes result of getBounds ##
#Populate

#Example
    double times[2] = { 0, 0 };
    for (int i = 0; i < 10000; ++i) {
      SkPath path;
      for (int j = 1; j < 100; ++ j) {
        path.addCircle(50 + j, 45 + j, 25 + j);
      }
      if (1 & i) {
        path.updateBoundsCache();
      }
      double start = SkTime::GetNSecs();
      (void) path.getBounds();
      times[1 & i] += SkTime::GetNSecs() - start;
    }
    SkDebugf("uncached avg: %g ms\n", times[0] * 1e-6);
    SkDebugf("cached avg: %g ms\n", times[1] * 1e-6);
#StdOut
#Volatile
uncached avg: 0.18048 ms
cached avg: 0.182784 ms
##
##

#SeeAlso getBounds
#ToDo the results don't make sense, need to profile to figure this out ##

##

# ------------------------------------------------------------------------------

#Method SkRect computeTightBounds() const
#In Property
#Line # returns extent of geometry ##
#Populate

#Example
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
            const SkRect& bounds = path.computeTightBounds();
            SkDebugf("%s bounds = %g, %g, %g, %g\n", prefix,
                     bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
    };
    SkPath path;
    debugster("empty", path);
    path.addCircle(50, 45, 25);
    debugster("circle", path);
    SkMatrix matrix;
    matrix.setRotate(45, 50, 45);
    path.transform(matrix);
    debugster("rotated circle", path);
#StdOut
empty bounds = 0, 0, 0, 0
circle bounds = 25, 20, 75, 70
rotated circle bounds = 25, 20, 75, 70
##
##

#SeeAlso getBounds

##

# ------------------------------------------------------------------------------

#Method bool conservativelyContainsRect(const SkRect& rect) const
#In Property
#Line # returns true if Rect may be inside ##
#Populate

#Example
#Height 140
#Description
Rect is drawn in blue if it is contained by red Path.
##
void draw(SkCanvas* canvas) {
    SkPath path;
    path.addRoundRect({10, 20, 54, 120}, 10, 20);
    SkRect tests[] = {
      { 10, 40, 54, 80 },
      { 25, 20, 39, 120 },
      { 15, 25, 49, 115 },
      { 13, 27, 51, 113 },
    };
    for (unsigned i = 0; i < SK_ARRAY_COUNT(tests); ++i) {
      SkPaint paint;
      paint.setColor(SK_ColorRED);
      canvas->drawPath(path, paint);
      bool rectInPath = path.conservativelyContainsRect(tests[i]);
      paint.setColor(rectInPath ? SK_ColorBLUE : SK_ColorBLACK);
      canvas->drawRect(tests[i], paint);
      canvas->translate(64, 0);
    }
}
##

#SeeAlso contains Op Rect Convexity

##

# ------------------------------------------------------------------------------

#Method void incReserve(int extraPtCount)
#In Utility
#Line # reserves space for additional data ##
#Populate

#Example
#Height 192
void draw(SkCanvas* canvas) {
    auto addPoly = [](int sides, SkScalar size, SkPath* path) -> void {
        path->moveTo(size, 0);
        for (int i = 1; i < sides; i++) {
            SkScalar c, s = SkScalarSinCos(SK_ScalarPI * 2 * i / sides, &c);
            path->lineTo(c * size, s * size);
        }
        path->close();
    };
    SkPath path;
    path.incReserve(3 + 4 + 5 + 6 + 7 + 8 + 9);
    for (int sides = 3; sides < 10; ++sides) {
       addPoly(sides, sides, &path);
    }
    SkMatrix matrix;
    matrix.setScale(10, 10, -10, -10);
    path.transform(matrix);
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    canvas->drawPath(path, paint);
}
##

#SeeAlso Point_Array

##

#Method void shrinkToFit()
#In Utility
#Line # removes unused reserved space ##
#Populate

#NoExample
#Height 192
void draw(SkCanvas* canvas) {
    SkPath skinnyPath;
    skinnyPath.lineTo(100, 100);
    skinnyPath.shrinkToFit();

    SkDebugf("no wasted Path capacity in my house!\n");
}
##

#SeeAlso incReserve

##

# ------------------------------------------------------------------------------
#Subtopic Build
#Line # adds points and verbs to path ##
##

#Method SkPath& moveTo(SkScalar x, SkScalar y)
#In Build
#Line # starts Contour ##
#Populate

#Example
    #Width 140
    #Height 100
    void draw(SkCanvas* canvas) {
        SkRect rect = { 20, 20, 120, 80 };
        SkPath path;
        path.addRect(rect);
        path.moveTo(rect.fLeft, rect.fTop);
        path.lineTo(rect.fRight, rect.fBottom);
        path.moveTo(rect.fLeft, rect.fBottom);
        path.lineTo(rect.fRight, rect.fTop);
        SkPaint paint;
        paint.setStyle(SkPaint::kStroke_Style);
        canvas->drawPath(path, paint);
    }
##

#SeeAlso Contour lineTo rMoveTo quadTo conicTo cubicTo close()

##

#Method SkPath& moveTo(const SkPoint& p)
#Populate

#Example
    #Width 128
    #Height 128
void draw(SkCanvas* canvas) {
    SkPoint data[][3] = {{{30,40},{60,60},{90,30}}, {{30,120},{60,100},{90,120}},
                         {{60,100},{60,40},{70,30}}, {{60,40},{50,20},{70,30}}};
    SkPath path;
    for (unsigned i = 0; i < SK_ARRAY_COUNT(data); ++i) {
        path.moveTo(data[i][0]);
        path.lineTo(data[i][1]);
        path.lineTo(data[i][2]);
    }
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    canvas->drawPath(path, paint);
}
##

#SeeAlso Contour lineTo rMoveTo quadTo conicTo cubicTo close()

##

#Method SkPath& rMoveTo(SkScalar dx, SkScalar dy)
#In Build
#Line # starts Contour relative to Last_Point ##
#Populate

#Example
    #Height 100
    SkPath path;
    path.addRect({20, 20, 80, 80}, SkPath::kCW_Direction, 2);
    path.rMoveTo(25, 2);
    SkVector arrow[] = {{0, -4}, {-20, 0}, {0, -3}, {-5, 5}, {5, 5}, {0, -3}, {20, 0}};
    for (unsigned i = 0; i < SK_ARRAY_COUNT(arrow); ++i) {
        path.rLineTo(arrow[i].fX, arrow[i].fY);
    }
    SkPaint paint;
    canvas->drawPath(path, paint);
    SkPoint lastPt;
    path.getLastPt(&lastPt);
    canvas->drawString("start", lastPt.fX, lastPt.fY, paint);
##

#SeeAlso Contour lineTo moveTo quadTo conicTo cubicTo close()

##

# ------------------------------------------------------------------------------

#Method SkPath& lineTo(SkScalar x, SkScalar y)
#In Build
#Line # appends Line ##
#Populate

#Example
#Height 100
###$
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setTextSize(72);
    canvas->drawString("#", 120, 80, paint);
    paint.setStyle(SkPaint::kStroke_Style);
    paint.setStrokeWidth(5);
    SkPath path;
    SkPoint hash[] = {{58, 28}, {43, 80}, {37, 45}, {85, 45}};
    SkVector offsets[] = {{0, 0}, {17, 0}, {0, 0}, {-5, 17}};
    unsigned o = 0;
    for (unsigned i = 0; i < SK_ARRAY_COUNT(hash); i += 2) {
        for (unsigned j = 0; j < 2; o++, j++) {
            path.moveTo(hash[i].fX + offsets[o].fX, hash[i].fY + offsets[o].fY);
            path.lineTo(hash[i + 1].fX + offsets[o].fX, hash[i + 1].fY + offsets[o].fY);
        }
    }
    canvas->drawPath(path, paint);
}
$$$#
##

#SeeAlso Contour moveTo rLineTo addRect

##

# ------------------------------------------------------------------------------

#Method SkPath& lineTo(const SkPoint& p)
#Populate

#Example
#Height 100
    SkPath path;
    SkVector oxo[] = {{25, 25}, {35, 35}, {25, 35}, {35, 25},
                      {40, 20}, {40, 80}, {60, 20}, {60, 80},
                      {20, 40}, {80, 40}, {20, 60}, {80, 60}};
    for (unsigned i = 0; i < SK_ARRAY_COUNT(oxo); i += 2) {
        path.moveTo(oxo[i]);
        path.lineTo(oxo[i + 1]);
    }
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    canvas->drawPath(path, paint);
##

#SeeAlso Contour moveTo rLineTo addRect

##

# ------------------------------------------------------------------------------

#Method SkPath& rLineTo(SkScalar dx, SkScalar dy)
#In Build
#Line # appends Line relative to Last_Point ##
#Populate

#Example
#Height 128
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkPath path;
    path.moveTo(10, 98);
    SkScalar x = 0, y = 0;
    for (int i = 10; i < 100; i += 5) {
        x += i * ((i & 2) - 1);
        y += i * (((i + 1) & 2) - 1);
        path.rLineTo(x, y);

    }
    canvas->drawPath(path, paint);
}
##

#SeeAlso Contour moveTo lineTo addRect

##

# ------------------------------------------------------------------------------
#Subtopic Quad
#Alias Quad ##
#Alias Quads ##
#Alias Quadratic_Bezier ##
#Alias Quadratic_Beziers ##
#Line # curve described by second-order polynomial ##

Quad describes a Quadratic_Bezier, a second-order curve identical to a section
of a parabola. Quad begins at a start Point, curves towards a control Point,
and then curves to an end Point.

#Example
#Height 110
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkPoint quadPts[] = {{20, 90}, {120, 10}, {220, 90}};
    canvas->drawLine(quadPts[0], quadPts[1], paint);
    canvas->drawLine(quadPts[1], quadPts[2], paint);
    SkPath path;
    path.moveTo(quadPts[0]);
    path.quadTo(quadPts[1], quadPts[2]);
    paint.setStrokeWidth(3);
    canvas->drawPath(path, paint);
}
##

Quad is a special case of Conic where Conic_Weight is set to one.

Quad is always contained by the triangle connecting its three Points. Quad
begins tangent to the line between start Point and control Point, and ends
tangent to the line between control Point and end Point.

#Example
#Height 160
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkPoint quadPts[] = {{20, 150}, {120, 10}, {220, 150}};
    SkColor colors[] = { 0xff88ff00, 0xff0088bb, 0xff6600cc, 0xffbb3377 };
    for (unsigned i = 0; i < SK_ARRAY_COUNT(colors); ++i) {
        paint.setColor(0x7fffffff & colors[i]);
        paint.setStrokeWidth(1);
        canvas->drawLine(quadPts[0], quadPts[1], paint);
        canvas->drawLine(quadPts[1], quadPts[2], paint);
        SkPath path;
        path.moveTo(quadPts[0]);
        path.quadTo(quadPts[1], quadPts[2]);
        paint.setStrokeWidth(3);
        paint.setColor(colors[i]);
        canvas->drawPath(path, paint);
        quadPts[1].fY += 30;
   }
}
##

#Method SkPath& quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2)

#In Quad
#Line # appends Quad ##
#Populate

#Example
    void draw(SkCanvas* canvas) {
        SkPaint paint;
        paint.setAntiAlias(true);
        paint.setStyle(SkPaint::kStroke_Style);
        SkPath path;
        path.moveTo(0, -10);
        for (int i = 0; i < 128; i += 16) {
            path.quadTo( 10 + i, -10 - i,  10 + i,       0);
            path.quadTo( 14 + i,  14 + i,       0,  14 + i);
            path.quadTo(-18 - i,  18 + i, -18 - i,       0);
            path.quadTo(-22 - i, -22 - i,       0, -22 - i);
        }
        path.offset(128, 128);
        canvas->drawPath(path, paint);
    }
    ##

    #SeeAlso Contour moveTo conicTo rQuadTo

##

#Method SkPath& quadTo(const SkPoint& p1, const SkPoint& p2)
#In Build
#In Quad
#Populate

#Example
    void draw(SkCanvas* canvas) {
        SkPaint paint;
        paint.setStyle(SkPaint::kStroke_Style);
        paint.setAntiAlias(true);
        SkPath path;
        SkPoint pts[] = {{128, 10}, {10, 214}, {236, 214}};
        path.moveTo(pts[1]);
        for (int i = 0; i < 3; ++i) {
            path.quadTo(pts[i % 3],  pts[(i + 2) % 3]);
        }
        canvas->drawPath(path, paint);
    }
    ##

    #SeeAlso Contour moveTo conicTo rQuadTo

##

#Method SkPath& rQuadTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2)
#In Build
#In Quad
#Line # appends Quad relative to Last_Point ##
#Populate

#Example
    void draw(SkCanvas* canvas) {
        SkPaint paint;
        paint.setAntiAlias(true);
        SkPath path;
        path.moveTo(128, 20);
        path.rQuadTo(-6, 10, -7, 10);
        for (int i = 1; i < 32; i += 4) {
           path.rQuadTo(10 + i, 10 + i, 10 + i * 4, 10);
           path.rQuadTo(-10 - i, 10 + i, -10 - (i + 2) * 4, 10);
        }
        path.quadTo(92, 220, 128, 215);
        canvas->drawPath(path, paint);
    }
    ##

    #SeeAlso Contour moveTo conicTo quadTo

##

#Subtopic Quad ##

# ------------------------------------------------------------------------------

#Subtopic Conic
#Alias Conic ##
#Alias Conics ##
#Line # conic section defined by three points and a weight ##

Conic describes a conical section: a piece of an ellipse, or a piece of a
parabola, or a piece of a hyperbola. Conic begins at a start Point,
curves towards a control Point, and then curves to an end Point. The influence
of the control Point is determined by Conic_Weight.

Each Conic in Path adds two Points and one Conic_Weight. Conic_Weights in Path
may be inspected with Iter, or with RawIter.

#Subtopic Weight
#Alias Conic_Weights ##
#Alias Weights ##
#Line # strength of Conic control Point ##

Weight determines both the strength of the control Point and the type of Conic.
Weight varies from zero to infinity. At zero, Weight causes the control Point to
have no effect; Conic is identical to a line segment from start Point to end
point. If Weight is less than one, Conic follows an elliptical arc.
If Weight is exactly one, then Conic is identical to Quad; Conic follows a
parabolic arc. If Weight is greater than one, Conic follows a hyperbolic
arc. If Weight is infinity, Conic is identical to two line segments, connecting
start Point to control Point, and control Point to end Point.

#Example
#Description
When Conic_Weight is one, Quad is added to path; the two are identical.
##
void draw(SkCanvas* canvas) {
    const char* verbNames[] = { "move", "line", "quad", "conic", "cubic", "close", "done" };
    const int pointCount[]  = {     1 ,     2 ,     3 ,      3 ,      4 ,      1 ,     0  };
    SkPath path;
    path.conicTo(20, 30, 50, 60, 1);
    SkPath::Iter iter(path, false);
    SkPath::Verb verb;
    do {
       SkPoint points[4];
       verb = iter.next(points);
       SkDebugf("%s ", verbNames[(int) verb]);
       for (int i = 0; i < pointCount[(int) verb]; ++i) {
            SkDebugf("{%g, %g}, ", points[i].fX, points[i].fY);
       }
       if (SkPath::kConic_Verb == verb) {
           SkDebugf("weight = %g", iter.conicWeight());
       }
       SkDebugf("\n");
    } while (SkPath::kDone_Verb != verb);
}
#StdOut
move {0, 0},
quad {0, 0}, {20, 30}, {50, 60},
done
##
##

If weight is less than one, Conic is an elliptical segment.

#Example
#Description
A 90 degree circular arc has the weight #Formula # 1 / sqrt(2) ##.
##
void draw(SkCanvas* canvas) {
    const char* verbNames[] = { "move", "line", "quad", "conic", "cubic", "close", "done" };
    const int pointCount[]  = {     1 ,     2 ,     3 ,      3 ,      4 ,      1 ,     0  };
    SkPath path;
    path.arcTo(20, 0, 20, 20, 20);
    SkPath::Iter iter(path, false);
    SkPath::Verb verb;
    do {
       SkPoint points[4];
       verb = iter.next(points);
       SkDebugf("%s ", verbNames[(int) verb]);
       for (int i = 0; i < pointCount[(int) verb]; ++i) {
            SkDebugf("{%g, %g}, ", points[i].fX, points[i].fY);
       }
       if (SkPath::kConic_Verb == verb) {
           SkDebugf("weight = %g", iter.conicWeight());
       }
       SkDebugf("\n");
    } while (SkPath::kDone_Verb != verb);
}
#StdOut
move {0, 0},
conic {0, 0}, {20, 0}, {20, 20}, weight = 0.707107
done
##
##

If weight is greater than one, Conic is a hyperbolic segment. As weight gets large,
a hyperbolic segment can be approximated by straight lines connecting the
control Point with the end Points.

#Example
void draw(SkCanvas* canvas) {
    const char* verbNames[] = { "move", "line", "quad", "conic", "cubic", "close", "done" };
    const int pointCount[]  = {     1 ,     2 ,     3 ,      3 ,      4 ,      1 ,     0  };
    SkPath path;
    path.conicTo(20, 0, 20, 20, SK_ScalarInfinity);
    SkPath::Iter iter(path, false);
    SkPath::Verb verb;
    do {
       SkPoint points[4];
       verb = iter.next(points);
       SkDebugf("%s ", verbNames[(int) verb]);
       for (int i = 0; i < pointCount[(int) verb]; ++i) {
            SkDebugf("{%g, %g}, ", points[i].fX, points[i].fY);
       }
       if (SkPath::kConic_Verb == verb) {
           SkDebugf("weight = %g", iter.conicWeight());
       }
       SkDebugf("\n");
    } while (SkPath::kDone_Verb != verb);
}
#StdOut
move {0, 0},
line {0, 0}, {20, 0},
line {20, 0}, {20, 20},
done
##
##

#Subtopic Weight ##

#Method SkPath& conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
                 SkScalar w)
#In Conic
#In Build
#Line # appends Conic ##
#Populate

#Example
    #Height 160
    #Description
    As weight increases, curve is pulled towards control point.
    The bottom two curves are elliptical; the next is parabolic; the
    top curve is hyperbolic.
    ##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkPoint conicPts[] = {{20, 150}, {120, 10}, {220, 150}};
    canvas->drawLine(conicPts[0], conicPts[1], paint);
    canvas->drawLine(conicPts[1], conicPts[2], paint);
    SkColor colors[] = { 0xff88ff00, 0xff0088bb, 0xff6600cc, 0xffbb3377 };
    paint.setStrokeWidth(3);
    SkScalar weight = 0.5f;
    for (unsigned i = 0; i < SK_ARRAY_COUNT(colors); ++i) {
        SkPath path;
        path.moveTo(conicPts[0]);
        path.conicTo(conicPts[1], conicPts[2], weight);
        paint.setColor(colors[i]);
        canvas->drawPath(path, paint);
        weight += 0.25f;
   }
}
    ##

    #SeeAlso rConicTo arcTo addArc quadTo

##

#Method SkPath& conicTo(const SkPoint& p1, const SkPoint& p2, SkScalar w)
#In Build
#In Conic
#Populate

#Example
    #Height 128
    #Description
    Conics and arcs use identical representations. As the arc sweep increases
    the Conic_Weight also increases, but remains smaller than one.
    ##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkRect oval = {0, 20, 120, 140};
    SkPath path;
    for (int i = 0; i < 4; ++i) {
        path.moveTo(oval.centerX(), oval.fTop);
        path.arcTo(oval, -90, 90 - 20 * i, false);
        oval.inset(15, 15);
    }
    path.offset(100, 0);
    SkScalar conicWeights[] = { 0.707107f, 0.819152f, 0.906308f, 0.965926f };
    SkPoint conicPts[][3] = { { {40, 20}, {100, 20}, {100, 80} },
                              { {40, 35}, {71.509f, 35}, {82.286f, 64.6091f} },
                              { {40, 50}, {53.9892f, 50}, {62.981f, 60.7164f} },
                              { {40, 65}, {44.0192f, 65}, {47.5f, 67.0096f} } };
    for (int i = 0; i < 4; ++i) {
         path.moveTo(conicPts[i][0]);
         path.conicTo(conicPts[i][1], conicPts[i][2], conicWeights[i]);
    }
    canvas->drawPath(path, paint);
}
    ##

    #SeeAlso rConicTo arcTo addArc quadTo

##

#Method SkPath& rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
                  SkScalar w)
#In Build
#In Conic
#Line # appends Conic relative to Last_Point ##
#Populate

#Example
    #Height 140
    void draw(SkCanvas* canvas) {
        SkPaint paint;
        paint.setAntiAlias(true);
        paint.setStyle(SkPaint::kStroke_Style);
        SkPath path;
        path.moveTo(20, 80);
        path.rConicTo( 60,   0,  60,  60, 0.707107f);
        path.rConicTo(  0, -60,  60, -60, 0.707107f);
        path.rConicTo(-60,   0, -60, -60, 0.707107f);
        path.rConicTo(  0,  60, -60,  60, 0.707107f);
        canvas->drawPath(path, paint);
    }
    ##

    #SeeAlso conicTo arcTo addArc quadTo

##

#Subtopic Conic ##

# ------------------------------------------------------------------------------
#Subtopic Cubic
#Alias Cubic ##
#Alias Cubics ##
#Alias Cubic_Bezier ##
#Alias Cubic_Beziers ##
#Line # curve described by third-order polynomial ##

Cubic describes a Bezier_Curve segment described by a third-order polynomial.
Cubic begins at a start Point, curving towards the first control Point;
and curves from the end Point towards the second control Point.

#Example
#Height 160
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkPoint cubicPts[] = {{20, 150}, {90, 10}, {160, 150}, {230, 10}};
    SkColor colors[] = { 0xff88ff00, 0xff0088bb, 0xff6600cc, 0xffbb3377 };
    for (unsigned i = 0; i < SK_ARRAY_COUNT(colors); ++i) {
        paint.setColor(0x7fffffff & colors[i]);
        paint.setStrokeWidth(1);
        for (unsigned j = 0; j < 3; ++j) {
            canvas->drawLine(cubicPts[j], cubicPts[j + 1], paint);
        }
        SkPath path;
        path.moveTo(cubicPts[0]);
        path.cubicTo(cubicPts[1], cubicPts[2], cubicPts[3]);
        paint.setStrokeWidth(3);
        paint.setColor(colors[i]);
        canvas->drawPath(path, paint);
        cubicPts[1].fY += 30;
        cubicPts[2].fX += 30;
   }
}
##

#Method SkPath& cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
                 SkScalar x3, SkScalar y3)
#In Build
#In Cubic
#Line # appends Cubic ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkPath path;
    path.moveTo(0, -10);
    for (int i = 0; i < 128; i += 16) {
        SkScalar c = i * 0.5f;
        path.cubicTo( 10 + c, -10 - i,  10 + i, -10 - c,  10 + i,       0);
        path.cubicTo( 14 + i,  14 + c,  14 + c,  14 + i,       0,  14 + i);
        path.cubicTo(-18 - c,  18 + i, -18 - i,  18 + c, -18 - i,       0);
        path.cubicTo(-22 - i, -22 - c, -22 - c, -22 - i,       0, -22 - i);
    }
    path.offset(128, 128);
    canvas->drawPath(path, paint);
}
##

#SeeAlso Contour moveTo rCubicTo quadTo

##

# ------------------------------------------------------------------------------

#Method SkPath& cubicTo(const SkPoint& p1, const SkPoint& p2, const SkPoint& p3)

#In Build
#In Cubic
#Populate

#Example
#Height 84
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    SkPoint pts[] = { {20, 20}, {300, 80}, {-140, 90}, {220, 10} };
    SkPath path;
    path.moveTo(pts[0]);
    path.cubicTo(pts[1], pts[2], pts[3]);
    canvas->drawPath(path, paint);
##

#SeeAlso Contour moveTo rCubicTo quadTo

##

# ------------------------------------------------------------------------------

#Method SkPath& rCubicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
                  SkScalar dx3, SkScalar dy3)
#In Build
#In Cubic
#Line # appends Cubic relative to Last_Point ##
#Populate

#Example
    void draw(SkCanvas* canvas) {
        SkPaint paint;
        paint.setAntiAlias(true);
        paint.setStyle(SkPaint::kStroke_Style);
        SkPath path;
        path.moveTo(24, 108);
        for (int i = 0; i < 16; i++) {
           SkScalar sx, sy;
           sx = SkScalarSinCos(i * SK_ScalarPI / 8, &sy);
           path.rCubicTo(40 * sx, 4 * sy, 4 * sx, 40 * sy, 40 * sx, 40 * sy);
        }
        canvas->drawPath(path, paint);
    }
##

#SeeAlso Contour moveTo cubicTo quadTo

##

#Subtopic Cubic ##

# ------------------------------------------------------------------------------

#Subtopic Arc
#Line # part of Oval or Circle ##
Arc can be constructed in a number of ways. Arc may be described by part of Oval and angles,
by start point and end point, and by radius and tangent lines. Each construction has advantages,
and some constructions correspond to Arc drawing in graphics standards.

All Arc draws are implemented by one or more Conic draws. When Conic_Weight is less than one,
Conic describes an Arc of some Oval or Circle.

arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, bool forceMoveTo)
describes Arc as a piece of Oval, beginning at start angle, sweeping clockwise or counterclockwise,
which may continue Contour or start a new one. This construction is similar to PostScript and
HTML_Canvas arcs. Variation addArc always starts new Contour. SkCanvas::drawArc draws without
requiring Path.

arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius)
describes Arc as tangent to the line segment from last Point added to Path to (x1, y1); and tangent
to the line segment from (x1, y1) to (x2, y2). This construction is similar to PostScript and
HTML_Canvas arcs.

arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep,
      SkScalar x, SkScalar y)
describes Arc as part of Oval with radii (rx, ry), beginning at
last Point added to Path and ending at (x, y). More than one Arc satisfies this criteria,
so additional values choose a single solution. This construction is similar to SVG arcs.

conicTo describes Arc of less than 180 degrees as a pair of tangent lines and Conic_Weight.
conicTo can represent any Arc with a sweep less than 180 degrees at any rotation. All arcTo
constructions are converted to Conic data when added to Path.

#ToDo  example is spaced correctly on fiddle but spacing is too wide on pc
##

#Illustration

#List
# <sup>1</sup> arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, bool forceMoveTo) ##
# <sup>2</sup> parameter adds move to first point  ##
# <sup>3</sup> start angle must be multiple of 90 degrees ##
# <sup>4</sup> arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius) ##
# <sup>5</sup> arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
               Direction sweep, SkScalar x, SkScalar y) ##
#List ##

#Example
#Height 128
void draw(SkCanvas* canvas) {
    SkRect oval = {8, 8, 56, 56};
    SkPaint ovalPaint;
    ovalPaint.setAntiAlias(true);
    SkPaint textPaint(ovalPaint);
    ovalPaint.setStyle(SkPaint::kStroke_Style);
    SkPaint arcPaint(ovalPaint);
    arcPaint.setStrokeWidth(5);
    arcPaint.setColor(SK_ColorBLUE);
    canvas->translate(-64, 0);
    for (char arcStyle = '1'; arcStyle <= '6'; ++arcStyle) {
        '4' == arcStyle ? canvas->translate(-96, 55) : canvas->translate(64, 0);
        canvas->drawText(&arcStyle, 1, 30, 36, textPaint);
        canvas->drawOval(oval, ovalPaint);
        SkPath path;
        path.moveTo({56, 32});
        switch (arcStyle) {
            case '1':
                path.arcTo(oval, 0, 90, false);
                break;
            case '2':
                canvas->drawArc(oval, 0, 90, false, arcPaint);
                continue;
            case '3':
                path.addArc(oval, 0, 90);
                break;
            case '4':
                path.arcTo({56, 56}, {32, 56}, 24);
                break;
            case '5':
                path.arcTo({24, 24}, 0, SkPath::kSmall_ArcSize, SkPath::kCW_Direction, {32, 56});
                break;
            case '6':
                path.conicTo({56, 56}, {32, 56}, SK_ScalarRoot2Over2);
                break;
         }
         canvas->drawPath(path, arcPaint);
     }
}
#Example ##

In the example above:
#List
# 1 describes an arc from an oval, a starting angle, and a sweep angle. ##
# 2 is similar to 1, but does not require building a path to draw. ##
# 3 is similar to 1, but always begins new Contour. ##
# 4 describes an arc from a pair of tangent lines and a radius. ##
# 5 describes an arc from Oval center, arc start Point and arc end Point. ##
# 6 describes an arc from a pair of tangent lines and a Conic_Weight. ##
#List ##

#Method SkPath& arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, bool forceMoveTo)
#In Build
#In Arc
#Line # appends Arc ##
#Populate

#Example
#Height 200
#Description
arcTo continues a previous contour when forceMoveTo is false and when Path
is not empty.
##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    SkPath path;
    paint.setStyle(SkPaint::kStroke_Style);
    paint.setStrokeWidth(4);
    path.moveTo(0, 0);
    path.arcTo({20, 20, 120, 120}, -90, 90, false);
    canvas->drawPath(path, paint);
    path.rewind();
    path.arcTo({120, 20, 220, 120}, -90, 90, false);
    canvas->drawPath(path, paint);
    path.rewind();
    path.moveTo(0, 0);
    path.arcTo({20, 120, 120, 220}, -90, 90, true);
    canvas->drawPath(path, paint);
}
##

#SeeAlso addArc SkCanvas::drawArc conicTo

##

# ------------------------------------------------------------------------------

#Method SkPath& arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius)
#In Build
#In Arc
#Populate

#Example
#Height 226
void draw(SkCanvas* canvas) {
    SkPaint tangentPaint;
    tangentPaint.setAntiAlias(true);
    SkPaint textPaint(tangentPaint);
    tangentPaint.setStyle(SkPaint::kStroke_Style);
    tangentPaint.setColor(SK_ColorGRAY);
    SkPaint arcPaint(tangentPaint);
    arcPaint.setStrokeWidth(5);
    arcPaint.setColor(SK_ColorBLUE);
    SkPath path;
    SkPoint pts[] = { {56, 20}, {200, 20}, {90, 190} };
    SkScalar radius = 50;
    path.moveTo(pts[0]);
    path.arcTo(pts[1], pts[2], radius);
    canvas->drawLine(pts[0], pts[1], tangentPaint);
    canvas->drawLine(pts[1], pts[2], tangentPaint);
    SkPoint lastPt;
    (void) path.getLastPt(&lastPt);
    SkVector radial = pts[2] - pts[1];
    radial.setLength(radius);
    SkPoint center = { lastPt.fX - radial.fY, lastPt.fY + radial.fX };
    canvas->drawCircle(center, radius, tangentPaint);
    canvas->drawLine(lastPt, center, tangentPaint);
    radial = pts[1] - pts[0];
    radial.setLength(radius);
    SkPoint arcStart = { center.fX + radial.fY, center.fY - radial.fX };
    canvas->drawLine(center, arcStart, tangentPaint);
    canvas->drawPath(path, arcPaint);
    canvas->drawString("(x0, y0)", pts[0].fX - 5, pts[0].fY, textPaint);
    canvas->drawString("(x1, y1)", pts[1].fX + 5, pts[1].fY, textPaint);
    canvas->drawString("(x2, y2)", pts[2].fX, pts[2].fY + 15, textPaint);
    canvas->drawString("radius", center.fX + 15, center.fY + 25, textPaint);
    canvas->drawString("radius", center.fX - 3, center.fY - 16, textPaint);
}
##

#Example
#Height 128
void draw(SkCanvas* canvas) {
    SkPaint tangentPaint;
    tangentPaint.setAntiAlias(true);
    SkPaint textPaint(tangentPaint);
    tangentPaint.setStyle(SkPaint::kStroke_Style);
    tangentPaint.setColor(SK_ColorGRAY);
    SkPaint arcPaint(tangentPaint);
    arcPaint.setStrokeWidth(5);
    arcPaint.setColor(SK_ColorBLUE);
    SkPath path;
    SkPoint pts[] = { {156, 20}, {200, 20}, {170, 50} };
    SkScalar radius = 50;
    path.moveTo(pts[0]);
    path.arcTo(pts[1], pts[2], radius);
    canvas->drawLine(pts[0], pts[1], tangentPaint);
    canvas->drawLine(pts[1], pts[2], tangentPaint);
    SkPoint lastPt;
    (void) path.getLastPt(&lastPt);
    SkVector radial = pts[2] - pts[1];
    radial.setLength(radius);
    SkPoint center = { lastPt.fX - radial.fY, lastPt.fY + radial.fX };
    canvas->drawLine(lastPt, center, tangentPaint);
    radial = pts[1] - pts[0];
    radial.setLength(radius);
    SkPoint arcStart = { center.fX + radial.fY, center.fY - radial.fX };
    canvas->drawLine(center, arcStart, tangentPaint);
    canvas->drawPath(path, arcPaint);
    canvas->drawString("(x0, y0)", pts[0].fX, pts[0].fY - 7, textPaint);
    canvas->drawString("(x1, y1)", pts[1].fX + 5, pts[1].fY, textPaint);
    canvas->drawString("(x2, y2)", pts[2].fX, pts[2].fY + 15, textPaint);
    canvas->drawString("radius", center.fX + 15, center.fY + 25, textPaint);
    canvas->drawString("radius", center.fX - 5, center.fY - 20, textPaint);
}
##

#Example
#Description
arcTo is represented by Line and circular Conic in Path.
##
void draw(SkCanvas* canvas) {
    SkPath path;
    path.moveTo({156, 20});
    path.arcTo(200, 20, 170, 50, 50);
    SkPath::Iter iter(path, false);
    SkPoint p[4];
    SkPath::Verb verb;
    while (SkPath::kDone_Verb != (verb = iter.next(p))) {
        switch (verb) {
            case SkPath::kMove_Verb:
                SkDebugf("move to (%g,%g)\n", p[0].fX, p[0].fY);
                break;
            case SkPath::kLine_Verb:
                SkDebugf("line (%g,%g),(%g,%g)\n", p[0].fX, p[0].fY, p[1].fX, p[1].fY);
                break;
            case SkPath::kConic_Verb:
                SkDebugf("conic (%g,%g),(%g,%g),(%g,%g) weight %g\n",
                         p[0].fX, p[0].fY, p[1].fX, p[1].fY, p[2].fX, p[2].fY, iter.conicWeight());
                break;
            default:
                SkDebugf("unexpected verb\n");
        }
    }
}
#StdOut
move to (156,20)
line (156,20),(79.2893,20)
conic (79.2893,20),(200,20),(114.645,105.355) weight 0.382683
##
##

#SeeAlso conicTo

##

# ------------------------------------------------------------------------------

#Method SkPath& arcTo(const SkPoint p1, const SkPoint p2, SkScalar radius)
#In Build
#In Arc
#Populate

#Example
#Description
Because tangent lines are parallel, arcTo appends line from last Path Point to
p1, but does not append a circular Conic.
##
void draw(SkCanvas* canvas) {
    SkPath path;
    path.moveTo({156, 20});
    path.arcTo({200, 20}, {170, 20}, 50);
    SkPath::Iter iter(path, false);
    SkPoint p[4];
    SkPath::Verb verb;
    while (SkPath::kDone_Verb != (verb = iter.next(p))) {
        switch (verb) {
            case SkPath::kMove_Verb:
                SkDebugf("move to (%g,%g)\n", p[0].fX, p[0].fY);
                break;
            case SkPath::kLine_Verb:
                SkDebugf("line (%g,%g),(%g,%g)\n", p[0].fX, p[0].fY, p[1].fX, p[1].fY);
                break;
            case SkPath::kConic_Verb:
                SkDebugf("conic (%g,%g),(%g,%g),(%g,%g) weight %g\n",
                          p[0].fX, p[0].fY, p[1].fX, p[1].fY, p[2].fX, p[2].fY, iter.conicWeight());
                break;
            default:
                SkDebugf("unexpected verb\n");
        }
    }
}
#StdOut
move to (156,20)
line (156,20),(200,20)
##
##

#SeeAlso conicTo

##

# ------------------------------------------------------------------------------

#Enum ArcSize
#Line # used by arcTo variation ##

#Code
    enum ArcSize {
        kSmall_ArcSize,
        kLarge_ArcSize,
    };
##

Four axis-aligned Ovals with the same height and width intersect a pair of Points.
ArcSize and Direction select one of the four Ovals, by choosing the larger or smaller
arc between the Points; and by choosing the arc Direction, clockwise
or counterclockwise.

#Const kSmall_ArcSize 0
#Line # smaller of Arc pair ##
##
#Const kLarge_ArcSize 1
#Line # larger of Arc pair ##
##

#Example
#Height 160
#Description
Arc begins at top of Oval pair and ends at bottom. Arc can take four routes to get there.
Two routes are large, and two routes are counterclockwise. The one route both large
and counterclockwise is blue.
##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    for (auto sweep: { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
        for (auto arcSize : { SkPath::kSmall_ArcSize, SkPath::kLarge_ArcSize } ) {
            SkPath path;
            path.moveTo({120, 50});
            path.arcTo(70, 40, 30, arcSize, sweep, 156, 100);
            if (SkPath::kCCW_Direction == sweep && SkPath::kLarge_ArcSize == arcSize) {
                paint.setColor(SK_ColorBLUE);
                paint.setStrokeWidth(3);
            }
            canvas->drawPath(path, paint);
         }
    }
}
##

#SeeAlso arcTo Direction

##

# ------------------------------------------------------------------------------

#Method SkPath& arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
               Direction sweep, SkScalar x, SkScalar y)
#In Build
#In Arc
#Populate

#Example
#Height 160
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    for (auto sweep: { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
        for (auto arcSize : { SkPath::kSmall_ArcSize, SkPath::kLarge_ArcSize } ) {
            SkPath path;
            path.moveTo({120, 50});
            path.arcTo(70, 40, 30, arcSize, sweep, 120.1, 50);
            if (SkPath::kCCW_Direction == sweep && SkPath::kLarge_ArcSize == arcSize) {
                paint.setColor(SK_ColorBLUE);
                paint.setStrokeWidth(3);
            }
            canvas->drawPath(path, paint);
         }
    }
}
##

#SeeAlso rArcTo ArcSize Direction

##

# ------------------------------------------------------------------------------

#Method SkPath& arcTo(const SkPoint r, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep,
               const SkPoint xy)
#In Build
#In Arc
#Populate

#Example
#Height 108
void draw(SkCanvas* canvas) {
    SkPaint paint;
    SkPath path;
    const SkPoint starts[] = {{20, 20}, {120, 20}, {70, 60}};
    for (auto start : starts) {
        path.moveTo(start.fX, start.fY);
        path.rArcTo(20, 20, 0, SkPath::kSmall_ArcSize, SkPath::kCCW_Direction, 60, 0);
    }
    canvas->drawPath(path, paint);
}
##

#SeeAlso rArcTo ArcSize Direction

##

# ------------------------------------------------------------------------------

#Method SkPath& rArcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
                Direction sweep, SkScalar dx, SkScalar dy)
#In Build
#In Arc
#Line # appends Arc relative to Last_Point ##

Appends Arc to Path, relative to last Path Point. Arc is implemented by one or
more Conic, weighted to describe part of Oval with radii (rx, ry) rotated by
xAxisRotate degrees. Arc curves from last Path Point to relative end Point
(dx, dy), choosing one of four possible routes: clockwise or
counterclockwise, and smaller or larger. If Path is empty, the start Arc Point
is (0, 0).

Arc sweep is always less than 360 degrees. arcTo appends Line to end Point
if either radii are zero, or if last Path Point equals end Point.
arcTo scales radii (rx, ry) to fit last Path Point and end Point if both are
greater than zero but too small to describe an arc.

arcTo appends up to four Conic curves.
arcTo implements the functionality of SVG_Arc, although SVG "sweep-flag" value is
opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise, while
kCW_Direction cast to int is zero.

#Param rx           radius before x-axis rotation ##
#Param ry           radius before x-axis rotation ##
#Param xAxisRotate  x-axis rotation in degrees; positive values are clockwise ##
#Param largeArc     chooses smaller or larger Arc ##
#Param sweep        chooses clockwise or counterclockwise Arc ##
#Param dx           x-axis offset end of Arc from last Path Point ##
#Param dy           y-axis offset end of Arc from last Path Point ##

#Return reference to Path ##

#Example
#Height 108
void draw(SkCanvas* canvas) {
    SkPaint paint;
    SkPath path;
    const SkPoint starts[] = {{20, 20}, {120, 20}, {70, 60}};
    for (auto start : starts) {
        path.moveTo(start.fX, start.fY);
        path.rArcTo(20, 20, 0, SkPath::kSmall_ArcSize, SkPath::kCCW_Direction, 60, 0);
    }
    canvas->drawPath(path, paint);
}
##

#SeeAlso arcTo ArcSize Direction

##

#Subtopic Arc ##

# ------------------------------------------------------------------------------

#Method SkPath& close()
#In Build
#Line # makes last Contour a loop ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setStrokeWidth(15);
    paint.setStrokeCap(SkPaint::kRound_Cap);
    SkPath path;
    const SkPoint points[] = {{20, 20}, {70, 20}, {40, 90}};
    path.addPoly(points, SK_ARRAY_COUNT(points), false);
    for (int loop = 0; loop < 2; ++loop) {
        for (auto style : {SkPaint::kStroke_Style, SkPaint::kFill_Style,
                SkPaint::kStrokeAndFill_Style} ) {
            paint.setStyle(style);
            canvas->drawPath(path, paint);
            canvas->translate(85, 0);
        }
        path.close();
        canvas->translate(-255, 128);
    }
}
##

#SeeAlso

##

# ------------------------------------------------------------------------------

#Method static bool IsInverseFillType(FillType fill)
#In Property
#Line # returns if Fill_Type represents outside geometry ##
Returns true if fill is inverted and Path with fill represents area outside
of its geometric bounds.

#Table
#Legend
# FillType                 # is inverse ##
##
# kWinding_FillType        # false      ##
# kEvenOdd_FillType        # false      ##
# kInverseWinding_FillType # true       ##
# kInverseEvenOdd_FillType # true       ##
##

#Param fill  one of: kWinding_FillType, kEvenOdd_FillType,
             kInverseWinding_FillType, kInverseEvenOdd_FillType
##

#Return  true if Path fills outside its bounds ##

#Example
#Function
###$
#define nameValue(fill) { SkPath::fill, #fill }

$$$#
##
void draw(SkCanvas* canvas) {
    struct {
        SkPath::FillType fill;
        const char* name;
    } fills[] = {
        nameValue(kWinding_FillType),
        nameValue(kEvenOdd_FillType),
        nameValue(kInverseWinding_FillType),
        nameValue(kInverseEvenOdd_FillType),
    };
    for (auto fill: fills ) {
        SkDebugf("IsInverseFillType(%s) == %s\n", fill.name, SkPath::IsInverseFillType(fill.fill) ?
                 "true" : "false");
    }
}
#StdOut
IsInverseFillType(kWinding_FillType) == false
IsInverseFillType(kEvenOdd_FillType) == false
IsInverseFillType(kInverseWinding_FillType) == true
IsInverseFillType(kInverseEvenOdd_FillType) == true
##
##

#SeeAlso FillType getFillType setFillType ConvertToNonInverseFillType

##

# ------------------------------------------------------------------------------

#Method static FillType ConvertToNonInverseFillType(FillType fill)
#In Utility
#Line # returns Fill_Type representing inside geometry ##
Returns equivalent Fill_Type representing Path fill inside its bounds.

#Table
#Legend
# FillType                 # inside FillType   ##
##
# kWinding_FillType        # kWinding_FillType ##
# kEvenOdd_FillType        # kEvenOdd_FillType ##
# kInverseWinding_FillType # kWinding_FillType ##
# kInverseEvenOdd_FillType # kEvenOdd_FillType ##
##

#Param fill  one of: kWinding_FillType, kEvenOdd_FillType,
             kInverseWinding_FillType, kInverseEvenOdd_FillType
##

#Return  fill, or kWinding_FillType or kEvenOdd_FillType if fill is inverted ##

#Example
#Function
###$
#define nameValue(fill) { SkPath::fill, #fill }

$$$#
##
void draw(SkCanvas* canvas) {
    struct {
        SkPath::FillType fill;
        const char* name;
    } fills[] = {
        nameValue(kWinding_FillType),
        nameValue(kEvenOdd_FillType),
        nameValue(kInverseWinding_FillType),
        nameValue(kInverseEvenOdd_FillType),
    };
    for (unsigned i = 0; i < SK_ARRAY_COUNT(fills); ++i) {
        if (fills[i].fill != (SkPath::FillType) i) {
            SkDebugf("fills array order does not match FillType enum order");
            break;
        }
        SkDebugf("ConvertToNonInverseFillType(%s) == %s\n", fills[i].name,
                fills[(int) SkPath::ConvertToNonInverseFillType(fills[i].fill)].name);
    }
}
#StdOut
ConvertToNonInverseFillType(kWinding_FillType) == kWinding_FillType
ConvertToNonInverseFillType(kEvenOdd_FillType) == kEvenOdd_FillType
ConvertToNonInverseFillType(kInverseWinding_FillType) == kWinding_FillType
ConvertToNonInverseFillType(kInverseEvenOdd_FillType) == kEvenOdd_FillType
##
##

#SeeAlso FillType getFillType setFillType IsInverseFillType

##

# ------------------------------------------------------------------------------

#Method static int ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2,
                                   SkScalar w, SkPoint pts[], int pow2)
#In Utility
#Line # approximates Conic with Quad array ##

Approximates Conic with Quad array. Conic is constructed from start Point p0,
control Point p1, end Point p2, and weight w.
Quad array is stored in pts; this storage is supplied by caller.
Maximum Quad count is 2 to the pow2.
Every third point in array shares last Point of previous Quad and first Point of
next Quad. Maximum pts storage size is given by:
#Formula # (1 + 2 * (1 << pow2)) * sizeof(SkPoint) ##.

Returns Quad count used the approximation, which may be smaller
than the number requested.

Conic_Weight determines the amount of influence Conic control point has on the curve.
w less than one represents an elliptical section. w greater than one represents
a hyperbolic section. w equal to one represents a parabolic section.

Two Quad curves are sufficient to approximate an elliptical Conic with a sweep
of up to 90 degrees; in this case, set pow2 to one.

#Param p0    Conic start Point ##
#Param p1    Conic control Point ##
#Param p2    Conic end Point ##
#Param w     Conic weight ##
#Param pts   storage for Quad array ##
#Param pow2  Quad count, as power of two, normally 0 to 5 (1 to 32 Quad curves) ##

#Return  number of Quad curves written to pts ##

#Example
#Description
A pair of Quad curves are drawn in red on top of the elliptical Conic curve in black.
The middle curve is nearly circular. The top-right curve is parabolic, which can
be drawn exactly with a single Quad.
##
void draw(SkCanvas* canvas) {
      SkPaint conicPaint;
      conicPaint.setAntiAlias(true);
      conicPaint.setStyle(SkPaint::kStroke_Style);
      SkPaint quadPaint(conicPaint);
      quadPaint.setColor(SK_ColorRED);
      SkPoint conic[] = { {20, 170}, {80, 170}, {80, 230} };
      for (auto weight : { .25f, .5f, .707f, .85f, 1.f } ) {
          SkPoint quads[5];
          SkPath::ConvertConicToQuads(conic[0], conic[1], conic[2], weight, quads, 1);
          SkPath path;
          path.moveTo(conic[0]);
          path.conicTo(conic[1], conic[2], weight);
          canvas->drawPath(path, conicPaint);
          path.rewind();
          path.moveTo(quads[0]);
          path.quadTo(quads[1], quads[2]);
          path.quadTo(quads[3], quads[4]);
          canvas->drawPath(path, quadPaint);
          canvas->translate(50, -50);
      }
}
##

#SeeAlso Conic Quad

##

# ------------------------------------------------------------------------------

#Method bool isRect(SkRect* rect, bool* isClosed = nullptr, Direction* direction = nullptr) const
#In Property
#Line # returns if describes Rect ##
#Populate

#Example
#Description
After addRect, isRect returns true. Following moveTo permits isRect to return true, but
following lineTo does not. addPoly returns true even though rect is not closed, and one
side of rect is made up of consecutive line segments.
##
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path) -> void {
        SkRect rect;
        SkPath::Direction direction;
        bool isClosed;
        path.isRect(&rect, &isClosed, &direction) ?
                SkDebugf("%s is rect (%g, %g, %g, %g); is %s" "closed; direction %s\n", prefix,
                         rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, isClosed ? "" : "not ",
                         SkPath::kCW_Direction == direction ? "CW" : "CCW") :
                SkDebugf("%s is not rect\n", prefix);
    };
    SkPath path;
    debugster("empty", path);
    path.addRect({10, 20, 30, 40});
    debugster("addRect", path);
    path.moveTo(60, 70);
    debugster("moveTo", path);
    path.lineTo(60, 70);
    debugster("lineTo", path);
    path.reset();
    const SkPoint pts[] = { {0, 0}, {0, 80}, {80, 80}, {80, 0}, {40, 0}, {20, 0} };
    path.addPoly(pts, SK_ARRAY_COUNT(pts), false);
    debugster("addPoly", path);
}
#StdOut
empty is not rect
addRect is rect (10, 20, 30, 40); is closed; direction CW
moveTo is rect (10, 20, 30, 40); is closed; direction CW
lineTo is not rect
addPoly is rect (0, 0, 80, 80); is not closed; direction CCW
##
##

#SeeAlso computeTightBounds conservativelyContainsRect getBounds isConvex isLastContourClosed isNestedFillRects

##

# ------------------------------------------------------------------------------

#Method bool isNestedFillRects(SkRect rect[2], Direction dirs[2] = nullptr) const
#In Property
#Line # returns if describes Rect pair, one inside the other ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    paint.setStrokeWidth(5);
    SkPath path;
    path.addRect({10, 20, 30, 40});
    paint.getFillPath(path, &path);
    SkRect rects[2];
    SkPath::Direction directions[2];
    if (path.isNestedFillRects(rects, directions)) {
        for (int i = 0; i < 2; ++i) {
            SkDebugf("%s (%g, %g, %g, %g); direction %s\n", i ? "inner" : "outer",
                     rects[i].fLeft, rects[i].fTop, rects[i].fRight, rects[i].fBottom,
                     SkPath::kCW_Direction == directions[i] ? "CW" : "CCW");
        }
    } else {
        SkDebugf("is not nested rectangles\n");
    }
}
#StdOut
outer (7.5, 17.5, 32.5, 42.5); direction CW
inner (12.5, 22.5, 27.5, 37.5); direction CCW
##
##

#SeeAlso computeTightBounds conservativelyContainsRect getBounds isConvex isLastContourClosed isRect

##

# ------------------------------------------------------------------------------

#Method SkPath& addRect(const SkRect& rect, Direction dir = kCW_Direction)
#In Build
#Line # adds one Contour containing Rect ##
#Populate

#Example
#Description
The left Rect dashes starting at the top-left corner, to the right.
The right Rect dashes starting at the top-left corner, towards the bottom.
##
#Height 128
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setStrokeWidth(15);
    paint.setStrokeCap(SkPaint::kSquare_Cap);
    float intervals[] = { 5, 21.75f };
    paint.setStyle(SkPaint::kStroke_Style);
    paint.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 0));
    SkPath path;
    path.addRect({20, 20, 100, 100}, SkPath::kCW_Direction);
    canvas->drawPath(path, paint);
    path.rewind();
    path.addRect({140, 20, 220, 100}, SkPath::kCCW_Direction);
    canvas->drawPath(path, paint);
}
##

#SeeAlso SkCanvas::drawRect Direction

##

# ------------------------------------------------------------------------------

#Method SkPath& addRect(const SkRect& rect, Direction dir, unsigned start)

Adds Rect to Path, appending kMove_Verb, three kLine_Verb, and kClose_Verb.
If dir is kCW_Direction, Rect corners are added clockwise; if dir is
kCCW_Direction, Rect corners are added counterclockwise.
start determines the first corner added.

#Table
#Legend
# start # first corner ##
#Legend ##
# 0     # top-left ##
# 1     # top-right ##
# 2     # bottom-right ##
# 3     # bottom-left ##
#Table ##

#Param rect   Rect to add as a closed contour ##
#Param dir    Direction to wind added contour ##
#Param start  initial corner of Rect to add ##

#Return reference to Path ##

#Example
#Height 128
#Description
The arrow is just after the initial corner and points towards the next
corner appended to Path.
##
void draw(SkCanvas* canvas) {
    const SkPoint arrow[] = { {5, -5}, {15, -5}, {20, 0}, {15, 5}, {5, 5}, {10, 0} };
    const SkRect rect = {10, 10, 54, 54};
    SkPaint rectPaint;
    rectPaint.setAntiAlias(true);
    rectPaint.setStyle(SkPaint::kStroke_Style);
    SkPaint arrowPaint(rectPaint);
    SkPath arrowPath;
    arrowPath.addPoly(arrow, SK_ARRAY_COUNT(arrow), true);
    arrowPaint.setPathEffect(SkPath1DPathEffect::Make(arrowPath, 176, 0,
                             SkPath1DPathEffect::kRotate_Style));
    for (auto direction : { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
        for (unsigned start : { 0, 1, 2, 3 } ) {
           SkPath path;
           path.addRect(rect, direction, start);
           canvas->drawPath(path, rectPaint);
           canvas->drawPath(path, arrowPaint);
           canvas->translate(64, 0);
       }
       canvas->translate(-256, 64);
    }
}
##

#SeeAlso SkCanvas::drawRect Direction

##

# ------------------------------------------------------------------------------

#Method SkPath& addRect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom,
                 Direction dir = kCW_Direction)
#Populate

#Example
#Description
The left Rect dashes start at the top-left corner, and continue to the right.
The right Rect dashes start at the top-left corner, and continue down.
##
#Height 128
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setStrokeWidth(15);
    paint.setStrokeCap(SkPaint::kSquare_Cap);
    float intervals[] = { 5, 21.75f };
    paint.setStyle(SkPaint::kStroke_Style);
    paint.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 0));
    for (auto direction : { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
        SkPath path;
        path.addRect(20, 20, 100, 100, direction);
        canvas->drawPath(path, paint);
        canvas->translate(128, 0);
    }
}
##

#SeeAlso SkCanvas::drawRect Direction

##

# ------------------------------------------------------------------------------

#Method SkPath& addOval(const SkRect& oval, Direction dir = kCW_Direction)
#In Build
#Line # adds one Contour containing Oval ##
#Populate

#Example
#Height 120
    SkPaint paint;
    SkPath oval;
    oval.addOval({20, 20, 160, 80});
    canvas->drawPath(oval, paint);
##

#SeeAlso SkCanvas::drawOval Direction Oval

##

# ------------------------------------------------------------------------------

#Method SkPath& addOval(const SkRect& oval, Direction dir, unsigned start)

Adds Oval to Path, appending kMove_Verb, four kConic_Verb, and kClose_Verb.
Oval is upright ellipse bounded by Rect oval with radii equal to half oval width
and half oval height. Oval begins at start and continues
clockwise if dir is kCW_Direction, counterclockwise if dir is kCCW_Direction.

#Table
#Legend
# start # Point                        ##
#Legend ##
# 0     # oval.centerX(), oval.fTop    ##
# 1     # oval.fRight, oval.centerY()  ##
# 2     # oval.centerX(), oval.fBottom ##
# 3     # oval.fLeft, oval.centerY()   ##
#Table ##

#Param oval   bounds of ellipse added ##
#Param dir    Direction to wind ellipse ##
#Param start  index of initial point of ellipse ##

#Return reference to Path ##

#Example
#Height 160
void draw(SkCanvas* canvas) {
    const SkPoint arrow[] = { {0, -5}, {10, 0}, {0, 5} };
    const SkRect rect = {10, 10, 54, 54};
    SkPaint ovalPaint;
    ovalPaint.setAntiAlias(true);
    SkPaint textPaint(ovalPaint);
    ovalPaint.setStyle(SkPaint::kStroke_Style);
    SkPaint arrowPaint(ovalPaint);
    SkPath arrowPath;
    arrowPath.addPoly(arrow, SK_ARRAY_COUNT(arrow), true);
    arrowPaint.setPathEffect(SkPath1DPathEffect::Make(arrowPath, 176, 0,
                             SkPath1DPathEffect::kRotate_Style));
    for (auto direction : { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
        for (unsigned start : { 0, 1, 2, 3 } ) {
           SkPath path;
           path.addOval(rect, direction, start);
           canvas->drawPath(path, ovalPaint);
           canvas->drawPath(path, arrowPaint);
           canvas->drawText(&"0123"[start], 1, rect.centerX(), rect.centerY() + 5, textPaint);
           canvas->translate(64, 0);
       }
       canvas->translate(-256, 72);
       canvas->drawString(SkPath::kCW_Direction == direction ? "clockwise" : "counterclockwise",
                          128, 0, textPaint);
    }
}
##

#SeeAlso SkCanvas::drawOval Direction Oval

##

# ------------------------------------------------------------------------------

#Method SkPath& addCircle(SkScalar x, SkScalar y, SkScalar radius,
                   Direction dir = kCW_Direction)
#In Build
#Line # adds one Contour containing Circle ##

Adds Circle centered at (x, y) of size radius to Path, appending kMove_Verb,
four kConic_Verb, and kClose_Verb. Circle begins at: #Formula # (x + radius, y) ##, continuing
clockwise if dir is kCW_Direction, and counterclockwise if dir is kCCW_Direction.

Has no effect if radius is zero or negative.

#Param x       center of Circle ##
#Param y       center of Circle  ##
#Param radius  distance from center to edge ##
#Param dir     Direction to wind Circle ##

#Return reference to Path ##

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setStyle(SkPaint::kStroke_Style);
    paint.setStrokeWidth(10);
    for (int size = 10; size < 300; size += 20) {
        SkPath path;
        path.addCircle(128, 128, size, SkPath::kCW_Direction);
        canvas->drawPath(path, paint);
    }
}
##

#SeeAlso SkCanvas::drawCircle Direction Circle

##

# ------------------------------------------------------------------------------

#Method SkPath& addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle)
#In Build
#Line # adds one Contour containing Arc ##
#Populate

#Example
#Description
The middle row of the left and right columns draw differently from the entries
above and below because sweepAngle is outside of the range of +/-360,
and startAngle modulo 90 is not zero.
##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    for (auto start : { 0, 90, 135, 180, 270 } ) {
        for (auto sweep : { -450.f, -180.f, -90.f, 90.f, 180.f, 360.1f } ) {
            SkPath path;
            path.addArc({10, 10, 35, 45}, start, sweep);
            canvas->drawPath(path, paint);
            canvas->translate(252 / 6, 0);
        }
        canvas->translate(-252, 255 / 5);
    }
}
##

#SeeAlso Arc arcTo SkCanvas::drawArc

##

# ------------------------------------------------------------------------------

#Method SkPath& addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry,
                      Direction dir = kCW_Direction)
#In Build
#Line # adds one Contour containing Round_Rect with common corner radii ##
#Populate

#Example
#Description
If either radius is zero, path contains Rect and is drawn red.
If sides are only radii, path contains Oval and is drawn blue.
All remaining path draws are convex, and are drawn in gray; no
paths constructed from addRoundRect are concave, so none are
drawn in green.
##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    for (auto xradius : { 0, 7, 13, 20 } ) {
        for (auto yradius : { 0, 9, 18, 40 } ) {
            SkPath path;
            path.addRoundRect({10, 10, 36, 46}, xradius, yradius);
            paint.setColor(path.isRect(nullptr) ? SK_ColorRED : path.isOval(nullptr) ?
                           SK_ColorBLUE : path.isConvex() ? SK_ColorGRAY : SK_ColorGREEN);
            canvas->drawPath(path, paint);
            canvas->translate(64, 0);
        }
        canvas->translate(-256, 64);
    }
}
##

#SeeAlso addRRect SkCanvas::drawRoundRect

##

# ------------------------------------------------------------------------------

#Method SkPath& addRoundRect(const SkRect& rect, const SkScalar radii[],
                      Direction dir = kCW_Direction)

Appends Round_Rect to Path, creating a new closed Contour. Round_Rect has bounds
equal to rect; each corner is 90 degrees of an ellipse with radii from the
array.

#Table
#Legend
# radii index # location                        ##
#Legend ##
# 0           # x-axis radius of top-left corner     ##
# 1           # y-axis radius of top-left corner     ##
# 2           # x-axis radius of top-right corner    ##
# 3           # y-axis radius of top-right corner    ##
# 4           # x-axis radius of bottom-right corner ##
# 5           # y-axis radius of bottom-right corner ##
# 6           # x-axis radius of bottom-left corner  ##
# 7           # y-axis radius of bottom-left corner  ##
#Table ##

If dir is kCW_Direction, Round_Rect starts at top-left of the lower-left corner
and winds clockwise. If dir is kCCW_Direction, Round_Rect starts at the
bottom-left of the upper-left corner and winds counterclockwise.

If both radii on any side of rect exceed its length, all radii are scaled
uniformly until the corners fit. If either radius of a corner is less than or
equal to zero, both are treated as zero.

After appending, Path may be empty, or may contain: Rect, Oval, or Round_Rect.

#Param rect   bounds of Round_Rect ##
#Param radii  array of 8 SkScalar values, a radius pair for each corner ##
#Param dir    Direction to wind Round_Rect ##

#Return reference to Path ##

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    SkScalar radii[] = { 80, 100, 0, 0, 40, 60, 0, 0 };
    SkPath path;
    SkMatrix rotate90;
    rotate90.setRotate(90, 128, 128);
    for (int i = 0; i < 4; ++i) {
        path.addRoundRect({10, 10, 110, 110}, radii);
        path.transform(rotate90);
    }
    canvas->drawPath(path, paint);
}
##

#SeeAlso addRRect SkCanvas::drawRoundRect

##

# ------------------------------------------------------------------------------

#Method SkPath& addRRect(const SkRRect& rrect, Direction dir = kCW_Direction)
#In Build
#Line # adds one Contour containing Round_Rect ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    SkRRect rrect;
    SkVector radii[] = {{50, 50}, {0, 0}, {0, 0}, {50, 50}};
    rrect.setRectRadii({10, 10, 110, 110}, radii);
    SkPath path;
    SkMatrix rotate90;
    rotate90.setRotate(90, 128, 128);
    for (int i = 0; i < 4; ++i) {
        path.addRRect(rrect);
        path.transform(rotate90);
    }
    canvas->drawPath(path, paint);
}
##

#SeeAlso addRoundRect SkCanvas::drawRRect

##

# ------------------------------------------------------------------------------

#Method SkPath& addRRect(const SkRRect& rrect, Direction dir, unsigned start)

Adds rrect to Path, creating a new closed Contour. If dir is kCW_Direction, rrect
winds clockwise; if dir is kCCW_Direction, rrect winds counterclockwise.
start determines the first point of rrect to add.

#Table
#Legend
# start       # location                    ##
#Legend ##
# 0           # right of top-left corner    ##
# 1           # left of top-right corner    ##
# 2           # bottom of top-right corner  ##
# 3           # top of bottom-right corner  ##
# 4           # left of bottom-right corner ##
# 5           # right of bottom-left corner ##
# 6           # top of bottom-left corner   ##
# 7           # bottom of top-left corner   ##
#Table ##

After appending, Path may be empty, or may contain: Rect, Oval, or Round_Rect.

#Param rrect  bounds and radii of rounded rectangle ##
#Param dir    Direction to wind Round_Rect ##
#Param start  index of initial point of Round_Rect ##

#Return reference to Path ##

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    SkRRect rrect;
    rrect.setRectXY({40, 40, 215, 215}, 50, 50);
    SkPath path;
    path.addRRect(rrect);
    canvas->drawPath(path, paint);
    for (int start = 0; start < 8; ++start) {
        SkPath textPath;
        textPath.addRRect(rrect, SkPath::kCW_Direction, start);
        SkPathMeasure pathMeasure(textPath, false);
        SkPoint position;
        SkVector tangent;
        if (!pathMeasure.getPosTan(0, &position, &tangent)) {
            continue;
        }
        SkRSXform rsxForm = SkRSXform::Make(tangent.fX, tangent.fY,
               position.fX + tangent.fY * 5, position.fY - tangent.fX * 5);
        canvas->drawTextRSXform(&"01234567"[start], 1, &rsxForm, nullptr, paint);
    }
}
##

#SeeAlso addRoundRect SkCanvas::drawRRect

##

# ------------------------------------------------------------------------------

#Method SkPath& addPoly(const SkPoint pts[], int count, bool close)
#In Build
#Line # adds one Contour containing connected lines ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setStrokeWidth(15);
    paint.setStrokeCap(SkPaint::kRound_Cap);
    const SkPoint points[] = {{20, 20}, {70, 20}, {40, 90}};
    for (bool close : { false, true } ) {
        SkPath path;
        path.addPoly(points, SK_ARRAY_COUNT(points), close);
        for (auto style : {SkPaint::kStroke_Style, SkPaint::kFill_Style,
                SkPaint::kStrokeAndFill_Style} ) {
            paint.setStyle(style);
            canvas->drawPath(path, paint);
            canvas->translate(85, 0);
        }
        canvas->translate(-255, 128);
    }
}
##

#SeeAlso SkCanvas::drawPoints

##

#Method SkPath& addPoly(const std::initializer_list<SkPoint>& list, bool close)
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setStrokeWidth(15);
    paint.setStrokeCap(SkPaint::kRound_Cap);
    for (bool close : { false, true } ) {
        SkPath path;
        path.addPoly({{20, 20}, {70, 20}, {40, 90}}, close);
        for (auto style : {SkPaint::kStroke_Style, SkPaint::kFill_Style,
                SkPaint::kStrokeAndFill_Style} ) {
            paint.setStyle(style);
            canvas->drawPath(path, paint);
            canvas->translate(85, 0);
        }
        canvas->translate(-255, 128);
    }
}
##

#SeeAlso SkCanvas::drawPoints

##

# ------------------------------------------------------------------------------

#Enum AddPathMode
#Line # sets addPath options ##

#Code
    enum AddPathMode {
        kAppend_AddPathMode,
        kExtend_AddPathMode,
    };
##

AddPathMode chooses how addPath appends. Adding one Path to another can extend
the last Contour or start a new Contour.

#Const kAppend_AddPathMode
#Line # appended to destination unaltered ##
    Path Verbs, Points, and Conic_Weights are appended to destination unaltered.
    Since Path Verb_Array begins with kMove_Verb if src is not empty, this
    starts a new Contour.
##
#Const kExtend_AddPathMode
#Line # add line if prior Contour is not closed ##
    If destination is closed or empty, start a new Contour. If destination
    is not empty, add Line from Last_Point to added Path first Point. Skip added
    Path initial kMove_Verb, then append remaining Verbs, Points, and Conic_Weights.
##

#Example
#Description
test is built from path, open on the top row, and closed on the bottom row.
The left column uses kAppend_AddPathMode; the right uses kExtend_AddPathMode.
The top right composition is made up of one contour; the other three have two.
##
#Height 180
    SkPath path, path2;
    path.moveTo(20, 20);
    path.lineTo(20, 40);
    path.lineTo(40, 20);
    path2.moveTo(60, 60);
    path2.lineTo(80, 60);
    path2.lineTo(80, 40);
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    for (int i = 0; i < 2; i++) {
        for (auto addPathMode : { SkPath::kAppend_AddPathMode, SkPath::kExtend_AddPathMode } ) {
            SkPath test(path);
            test.addPath(path2, addPathMode);
            canvas->drawPath(test, paint);
            canvas->translate(100, 0);
        }
        canvas->translate(-200, 100);
        path.close();
    }
##

#SeeAlso addPath reverseAddPath

##

# ------------------------------------------------------------------------------

#Method SkPath& addPath(const SkPath& src, SkScalar dx, SkScalar dy,
                 AddPathMode mode = kAppend_AddPathMode)
#In Build
#Line # adds contents of Path ##
#Populate

#Example
#Height 180
    SkPaint paint;
    paint.setTextSize(128);
    paint.setFakeBoldText(true);
    SkPath dest, text;
    paint.getTextPath("O", 1, 50, 120, &text);
    for (int i = 0; i < 3; i++) {
        dest.addPath(text, i * 20, i * 20);
    }
    Simplify(dest, &dest);
    paint.setStyle(SkPaint::kStroke_Style);
    paint.setStrokeWidth(3);
    canvas->drawPath(dest, paint);
##

#SeeAlso AddPathMode offset reverseAddPath

##

# ------------------------------------------------------------------------------

#Method SkPath& addPath(const SkPath& src, AddPathMode mode = kAppend_AddPathMode)
#Populate

#Example
#Height 80
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    SkPath dest, path;
    path.addOval({-80, 20, 0, 60}, SkPath::kCW_Direction, 1);
    for (int i = 0; i < 2; i++) {
        dest.addPath(path, SkPath::kExtend_AddPathMode);
        dest.offset(100, 0);
    }
    canvas->drawPath(dest, paint);
##

#SeeAlso AddPathMode reverseAddPath

##

# ------------------------------------------------------------------------------

#Method SkPath& addPath(const SkPath& src, const SkMatrix& matrix, AddPathMode mode = kAppend_AddPathMode)
#Populate

#Example
#Height 160
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    SkPath dest, path;
    path.addOval({20, 20, 200, 120}, SkPath::kCW_Direction, 1);
    for (int i = 0; i < 6; i++) {
        SkMatrix matrix;
        matrix.reset();
        matrix.setPerspX(i / 400.f);
        dest.addPath(path, matrix);
    }
    canvas->drawPath(dest, paint);
##

#SeeAlso AddPathMode transform offset reverseAddPath

##

# ------------------------------------------------------------------------------

#Method SkPath& reverseAddPath(const SkPath& src)
#In Build
#Line # adds contents of Path back to front ##
#Populate

#Example
#Height 200
    SkPath path;
    path.moveTo(20, 20);
    path.lineTo(20, 40);
    path.lineTo(40, 20);
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    for (int i = 0; i < 2; i++) {
        SkPath path2;
        path2.moveTo(60, 60);
        path2.lineTo(80, 60);
        path2.lineTo(80, 40);
        for (int j = 0; j < 2; j++) {
            SkPath test(path);
            test.reverseAddPath(path2);
            canvas->drawPath(test, paint);
            canvas->translate(100, 0);
            path2.close();
        }
        canvas->translate(-200, 100);
        path.close();
    }
##

#SeeAlso AddPathMode transform offset addPath

##

# ------------------------------------------------------------------------------

#Method void offset(SkScalar dx, SkScalar dy, SkPath* dst) const
#In Transform
#Line # translates Point_Array ##
#Populate

#Example
#Height 60
    SkPath pattern;
    pattern.moveTo(20, 20);
    pattern.lineTo(20, 40);
    pattern.lineTo(40, 20);
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    for (int i = 0; i < 10; i++) {
        SkPath path;
        pattern.offset(20 * i, 0, &path);
        canvas->drawPath(path, paint);
    }
##

#SeeAlso addPath transform

##

# ------------------------------------------------------------------------------
#Subtopic Transform
#Line # modify all points ##
##

#Method void offset(SkScalar dx, SkScalar dy)
#In Transform
#Populate

#Example
#Height 60
    SkPath path;
    path.moveTo(20, 20);
    path.lineTo(20, 40);
    path.lineTo(40, 20);
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    for (int i = 0; i < 10; i++) {
        canvas->drawPath(path, paint);
        path.offset(20, 0);
    }
##

#SeeAlso addPath transform SkCanvas::translate()

##

# ------------------------------------------------------------------------------

#Method void transform(const SkMatrix& matrix, SkPath* dst) const
#In Transform
#Line # applies Matrix to Point_Array and Weights ##
#Populate

#Example
#Height 200
    SkPath pattern;
    pattern.moveTo(100, 100);
    pattern.lineTo(100, 20);
    pattern.lineTo(20, 100);
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    for (int i = 0; i < 10; i++) {
        SkPath path;
        SkMatrix matrix;
        matrix.setRotate(36 * i, 100, 100);
        pattern.transform(matrix, &path);
        canvas->drawPath(path, paint);
    }
##

#SeeAlso addPath offset SkCanvas::concat() SkMatrix

##

# ------------------------------------------------------------------------------

#Method void transform(const SkMatrix& matrix)
#Populate

#Example
#Height 200
    SkPath path;
    path.moveTo(100, 100);
    path.quadTo(100, 20, 20, 100);
    SkPaint paint;
    paint.setStyle(SkPaint::kStroke_Style);
    for (int i = 0; i < 10; i++) {
        SkMatrix matrix;
        matrix.setRotate(36, 100, 100);
        path.transform(matrix);
        canvas->drawPath(path, paint);
    }
##

#SeeAlso addPath offset SkCanvas::concat() SkMatrix

##

# ------------------------------------------------------------------------------

#Subtopic Last_Point
#Line # final Point in Contour ##

Path is defined cumulatively, often by adding a segment to the end of last
Contour. Last_Point of Contour is shared as first Point of added Line or Curve.
Last_Point can be read and written directly with getLastPt and setLastPt.

#Method bool getLastPt(SkPoint* lastPt) const
#In Property
#In Last_Point
#Line # returns Last_Point ##
#Populate

#Example
        SkPath path;
        path.moveTo(100, 100);
        path.quadTo(100, 20, 20, 100);
        SkMatrix matrix;
        matrix.setRotate(36, 100, 100);
        path.transform(matrix);
        SkPoint last;
        path.getLastPt(&last);
        SkDebugf("last point: %g, %g\n", last.fX, last.fY);
    #StdOut
    last point: 35.2786, 52.9772
    ##
    ##

    #SeeAlso setLastPt

##

#Method void setLastPt(SkScalar x, SkScalar y)
#In Utility
#In Last_Point
#Line # replaces Last_Point ##
#Populate

#Example
    #Height 128
        SkPaint paint;
        paint.setTextSize(128);
        SkPath path;
        paint.getTextPath("@", 1, 60, 100, &path);
        path.setLastPt(20, 120);
        canvas->drawPath(path, paint);
    ##

    #SeeAlso getLastPt

##

#Method void setLastPt(const SkPoint& p)
#Populate

#Example
    #Height 128
        SkPaint paint;
        paint.setTextSize(128);
        SkPath path, path2;
        paint.getTextPath("A", 1, 60, 100, &path);
        paint.getTextPath("Z", 1, 60, 100, &path2);
        SkPoint pt, pt2;
        path.getLastPt(&pt);
        path2.getLastPt(&pt2);
        path.setLastPt(pt2);
        path2.setLastPt(pt);
        canvas->drawPath(path, paint);
        canvas->drawPath(path2, paint);
    ##

    #SeeAlso getLastPt

##

#Subtopic Last_Point ##

# ------------------------------------------------------------------------------

#Enum SegmentMask
#Line # returns Verb types in Path ##

#Code
    enum SegmentMask {
        kLine_SegmentMask = 1 << 0,
        kQuad_SegmentMask = 1 << 1,
        kConic_SegmentMask = 1 << 2,
        kCubic_SegmentMask = 1 << 3,
    };
##

SegmentMask constants correspond to each drawing Verb type in Path; for
instance, if Path only contains Lines, only the kLine_SegmentMask bit is set.

#Bug 6785
#Const kLine_SegmentMask 1
#Line # contains one or more Lines ##
Set if Verb_Array contains kLine_Verb.
##
#Const kQuad_SegmentMask 2
#Line # contains one or more Quads ##
Set if Verb_Array contains kQuad_Verb. Note that conicTo may add a Quad.
##
#Const kConic_SegmentMask 4
#Line # contains one or more Conics ##
Set if Verb_Array contains kConic_Verb.
##
#Const kCubic_SegmentMask 8
#Line # contains one or more Cubics ##
Set if Verb_Array contains kCubic_Verb.
##

#Example
#Description
When conicTo has a weight of one, Quad is added to Path.
##
    SkPath path;
    path.conicTo(10, 10, 20, 30, 1);
    SkDebugf("Path kConic_SegmentMask is %s\n", path.getSegmentMasks() &
          SkPath::kConic_SegmentMask ? "set" : "clear");
    SkDebugf("Path kQuad_SegmentMask is %s\n", path.getSegmentMasks() &
          SkPath::kQuad_SegmentMask ? "set" : "clear");
#StdOut
Path kConic_SegmentMask is clear
Path kQuad_SegmentMask is set
##
##

#SeeAlso getSegmentMasks Verb

##

# ------------------------------------------------------------------------------

#Method uint32_t getSegmentMasks() const
#In Utility
#In Property
#Line # returns types in Verb_Array ##
#Populate

#Example
SkPath path;
path.quadTo(20, 30, 40, 50);
path.close();
const char* masks[] = { "line", "quad", "conic", "cubic" };
int index = 0;
for (auto mask : { SkPath::kLine_SegmentMask, SkPath::kQuad_SegmentMask,
        SkPath::kConic_SegmentMask, SkPath::kCubic_SegmentMask } ) {
    if (mask & path.getSegmentMasks()) {
       SkDebugf("mask %s set\n", masks[index]);
    }
    ++index;
}
#StdOut
mask quad set
##
##

#SeeAlso getSegmentMasks Verb

##

# ------------------------------------------------------------------------------

#Method bool contains(SkScalar x, SkScalar y) const
#In Property
#Line # returns if Point is in fill area ##
Returns true if the point (x, y) is contained by Path, taking into
account FillType.

#Table
#Legend
# FillType                 # contains() returns true if Point is enclosed by ##
##
# kWinding_FillType        # a non-zero sum of Contour Directions. ##
# kEvenOdd_FillType        # an odd number of Contours.            ##
# kInverseWinding_FillType # a zero sum of Contour Directions.     ##
# kInverseEvenOdd_FillType # and even number of Contours.          ##
##

#Param x  x-axis value of containment test ##
#Param y  y-axis value of containment test ##

#Return  true if Point is in Path ##

#Example
SkPath path;
SkPaint paint;
paint.setTextSize(256);
paint.getTextPath("&", 1, 30, 220, &path);
for (int y = 2; y < 256; y += 9) {
   for (int x = 2; x < 256; x += 9) {
       int coverage = 0;
       for (int iy = -4; iy <= 4; iy += 2) {
           for (int ix = -4; ix <= 4; ix += 2) {
               coverage += path.contains(x + ix, y + iy);
           }
       }
       paint.setColor(SkColorSetARGB(0x5f, 0xff * coverage / 25, 0, 0xff * (25 - coverage) / 25));
       canvas->drawCircle(x, y, 8, paint);
   }
}
##

#SeeAlso conservativelyContainsRect Fill_Type Op

##

# ------------------------------------------------------------------------------

#Method void dump(SkWStream* stream, bool forceClose, bool dumpAsHex) const
#In Utility
#Line # sends text representation to stream ##
#Populate

#Example
   SkPath path;
   path.quadTo(20, 30, 40, 50);
   for (bool forceClose : { false, true } ) {
       for (bool dumpAsHex : { false, true } ) {
           path.dump(nullptr, forceClose, dumpAsHex);
           SkDebugf("\n");
       }
   }
#StdOut
path.setFillType(SkPath::kWinding_FillType);
path.moveTo(0, 0);
path.quadTo(20, 30, 40, 50);

path.setFillType(SkPath::kWinding_FillType);
path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000));  // 0, 0
path.quadTo(SkBits2Float(0x41a00000), SkBits2Float(0x41f00000), SkBits2Float(0x42200000), SkBits2Float(0x42480000));  // 20, 30, 40, 50

path.setFillType(SkPath::kWinding_FillType);
path.moveTo(0, 0);
path.quadTo(20, 30, 40, 50);
path.lineTo(0, 0);
path.close();

path.setFillType(SkPath::kWinding_FillType);
path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000));  // 0, 0
path.quadTo(SkBits2Float(0x41a00000), SkBits2Float(0x41f00000), SkBits2Float(0x42200000), SkBits2Float(0x42480000));  // 20, 30, 40, 50
path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000));  // 0, 0
path.close();
##
##

#SeeAlso dumpHex SkRect::dump() SkRRect::dump() SkPathMeasure::dump()

##

# ------------------------------------------------------------------------------

#Method void dump() const
#Populate

#Example
SkPath path, copy;
path.lineTo(6.f / 7, 2.f / 3);
path.dump();
copy.setFillType(SkPath::kWinding_FillType);
copy.moveTo(0, 0);
copy.lineTo(0.857143f, 0.666667f);
SkDebugf("path is " "%s" "equal to copy\n", path == copy ? "" : "not ");
#StdOut
path.setFillType(SkPath::kWinding_FillType);
path.moveTo(0, 0);
path.lineTo(0.857143f, 0.666667f);
path is not equal to copy
##
##

#SeeAlso dumpHex SkRect::dump() SkRRect::dump() SkPathMeasure::dump() writeToMemory

##

# ------------------------------------------------------------------------------

#Method void dumpHex() const
#In Utility
#Line # sends text representation using hexadecimal to standard output ##
Writes text representation of Path to standard output. The representation may be
directly compiled as C++ code. Floating point values are written
in hexadecimal to preserve their exact bit pattern. The output reconstructs the
original Path.

Use instead of dump() when submitting
#A bug reports against Skia # https://bug.skia.org ##
.

#Example
SkPath path, copy;
path.lineTo(6.f / 7, 2.f / 3);
path.dumpHex();
copy.setFillType(SkPath::kWinding_FillType);
copy.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000));  // 0, 0
copy.lineTo(SkBits2Float(0x3f5b6db7), SkBits2Float(0x3f2aaaab));  // 0.857143f, 0.666667f
SkDebugf("path is " "%s" "equal to copy\n", path == copy ? "" : "not ");
#StdOut
path.setFillType(SkPath::kWinding_FillType);
path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000));  // 0, 0
path.lineTo(SkBits2Float(0x3f5b6db7), SkBits2Float(0x3f2aaaab));  // 0.857143f, 0.666667f
path is equal to copy
##
##

#SeeAlso dump SkRect::dumpHex SkRRect::dumpHex writeToMemory

##

# ------------------------------------------------------------------------------

#Method size_t writeToMemory(void* buffer) const
#In Utility
#Line # copies data to buffer ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPath path, copy;
    path.lineTo(6.f / 7, 2.f / 3);
    size_t size = path.writeToMemory(nullptr);
    SkTDArray<char> storage;
    storage.setCount(size);
    path.writeToMemory(storage.begin());
    copy.readFromMemory(storage.begin(), size);
    SkDebugf("path is " "%s" "equal to copy\n", path == copy ? "" : "not ");
}
#StdOut
path is equal to copy
##
##

#SeeAlso serialize readFromMemory dump dumpHex

##

#Method sk_sp<SkData> serialize() const
#In Utility
#Line # copies data to buffer ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPath path, copy;
    path.lineTo(6.f / 7, 2.f / 3);
    sk_sp<SkData> data = path.serialize();
    copy.readFromMemory(data->data(), data->size());
    SkDebugf("path is " "%s" "equal to copy\n", path == copy ? "" : "not ");
}
#StdOut
path is equal to copy
##
##

#SeeAlso writeToMemory readFromMemory dump dumpHex
##

# ------------------------------------------------------------------------------

#Method size_t readFromMemory(const void* buffer, size_t length)
#In Utility
#Line # initializes from buffer ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPath path, copy;
    path.lineTo(6.f / 7, 2.f / 3);
    size_t size = path.writeToMemory(nullptr);
    SkTDArray<char> storage;
    storage.setCount(size);
    path.writeToMemory(storage.begin());
    size_t wrongSize = size - 4;
    size_t bytesRead = copy.readFromMemory(storage.begin(), wrongSize);
    SkDebugf("length = %u; returned by readFromMemory = %u\n", wrongSize, bytesRead);
    size_t largerSize = size + 4;
    bytesRead = copy.readFromMemory(storage.begin(), largerSize);
    SkDebugf("length = %u; returned by readFromMemory = %u\n", largerSize, bytesRead);
}
#StdOut
length = 32; returned by readFromMemory = 0
length = 40; returned by readFromMemory = 36
##
##

#SeeAlso writeToMemory

##

# ------------------------------------------------------------------------------
#Subtopic Generation_ID
#Alias Generation_IDs ##
#Line # value reflecting contents change ##
Generation_ID provides a quick way to check if Verb_Array, Point_Array, or
Conic_Weight has changed. Generation_ID is not a hash; identical Paths will
not necessarily have matching Generation_IDs.

Empty Paths have a Generation_ID of one.

#Method uint32_t getGenerationID() const

#In Generation_ID
#Line # returns unique ID ##
#Populate

#Example
SkPath path;
SkDebugf("empty genID = %u\n", path.getGenerationID());
path.lineTo(1, 2);
SkDebugf("1st lineTo genID = %u\n", path.getGenerationID());
path.rewind();
SkDebugf("empty genID = %u\n", path.getGenerationID());
path.lineTo(1, 2);
SkDebugf("2nd lineTo genID = %u\n", path.getGenerationID());
#StdOut
empty genID = 1
1st lineTo genID = 2
empty genID = 1
2nd lineTo genID = 3
##
##

#SeeAlso operator==(const SkPath& a, const SkPath& b)

##

#Subtopic ##

# ------------------------------------------------------------------------------

#Method bool isValid() const
#In Property
#In Utility
#Line # returns if data is internally consistent ##
#Populate

#NoExample
    ##

##

# ------------------------------------------------------------------------------

#Class Iter
#Line # data iterator ##

#Code
#Populate
##

Iterates through Verb_Array, and associated Point_Array and Conic_Weight.
Provides options to treat open Contours as closed, and to ignore
degenerate data.

#Example
#Height 128
#Description
Ignoring the actual Verbs and replacing them with Quads rounds the
path of the glyph.
##
void draw(SkCanvas* canvas) {
    SkPaint paint;
    paint.setAntiAlias(true);
    paint.setTextSize(256);
    SkPath asterisk, path;
    paint.getTextPath("*", 1, 50, 192, &asterisk);
    SkPath::Iter iter(asterisk, true);
    SkPoint start[4], pts[4];
    iter.next(start);  // skip moveTo
    iter.next(start);  // first quadTo
    path.moveTo((start[0] + start[1]) * 0.5f);
    while (SkPath::kClose_Verb != iter.next(pts)) {
        path.quadTo(pts[0], (pts[0] + pts[1]) * 0.5f);
    }
    path.quadTo(start[0], (start[0] + start[1]) * 0.5f);
    canvas->drawPath(path, paint);
}
##

#SeeAlso RawIter

#Method Iter()
#Line # constructs Path iterator ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    SkPath::Iter iter;
    SkPoint points[4];
    SkDebugf("iter is " "%s" "done\n", SkPath::kDone_Verb == iter.next(points) ? "" : "not ");
    SkPath path;
    iter.setPath(path, false);
    SkDebugf("iter is " "%s" "done\n", SkPath::kDone_Verb == iter.next(points) ? "" : "not ");
}
#StdOut
iter is done
iter is done
##
##

#SeeAlso setPath

##

#Method Iter(const SkPath& path, bool forceClose)
#Line # constructs Path iterator ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, SkPath::Iter& iter) -> void {
        SkDebugf("%s:\n", prefix);
        const char* verbStr[] =  { "Move", "Line", "Quad", "Conic", "Cubic", "Close", "Done" };
        const int pointCount[] = {     1 ,     2 ,     3 ,      3 ,      4 ,      1 ,     0  };
        SkPath::Verb verb;
        do {
           SkPoint points[4];
           verb = iter.next(points);
           SkDebugf("k%s_Verb ", verbStr[(int) verb]);
           for (int i = 0; i < pointCount[(int) verb]; ++i) {
                SkDebugf("{%g, %g}, ", points[i].fX, points[i].fY);
           }
           if (SkPath::kConic_Verb == verb) {
               SkDebugf("weight = %g", iter.conicWeight());
           }
           SkDebugf("\n");
        } while (SkPath::kDone_Verb != verb);
        SkDebugf("\n");
    };

    SkPath path;
    path.quadTo(10, 20, 30, 40);
    SkPath::Iter openIter(path, false);
    debugster("open", openIter);
    SkPath::Iter closedIter(path, true);
    debugster("closed", closedIter);
}
#StdOut
open:
kMove_Verb {0, 0},
kQuad_Verb {0, 0}, {10, 20}, {30, 40},
kDone_Verb

closed:
kMove_Verb {0, 0},
kQuad_Verb {0, 0}, {10, 20}, {30, 40},
kLine_Verb {30, 40}, {0, 0},
kClose_Verb {0, 0},
kDone_Verb
##
##

#SeeAlso setPath

##

#Method void setPath(const SkPath& path, bool forceClose)
#Line # resets Iter to Path ##
#Populate

#Example
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, SkPath::Iter& iter) -> void {
        SkDebugf("%s:\n", prefix);
        const char* verbStr[] =  { "Move", "Line", "Quad", "Conic", "Cubic", "Close", "Done" };
        const int pointCount[] = {     1 ,     2 ,     3 ,      3 ,      4 ,      1 ,     0  };
        SkPath::Verb verb;
        do {
           SkPoint points[4];
           verb = iter.next(points);
           SkDebugf("k%s_Verb ", verbStr[(int) verb]);
           for (int i = 0; i < pointCount[(int) verb]; ++i) {
                SkDebugf("{%g, %g}, ", points[i].fX, points[i].fY);
           }
           if (SkPath::kConic_Verb == verb) {
               SkDebugf("weight = %g", iter.conicWeight());
           }
           SkDebugf("\n");
        } while (SkPath::kDone_Verb != verb);
        SkDebugf("\n");
    };

    SkPath path;
    path.quadTo(10, 20, 30, 40);
    SkPath::Iter iter(path, false);
    debugster("quad open", iter);
    SkPath path2;
    path2.conicTo(1, 2, 3, 4, .5f);
    iter.setPath(path2, true);
    debugster("conic closed", iter);
}
#StdOut
quad open:
kMove_Verb {0, 0},
kQuad_Verb {0, 0}, {10, 20}, {30, 40},
kDone_Verb

conic closed:
kMove_Verb {0, 0},
kConic_Verb {0, 0}, {1, 2}, {3, 4}, weight = 0.5
kLine_Verb {3, 4}, {0, 0},
kClose_Verb {0, 0},
kDone_Verb
##
##

#SeeAlso Iter(const SkPath& path, bool forceClose)

##

#Method Verb next(SkPoint pts[4], bool doConsumeDegenerates = true, bool exact = false)
#Line # returns next Verb ##
#Populate

#Example
#Description
skip degenerate skips the first in a kMove_Verb pair, the kMove_Verb
followed by the kClose_Verb, the zero length Line and the very small Line.

skip degenerate if exact skips the same as skip degenerate, but shows
the very small Line.

skip none shows all of the Verbs and Points in Path.
##
void draw(SkCanvas* canvas) {
    auto debugster = [](const char* prefix, const SkPath& path, bool degen, bool exact) -> void {
        SkPath::Iter iter(path, false);
        SkDebugf("%s:\n", prefix);
        const char* verbStr[] =  { "Move", "Line", "Quad", "Conic", "Cubic", "Close", "Done" };
        const int pointCount[] = {     1 ,     2 ,     3 ,      3 ,      4 ,      1 ,     0  };
        SkPath::Verb verb;
        do {
           SkPoint points[4];
           verb = iter.next(points, degen, exact);
           SkDebugf("k%s_Verb ", verbStr[(int) verb]);
           for (int i = 0; i < pointCount[(int) verb]; ++i) {
                SkDebugf("{%1.8g, %1.8g}, ", points[i].fX, points[i].fY);
           }
           SkDebugf("\n");
        } while (SkPath::kDone_Verb != verb);
        SkDebugf("\n");
    };

    SkPath path;
    path.moveTo(10, 10);
    path.moveTo(20, 20);
    path.quadTo(10, 20, 30, 40);
    path.moveTo(1, 1);
    path.close();
    path.moveTo(30, 30);
    path.lineTo(30, 30);
    path.moveTo(30, 30);
    path.lineTo(30.00001f, 30);
    debugster("skip degenerate", path, true, false);
    debugster("skip degenerate if exact", path, true, true);
    debugster("skip none", path, false, false);
}
#StdOut
skip degenerate:
kMove_Verb {20, 20},
kQuad_Verb {20, 20}, {10, 20}, {30, 40},
kDone_Verb

skip degenerate if exact:
kMove_Verb {20, 20},
kQuad_Verb {20, 20}, {10, 20}, {30, 40},
kMove_Verb {30, 30},
kLine_Verb {30, 30}, {30.00001, 30},
kDone_Verb

skip none:
kMove_Verb {10, 10},
kMove_Verb {20, 20},
kQuad_Verb {20, 20}, {10, 20}, {30, 40},
kMove_Verb {1, 1},
kClose_Verb {1, 1},
kMove_Verb {30, 30},
kLine_Verb {30, 30}, {30, 30},
kMove_Verb {30, 30},
kLine_Verb {30, 30}, {30.00001, 30},
kDone_Verb
##
##

#SeeAlso Verb IsLineDegenerate IsCubicDegenerate IsQuadDegenerate

##

#Method SkScalar conicWeight() const
#Line # returns Conic_Weight ##
#Populate

#Example
    void draw(SkCanvas* canvas) {
       SkPath path;
       path.conicTo(1, 2, 3, 4, .5f);
       SkPath::Iter iter(path, false);
       SkPoint p[4];
       SkDebugf("first verb is " "%s" "move\n", SkPath::kMove_Verb == iter.next(p) ? "" : "not ");
       SkDebugf("next verb is " "%s" "conic\n", SkPath::kConic_Verb == iter.next(p) ? "" : "not ");
       SkDebugf("conic points: {%g,%g}, {%g,%g}, {%g,%g}\n", p[0].fX, p[0].fY, p[1].fX, p[1].fY,
                    p[2].fX, p[2].fY);
       SkDebugf("conic weight: %g\n", iter.conicWeight());
    }
    #StdOut
first verb is move
next verb is conic
conic points: {0,0}, {1,2}, {3,4}
conic weight: 0.5
    ##
    ##

    #SeeAlso Conic_Weight

##

#Method bool isCloseLine() const
#Line # returns if Line was generated by kClose_Verb ##
#Populate

#Example
void draw(SkCanvas* canvas) {
   SkPath path;
   path.moveTo(6, 7);
   path.conicTo(1, 2, 3, 4, .5f);
   path.close();
   SkPath::Iter iter(path, false);
   SkPoint p[4];
   SkDebugf("1st verb is " "%s" "move\n", SkPath::kMove_Verb == iter.next(p) ? "" : "not ");
   SkDebugf("moveTo point: {%g,%g}\n", p[0].fX, p[0].fY);
   SkDebugf("2nd verb is " "%s" "conic\n", SkPath::kConic_Verb == iter.next(p) ? "" : "not ");
   SkDebugf("3rd verb is " "%s" "line\n", SkPath::kLine_Verb == iter.next(p) ? "" : "not ");
   SkDebugf("line points: {%g,%g}, {%g,%g}\n", p[0].fX, p[0].fY, p[1].fX, p[1].fY);
   SkDebugf("line " "%s" "generated by close\n", iter.isCloseLine() ? "" : "not ");
   SkDebugf("4th verb is " "%s" "close\n", SkPath::kClose_Verb == iter.next(p) ? "" : "not ");
}
    #StdOut
1st verb is move
moveTo point: {6,7}
2nd verb is conic
3rd verb is line
line points: {3,4}, {6,7}
line generated by close
4th verb is close
    ##
    ##

    #SeeAlso close()
##

#Method bool isClosedContour() const
#Line # returns if Contour has kClose_Verb ##
#Populate

#Example
void draw(SkCanvas* canvas) {
   for (bool forceClose : { false, true } ) {
       SkPath path;
       path.conicTo(1, 2, 3, 4, .5f);
       SkPath::Iter iter(path, forceClose);
       SkDebugf("without close(), forceClose is %s: isClosedContour returns %s\n",
           forceClose ? "true " : "false", iter.isClosedContour() ? "true" : "false");
       path.close();
       iter.setPath(path, forceClose);
       SkDebugf("with close(),    forceClose is %s: isClosedContour returns %s\n",
           forceClose ? "true " : "false", iter.isClosedContour() ? "true" : "false");
    }
}
#StdOut
without close(), forceClose is false: isClosedContour returns false
with close(),    forceClose is false: isClosedContour returns true
without close(), forceClose is true : isClosedContour returns true
with close(),    forceClose is true : isClosedContour returns true
##
##

#SeeAlso Iter(const SkPath& path, bool forceClose)

##

#Class Iter ##

#Class RawIter
#Line # raw data iterator ##

#Code
#Populate
##

Iterates through Verb_Array, and associated Point_Array and Conic_Weight.
Verb_Array, Point_Array, and Conic_Weight are returned unaltered.


    #Method RawIter()
    #Line # constructs empty Path iterator ##
#Populate

#NoExample
        ##
    ##

    #Method RawIter(const SkPath& path)
    #Line # constructs with Path to iterate over ##
#Populate

#NoExample
        ##
    ##

    #Method void setPath(const SkPath& path)
    #Line # sets Path to iterate over ##
#Populate

#NoExample
        ##
   ##

    #Method Verb next(SkPoint pts[4])
    #Line # returns next Verb and associated Points ##
#Populate

#Example
        void draw(SkCanvas* canvas) {
            SkPath path;
            path.moveTo(50, 60);
            path.quadTo(10, 20, 30, 40);
            path.close();
            path.lineTo(30, 30);
            path.conicTo(1, 2, 3, 4, .5f);
            path.cubicTo(-1, -2, -3, -4, -5, -6);
            SkPath::RawIter iter(path);
            const char* verbStr[] =  { "Move", "Line", "Quad", "Conic", "Cubic", "Close", "Done" };
            const int pointCount[] = {     1 ,     2 ,     3 ,      3 ,      4 ,      1 ,     0  };
            SkPath::Verb verb;
            do {
                SkPoint points[4];
                verb = iter.next(points);
                SkDebugf("k%s_Verb ", verbStr[(int) verb]);
                for (int i = 0; i < pointCount[(int) verb]; ++i) {
                    SkDebugf("{%1.8g, %1.8g}, ", points[i].fX, points[i].fY);
                }
                if (SkPath::kConic_Verb == verb) {
                    SkDebugf("weight = %g", iter.conicWeight());
                }
                SkDebugf("\n");
            } while (SkPath::kDone_Verb != verb);
        }
    #StdOut
        kMove_Verb {50, 60},
        kQuad_Verb {50, 60}, {10, 20}, {30, 40},
        kClose_Verb {50, 60},
        kMove_Verb {50, 60},
        kLine_Verb {50, 60}, {30, 30},
        kConic_Verb {30, 30}, {1, 2}, {3, 4}, weight = 0.5
        kCubic_Verb {3, 4}, {-1, -2}, {-3, -4}, {-5, -6},
        kDone_Verb
    ##
    ##

    #SeeAlso peek()

    ##

    #Method Verb peek() const
    #Line # returns next Verb ##
    #Populate

        #Example
            SkPath path;
            path.quadTo(10, 20, 30, 40);
            path.conicTo(1, 2, 3, 4, .5f);
            path.cubicTo(1, 2, 3, 4, .5, 6);
            SkPath::RawIter iter(path);
            SkPath::Verb verb, peek = iter.peek();
            const char* verbStr[] =  { "Move", "Line", "Quad", "Conic", "Cubic", "Close", "Done" };
            do {
                SkPoint points[4];
                verb = iter.next(points);
                SkDebugf("peek %s %c= verb %s\n", verbStr[peek], peek == verb ? '=' : '!', verbStr[verb]);
                peek = iter.peek();
            } while (SkPath::kDone_Verb != verb);
            SkDebugf("peek %s %c= verb %s\n", verbStr[peek], peek == verb ? '=' : '!', verbStr[verb]);
            #StdOut
                #Volatile
                peek Move == verb Move
                peek Quad == verb Quad
                peek Conic == verb Conic
                peek Cubic == verb Cubic
                peek Done == verb Done
                peek Done == verb Done
            ##
        ##

        #Bug 6832
        # StdOut is not really volatile, it just produces the wrong result.
        # A simple fix changes the output of hairlines and needs to be
        # investigated to see if the change is correct or not.
        # see change 21340 (abandoned for now)

        #SeeAlso next

    ##

    #Method SkScalar conicWeight() const
    #Line # returns Conic_Weight ##
#Populate

#Example
    void draw(SkCanvas* canvas) {
       SkPath path;
       path.conicTo(1, 2, 3, 4, .5f);
       SkPath::RawIter iter(path);
       SkPoint p[4];
       SkDebugf("first verb is " "%s" "move\n", SkPath::kMove_Verb == iter.next(p) ? "" : "not ");
       SkDebugf("next verb is " "%s" "conic\n", SkPath::kConic_Verb == iter.next(p) ? "" : "not ");
       SkDebugf("conic points: {%g,%g}, {%g,%g}, {%g,%g}\n", p[0].fX, p[0].fY, p[1].fX, p[1].fY,
                    p[2].fX, p[2].fY);
       SkDebugf("conic weight: %g\n", iter.conicWeight());
    }
    #StdOut
        first verb is move
        next verb is conic
        conic points: {0,0}, {1,2}, {3,4}
        conic weight: 0.5
    ##
    ##

    #SeeAlso Conic_Weight

    ##

#Class RawIter ##

#Class SkPath ##

#Topic Path ##