ohos-native-drawing-sys 0.2.1

OpenHarmony's native drawing sys for rust
Documentation
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
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
/* automatically generated by rust-bindgen 0.65.1 */

#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(clippy::missing_safety_doc)]

#[allow(unused_imports)]
use ohos_image_native_sys::*;
use ohos_image_sys::*;

#[link(name = "native_drawing")]
unsafe extern "C" {}

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Canvas {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Pen {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Region {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Brush {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Path {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_PathIterator {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Lattice {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Bitmap {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Point {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_PixelMap {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_ColorSpace {
    _unused: [u8; 0],
}
#[doc = " @brief Defines a point of 2d.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Point2D {
    pub x: f32,
    pub y: f32,
}
#[doc = " @brief Defines a corner radii, which is on x-axis and y-axis.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_Corner_Radii = OH_Drawing_Point2D;
#[doc = " @brief Defines a point of 3d, which is used to describe the coordinate point.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Point3D {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_PathEffect {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Rect {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RoundRect {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Matrix {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_ShaderEffect {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_ShadowLayer {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Filter {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_MaskFilter {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_ColorFilter {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Font {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFeatures {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_MemoryStream {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontArguments {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Typeface {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextBlob {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Image {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_ImageFilter {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_SamplingOptions {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextBlobBuilder {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_GpuContext {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Surface {
    _unused: [u8; 0],
}
#[doc = " Unknown format."]
pub const OH_Drawing_ColorFormat_COLOR_FORMAT_UNKNOWN: OH_Drawing_ColorFormat = 0;
#[doc = " Each pixel is represented by 8 bits, which together indicate alpha."]
pub const OH_Drawing_ColorFormat_COLOR_FORMAT_ALPHA_8: OH_Drawing_ColorFormat = 1;
#[doc = " Each pixel is represented by 16 bits. From the most significant bit to the least significant bit,\n the first 5 bits indicate red, the subsequent 6 bits indicate green, and the last 5 bits indicate blue."]
pub const OH_Drawing_ColorFormat_COLOR_FORMAT_RGB_565: OH_Drawing_ColorFormat = 2;
#[doc = " Each pixel is represented by 16 bits. From the most significant bit to the least significant bit,\n every 4 bits indicate alpha, red, green, and blue, respectively."]
pub const OH_Drawing_ColorFormat_COLOR_FORMAT_ARGB_4444: OH_Drawing_ColorFormat = 3;
#[doc = " Each pixel is represented by 32 bits. From the most significant bit to the least significant bit,\n every 8 bits indicate alpha, red, green, and blue, respectively."]
pub const OH_Drawing_ColorFormat_COLOR_FORMAT_RGBA_8888: OH_Drawing_ColorFormat = 4;
#[doc = " Each pixel is represented by 32 bits. From the most significant bit to the least significant bit,\n every 8 bits indicate blue, green, red, and alpha, respectively."]
pub const OH_Drawing_ColorFormat_COLOR_FORMAT_BGRA_8888: OH_Drawing_ColorFormat = 5;
#[doc = " @brief Enumerates storage formats of bitmap pixels.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_ColorFormat = u32;
#[doc = " Unknown format."]
pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNKNOWN: OH_Drawing_AlphaFormat = 0;
#[doc = " The bitmap does not have the alpha component."]
pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_OPAQUE: OH_Drawing_AlphaFormat = 1;
#[doc = " The color component of each pixel is premultiplied by the alpha component."]
pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_PREMUL: OH_Drawing_AlphaFormat = 2;
#[doc = " The color component of each pixel is not premultiplied by the alpha component."]
pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNPREMUL: OH_Drawing_AlphaFormat = 3;
#[doc = " @brief Enumerates alpha formats of bitmap pixels.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_AlphaFormat = u32;
#[doc = " r = 0."]
pub const OH_Drawing_BlendMode_BLEND_MODE_CLEAR: OH_Drawing_BlendMode = 0;
#[doc = " r = s."]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC: OH_Drawing_BlendMode = 1;
#[doc = " r = d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST: OH_Drawing_BlendMode = 2;
#[doc = " r = s + (1-sa)*d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_OVER: OH_Drawing_BlendMode = 3;
#[doc = " r = d + (1-da)*s."]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST_OVER: OH_Drawing_BlendMode = 4;
#[doc = " r = s * da."]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_IN: OH_Drawing_BlendMode = 5;
#[doc = " r = d * sa."]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST_IN: OH_Drawing_BlendMode = 6;
#[doc = " r = s * (1-da)."]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_OUT: OH_Drawing_BlendMode = 7;
#[doc = " r = d * (1-sa)."]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST_OUT: OH_Drawing_BlendMode = 8;
#[doc = " r = s*da + d*(1-sa)."]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_ATOP: OH_Drawing_BlendMode = 9;
#[doc = " r = d*sa + s*(1-da)."]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST_ATOP: OH_Drawing_BlendMode = 10;
#[doc = " r = s*(1-da) + d*(1-sa)."]
pub const OH_Drawing_BlendMode_BLEND_MODE_XOR: OH_Drawing_BlendMode = 11;
#[doc = " r = min(s + d, 1)."]
pub const OH_Drawing_BlendMode_BLEND_MODE_PLUS: OH_Drawing_BlendMode = 12;
#[doc = " r = s*d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_MODULATE: OH_Drawing_BlendMode = 13;
#[doc = " r = s + d - s*d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_SCREEN: OH_Drawing_BlendMode = 14;
#[doc = " multiply or screen, depending on destination."]
pub const OH_Drawing_BlendMode_BLEND_MODE_OVERLAY: OH_Drawing_BlendMode = 15;
#[doc = " rc = s + d - max(s*da, d*sa), ra = s + (1-sa)*d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_DARKEN: OH_Drawing_BlendMode = 16;
#[doc = " rc = s + d - min(s*da, d*sa), ra = s + (1-sa)*d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_LIGHTEN: OH_Drawing_BlendMode = 17;
#[doc = " brighten destination to reflect source."]
pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR_DODGE: OH_Drawing_BlendMode = 18;
#[doc = " darken destination to reflect source."]
pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR_BURN: OH_Drawing_BlendMode = 19;
#[doc = " multiply or screen, depending on source."]
pub const OH_Drawing_BlendMode_BLEND_MODE_HARD_LIGHT: OH_Drawing_BlendMode = 20;
#[doc = " lighten or darken, depending on source."]
pub const OH_Drawing_BlendMode_BLEND_MODE_SOFT_LIGHT: OH_Drawing_BlendMode = 21;
#[doc = " rc = s + d - 2*(min(s*da, d*sa)), ra = s + (1-sa)*d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_DIFFERENCE: OH_Drawing_BlendMode = 22;
#[doc = " rc = s + d - two(s*d), ra = s + (1-sa)*d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_EXCLUSION: OH_Drawing_BlendMode = 23;
#[doc = " r = s*(1-da) + d*(1-sa) + s*d."]
pub const OH_Drawing_BlendMode_BLEND_MODE_MULTIPLY: OH_Drawing_BlendMode = 24;
#[doc = " hue of source with saturation and luminosity of destination."]
pub const OH_Drawing_BlendMode_BLEND_MODE_HUE: OH_Drawing_BlendMode = 25;
#[doc = " saturation of source with hue and luminosity of destination."]
pub const OH_Drawing_BlendMode_BLEND_MODE_SATURATION: OH_Drawing_BlendMode = 26;
#[doc = " hue and saturation of source with luminosity of destination."]
pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR: OH_Drawing_BlendMode = 27;
#[doc = " luminosity of source with hue and saturation of destination."]
pub const OH_Drawing_BlendMode_BLEND_MODE_LUMINOSITY: OH_Drawing_BlendMode = 28;
#[doc = " @brief The blending operation generates a new color for the two colors (source, destination).\n These operations are the same on the 4 color channels: red, green, blue, alpha.\n For these, we use alpha channel as an example, rather than naming each channel individually.\n\n For brevity, we use the following abbreviations.\n s  : source\n d  : destination\n sa : source alpha\n da : destination alpha\n\n Results are abbreviated\n r  : if all 4 channels are computed in the same manner\n ra : result alpha channel\n rc : result \"color\": red, green, blue channels\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_BlendMode = u32;
#[doc = " @brief Defines image info struct.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Image_Info {
    #[doc = " storage for width of image"]
    pub width: i32,
    #[doc = " storage for height of image"]
    pub height: i32,
    #[doc = " storage for color formats"]
    pub colorType: OH_Drawing_ColorFormat,
    #[doc = " storage for alpha formats"]
    pub alphaType: OH_Drawing_AlphaFormat,
}
#[doc = " @brief Defines rectstyle info struct.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RectStyle_Info {
    #[doc = " color of rectstyle"]
    pub color: u32,
    #[doc = " radius in left top of rectstyle"]
    pub leftTopRadius: f64,
    #[doc = " radius in right top of rectstyle"]
    pub rightTopRadius: f64,
    #[doc = " radius in right bottom of rectstyle"]
    pub rightBottomRadius: f64,
    #[doc = " radius in left bottom of rectstyle"]
    pub leftBottomRadius: f64,
}
#[doc = " @brief Defines the string information struct.\n\n @since 14\n @version 1.0"]
#[cfg(feature = "api-14")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_String {
    #[doc = " A pointer to a byte string containing UTF-16 encoded entities"]
    pub strData: *mut u8,
    #[doc = " The length of `strData` in bytes"]
    pub strLen: u32,
}
#[doc = " uses bytes to represent UTF-8 or ASCII"]
pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF8: OH_Drawing_TextEncoding = 0;
#[doc = " uses two byte words to represent most of Unicode"]
pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF16: OH_Drawing_TextEncoding = 1;
#[doc = " uses four byte words to represent all of Unicode"]
pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF32: OH_Drawing_TextEncoding = 2;
#[doc = " uses two byte words to represent glyph indices"]
pub const OH_Drawing_TextEncoding_TEXT_ENCODING_GLYPH_ID: OH_Drawing_TextEncoding = 3;
#[doc = " @brief Enumerates text encoding types.\n @since 12\n @version 1.0"]
pub type OH_Drawing_TextEncoding = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontMgr {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontStyleSet {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RecordCmdUtils {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RecordCmd {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Array {
    _unused: [u8; 0],
}
#[doc = " @brief Defines the pixel format of a bitmap, including the color type and alpha type.\n\n @since 8\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_BitmapFormat {
    #[doc = " Storage format of bitmap pixels"]
    pub colorFormat: OH_Drawing_ColorFormat,
    #[doc = " Alpha format of bitmap pixels"]
    pub alphaFormat: OH_Drawing_AlphaFormat,
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Bitmap</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Bitmap</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BitmapCreate() -> *mut OH_Drawing_Bitmap;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Bitmap</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BitmapDestroy(bitmap: *mut OH_Drawing_Bitmap);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Bitmap</b> object with <b>OH_Drawing_Image_Info</b> object\n and sets the mem address or pixel storage.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @param pixels the pointer to memory address or pixel storage.\n @param rowBytes size of pixel row or larger.\n @return Returns the pointer to the <b>OH_Drawing_Bitmap</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BitmapCreateFromPixels(
        imageInfo: *mut OH_Drawing_Image_Info,
        pixels: *mut ::std::os::raw::c_void,
        rowBytes: u32,
    ) -> *mut OH_Drawing_Bitmap;
}
extern "C" {
    #[doc = " @brief Initializes the width and height of an <b>OH_Drawing_Bitmap</b> object\n and sets the pixel format for the bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param width Indicates the width of the bitmap to be initialized.\n @param height Indicates the height of the bitmap to be initialized.\n @param bitmapFormat Indicates the pixel format of the bitmap to be initialized,\n                                including the pixel color type and alpha type.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BitmapBuild(
        bitmap: *mut OH_Drawing_Bitmap,
        width: u32,
        height: u32,
        bitmapFormat: *const OH_Drawing_BitmapFormat,
    );
}
extern "C" {
    #[doc = " @brief Obtains the width of a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the width.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BitmapGetWidth(bitmap: *mut OH_Drawing_Bitmap) -> u32;
}
extern "C" {
    #[doc = " @brief Obtains the height of a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the height.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BitmapGetHeight(bitmap: *mut OH_Drawing_Bitmap) -> u32;
}
extern "C" {
    #[doc = " @brief Obtains the color format of a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the bitmap color format.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BitmapGetColorFormat(
        bitmap: *mut OH_Drawing_Bitmap,
    ) -> OH_Drawing_ColorFormat;
}
extern "C" {
    #[doc = " @brief Obtains the alpha format of a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the bitmap alpha format.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BitmapGetAlphaFormat(
        bitmap: *mut OH_Drawing_Bitmap,
    ) -> OH_Drawing_AlphaFormat;
}
extern "C" {
    #[doc = " @brief Obtains the pixel address of a bitmap. You can use this address to obtain the pixel data of the bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the pixel address.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BitmapGetPixels(
        bitmap: *mut OH_Drawing_Bitmap,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " @brief Gets the image info.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BitmapGetImageInfo(
        bitmap: *mut OH_Drawing_Bitmap,
        imageInfo: *mut OH_Drawing_Image_Info,
    );
}
extern "C" {
    #[doc = " @brief Copies a rect of pixels from bitmap to dstPixels. Copy starts at (srcX, srcY),\n and does not exceed bitmap width and height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param dstInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @param dstPixels Destination pixel storage.\n @param dstRowBytes Destination row length.\n @param srcX Column index whose absolute value is less than width.\n @param srcY Row index whose absolute value is less than height.\n @return Returns true if pixels are copied to dstPixels.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BitmapReadPixels(
        bitmap: *mut OH_Drawing_Bitmap,
        dstInfo: *const OH_Drawing_Image_Info,
        dstPixels: *mut ::std::os::raw::c_void,
        dstRowBytes: usize,
        srcX: i32,
        srcY: i32,
    ) -> bool;
}
#[doc = " @error Operation completed successfully."]
pub const OH_Drawing_ErrorCode_OH_DRAWING_SUCCESS: OH_Drawing_ErrorCode = 0;
#[doc = " @error Permission verification failed."]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_NO_PERMISSION: OH_Drawing_ErrorCode = 201;
#[doc = " @error Invalid input parameter. For example, the pointer in the parameter is a nullptr."]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INVALID_PARAMETER: OH_Drawing_ErrorCode = 401;
#[doc = " @error The parameter is not in the valid range."]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE: OH_Drawing_ErrorCode =
    26200001;
#[doc = " @error mem allocate failed.\n @since 13"]
#[cfg(feature = "api-13")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_ALLOCATION_FAILED: OH_Drawing_ErrorCode = 26200002;
#[doc = " @error The attribute id is not recognized or supported.\n @since 21"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH: OH_Drawing_ErrorCode =
    26200003;
#[doc = " @error incorrect input parameter. The possible cause is that the provided pointer is null.\n @since 22"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INCORRECT_PARAMETER: OH_Drawing_ErrorCode =
    26200004;
#[doc = " @error File not found. The specified file does not exist or the path is incorrect..\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_NOT_FOUND: OH_Drawing_ErrorCode = 26200005;
#[doc = " @error Failed to open the file. The file cannot be opened due to permission or I/O issues.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_OPEN_FILE_FAILED: OH_Drawing_ErrorCode = 26200006;
#[doc = " @error File seek failed. The system failed to reposition the file read pointer..\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_SEEK_FAILED: OH_Drawing_ErrorCode = 26200007;
#[doc = " @error Failed to get the file size. The system was unable to obtain the file size information.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_GET_FILE_SIZE_FAILED: OH_Drawing_ErrorCode =
    26200008;
#[doc = " @error Failed to read the file. The file could not be read completely or contains unreadable data.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_READ_FILE_FAILED: OH_Drawing_ErrorCode = 26200009;
#[doc = " @error Empty file. The specified file is empty and contains no valid data.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_EMPTY_FILE: OH_Drawing_ErrorCode = 26200010;
#[doc = " @error Corrupted file. The file content is invalid or damaged and cannot be parsed.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_CORRUPTED: OH_Drawing_ErrorCode = 26200011;
#[doc = " @brief Enumerates error codes of drawing.\n @since 12"]
pub type OH_Drawing_ErrorCode = u32;
extern "C" {
    #[doc = " @brief Obtains the error code of the drawing module.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the error code.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ErrorCodeGet() -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Resets the error code of the drawing module to OH_DRAWING_SUCCESS.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_ErrorCodeReset();
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Brush</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Brush</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BrushCreate() -> *mut OH_Drawing_Brush;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Brush</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Brush</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty or a nullptr is passed.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BrushCopy(brush: *mut OH_Drawing_Brush) -> *mut OH_Drawing_Brush;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Brush</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BrushDestroy(brush: *mut OH_Drawing_Brush);
}
extern "C" {
    #[doc = " @brief Checks whether anti-aliasing is enabled for a brush. If anti-aliasing is enabled,\n edges will be drawn with partial transparency.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @return Returns <b>true</b> if anti-aliasing is enabled; returns <b>false</b> otherwise.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BrushIsAntiAlias(brush: *const OH_Drawing_Brush) -> bool;
}
extern "C" {
    #[doc = " @brief Enables or disables anti-aliasing for a brush. If anti-aliasing is enabled,\n edges will be drawn with partial transparency.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param antiAlias Specifies whether to enable anti-aliasing. The value <b>true</b> means\n             to enable anti-aliasing, and <b>false</b> means the opposite.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BrushSetAntiAlias(brush: *mut OH_Drawing_Brush, antiAlias: bool);
}
extern "C" {
    #[doc = " @brief Obtains the color of a brush. The color is used by the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @return Returns a 32-bit (ARGB) variable that describes the color.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BrushGetColor(brush: *const OH_Drawing_Brush) -> u32;
}
extern "C" {
    #[doc = " @brief Sets the color for a brush. The color will be used by the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param color Indicates the color to set, which is a 32-bit (ARGB) variable.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BrushSetColor(brush: *mut OH_Drawing_Brush, color: u32);
}
extern "C" {
    #[doc = " @brief Obtains the alpha of a brush. The alpha is used by the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @return Returns a 8-bit variable that describes the alpha.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_BrushGetAlpha(brush: *const OH_Drawing_Brush) -> u8;
}
extern "C" {
    #[doc = " @brief Sets the alpha for a brush. The alpha will be used by the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param alpha Indicates the alpha to set, which is a 8-bit variable.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_BrushSetAlpha(brush: *mut OH_Drawing_Brush, alpha: u8);
}
extern "C" {
    #[doc = " @brief Sets the color for a brush. The color will be used by the brush to fill in a shape.\n The color is an ARGB structure described by floating point numbers and interpreted as being in the colorSpaceManager.\n If colorSpaceManager is nullptr, then color is assumed to be in the sRGB color space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param a Indicates the alpha component of color, represented as a floating point number between 0 and 1.\n @param r Indicates the red component of color, represented as a floating point number between 0 and 1.\n @param g Indicates the green component of color, represented as a floating point number between 0 and 1.\n @param b Indicates the blue component of color, represented as a floating point number between 0 and 1.\n @param colorSpaceManager Indicates the pointer to an <b>OH_NativeColorSpaceManager</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_BrushSetColor4f(
        brush: *mut OH_Drawing_Brush,
        a: f32,
        r: f32,
        g: f32,
        b: f32,
        colorSpaceManager: *mut OH_NativeColorSpaceManager,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the alpha component of a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param a Indicates the alpha component of color.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or a is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_BrushGetAlphaFloat(
        brush: *const OH_Drawing_Brush,
        a: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the red component of a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param r Indicates the red component of color.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or r is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_BrushGetRedFloat(
        brush: *const OH_Drawing_Brush,
        r: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the green component of a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param g Indicates the green component of color.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or g is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_BrushGetGreenFloat(
        brush: *const OH_Drawing_Brush,
        g: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the blue component of a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param b Indicates the blue component of color.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or b is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_BrushGetBlueFloat(
        brush: *const OH_Drawing_Brush,
        b: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the shaderEffect for a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_BrushSetShaderEffect(
        brush: *mut OH_Drawing_Brush,
        shaderEffect: *mut OH_Drawing_ShaderEffect,
    );
}
extern "C" {
    #[doc = " @brief Sets the shadowLayer for a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BrushSetShadowLayer(
        brush: *mut OH_Drawing_Brush,
        shadowLayer: *mut OH_Drawing_ShadowLayer,
    );
}
extern "C" {
    #[doc = " @brief Sets the filter for a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_BrushSetFilter(brush: *mut OH_Drawing_Brush, filter: *mut OH_Drawing_Filter);
}
extern "C" {
    #[doc = " @brief Gets the filter from a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BrushGetFilter(brush: *mut OH_Drawing_Brush, filter: *mut OH_Drawing_Filter);
}
extern "C" {
    #[doc = " @brief Sets a blender that implements the specified blendmode enum for a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param blendMode Indicates the blend mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BrushSetBlendMode(
        brush: *mut OH_Drawing_Brush,
        blendMode: OH_Drawing_BlendMode,
    );
}
extern "C" {
    #[doc = " @brief Resets all brush contents to their initial values.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BrushReset(brush: *mut OH_Drawing_Brush);
}
#[doc = " single sample point (nearest neighbor)"]
pub const OH_Drawing_FilterMode_FILTER_MODE_NEAREST: OH_Drawing_FilterMode = 0;
#[doc = " interporate between 2x2 sample points (bilinear interpolation)"]
pub const OH_Drawing_FilterMode_FILTER_MODE_LINEAR: OH_Drawing_FilterMode = 1;
#[doc = " @brief Enumerates storage filter mode.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FilterMode = u32;
#[doc = " ignore mipmap levels, sample from the \"base\""]
pub const OH_Drawing_MipmapMode_MIPMAP_MODE_NONE: OH_Drawing_MipmapMode = 0;
#[doc = " sample from the nearest level"]
pub const OH_Drawing_MipmapMode_MIPMAP_MODE_NEAREST: OH_Drawing_MipmapMode = 1;
#[doc = " interpolate between the two nearest levels"]
pub const OH_Drawing_MipmapMode_MIPMAP_MODE_LINEAR: OH_Drawing_MipmapMode = 2;
#[doc = " @brief Enumerates storage formats mipmap mode.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_MipmapMode = u32;
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_SamplingOptions</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filterMode sampling filter mode.\n @param mipmapMode sampling mipmap mode..\n @return Returns the pointer to the <b>OH_Drawing_SamplingOptions</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SamplingOptionsCreate(
        filterMode: OH_Drawing_FilterMode,
        mipmapMode: OH_Drawing_MipmapMode,
    ) -> *mut OH_Drawing_SamplingOptions;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_SamplingOptions</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @return Returns the pointer to the <b>OH_Drawing_SamplingOptions</b> object created.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SamplingOptionsCopy(
        samplingOptions: *mut OH_Drawing_SamplingOptions,
    ) -> *mut OH_Drawing_SamplingOptions;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_SamplingOptions</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SamplingOptionsDestroy(samplingOptions: *mut OH_Drawing_SamplingOptions);
}
#[doc = " Using sampling only inside bounds in a slower manner."]
pub const OH_Drawing_SrcRectConstraint_STRICT_SRC_RECT_CONSTRAINT: OH_Drawing_SrcRectConstraint = 0;
#[doc = " Using sampling outside bounds in a faster manner."]
pub const OH_Drawing_SrcRectConstraint_FAST_SRC_RECT_CONSTRAINT: OH_Drawing_SrcRectConstraint = 1;
#[doc = " @brief Enumeration defines the constraint type.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_SrcRectConstraint = u32;
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Canvas</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Canvas</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasCreate() -> *mut OH_Drawing_Canvas;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Canvas</b> object from <b>OH_Drawing_PixelMap</b>.\n The OH_Drawing_PixelMap should be dissolved by OH_Drawing_PixelMapDissolve after the OH_Drawing_Canvas is destroyed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Canvas</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty or pixelMap is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_CanvasCreateWithPixelMap(
        pixelMap: *mut OH_Drawing_PixelMap,
    ) -> *mut OH_Drawing_Canvas;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Canvas</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasDestroy(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Binds a bitmap to a canvas so that the content drawn on the canvas\n is output to the bitmap (this process is called CPU rendering).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasBind(canvas: *mut OH_Drawing_Canvas, bitmap: *mut OH_Drawing_Bitmap);
}
extern "C" {
    #[doc = " @brief Attaches a pen to a canvas so that the canvas will use the style and color of the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasAttachPen(canvas: *mut OH_Drawing_Canvas, pen: *const OH_Drawing_Pen);
}
extern "C" {
    #[doc = " @brief Detaches the pen from a canvas so that the canvas will not use the style\n and color of the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasDetachPen(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Attaches a brush to a canvas so that the canvas will use the style and color of the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasAttachBrush(
        canvas: *mut OH_Drawing_Canvas,
        brush: *const OH_Drawing_Brush,
    );
}
extern "C" {
    #[doc = " @brief Detaches the brush from a canvas so that the canvas will not use the style\n and color of the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasDetachBrush(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Saves the current canvas status (canvas matrix) to the top of the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasSave(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Saves matrix and clip, and allocates a bitmap for subsequent drawing.\n Calling restore discards changes to matrix and clip, and draws the bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasSaveLayer(
        canvas: *mut OH_Drawing_Canvas,
        rect: *const OH_Drawing_Rect,
        brush: *const OH_Drawing_Brush,
    );
}
extern "C" {
    #[doc = " @brief Restores the canvas status (canvas matrix) saved on the top of the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasRestore(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Gets the number of the canvas status (canvas matrix) saved in the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @return Returns a 32-bit variable that describes the number of canvas status.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetSaveCount(canvas: *mut OH_Drawing_Canvas) -> u32;
}
extern "C" {
    #[doc = " @brief Restores the specific number of the canvas status (canvas matrix) saved in the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param saveCount Indicates the specific number of canvas status.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasRestoreToCount(canvas: *mut OH_Drawing_Canvas, saveCount: u32);
}
extern "C" {
    #[doc = " @brief Draws a line segment.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param x1 Indicates the x coordinate of the start point of the line segment.\n @param y1 Indicates the y coordinate of the start point of the line segment.\n @param x2 Indicates the x coordinate of the end point of the line segment.\n @param y2 Indicates the y coordinate of the end point of the line segment.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawLine(
        canvas: *mut OH_Drawing_Canvas,
        x1: f32,
        y1: f32,
        x2: f32,
        y2: f32,
    );
}
extern "C" {
    #[doc = " @brief Draws a path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawPath(canvas: *mut OH_Drawing_Canvas, path: *const OH_Drawing_Path);
}
extern "C" {
    #[doc = " @brief Draw a pixel map on the grid, with the grid evenly distributed over the pixel map.\n\n @param cCanvas Indicates the pointer to an OH_Drawing_Canvas object.\n @param pixelMap Indicates the pointer to an OH_Drawing_PixelMap.\n @param meshWidth The number of columns in the mesh.\n @param meshHeight The number of rows in the mesh.\n @param vertices Indicates the vertex array that specifies the drawing positions of the mesh.\n @param verticesSize The size of vertices.\n @param vertOffset The number of vert elements to skip before drawing.\n @param colors Indicates the color array that specifies a color at each vertex.\n @param colorsSize The size of colors.\n @param colorOffset The number of color elements to skip before drawing.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if any of canvas, pixelMap\n                 and dst is nullptr.\n @since 23\n @version 1.0"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_CanvasDrawPixelMapMesh(
        cCanvas: *mut OH_Drawing_Canvas,
        pixelMap: *mut OH_Drawing_PixelMap,
        meshWidth: u32,
        meshHeight: u32,
        vertices: *const f32,
        verticesSize: u32,
        vertOffset: u32,
        colors: *const u32,
        colorsSize: u32,
        colorOffset: u32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Divides the pixelmap into a grid with nine sections: four sides, four corners, and the center.\n Draws the specified section of the pixelmap onto the canvas, corners are unmodified or scaled down if they exceed\n the destination rectangle, center and four sides are scaled to fit remaining space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @param center Divides the pixelmap into nine sections: four sides, four corners, and the center.\n @param dst The area of destination canvas.\n @param mode Filter mode.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, pixelMap\n                 and dst is nullptr.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CanvasDrawPixelMapNine(
        canvas: *mut OH_Drawing_Canvas,
        pixelMap: *mut OH_Drawing_PixelMap,
        center: *const OH_Drawing_Rect,
        dst: *const OH_Drawing_Rect,
        mode: OH_Drawing_FilterMode,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Draw the specified area of the Media::PixelMap to the specified area of the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @param src the area of source pixelmap.\n @param dst the area of destination canvas.\n @param samplingOptions the sampling mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawPixelMapRect(
        canvas: *mut OH_Drawing_Canvas,
        pixelMap: *mut OH_Drawing_PixelMap,
        src: *const OH_Drawing_Rect,
        dst: *const OH_Drawing_Rect,
        samplingOptions: *const OH_Drawing_SamplingOptions,
    );
}
extern "C" {
    #[doc = " @brief Draw the specified area of the Media::PixelMap to the specified area of the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @param src Indicates the area of source pixelmap.\n @param dst Indicates the area of destination canvas.\n @param samplingOptions Indicates the sampling mode.\n @param constraint Indicates constraint type.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, pixelMap\n                 and dst is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_CanvasDrawPixelMapRectConstraint(
        canvas: *mut OH_Drawing_Canvas,
        pixelMap: *mut OH_Drawing_PixelMap,
        src: *const OH_Drawing_Rect,
        dst: *const OH_Drawing_Rect,
        samplingOptions: *const OH_Drawing_SamplingOptions,
        constraint: OH_Drawing_SrcRectConstraint,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Fills clipped canvas area with brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawBackground(
        canvas: *mut OH_Drawing_Canvas,
        brush: *const OH_Drawing_Brush,
    );
}
extern "C" {
    #[doc = " @brief Draws region using clip, matrix and paint.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawRegion(
        canvas: *mut OH_Drawing_Canvas,
        region: *const OH_Drawing_Region,
    );
}
#[doc = " Draw each point separately."]
pub const OH_Drawing_PointMode_POINT_MODE_POINTS: OH_Drawing_PointMode = 0;
#[doc = " Draw each pair of points as a line segment."]
pub const OH_Drawing_PointMode_POINT_MODE_LINES: OH_Drawing_PointMode = 1;
#[doc = " Draw the array of points as a open polygon."]
pub const OH_Drawing_PointMode_POINT_MODE_POLYGON: OH_Drawing_PointMode = 2;
#[doc = " @brief Enumerates of scale to fit flags, selects if an array of points are drawn as discrete points, as lines,\n or as an open polygon.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PointMode = u32;
extern "C" {
    #[doc = " @brief Draws a point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or point is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawPoint(
        canvas: *mut OH_Drawing_Canvas,
        point: *const OH_Drawing_Point2D,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Draws point array as separate point, line segment or open polygon according to given point mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param mode Draw points enum.\n @param count The point count.\n @param point2D Point struct array.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawPoints(
        canvas: *mut OH_Drawing_Canvas,
        mode: OH_Drawing_PointMode,
        count: u32,
        point2D: *const OH_Drawing_Point2D,
    );
}
extern "C" {
    #[doc = " @brief Draws a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param left Indicates the left position of the <b>OH_Drawing_Bitmap</b>.\n @param top Indicates the top position of the <b>OH_Drawing_Bitmap</b>.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawBitmap(
        canvas: *mut OH_Drawing_Canvas,
        bitmap: *const OH_Drawing_Bitmap,
        left: f32,
        top: f32,
    );
}
extern "C" {
    #[doc = " @brief Draw the specified area of the bitmap to the specified area of the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param src the area of source bitmap, can be nullptr.\n @param dst the area of destination canvas.\n @param samplingOptions the sampling mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawBitmapRect(
        canvas: *mut OH_Drawing_Canvas,
        bitmap: *const OH_Drawing_Bitmap,
        src: *const OH_Drawing_Rect,
        dst: *const OH_Drawing_Rect,
        samplingOptions: *const OH_Drawing_SamplingOptions,
    );
}
extern "C" {
    #[doc = " @brief Draws a rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawRect(canvas: *mut OH_Drawing_Canvas, rect: *const OH_Drawing_Rect);
}
extern "C" {
    #[doc = " @brief Draws a circle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param radius Indicates the radius of the circle.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawCircle(
        canvas: *mut OH_Drawing_Canvas,
        point: *const OH_Drawing_Point,
        radius: f32,
    );
}
extern "C" {
    #[doc = " @brief Fills the entire canvas with the specified color and blend mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param color Indicates the color, which is a 32-bit variable.\n @param blendMode Indicates the blend mode.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawColor(
        canvas: *mut OH_Drawing_Canvas,
        color: u32,
        blendMode: OH_Drawing_BlendMode,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Draws an oval.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawOval(canvas: *mut OH_Drawing_Canvas, rect: *const OH_Drawing_Rect);
}
extern "C" {
    #[doc = " @brief Draws an arc.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param startAngle Indicates the startAngle of the arc.\n @param sweepAngle Indicates the sweepAngle of the arc.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawArc(
        canvas: *mut OH_Drawing_Canvas,
        rect: *const OH_Drawing_Rect,
        startAngle: f32,
        sweepAngle: f32,
    );
}
extern "C" {
    #[doc = " @brief Draws an arc with use center.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param startAngle Indicates the startAngle of the arc.\n @param sweepAngle Indicates the sweepAngle of the arc.\n @param useCenter If true, include the center of the oval in the arc, and close it if it is being stroked.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or rect is nullptr.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CanvasDrawArcWithCenter(
        canvas: *mut OH_Drawing_Canvas,
        rect: *const OH_Drawing_Rect,
        startAngle: f32,
        sweepAngle: f32,
        useCenter: bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Draws a roundrect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawRoundRect(
        canvas: *mut OH_Drawing_Canvas,
        roundRect: *const OH_Drawing_RoundRect,
    );
}
extern "C" {
    #[doc = " @brief Draw two nested rounded rectangles.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param outer Rounded rectangle object, representing the outer rounded rectangle boundary.\n @param inner Rounded rectangle object, representing the internal rounded rectangle boundary.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, outer\n                 and inner is nullptr.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CanvasDrawNestedRoundRect(
        canvas: *mut OH_Drawing_Canvas,
        outer: *const OH_Drawing_RoundRect,
        inner: *const OH_Drawing_RoundRect,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Draws a single character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param str Indicates the single character encoded in UTF-8.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param x Indicates the horizontal offset applied to the single character.\n @param y Indicates the vertical offset applied to the single character.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, str\n                 and font is nullptr or strlen(str) is 0.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawSingleCharacter(
        canvas: *mut OH_Drawing_Canvas,
        str_: *const ::std::os::raw::c_char,
        font: *const OH_Drawing_Font,
        x: f32,
        y: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Draws a single character with font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param str Indicates the single character encoded in UTF-8.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param x Indicates the horizontal offset applied to the single character.\n @param y Indicates the vertical offset applied to the single character.\n @param fontFeatures Indicates the pointer to an <b>OH_Drawing_FontFeatures</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, str, font\n                 or fontFeatures is nullptr, or if strlen(str) is 0.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_CanvasDrawSingleCharacterWithFeatures(
        canvas: *mut OH_Drawing_Canvas,
        str_: *const ::std::os::raw::c_char,
        font: *const OH_Drawing_Font,
        x: f32,
        y: f32,
        fontFeatures: *mut OH_Drawing_FontFeatures,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Draws a textblob.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.\n @param x Indicates the horizontal offset applied to blob.\n @param y Indicates the vertical offset applied to blob.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawTextBlob(
        canvas: *mut OH_Drawing_Canvas,
        textBlob: *const OH_Drawing_TextBlob,
        x: f32,
        y: f32,
    );
}
#[doc = " Clip with difference."]
pub const OH_Drawing_CanvasClipOp_DIFFERENCE: OH_Drawing_CanvasClipOp = 0;
#[doc = " Clip with intersection."]
pub const OH_Drawing_CanvasClipOp_INTERSECT: OH_Drawing_CanvasClipOp = 1;
#[doc = " @brief Enumerates clip op.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_CanvasClipOp = u32;
extern "C" {
    #[doc = " @brief Clip a rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param clipOp Indicates the operation to apply to clip.\n @param doAntiAlias Indicates whether clip operation requires anti-aliased.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasClipRect(
        canvas: *mut OH_Drawing_Canvas,
        rect: *const OH_Drawing_Rect,
        clipOp: OH_Drawing_CanvasClipOp,
        doAntiAlias: bool,
    );
}
extern "C" {
    #[doc = " @brief Clip a round rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @param clipOp Indicates the operation to apply to clip.\n @param doAntiAlias Indicates whether clip operation requires anti-aliased.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasClipRoundRect(
        canvas: *mut OH_Drawing_Canvas,
        roundRect: *const OH_Drawing_RoundRect,
        clipOp: OH_Drawing_CanvasClipOp,
        doAntiAlias: bool,
    );
}
extern "C" {
    #[doc = " @brief Clip a path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param clipOp Indicates the operation to apply to clip.\n @param doAntiAlias Indicates whether clip operation requires anti-aliased.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasClipPath(
        canvas: *mut OH_Drawing_Canvas,
        path: *const OH_Drawing_Path,
        clipOp: OH_Drawing_CanvasClipOp,
        doAntiAlias: bool,
    );
}
extern "C" {
    #[doc = " @brief Clips a region.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param clipOp To apply to clip.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or region is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasClipRegion(
        canvas: *mut OH_Drawing_Canvas,
        region: *const OH_Drawing_Region,
        clipOp: OH_Drawing_CanvasClipOp,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Rotates by degrees. Positive degrees rotates clockwise.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param degrees Indicates the amount to rotate, in degrees.\n @param px Indicates the x-axis value of the point to rotate about.\n @param py Indicates the y-axis value of the point to rotate about.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasRotate(canvas: *mut OH_Drawing_Canvas, degrees: f32, px: f32, py: f32);
}
extern "C" {
    #[doc = " @brief Translates by dx along the x-axis and dy along the y-axis.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param dx Indicates the distance to translate on x-axis.\n @param dy Indicates the distance to translate on y-axis.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasTranslate(canvas: *mut OH_Drawing_Canvas, dx: f32, dy: f32);
}
extern "C" {
    #[doc = " @brief Scales by sx on the x-axis and sy on the y-axis.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param sx Indicates the amount to scale on x-axis.\n @param sy Indicates the amount to scale on y-axis.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasScale(canvas: *mut OH_Drawing_Canvas, sx: f32, sy: f32);
}
extern "C" {
    #[doc = " @brief Skew by sx on the x-axis and sy on the y-axis.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param sx Indicates the amount to skew on x-axis.\n @param sy Indicates the amount to skew on y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasSkew(canvas: *mut OH_Drawing_Canvas, sx: f32, sy: f32);
}
extern "C" {
    #[doc = " @brief Get the width of a canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetWidth(canvas: *mut OH_Drawing_Canvas) -> i32;
}
extern "C" {
    #[doc = " @brief Get the height of a canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetHeight(canvas: *mut OH_Drawing_Canvas) -> i32;
}
extern "C" {
    #[doc = " @brief Get the bounds of clip of a canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetLocalClipBounds(
        canvas: *mut OH_Drawing_Canvas,
        rect: *mut OH_Drawing_Rect,
    );
}
extern "C" {
    #[doc = " @brief Get a 3x3 matrix of the transform from local coordinates to 'device'.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetTotalMatrix(
        canvas: *mut OH_Drawing_Canvas,
        matrix: *mut OH_Drawing_Matrix,
    );
}
extern "C" {
    #[doc = " @brief Use the passed matrix to transforming the geometry, then use existing matrix.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\n represents the matrix which is passed.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasConcatMatrix(
        canvas: *mut OH_Drawing_Canvas,
        matrix: *mut OH_Drawing_Matrix,
    );
}
#[doc = " Use no shadow flags."]
pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_NONE: OH_Drawing_CanvasShadowFlags = 0;
#[doc = " The occluding object is transparent."]
pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_TRANSPARENT_OCCLUDER:
    OH_Drawing_CanvasShadowFlags = 1;
#[doc = " No need to analyze shadows."]
pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_GEOMETRIC_ONLY: OH_Drawing_CanvasShadowFlags =
    2;
#[doc = " Use all shadow flags."]
pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_ALL: OH_Drawing_CanvasShadowFlags = 3;
#[doc = " @brief Enumerates of shadow flags.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_CanvasShadowFlags = u32;
extern "C" {
    #[doc = " @brief Use circular light to draw an offset spot shadow and outlining ambient shadow for the given path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object, use to generate shadows.\n @param planeParams Represents the value of the function which returns Z offset of the occluder from the\n canvas based on x and y.\n @param devLightPos Represents the position of the light relative to the canvas.\n @param lightRadius The radius of the circular light.\n @param ambientColor Ambient shadow's color.\n @param spotColor Spot shadow's color.\n @param flag Indicates the flag to control opaque occluder, shadow, and light position.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawShadow(
        canvas: *mut OH_Drawing_Canvas,
        path: *mut OH_Drawing_Path,
        planeParams: OH_Drawing_Point3D,
        devLightPos: OH_Drawing_Point3D,
        lightRadius: f32,
        ambientColor: u32,
        spotColor: u32,
        flag: OH_Drawing_CanvasShadowFlags,
    );
}
extern "C" {
    #[doc = " @brief Clears a canvas by using a specified color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param color Indicates the color, which is a 32-bit (ARGB) variable.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasClear(canvas: *mut OH_Drawing_Canvas, color: u32);
}
extern "C" {
    #[doc = " @brief Sets matrix of canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasSetMatrix(
        canvas: *mut OH_Drawing_Canvas,
        matrix: *mut OH_Drawing_Matrix,
    );
}
extern "C" {
    #[doc = " @brief Reset matrix to the idenmtity matrix, any prior matrix state is overwritten.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasResetMatrix(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Draws the specified source rectangle of the image onto the canvas,\n scaled and translated to the destination rectangle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param src The area of source image.\n @param dst The area of destination canvas.\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @param srcRectConstraint Constraint type.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawImageRectWithSrc(
        canvas: *mut OH_Drawing_Canvas,
        image: *const OH_Drawing_Image,
        src: *const OH_Drawing_Rect,
        dst: *const OH_Drawing_Rect,
        samplingOptions: *const OH_Drawing_SamplingOptions,
        srcRectConstraint: OH_Drawing_SrcRectConstraint,
    );
}
extern "C" {
    #[doc = " @brief Draws the specified source rectangle of the image onto the canvas,\n scaled and translated to the destination rectangle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawImageRect(
        canvas: *mut OH_Drawing_Canvas,
        image: *mut OH_Drawing_Image,
        rect: *mut OH_Drawing_Rect,
        samplingOptions: *mut OH_Drawing_SamplingOptions,
    );
}
#[doc = " The vertices are a triangle list."]
pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES: OH_Drawing_VertexMode = 0;
#[doc = " The vertices are a triangle strip."]
pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES_STRIP: OH_Drawing_VertexMode = 1;
#[doc = " The vertices are a triangle fan."]
pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLE_FAN: OH_Drawing_VertexMode = 2;
#[doc = " @brief Enumerates of vertices flags.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_VertexMode = u32;
extern "C" {
    #[doc = " @brief Draw a triangular mesh with vertex descriptions.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param vertexMmode Draw a set of vertices.\n @param vertexCount Vertex count.\n @param positions Positions data pointer.\n @param texs Texture coordinate data pointer.\n @param colors Color data pointer.\n @param indexCount Index count.\n @param indices Index data pointer.\n @param mode Blend mode used for drawing.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawVertices(
        canvas: *mut OH_Drawing_Canvas,
        vertexMmode: OH_Drawing_VertexMode,
        vertexCount: i32,
        positions: *const OH_Drawing_Point2D,
        texs: *const OH_Drawing_Point2D,
        colors: *const u32,
        indexCount: i32,
        indices: *const u16,
        mode: OH_Drawing_BlendMode,
    );
}
extern "C" {
    #[doc = " @brief Read pixels data from canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param imageInfo width, height, colorType, and alphaType of dstPixels.\n @param dstPixels destination pixel storage.\n @param dstRowBytes size of one row of pixels.\n @param srcX offset into canvas writable pixels on x-axis.\n @param srcY offset into canvas writable pixels on y-axis.\n @return true if pixels are copied to dstPixels.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasReadPixels(
        canvas: *mut OH_Drawing_Canvas,
        imageInfo: *mut OH_Drawing_Image_Info,
        dstPixels: *mut ::std::os::raw::c_void,
        dstRowBytes: u32,
        srcX: i32,
        srcY: i32,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Read pixels data to a bitmap from canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param srcX offset into canvas writable pixels on x-axis.\n @param srcY offset into canvas writable pixels on y-axis.\n @return true if pixels are copied to dstBitmap.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasReadPixelsToBitmap(
        canvas: *mut OH_Drawing_Canvas,
        bitmap: *mut OH_Drawing_Bitmap,
        srcX: i32,
        srcY: i32,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Checks whether the drawable area is empty.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param isClipEmpty Indicates if drawable area is empty.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or isClipEmpty is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasIsClipEmpty(
        canvas: *mut OH_Drawing_Canvas,
        isClipEmpty: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets image info of canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or imageInfo is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetImageInfo(
        canvas: *mut OH_Drawing_Canvas,
        imageInfo: *mut OH_Drawing_Image_Info,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Replay drawing command.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param recordCmd Indicates the pointer to an <b>OH_Drawing_RecordCmd</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or recordCmd is nullptr.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_CanvasDrawRecordCmd(
        canvas: *mut OH_Drawing_Canvas,
        recordCmd: *mut OH_Drawing_RecordCmd,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Replay drawing command.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param recordCmd Indicates the pointer to an <b>OH_Drawing_RecordCmd</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or recordCmd is nullptr.\n @since 19\n @version 1.0"]
    #[cfg(feature = "api-19")]
    pub fn OH_Drawing_CanvasDrawRecordCmdNesting(
        canvas: *mut OH_Drawing_Canvas,
        recordCmd: *mut OH_Drawing_RecordCmd,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the path has been cut off.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Paht</b> object.\n @param quickReject Indicates if the path has been cut off.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or path is nullptr,\n                  or quickReject is nullptr.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CanvasQuickRejectPath(
        canvas: *mut OH_Drawing_Canvas,
        path: *const OH_Drawing_Path,
        quickReject: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the rect has been cut off.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param quickReject Indicates if the rect has been cut off.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or rect is nullptr,\n                  or quickReject is nullptr.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CanvasQuickRejectRect(
        canvas: *mut OH_Drawing_Canvas,
        rect: *const OH_Drawing_Rect,
        quickReject: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Converts four variables (alpha, red, green, and blue) into a 32-bit (ARGB) variable that describes a color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param alpha Indicates a variable that describes alpha. The value ranges from 0x00 to 0xFF.\n @param red Indicates a variable that describes red. The value ranges from 0x00 to 0xFF.\n @param green Indicates a variable that describes green. The value ranges from 0x00 to 0xFF.\n @param blue Indicates a variable that describes blue. The value ranges from 0x00 to 0xFF.\n @return Returns a 32-bit (ARGB) variable that describes the color.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_ColorSetArgb(alpha: u32, red: u32, green: u32, blue: u32) -> u32;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> with a blend mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param color Indicates the color, which is a 32-bit (ARGB) variable.\n @param blendMode Indicates the blend mode.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateBlendMode(
        color: u32,
        blendMode: OH_Drawing_BlendMode,
    ) -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> applies the outerColorFilter and then applies innerColorFilter.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param outerColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @param innerColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateCompose(
        outerColorFilter: *mut OH_Drawing_ColorFilter,
        innerColorFilter: *mut OH_Drawing_ColorFilter,
    ) -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> with a 5x4 color matrix.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the matrix, which is represented as a float array of length 20.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateMatrix(matrix: *const f32) -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> applies the gamma curve of SRGB to the RGB color channel.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateLinearToSrgbGamma() -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> applies the RGB color channel to the gamma curve of SRGB.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateSrgbGammaToLinear() -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> multiplies the luma of its input into the alpha channel,\n and sets the red, green, and blue channels to zero.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateLuma() -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> with the given mutColor used to multiply source color and addColor\n used to add to source color. The Alpha channel will not be affected.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param mulColor Indicates the color, which is a 32-bit (ARGB) variable.\n @param addColor Indicates the color, which is a 32-bit (ARGB) variable.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_ColorFilterCreateLighting(
        mulColor: u32,
        addColor: u32,
    ) -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_ColorFilter</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterDestroy(colorFilter: *mut OH_Drawing_ColorFilter);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorSpace</b> object that represents the SRGB color space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorSpace</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ColorSpaceCreateSrgb() -> *mut OH_Drawing_ColorSpace;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ColorSpace</b> object with the SRGB primaries, but a linear (1.0) gamma.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorSpace</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ColorSpaceCreateSrgbLinear() -> *mut OH_Drawing_ColorSpace;
}
extern "C" {
    #[doc = " @brief Destroy an <b>OH_Drawing_ColorSpace</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param colorSpace Indicates the pointer to an <b>OH_Drawing_ColorSpace</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ColorSpaceDestroy(colorSpace: *mut OH_Drawing_ColorSpace);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Filter</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FilterCreate() -> *mut OH_Drawing_Filter;
}
extern "C" {
    #[doc = " @brief Sets an <b>OH_Drawing_ImageFilter</b> object for an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @param imageFilter Indicates the pointer to an <b>OH_Drawing_ImageFilter</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FilterSetImageFilter(
        filter: *mut OH_Drawing_Filter,
        imageFilter: *mut OH_Drawing_ImageFilter,
    );
}
extern "C" {
    #[doc = " @brief Sets an <b>OH_Drawing_MaskFilter</b> object for an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @param maskFilter Indicates the pointer to an <b>OH_Drawing_MaskFilter</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FilterSetMaskFilter(
        filter: *mut OH_Drawing_Filter,
        maskFilter: *mut OH_Drawing_MaskFilter,
    );
}
extern "C" {
    #[doc = " @brief Sets an <b>OH_Drawing_ColorFilter</b> object for an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FilterSetColorFilter(
        filter: *mut OH_Drawing_Filter,
        colorFilter: *mut OH_Drawing_ColorFilter,
    );
}
extern "C" {
    #[doc = " @brief Gets an <b>OH_Drawing_ColorFilter</b> object from an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FilterGetColorFilter(
        filter: *mut OH_Drawing_Filter,
        colorFilter: *mut OH_Drawing_ColorFilter,
    );
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Filter</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FilterDestroy(filter: *mut OH_Drawing_Filter);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Font</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontCreate() -> *mut OH_Drawing_Font;
}
#[doc = " glyph outlines unchanged"]
pub const OH_Drawing_FontHinting_FONT_HINTING_NONE: OH_Drawing_FontHinting = 0;
#[doc = " minimal modification to improve contrast"]
pub const OH_Drawing_FontHinting_FONT_HINTING_SLIGHT: OH_Drawing_FontHinting = 1;
#[doc = " glyph outlines modified to improve contrast"]
pub const OH_Drawing_FontHinting_FONT_HINTING_NORMAL: OH_Drawing_FontHinting = 2;
#[doc = " modifies glyph outlines for maximum contrast"]
pub const OH_Drawing_FontHinting_FONT_HINTING_FULL: OH_Drawing_FontHinting = 3;
#[doc = " @brief Enumerates font hinting pattern.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FontHinting = u32;
#[doc = " no transparent pixels on glyph edges"]
pub const OH_Drawing_FontEdging_FONT_EDGING_ALIAS: OH_Drawing_FontEdging = 0;
#[doc = " may have transparent pixels on glyph edges"]
pub const OH_Drawing_FontEdging_FONT_EDGING_ANTI_ALIAS: OH_Drawing_FontEdging = 1;
#[doc = " glyph positioned in pixel using transparency"]
pub const OH_Drawing_FontEdging_FONT_EDGING_SUBPIXEL_ANTI_ALIAS: OH_Drawing_FontEdging = 2;
#[doc = " @brief Enumerates font edging effect.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FontEdging = u32;
extern "C" {
    #[doc = " @brief Sets whether the font baselines and pixels alignment when the transformation matrix is \u{200b}\u{200b}axis aligned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param baselineSnap Indicates whether the font baselines and pixels alignment.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetBaselineSnap(font: *mut OH_Drawing_Font, baselineSnap: bool);
}
extern "C" {
    #[doc = " @brief Gets whether the font baselines and pixels alignment when the transformation matrix is \u{200b}\u{200b}axis aligned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if the font baselines and pixels alignment; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsBaselineSnap(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets whether the font uses sub-pixel rendering.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isSubpixel Indicates whether the font uses sub-pixel rendering.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetSubpixel(font: *mut OH_Drawing_Font, isSubpixel: bool);
}
extern "C" {
    #[doc = " @brief Gets whether the font uses sub-pixel rendering.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if the font uses sub-pixel rendering; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsSubpixel(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets whether the font outline is automatically adjusted.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isForceAutoHinting Indicates whether the font outline is automatically adjusted.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetForceAutoHinting(font: *mut OH_Drawing_Font, isForceAutoHinting: bool);
}
extern "C" {
    #[doc = " @brief Gets whether the font outline is automatically adjusted.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if the font outline is automatically adjusted; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsForceAutoHinting(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets an <b>OH_Drawing_Typeface</b> object for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontSetTypeface(
        font: *mut OH_Drawing_Font,
        typeface: *mut OH_Drawing_Typeface,
    );
}
extern "C" {
    #[doc = " @brief Gets an <b>OH_Drawing_Typeface</b> object from the <b>OH_Drawing_Typeface</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return OH_Drawing_Typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetTypeface(font: *mut OH_Drawing_Font) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Sets text size for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param textSize Indicates the text size.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontSetTextSize(font: *mut OH_Drawing_Font, textSize: f32);
}
extern "C" {
    #[doc = " @brief Gets text size for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns the size of text.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetTextSize(font: *const OH_Drawing_Font) -> f32;
}
extern "C" {
    #[doc = " @brief Calculate number of glyphs represented by text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates the text length in bytes.\n @param encoding Indicates the text encoding.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontCountText(
        font: *mut OH_Drawing_Font,
        text: *const ::std::os::raw::c_void,
        byteLength: usize,
        encoding: OH_Drawing_TextEncoding,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Converts text into glyph indices.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates the text length in bytes.\n @param encoding Indicates the text encoding.\n @param glyphs Indicates the storage for glyph indices.\n @param maxGlyphCount Indicates the storage capacity.\n @return Returns the number of glyph indices represented by text.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontTextToGlyphs(
        font: *const OH_Drawing_Font,
        text: *const ::std::os::raw::c_void,
        byteLength: u32,
        encoding: OH_Drawing_TextEncoding,
        glyphs: *mut u16,
        maxGlyphCount: ::std::os::raw::c_int,
    ) -> u32;
}
extern "C" {
    #[doc = " @brief Retrieves the advance for each glyph in glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyphs Indicates the array of glyph indices to be measured.\n @param count Indicates the number of glyphs.\n @param widths Indicates the text advances for each glyph returned to the caller.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetWidths(
        font: *const OH_Drawing_Font,
        glyphs: *const u16,
        count: ::std::os::raw::c_int,
        widths: *mut f32,
    );
}
extern "C" {
    #[doc = " @brief Measures the width of a single character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param str Indicates the single character encoded in UTF-8.\n @param textWidth Indicates the width of the single character.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, str\n                 and textWidth is nullptr or strlen(str) is 0.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMeasureSingleCharacter(
        font: *const OH_Drawing_Font,
        str_: *const ::std::os::raw::c_char,
        textWidth: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Measures the width of a single character with font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param str Indicates the single character encoded in UTF-8.\n @param fontFeatures Indicates the pointer to an <b>OH_Drawing_FontFeatures</b> object.\n @param textWidth Indicates the width of the single character.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, str\n                 fontFeatures or textWidth is nullptr, or if strlen(str) is 0.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_FontMeasureSingleCharacterWithFeatures(
        font: *const OH_Drawing_Font,
        str_: *const ::std::os::raw::c_char,
        fontFeatures: *const OH_Drawing_FontFeatures,
        textWidth: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Measures the width of text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates the text length in bytes.\n @param encoding Indicates the text encoding.\n @param bounds Gets the bounding box relative to (0, 0) if not nullptr.\n @param textWidth Indicates the width of text.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text\n                 and textWidth is nullptr or byteLength is 0.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMeasureText(
        font: *const OH_Drawing_Font,
        text: *const ::std::os::raw::c_void,
        byteLength: usize,
        encoding: OH_Drawing_TextEncoding,
        bounds: *mut OH_Drawing_Rect,
        textWidth: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Measures the width of text with brush or pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates the text length in bytes.\n @param encoding Indicates the text encoding.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param bounds Gets the bounding box relative to (0, 0) if not nullptr.\n @param textWidth Indicates the width of text.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text\n                 and textWidth is nullptr or byteLength is 0 or brush and pen are both not empty.\n @since 19\n @version 1.0"]
    #[cfg(feature = "api-19")]
    pub fn OH_Drawing_FontMeasureTextWithBrushOrPen(
        font: *const OH_Drawing_Font,
        text: *const ::std::os::raw::c_void,
        byteLength: usize,
        encoding: OH_Drawing_TextEncoding,
        brush: *const OH_Drawing_Brush,
        pen: *const OH_Drawing_Pen,
        bounds: *mut OH_Drawing_Rect,
        textWidth: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Retrieves the advance and bounding box for each glyph in glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyphs Indicates the array of glyph indices to be measured.\n @param count Indicates the number of glyphs.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param widths Indicates the text advances for each glyph returned to the caller.\n @param bounds Indicates the text bounding box for each glyph returned to the caller.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font and glyphs is nullptr\n                 or count is no larger than 0 or brush and pen are both not empty.\n @since 19\n @version 1.0"]
    #[cfg(feature = "api-19")]
    pub fn OH_Drawing_FontGetWidthsBounds(
        font: *const OH_Drawing_Font,
        glyphs: *const u16,
        count: ::std::os::raw::c_int,
        brush: *const OH_Drawing_Brush,
        pen: *const OH_Drawing_Pen,
        widths: *mut f32,
        bounds: *mut OH_Drawing_Array,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Retrieves the positions for each glyph, beginning at the specified origin.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyphs Indicates the array of glyph indices to be measured.\n @param count Indicates the number of glyphs.\n @param origin Indicates the location of the first glyph.\n @param points Indicates the relative position for each glyph returned to the caller.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, glyphs and points is nullptr or\n                 count is no larger than 0.\n @since 19\n @version 1.0"]
    #[cfg(feature = "api-19")]
    pub fn OH_Drawing_FontGetPos(
        font: *const OH_Drawing_Font,
        glyphs: *const u16,
        count: ::std::os::raw::c_int,
        origin: *const OH_Drawing_Point,
        points: *mut OH_Drawing_Point2D,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Returns the recommended spacing between lines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param spacing Indicates the recommended spacing between lines.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font and spacing is nullptr.\n @since 19\n @version 1.0"]
    #[cfg(feature = "api-19")]
    pub fn OH_Drawing_FontGetSpacing(
        font: *const OH_Drawing_Font,
        spacing: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Enables or disables linearly scalable font for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isLinearText Indicates whether to enable linearly scalable font.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontSetLinearText(font: *mut OH_Drawing_Font, isLinearText: bool);
}
extern "C" {
    #[doc = " @brief Gets whether the font is linearly scalable.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if the font is linearly scalable; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsLinearText(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets text skew on x-axis for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param skewX Indicates the additional shear on x-axis relative to y-axis.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontSetTextSkewX(font: *mut OH_Drawing_Font, skewX: f32);
}
extern "C" {
    #[doc = " @brief Gets text skew on x-axis for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns additional skew on x-axis relative to y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetTextSkewX(font: *const OH_Drawing_Font) -> f32;
}
extern "C" {
    #[doc = " @brief Enables or disables to increase stroke width to approximate bold fonts for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isFakeBoldText Indicates whether to enable to increase stroke width.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontSetFakeBoldText(font: *mut OH_Drawing_Font, isFakeBoldText: bool);
}
extern "C" {
    #[doc = " @brief Gets whether to increase the stroke width to approximate bold fonts.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> to increase the stroke width to approximate bold fonts; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsFakeBoldText(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets text scale on x-axis for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param scaleX Indicates the text horizontal scale.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetScaleX(font: *mut OH_Drawing_Font, scaleX: f32);
}
extern "C" {
    #[doc = " @brief Gets text scale on x-axis from an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns text horizontal scale on x-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetScaleX(font: *const OH_Drawing_Font) -> f32;
}
extern "C" {
    #[doc = " @brief Sets hinting pattern for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param fontHinting Indicates the font hinting pattern.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetHinting(
        font: *mut OH_Drawing_Font,
        fontHinting: OH_Drawing_FontHinting,
    );
}
extern "C" {
    #[doc = " @brief Gets hinting pattern from an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns the font hinting pattern.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetHinting(font: *const OH_Drawing_Font) -> OH_Drawing_FontHinting;
}
extern "C" {
    #[doc = " @brief Sets whether to use bitmaps instead of outlines in the <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isEmbeddedBitmaps Indicates whether to use bitmaps instead of outlines.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetEmbeddedBitmaps(font: *mut OH_Drawing_Font, isEmbeddedBitmaps: bool);
}
extern "C" {
    #[doc = " @brief Gets whether to use bitmaps instead of outlines in the <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if using bitmaps instead of outlines; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsEmbeddedBitmaps(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets the font edging effect for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param fontEdging Indicates the font edging effect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetEdging(font: *mut OH_Drawing_Font, fontEdging: OH_Drawing_FontEdging);
}
extern "C" {
    #[doc = " @brief Gets the font edging effect from an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns the font edging effect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetEdging(font: *const OH_Drawing_Font) -> OH_Drawing_FontEdging;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Font</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontDestroy(font: *mut OH_Drawing_Font);
}
#[doc = " @brief Defines a run, supplies storage for the metrics of an <b>OH_Drawing_Font</b>.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Font_Metrics {
    #[doc = " Indicating which metrics are valid"]
    pub flags: u32,
    #[doc = " storage for top in font metrics"]
    pub top: f32,
    #[doc = " storage for ascent in font metrics"]
    pub ascent: f32,
    #[doc = " storage for descent in font metrics"]
    pub descent: f32,
    #[doc = " storage for bottom in font metrics"]
    pub bottom: f32,
    #[doc = " storage for leading in font metrics"]
    pub leading: f32,
    #[doc = "  Average character width, zero if unknown"]
    pub avgCharWidth: f32,
    #[doc = " Maximum character width, zero if unknown"]
    pub maxCharWidth: f32,
    #[doc = " Greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts"]
    pub xMin: f32,
    #[doc = " Greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts"]
    pub xMax: f32,
    #[doc = " Height of lower-case letter, zero if unknown, typically negative"]
    pub xHeight: f32,
    #[doc = " Height of an upper-case letter, zero if unknown, typically negative"]
    pub capHeight: f32,
    #[doc = " @brief Underline thickness"]
    pub underlineThickness: f32,
    #[doc = " Distance from baseline to top of stroke, typically positive"]
    pub underlinePosition: f32,
    #[doc = " Strikeout thickness"]
    pub strikeoutThickness: f32,
    #[doc = " Distance from baseline to bottom of stroke, typically negative"]
    pub strikeoutPosition: f32,
}
extern "C" {
    #[doc = " @brief Obtains the metrics of a font.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param fontMetrics Indicates the pointer to an <b>OH_Drawing_Font_Metrics</b> object.\n @return Returns a float variable that recommended spacing between lines.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetMetrics(
        font: *mut OH_Drawing_Font,
        fontMetrics: *mut OH_Drawing_Font_Metrics,
    ) -> f32;
}
extern "C" {
    #[doc = " @brief Retrieves the bound rect for each glyph in glyph array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyphs Indicates the array of glyph indices to be measured.\n @param count Indicates the number of glyphs.\n @param bounds The bound rect array for each glyph, returned to the caller.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, glyphs\n                 and bounds is nullptr or count is 0.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_FontGetBounds(
        font: *const OH_Drawing_Font,
        glyphs: *const u16,
        count: u32,
        bounds: *mut OH_Drawing_Array,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Retrieves the path for specified Glyph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyph glyph index to be obtained.\n @param path The path object, returned to the caller.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, path\n                 is nullptr or glyph not exist.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_FontGetPathForGlyph(
        font: *const OH_Drawing_Font,
        glyph: u16,
        path: *mut OH_Drawing_Path,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get the text outline path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates to get the byte length of the corresponding text path. If this byte length is greater\n than the byte length of the text string, undefined behavior will occur.\n @param encoding <b>OH_Drawing_TextEncoding</b> Indicates the text encoding.\n @param x Indicates x coordinates of the text.\n @param y Indicates y coordinates of the text.\n @param path <b>OH_Drawing_Path</b> The path object, returned to the caller.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text or path is nullptr.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_FontGetTextPath(
        font: *const OH_Drawing_Font,
        text: *const ::std::os::raw::c_void,
        byteLength: usize,
        encoding: OH_Drawing_TextEncoding,
        x: f32,
        y: f32,
        path: *mut OH_Drawing_Path,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_FontFeatures</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontFeatures</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_FontFeaturesCreate() -> *mut OH_Drawing_FontFeatures;
}
extern "C" {
    #[doc = " @brief Adds a font feature for an <b>OH_Drawing_FontFeatures</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFeatures Indicates the pointer to an <b>OH_Drawing_FontFeatures</b> object.\n @param name Indicates the feature name.\n @param value Indicates the value of the feature.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if either fontFeatures or name is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_FontFeaturesAddFeature(
        fontFeatures: *mut OH_Drawing_FontFeatures,
        name: *const ::std::os::raw::c_char,
        value: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_FontFeatures</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFeatures Indicates the pointer to an <b>OH_Drawing_FontFeatures</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if fontFeatures is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_FontFeaturesDestroy(
        fontFeatures: *mut OH_Drawing_FontFeatures,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets whether to follow the theme font. If the value is true, the theme font is used when typeface is not set.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param followed Indicates whether to follow the theme font.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if font is nullptr.\n @since 15"]
    #[cfg(feature = "api-15")]
    pub fn OH_Drawing_FontSetThemeFontFollowed(
        font: *mut OH_Drawing_Font,
        followed: bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets whether to follow the theme font.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param followed Indicates whether to follow the theme font.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if font or followed is nullptr.\n @since 15"]
    #[cfg(feature = "api-15")]
    pub fn OH_Drawing_FontIsThemeFontFollowed(
        font: *const OH_Drawing_Font,
        followed: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontCollection {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Typography {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_LineTypography {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextStyle {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TypographyStyle {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TypographyCreate {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextBox {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_PositionAndAffinity {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Range {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontParser {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextShadow {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextTab {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextLine {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Run {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFullDescriptor {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_FontCollection</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontCollection</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CreateFontCollection() -> *mut OH_Drawing_FontCollection;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontCollection</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyFontCollection(fontCollection: *mut OH_Drawing_FontCollection);
}
extern "C" {
    #[doc = " @brief Disable the font collection fallback.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @since 12\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_DisableFontCollectionSystemFont"]
    pub fn OH_Drawing_DisableFontCollectionFallback(fontCollection: *mut OH_Drawing_FontCollection);
}
extern "C" {
    #[doc = " @brief Disable the font collection systemfont.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DisableFontCollectionSystemFont(
        fontCollection: *mut OH_Drawing_FontCollection,
    );
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_FontCollection</b> object with shared usage between\n <b>OH_Drawing_TypographyCreate</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontCollection</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CreateSharedFontCollection() -> *mut OH_Drawing_FontCollection;
}
extern "C" {
    #[doc = " @brief Clear font caches.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ClearFontCaches(fontCollection: *mut OH_Drawing_FontCollection);
}
extern "C" {
    #[doc = " @brief Get the <b>OH_Drawing_FontCollection</b> global instance.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Return the pointer to the <b>OH_Drawing_FontCollection</b> global instance.\n @since 14\n @version 1.0"]
    #[cfg(feature = "api-14")]
    pub fn OH_Drawing_GetFontCollectionGlobalInstance() -> *mut OH_Drawing_FontCollection;
}
#[doc = " Right to left (RTL)"]
pub const OH_Drawing_TextDirection_TEXT_DIRECTION_RTL: OH_Drawing_TextDirection = 0;
#[doc = " Left to right (LTR)"]
pub const OH_Drawing_TextDirection_TEXT_DIRECTION_LTR: OH_Drawing_TextDirection = 1;
#[doc = " @brief Enumerates text directions.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_TextDirection = u32;
#[doc = " Left-aligned"]
pub const OH_Drawing_TextAlign_TEXT_ALIGN_LEFT: OH_Drawing_TextAlign = 0;
#[doc = " Right-aligned"]
pub const OH_Drawing_TextAlign_TEXT_ALIGN_RIGHT: OH_Drawing_TextAlign = 1;
#[doc = " Center-aligned"]
pub const OH_Drawing_TextAlign_TEXT_ALIGN_CENTER: OH_Drawing_TextAlign = 2;
#[doc = " Justified, which means that each line (except the last line) is stretched so that every line has equal width,\n and the left and right margins are straight."]
pub const OH_Drawing_TextAlign_TEXT_ALIGN_JUSTIFY: OH_Drawing_TextAlign = 3;
#[doc = " <b>TEXT_ALIGN_START</b> achieves the same effect as <b>TEXT_ALIGN_LEFT</b>\n when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_LTR</b>;\n it achieves the same effect as <b>TEXT_ALIGN_RIGHT</b>\n when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_RTL</b>."]
pub const OH_Drawing_TextAlign_TEXT_ALIGN_START: OH_Drawing_TextAlign = 4;
#[doc = " <b>TEXT_ALIGN_END</b> achieves the same effect as <b>TEXT_ALIGN_RIGHT</b>\n when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_LTR</b>;\n it achieves the same effect as <b>TEXT_ALIGN_LEFT</b>\n when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_RTL</b>."]
pub const OH_Drawing_TextAlign_TEXT_ALIGN_END: OH_Drawing_TextAlign = 5;
#[doc = " @brief Enumerates text alignment modes.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_TextAlign = u32;
#[doc = " Thin"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_100: OH_Drawing_FontWeight = 0;
#[doc = " Extra-light"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_200: OH_Drawing_FontWeight = 1;
#[doc = " Light"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_300: OH_Drawing_FontWeight = 2;
#[doc = " Normal/Regular"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_400: OH_Drawing_FontWeight = 3;
#[doc = " Medium"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_500: OH_Drawing_FontWeight = 4;
#[doc = " Semi-bold"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_600: OH_Drawing_FontWeight = 5;
#[doc = " Bold"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_700: OH_Drawing_FontWeight = 6;
#[doc = " Extra-bold"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_800: OH_Drawing_FontWeight = 7;
#[doc = " Black"]
pub const OH_Drawing_FontWeight_FONT_WEIGHT_900: OH_Drawing_FontWeight = 8;
#[doc = " @brief Enumerates font weights.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_FontWeight = u32;
#[doc = " Alphabetic, where the letters in alphabets like English sit on."]
pub const OH_Drawing_TextBaseline_TEXT_BASELINE_ALPHABETIC: OH_Drawing_TextBaseline = 0;
#[doc = " Ideographic. The baseline is at the bottom of the text area."]
pub const OH_Drawing_TextBaseline_TEXT_BASELINE_IDEOGRAPHIC: OH_Drawing_TextBaseline = 1;
#[doc = " @brief Enumerates text baselines.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_TextBaseline = u32;
#[doc = " No decoration."]
pub const OH_Drawing_TextDecoration_TEXT_DECORATION_NONE: OH_Drawing_TextDecoration = 0;
#[doc = " A underline is used for decoration."]
pub const OH_Drawing_TextDecoration_TEXT_DECORATION_UNDERLINE: OH_Drawing_TextDecoration = 1;
#[doc = " An overline is used for decoration."]
pub const OH_Drawing_TextDecoration_TEXT_DECORATION_OVERLINE: OH_Drawing_TextDecoration = 2;
#[doc = " A strikethrough is used for decoration."]
pub const OH_Drawing_TextDecoration_TEXT_DECORATION_LINE_THROUGH: OH_Drawing_TextDecoration = 4;
#[doc = " @brief Enumerates text decorations.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_TextDecoration = u32;
#[doc = " Normal style"]
pub const OH_Drawing_FontStyle_FONT_STYLE_NORMAL: OH_Drawing_FontStyle = 0;
#[doc = " Italic style"]
pub const OH_Drawing_FontStyle_FONT_STYLE_ITALIC: OH_Drawing_FontStyle = 1;
#[doc = " Oblique style"]
pub const OH_Drawing_FontStyle_FONT_STYLE_OBLIQUE: OH_Drawing_FontStyle = 2;
#[doc = " @brief Enumerates font styles.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_FontStyle = u32;
#[doc = " Offset At Baseline"]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_OFFSET_AT_BASELINE:
    OH_Drawing_PlaceholderVerticalAlignment = 0;
#[doc = " Above Baseline"]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_ABOVE_BASELINE:
    OH_Drawing_PlaceholderVerticalAlignment = 1;
#[doc = " Below Baseline"]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BELOW_BASELINE:
    OH_Drawing_PlaceholderVerticalAlignment = 2;
#[doc = " Top of Row Box"]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_TOP_OF_ROW_BOX:
    OH_Drawing_PlaceholderVerticalAlignment = 3;
#[doc = " Bottom of Row Box"]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BOTTOM_OF_ROW_BOX:
    OH_Drawing_PlaceholderVerticalAlignment = 4;
#[doc = " Center of Row Box"]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_CENTER_OF_ROW_BOX:
    OH_Drawing_PlaceholderVerticalAlignment = 5;
#[doc = " Follow paragraph setting\n @since 20"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_FOLLOW_PARAGRAPH:
    OH_Drawing_PlaceholderVerticalAlignment = 6;
#[doc = " @brief Enumerates placeholder vertical alignment.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_PlaceholderVerticalAlignment = u32;
#[doc = " @brief Defines the placeholder span.\n\n @since 11\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_PlaceholderSpan {
    #[doc = " width of placeholder"]
    pub width: f64,
    #[doc = " height of placeholder"]
    pub height: f64,
    #[doc = " alignment of placeholder"]
    pub alignment: OH_Drawing_PlaceholderVerticalAlignment,
    #[doc = " baseline of placeholder"]
    pub baseline: OH_Drawing_TextBaseline,
    #[doc = " baselineoffset of placeholder"]
    pub baselineOffset: f64,
}
#[doc = " Solid style"]
pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_SOLID:
    OH_Drawing_TextDecorationStyle = 0;
#[doc = " Double style"]
pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DOUBLE:
    OH_Drawing_TextDecorationStyle = 1;
#[doc = " Dotted style"]
pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DOTTED:
    OH_Drawing_TextDecorationStyle = 2;
#[doc = " Dashed style"]
pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DASHED:
    OH_Drawing_TextDecorationStyle = 3;
#[doc = " Wavy style"]
pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_WAVY:
    OH_Drawing_TextDecorationStyle = 4;
#[doc = " @brief Enumerates text decoration style.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_TextDecorationStyle = u32;
#[doc = " Head modal"]
pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_HEAD: OH_Drawing_EllipsisModal = 0;
#[doc = " Middle modal"]
pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MIDDLE: OH_Drawing_EllipsisModal = 1;
#[doc = " Tail modal"]
pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_TAIL: OH_Drawing_EllipsisModal = 2;
#[doc = " @brief Enumerates ellipsis modal.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_EllipsisModal = u32;
#[doc = " Greedy strategy"]
pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_GREEDY: OH_Drawing_BreakStrategy = 0;
#[doc = " Quality strategy"]
pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_HIGH_QUALITY: OH_Drawing_BreakStrategy = 1;
#[doc = " Balanced strategy"]
pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_BALANCED: OH_Drawing_BreakStrategy = 2;
#[doc = " @brief Enumerates break strategy.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_BreakStrategy = u32;
#[doc = " Normal type"]
pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_NORMAL: OH_Drawing_WordBreakType = 0;
#[doc = " Break All type"]
pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_ALL: OH_Drawing_WordBreakType = 1;
#[doc = " Break Word type"]
pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_WORD: OH_Drawing_WordBreakType = 2;
#[doc = " Break word with hyphens\n @since 18"]
#[cfg(feature = "api-18")]
pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_HYPHEN: OH_Drawing_WordBreakType = 3;
#[doc = " @brief Enumerates word break type.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_WordBreakType = u32;
#[doc = " Tight style"]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_TIGHT: OH_Drawing_RectHeightStyle = 0;
#[doc = " Max style"]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_MAX: OH_Drawing_RectHeightStyle = 1;
#[doc = " Includelinespacemiddle style"]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEMIDDLE:
    OH_Drawing_RectHeightStyle = 2;
#[doc = " Includelinespacetop style"]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACETOP:
    OH_Drawing_RectHeightStyle = 3;
#[doc = " Includelinespacebottom style"]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEBOTTOM:
    OH_Drawing_RectHeightStyle = 4;
#[doc = " Struct style"]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_STRUCT: OH_Drawing_RectHeightStyle = 5;
#[doc = " @brief Enumerates rect height style.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_RectHeightStyle = u32;
#[doc = " Tight style"]
pub const OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_TIGHT: OH_Drawing_RectWidthStyle = 0;
#[doc = " Max style"]
pub const OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_MAX: OH_Drawing_RectWidthStyle = 1;
#[doc = " @brief Enumerates rect Width style.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_RectWidthStyle = u32;
#[doc = " The list of system font configuration information was successfully obtained"]
pub const OH_Drawing_FontConfigInfoErrorCode_SUCCESS_FONT_CONFIG_INFO:
    OH_Drawing_FontConfigInfoErrorCode = 0;
#[doc = " Unknown error"]
pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_UNKNOWN:
    OH_Drawing_FontConfigInfoErrorCode = 1;
#[doc = " Parse system config file error"]
pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_PARSE_FILE:
    OH_Drawing_FontConfigInfoErrorCode = 2;
#[doc = " Alloc memory error"]
pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_ALLOC_MEMORY:
    OH_Drawing_FontConfigInfoErrorCode = 3;
#[doc = " Copy string data error"]
pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_COPY_STRING_DATA:
    OH_Drawing_FontConfigInfoErrorCode = 4;
#[doc = " @brief Gets system font configuration information list result enum.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FontConfigInfoErrorCode = u32;
#[doc = " @brief Fallback font information.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFallbackInfo {
    #[doc = " The type of language supported by the font set. The language format is bcp47"]
    pub language: *mut ::std::os::raw::c_char,
    #[doc = " Font family name"]
    pub familyName: *mut ::std::os::raw::c_char,
}
#[doc = " @brief Fallback font group.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFallbackGroup {
    #[doc = " The name of the font set corresponding to the fallback font set. If the value is null,\n all fonts can be set using the fallback font set list."]
    pub groupName: *mut ::std::os::raw::c_char,
    #[doc = " Fallback font Info Size"]
    pub fallbackInfoSize: usize,
    #[doc = " A list of font sets for fallback fonts"]
    pub fallbackInfoSet: *mut OH_Drawing_FontFallbackInfo,
}
#[doc = " @brief Font weight mapping information.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontAdjustInfo {
    #[doc = " The font's original weight value"]
    pub weight: ::std::os::raw::c_int,
    #[doc = " The font weight displayed in the application"]
    pub to: ::std::os::raw::c_int,
}
#[doc = " @brief Alias font information.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontAliasInfo {
    #[doc = " Font family name"]
    pub familyName: *mut ::std::os::raw::c_char,
    #[doc = " Font weight value. When the weight value is greater than 0,\n the font set contains only fonts with the specified weight.\n When the weight value is equal to 0, the font set contains all fonts."]
    pub weight: ::std::os::raw::c_int,
}
#[doc = " @brief General font set information supported by the system.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontGenericInfo {
    #[doc = " Font family name"]
    pub familyName: *mut ::std::os::raw::c_char,
    #[doc = " The size of alias font lists"]
    pub aliasInfoSize: usize,
    #[doc = " The size of font weight mapping information lists"]
    pub adjustInfoSize: usize,
    #[doc = " List of alias fonts"]
    pub aliasInfoSet: *mut OH_Drawing_FontAliasInfo,
    #[doc = " Font weight mapping information lists"]
    pub adjustInfoSet: *mut OH_Drawing_FontAdjustInfo,
}
#[doc = " @brief System font configuration information.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontConfigInfo {
    #[doc = " Count of system font file paths"]
    pub fontDirSize: usize,
    #[doc = " List size of generic font sets"]
    pub fontGenericInfoSize: usize,
    #[doc = " Count of fallback font set lists"]
    pub fallbackGroupSize: usize,
    #[doc = " List of system font file paths"]
    pub fontDirSet: *mut *mut ::std::os::raw::c_char,
    #[doc = " List of generic font sets"]
    pub fontGenericInfoSet: *mut OH_Drawing_FontGenericInfo,
    #[doc = " List of fallback font sets"]
    pub fallbackGroupSet: *mut OH_Drawing_FontFallbackGroup,
}
#[doc = " @brief Describes the font information.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontDescriptor {
    #[doc = " The file path of System font"]
    pub path: *mut ::std::os::raw::c_char,
    #[doc = " A name that uniquely identifies the font"]
    pub postScriptName: *mut ::std::os::raw::c_char,
    #[doc = " The name of System font"]
    pub fullName: *mut ::std::os::raw::c_char,
    #[doc = " The family of System font"]
    pub fontFamily: *mut ::std::os::raw::c_char,
    #[doc = " The subfont family of the system font"]
    pub fontSubfamily: *mut ::std::os::raw::c_char,
    #[doc = " The weight of System font"]
    pub weight: ::std::os::raw::c_int,
    #[doc = " The width of System font"]
    pub width: ::std::os::raw::c_int,
    #[doc = " Whether the system font is tilted"]
    pub italic: ::std::os::raw::c_int,
    #[doc = " Whether the system font is compact"]
    pub monoSpace: bool,
    #[doc = " whether symbolic fonts are supported"]
    pub symbolic: bool,
}
#[doc = " @brief The metrics of line.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_LineMetrics {
    #[doc = " Text ascender height"]
    pub ascender: f64,
    #[doc = " Tex descender height"]
    pub descender: f64,
    #[doc = " The height of a capital letter"]
    pub capHeight: f64,
    #[doc = " The height of a lowercase letter"]
    pub xHeight: f64,
    #[doc = " Text width"]
    pub width: f64,
    #[doc = " Line height"]
    pub height: f64,
    #[doc = " The distance from the left end of the text to the left end of the container,\n aligned to 0, is the width of the container minus the width of the line of text"]
    pub x: f64,
    #[doc = " The height from the top of the text to the top of the container, the first line is 0,\n and the second line is the height of the first line"]
    pub y: f64,
    #[doc = " Start Index"]
    pub startIndex: usize,
    #[doc = " End Index"]
    pub endIndex: usize,
    #[doc = " The metrics information of the first character"]
    pub firstCharMetrics: OH_Drawing_Font_Metrics,
}
#[doc = " both ascend of first row and last row style"]
pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_ALL: OH_Drawing_TextHeightBehavior = 0;
#[doc = " forbidding ascend of first row style"]
pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_FIRST_ASCENT:
    OH_Drawing_TextHeightBehavior = 1;
#[doc = " forbidding ascend of last row style"]
pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_LAST_ASCENT:
    OH_Drawing_TextHeightBehavior = 2;
#[doc = " neither ascend of first row nor last row style"]
pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_ALL: OH_Drawing_TextHeightBehavior = 3;
#[doc = " @brief Enumerates of heightmode of text.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_TextHeightBehavior = u32;
#[doc = " None style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_NONE: OH_Drawing_TextStyleType = 0;
#[doc = " All attributes style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_ALL_ATTRIBUTES: OH_Drawing_TextStyleType = 1;
#[doc = " Font style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_FONT: OH_Drawing_TextStyleType = 2;
#[doc = " Foreground style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_FOREGROUND: OH_Drawing_TextStyleType = 3;
#[doc = " Background style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_BACKGROUND: OH_Drawing_TextStyleType = 4;
#[doc = " Shadow style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_SHADOW: OH_Drawing_TextStyleType = 5;
#[doc = " Decorations style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_DECORATIONS: OH_Drawing_TextStyleType = 6;
#[doc = " Letter spacing style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_LETTER_SPACING: OH_Drawing_TextStyleType = 7;
#[doc = " Word spacing style"]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_WORD_SPACING: OH_Drawing_TextStyleType = 8;
#[doc = " @brief Enumerates text style type.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_TextStyleType = u32;
pub const OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_CONDENSED: OH_Drawing_FontWidth = 1;
pub const OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_CONDENSED: OH_Drawing_FontWidth = 2;
pub const OH_Drawing_FontWidth_FONT_WIDTH_CONDENSED: OH_Drawing_FontWidth = 3;
pub const OH_Drawing_FontWidth_FONT_WIDTH_SEMI_CONDENSED: OH_Drawing_FontWidth = 4;
pub const OH_Drawing_FontWidth_FONT_WIDTH_NORMAL: OH_Drawing_FontWidth = 5;
pub const OH_Drawing_FontWidth_FONT_WIDTH_SEMI_EXPANDED: OH_Drawing_FontWidth = 6;
pub const OH_Drawing_FontWidth_FONT_WIDTH_EXPANDED: OH_Drawing_FontWidth = 7;
pub const OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_EXPANDED: OH_Drawing_FontWidth = 8;
pub const OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_EXPANDED: OH_Drawing_FontWidth = 9;
#[doc = " @brief Enumerates font width.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FontWidth = u32;
#[doc = " Line height maximum"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM:
    OH_Drawing_TextStyleAttributeId = 0;
#[doc = " Line height minimum"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM:
    OH_Drawing_TextStyleAttributeId = 1;
#[doc = " Line height style"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE:
    OH_Drawing_TextStyleAttributeId = 2;
#[doc = " Font width"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_I_FONT_WIDTH:
    OH_Drawing_TextStyleAttributeId = 3;
#[doc = " @brief Enumerates text style attribute.\n\n @since 21"]
#[cfg(feature = "api-21")]
pub type OH_Drawing_TextStyleAttributeId = u32;
#[doc = " Use the font size as the scale factor for line height scaling"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_LineHeightStyle_TEXT_LINE_HEIGHT_BY_FONT_SIZE: OH_Drawing_LineHeightStyle = 0;
#[doc = " Use the text height after shaping as the scale factor for line height scaling"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_LineHeightStyle_TEXT_LINE_HEIGHT_BY_FONT_HEIGHT: OH_Drawing_LineHeightStyle =
    1;
#[doc = " @brief Enumerates line height's scaling type.\n\n @since 21"]
#[cfg(feature = "api-21")]
pub type OH_Drawing_LineHeightStyle = u32;
#[doc = " Line height maximum"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM:
    OH_Drawing_TypographyStyleAttributeId = 0;
#[doc = " Line height minimum"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM:
    OH_Drawing_TypographyStyleAttributeId = 1;
#[doc = " Line spacing"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING:
    OH_Drawing_TypographyStyleAttributeId = 2;
#[doc = " Line height style"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE:
    OH_Drawing_TypographyStyleAttributeId = 3;
#[doc = " Font width"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH:
    OH_Drawing_TypographyStyleAttributeId = 4;
#[doc = " Compress head punctuation\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_COMPRESS_HEAD_PUNCTUATION : OH_Drawing_TypographyStyleAttributeId = 5 ;
#[doc = " Font padding\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_INCLUDE_FONT_PADDING:
    OH_Drawing_TypographyStyleAttributeId = 6;
#[doc = " Fallback line spacing\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_FALLBACK_LINE_SPACING:
    OH_Drawing_TypographyStyleAttributeId = 7;
#[doc = " @brief Enumerates typography style attribute.\n\n @since 21"]
#[cfg(feature = "api-21")]
pub type OH_Drawing_TypographyStyleAttributeId = u32;
extern "C" {
    #[doc = " @brief Sets double value to the text style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n         Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id\n                  exceeds the allowable range.\n @since 21"]
    #[cfg(feature = "api-21")]
    pub fn OH_Drawing_SetTextStyleAttributeDouble(
        style: *mut OH_Drawing_TextStyle,
        id: OH_Drawing_TextStyleAttributeId,
        value: f64,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the double type property's value from the text style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 21"]
    #[cfg(feature = "api-21")]
    pub fn OH_Drawing_GetTextStyleAttributeDouble(
        style: *mut OH_Drawing_TextStyle,
        id: OH_Drawing_TextStyleAttributeId,
        value: *mut f64,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets int value to the text style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n         Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id\n                  exceeds the allowable range.\n @since 21"]
    #[cfg(feature = "api-21")]
    pub fn OH_Drawing_SetTextStyleAttributeInt(
        style: *mut OH_Drawing_TextStyle,
        id: OH_Drawing_TextStyleAttributeId,
        value: ::std::os::raw::c_int,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the int type property's value from the text style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 21"]
    #[cfg(feature = "api-21")]
    pub fn OH_Drawing_GetTextStyleAttributeInt(
        style: *mut OH_Drawing_TextStyle,
        id: OH_Drawing_TextStyleAttributeId,
        value: *mut ::std::os::raw::c_int,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets double value to the typography style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n         Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id\n                  exceeds the allowable range.\n @since 21"]
    #[cfg(feature = "api-21")]
    pub fn OH_Drawing_SetTypographyStyleAttributeDouble(
        style: *mut OH_Drawing_TypographyStyle,
        id: OH_Drawing_TypographyStyleAttributeId,
        value: f64,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the double type property's value from the typography style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 21"]
    #[cfg(feature = "api-21")]
    pub fn OH_Drawing_GetTypographyStyleAttributeDouble(
        style: *mut OH_Drawing_TypographyStyle,
        id: OH_Drawing_TypographyStyleAttributeId,
        value: *mut f64,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets int value to the typography style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n         Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id\n                  exceeds the allowable range.\n @since 21"]
    #[cfg(feature = "api-21")]
    pub fn OH_Drawing_SetTypographyStyleAttributeInt(
        style: *mut OH_Drawing_TypographyStyle,
        id: OH_Drawing_TypographyStyleAttributeId,
        value: ::std::os::raw::c_int,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the int type property's value from the typography style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 21"]
    #[cfg(feature = "api-21")]
    pub fn OH_Drawing_GetTypographyStyleAttributeInt(
        style: *mut OH_Drawing_TypographyStyle,
        id: OH_Drawing_TypographyStyleAttributeId,
        value: *mut ::std::os::raw::c_int,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets bool value to the typography style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if the style is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_SetTypographyStyleAttributeBool(
        style: *mut OH_Drawing_TypographyStyle,
        id: OH_Drawing_TypographyStyleAttributeId,
        value: bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the bool type property's value from the typography style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if the style or value is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetTypographyStyleAttributeBool(
        style: *mut OH_Drawing_TypographyStyle,
        id: OH_Drawing_TypographyStyleAttributeId,
        value: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
#[doc = " No badge"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextBadgeType_TEXT_BADGE_NONE: OH_Drawing_TextBadgeType = 0;
#[doc = " Superscript"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextBadgeType_TEXT_SUPERSCRIPT: OH_Drawing_TextBadgeType = 1;
#[doc = " Subscript"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextBadgeType_TEXT_SUBSCRIPT: OH_Drawing_TextBadgeType = 2;
#[doc = " @brief Type of badge.\n\n @since 20\n @version 1.0"]
#[cfg(feature = "api-20")]
pub type OH_Drawing_TextBadgeType = u32;
#[doc = " Baseline of text line"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_BASELINE:
    OH_Drawing_TextVerticalAlignment = 0;
#[doc = " Bottom of text line"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_BOTTOM:
    OH_Drawing_TextVerticalAlignment = 1;
#[doc = " Center of text line"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_CENTER:
    OH_Drawing_TextVerticalAlignment = 2;
#[doc = " Top of text line"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_TOP:
    OH_Drawing_TextVerticalAlignment = 3;
#[doc = " @brief Type of vertical alignment.\n\n @since 20\n @version 1.0"]
#[cfg(feature = "api-20")]
pub type OH_Drawing_TextVerticalAlignment = u32;
#[doc = " @brief Defines the font style struct.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontStyleStruct {
    #[doc = " Font weight"]
    pub weight: OH_Drawing_FontWeight,
    #[doc = " Font width"]
    pub width: OH_Drawing_FontWidth,
    #[doc = " Font slant"]
    pub slant: OH_Drawing_FontStyle,
}
#[doc = " @brief Defines the fontfeature.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFeature {
    #[doc = " key of fontfeature"]
    pub tag: *mut ::std::os::raw::c_char,
    #[doc = " value of fontfeature"]
    pub value: ::std::os::raw::c_int,
}
#[doc = " @brief Defines StrutStyle info struct.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_StrutStyle {
    #[doc = " The font weight to use when calculating the strut"]
    pub weight: OH_Drawing_FontWeight,
    #[doc = " The font style to use when calculating the strut"]
    pub style: OH_Drawing_FontStyle,
    #[doc = " The size of the ascent plus descent in logical pixels"]
    pub size: f64,
    #[doc = " The minimum height of the strut, as a multiple of fontSize"]
    pub heightScale: f64,
    #[doc = " Whether the height is override"]
    pub heightOverride: bool,
    #[doc = " Whether the halfleading is enable"]
    pub halfLeading: bool,
    #[doc = " The additional leading to apply to the strut as a multiple of Size"]
    pub leading: f64,
    #[doc = " Whether the strut height should be forced"]
    pub forceStrutHeight: bool,
    #[doc = " The size of font families"]
    pub familiesSize: usize,
    #[doc = " The families of the font to use when calculating the strut"]
    pub families: *mut *mut ::std::os::raw::c_char,
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_TypographyStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_TypographyStyle</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CreateTypographyStyle() -> *mut OH_Drawing_TypographyStyle;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_TypographyStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyTypographyStyle(style: *mut OH_Drawing_TypographyStyle);
}
extern "C" {
    #[doc = " @brief Sets the text direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param direction Indicates the text direction to set. For details, see the enum <b>OH_Drawing_TextDirection</b>.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextDirection(
        style: *mut OH_Drawing_TypographyStyle,
        direction: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param align Indicates the text alignment mode to set. For details, see the enum <b>OH_Drawing_TextAlign</b>.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextAlign(
        style: *mut OH_Drawing_TypographyStyle,
        align: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the maximum number of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param lineNumber Indicates the maximum number of lines to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextMaxLines(
        style: *mut OH_Drawing_TypographyStyle,
        lineNumber: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_TextStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_TextStyle</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CreateTextStyle() -> *mut OH_Drawing_TextStyle;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_TextStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyTextStyle(style: *mut OH_Drawing_TextStyle);
}
extern "C" {
    #[doc = " @brief Sets the text color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param color Indicates the color to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleColor(style: *mut OH_Drawing_TextStyle, color: u32);
}
extern "C" {
    #[doc = " @brief Sets the font size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontSize Indicates the font size to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleFontSize(style: *mut OH_Drawing_TextStyle, fontSize: f64);
}
extern "C" {
    #[doc = " @brief Sets the font weight.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontWeight Indicates the font weight to set. For details, see the enum <b>OH_Drawing_FontWeight</b>.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleFontWeight(
        style: *mut OH_Drawing_TextStyle,
        fontWeight: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the text baseline.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param baseline Indicates the text baseline to set. For details, see the enum <b>OH_Drawing_TextBaseline</b>.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleBaseLine(
        style: *mut OH_Drawing_TextStyle,
        baseline: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the text decoration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decoration Indicates the text decoration to set. For details, see the enum <b>OH_Drawing_TextDecoration</b>.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleDecoration(
        style: *mut OH_Drawing_TextStyle,
        decoration: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Add the text decoration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decoration Indicates the text decoration to add. For details, see the enum <b>OH_Drawing_TextDecoration</b>.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_AddTextStyleDecoration(
        style: *mut OH_Drawing_TextStyle,
        decoration: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Remove the text decoration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decoration Indicates the text decoration to remove, shoud be match existing text decorations.\n For details, see the enum <b>OH_Drawing_TextDecoration</b>.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_RemoveTextStyleDecoration(
        style: *mut OH_Drawing_TextStyle,
        decoration: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the color for the text decoration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param color Indicates the color to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleDecorationColor(style: *mut OH_Drawing_TextStyle, color: u32);
}
extern "C" {
    #[doc = " @brief Sets the font height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontHeight Indicates the font height to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleFontHeight(style: *mut OH_Drawing_TextStyle, fontHeight: f64);
}
extern "C" {
    #[doc = " @brief Sets the font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontFamiliesNumber Indicates the number of font families to set.\n @param fontFamilies Indicates the pointer to the font families to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleFontFamilies(
        style: *mut OH_Drawing_TextStyle,
        fontFamiliesNumber: ::std::os::raw::c_int,
        fontFamilies: *mut *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " @brief Sets the font style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontStyle Indicates the font style to set. For details, see the enum <b>OH_Drawing_FontStyle</b>.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleFontStyle(
        style: *mut OH_Drawing_TextStyle,
        fontStyle: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the locale.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param locale Indicates the pointer to the locale to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleLocale(
        style: *mut OH_Drawing_TextStyle,
        locale: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " @brief Sets the foreground brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundBrush Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleForegroundBrush(
        style: *mut OH_Drawing_TextStyle,
        foregroundBrush: *mut OH_Drawing_Brush,
    );
}
extern "C" {
    #[doc = " @brief Gets the foreground brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundBrush Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetForegroundBrush(
        style: *mut OH_Drawing_TextStyle,
        foregroundBrush: *mut OH_Drawing_Brush,
    );
}
extern "C" {
    #[doc = " @brief Sets the foreground pen style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundPen Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleForegroundPen(
        style: *mut OH_Drawing_TextStyle,
        foregroundPen: *mut OH_Drawing_Pen,
    );
}
extern "C" {
    #[doc = " @brief Gets the foreground pen style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundPen Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetForegroundPen(
        style: *mut OH_Drawing_TextStyle,
        foregroundPen: *mut OH_Drawing_Pen,
    );
}
extern "C" {
    #[doc = " @brief Sets the background brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundPen Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleBackgroundBrush(
        style: *mut OH_Drawing_TextStyle,
        foregroundPen: *mut OH_Drawing_Brush,
    );
}
extern "C" {
    #[doc = " @brief Gets the background brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param backgroundBrush Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetBackgroundBrush(
        style: *mut OH_Drawing_TextStyle,
        backgroundBrush: *mut OH_Drawing_Brush,
    );
}
extern "C" {
    #[doc = " @brief Sets the background pen style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param backgroundPen Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleBackgroundPen(
        style: *mut OH_Drawing_TextStyle,
        backgroundPen: *mut OH_Drawing_Pen,
    );
}
extern "C" {
    #[doc = " @brief Gets the background pen style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param backgroundPen Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetBackgroundPen(
        style: *mut OH_Drawing_TextStyle,
        backgroundPen: *mut OH_Drawing_Pen,
    );
}
extern "C" {
    #[doc = " @brief Creates a pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TypographyCreate</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CreateTypographyHandler(
        style: *mut OH_Drawing_TypographyStyle,
        fontCollection: *mut OH_Drawing_FontCollection,
    ) -> *mut OH_Drawing_TypographyCreate;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_TypographyCreate</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyTypographyHandler(handler: *mut OH_Drawing_TypographyCreate);
}
extern "C" {
    #[doc = " @brief Sets the text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_TypographyHandlerPushTextStyle(
        handler: *mut OH_Drawing_TypographyCreate,
        style: *mut OH_Drawing_TextStyle,
    );
}
extern "C" {
    #[doc = " @brief Sets the text content.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param text Indicates the pointer to the text content to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_TypographyHandlerAddText(
        handler: *mut OH_Drawing_TypographyCreate,
        text: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " @brief Removes the topmost style in the stack, leaving the remaining styles in effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_TypographyHandlerPopTextStyle(handler: *mut OH_Drawing_TypographyCreate);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Typography</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Typography</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CreateTypography(
        handler: *mut OH_Drawing_TypographyCreate,
    ) -> *mut OH_Drawing_Typography;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_Typography</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyTypography(typography: *mut OH_Drawing_Typography);
}
extern "C" {
    #[doc = " @brief Lays out the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param maxWidth Indicates the maximum text width to set.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_TypographyLayout(typography: *mut OH_Drawing_Typography, maxWidth: f64);
}
extern "C" {
    #[doc = " @brief Paints text on the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param potisionX Indicates the x coordinate.\n @param potisionY Indicates the y coordinate.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_TypographyPaint(
        typography: *mut OH_Drawing_Typography,
        canvas: *mut OH_Drawing_Canvas,
        potisionX: f64,
        potisionY: f64,
    );
}
extern "C" {
    #[doc = " @brief Paints path text on the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates path information.\n @param hOffset Indicates the distance along the path to add to the text's starting position.\n @param vOffset Indicates the distance above(-) or below(+) the path to position the text.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyPaintOnPath(
        typography: *mut OH_Drawing_Typography,
        canvas: *mut OH_Drawing_Canvas,
        path: *mut OH_Drawing_Path,
        hOffset: f64,
        vOffset: f64,
    );
}
extern "C" {
    #[doc = " @brief Gets the max width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the max width.\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetMaxWidth(typography: *mut OH_Drawing_Typography) -> f64;
}
extern "C" {
    #[doc = " @brief Gets the height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the height.\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetHeight(typography: *mut OH_Drawing_Typography) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the width of the longest line. You are advised to round up the return value in actual use.\n When the text content is empty, the minimum float value,\n that is, -340282346638528859811704183484516925440.000000, is returned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to an <b>OH_Drawing_Typography</b> object, which is obtained by\n {@link OH_Drawing_CreateTypography}.\n @return Returns the width of the longest line.\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetLongestLine(typography: *mut OH_Drawing_Typography) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the width of the longest line with indent. You are advised to\n round up the return value in actual use. When the text content is empty, the\n minimum float value, that is, 0.0, is returned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to an <b>OH_Drawing_Typography</b> object, which is obtained by\n {@link OH_Drawing_CreateTypography}.\n @return Returns the width of the longest line with indent.\n @since 13\n @version 1.1"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_TypographyGetLongestLineWithIndent(
        typography: *mut OH_Drawing_Typography,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Gets the min intrinsic width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the min intrinsic width.\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetMinIntrinsicWidth(typography: *mut OH_Drawing_Typography)
        -> f64;
}
extern "C" {
    #[doc = " @brief Gets the max intrinsic width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the max intrinsic width.\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetMaxIntrinsicWidth(typography: *mut OH_Drawing_Typography)
        -> f64;
}
extern "C" {
    #[doc = " @brief Gets the alphabetic baseline.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the alphabetic baseline.\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetAlphabeticBaseline(
        typography: *mut OH_Drawing_Typography,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Gets the ideographic baseline.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the ideographic baseline.\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetIdeographicBaseline(
        typography: *mut OH_Drawing_Typography,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Sets the placeholder.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param span Indicates the pointer to an <b>OH_Drawing_PlaceholderSpan</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyHandlerAddPlaceholder(
        handler: *mut OH_Drawing_TypographyCreate,
        span: *mut OH_Drawing_PlaceholderSpan,
    );
}
extern "C" {
    #[doc = " @brief Gets the exceed maxLines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the exceed maxLines.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyDidExceedMaxLines(typography: *mut OH_Drawing_Typography) -> bool;
}
extern "C" {
    #[doc = " @brief Gets the rects for range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param start Indicates the start of range to set.\n @param end Indicates the end of range to set.\n @param heightStyle Indicates the height style to set.\n For details, see the enum <b>OH_Drawing_RectHeightStyle</b>.\n @param widthStyle Indicates the width style to set.\n For details, see the enum <b>OH_Drawing_RectWidthStyle</b>.\n @return Returns the rects for range.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetRectsForRange(
        typography: *mut OH_Drawing_Typography,
        start: usize,
        end: usize,
        heightStyle: OH_Drawing_RectHeightStyle,
        widthStyle: OH_Drawing_RectWidthStyle,
    ) -> *mut OH_Drawing_TextBox;
}
extern "C" {
    #[doc = " @brief Gets the rects for placeholders.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the rects for placeholders.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetRectsForPlaceholders(
        typography: *mut OH_Drawing_Typography,
    ) -> *mut OH_Drawing_TextBox;
}
extern "C" {
    #[doc = " @brief Gets left from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns left from textbox.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetLeftFromTextBox(
        textbox: *mut OH_Drawing_TextBox,
        index: ::std::os::raw::c_int,
    ) -> f32;
}
extern "C" {
    #[doc = " @brief Gets right from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns right from textbox.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetRightFromTextBox(
        textbox: *mut OH_Drawing_TextBox,
        index: ::std::os::raw::c_int,
    ) -> f32;
}
extern "C" {
    #[doc = " @brief Gets top from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns top from textbox.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetTopFromTextBox(
        textbox: *mut OH_Drawing_TextBox,
        index: ::std::os::raw::c_int,
    ) -> f32;
}
extern "C" {
    #[doc = " @brief Gets bottom from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns bottom from textbox.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetBottomFromTextBox(
        textbox: *mut OH_Drawing_TextBox,
        index: ::std::os::raw::c_int,
    ) -> f32;
}
extern "C" {
    #[doc = " @brief Gets direction from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns direction from textbox.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetTextDirectionFromTextBox(
        textbox: *mut OH_Drawing_TextBox,
        index: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Gets size of textBox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @return Returns size of textBox.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetSizeOfTextBox(textBox: *mut OH_Drawing_TextBox) -> usize;
}
extern "C" {
    #[doc = " @brief Gets the glyphposition at coordinate.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param dx Indicates the positionX of typography to set.\n @param dy Indicates the positionY of typography to set.\n @return Returns the glyphposition at coordinate.\n @since 11\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster"]
    pub fn OH_Drawing_TypographyGetGlyphPositionAtCoordinate(
        typography: *mut OH_Drawing_Typography,
        dx: f64,
        dy: f64,
    ) -> *mut OH_Drawing_PositionAndAffinity;
}
extern "C" {
    #[doc = " @brief Gets the glyphposition at coordinate with cluster.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param dx Indicates the positionX of typography to set.\n @param dy Indicates the positionY of typography to set.\n @return Returns the glyphposition at coordinate with cluster.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster(
        typography: *mut OH_Drawing_Typography,
        dx: f64,
        dy: f64,
    ) -> *mut OH_Drawing_PositionAndAffinity;
}
extern "C" {
    #[doc = " @brief Gets position from position and affinity.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positionAndAffinity Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.\n @return Returns position from position and affinity.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetPositionFromPositionAndAffinity(
        positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
    ) -> usize;
}
extern "C" {
    #[doc = " @brief Gets affinity from position and affinity.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positionandaffinity Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.\n @return Returns affinity from position and affinity.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetAffinityFromPositionAndAffinity(
        positionandaffinity: *mut OH_Drawing_PositionAndAffinity,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Gets the word boundary.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param offset Indicates the size of text to set.\n @return Returns the word boundary.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetWordBoundary(
        typography: *mut OH_Drawing_Typography,
        offset: usize,
    ) -> *mut OH_Drawing_Range;
}
extern "C" {
    #[doc = " @brief Gets start from range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param range Indicates the pointer to an <b>OH_Drawing_Range</b> object.\n @return Returns start from range.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetStartFromRange(range: *mut OH_Drawing_Range) -> usize;
}
extern "C" {
    #[doc = " @brief Gets end from range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param range Indicates the pointer to an <b>OH_Drawing_Range</b> object.\n @return Returns end from range.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetEndFromRange(range: *mut OH_Drawing_Range) -> usize;
}
extern "C" {
    #[doc = " @brief Gets the line count.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the line count.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetLineCount(typography: *mut OH_Drawing_Typography) -> usize;
}
extern "C" {
    #[doc = " @brief Sets the decoration style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decorationStyle Indicates the text decoration style to set.\n For details, see the enum <b>OH_Drawing_TextDecorationStyle</b>.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleDecorationStyle(
        style: *mut OH_Drawing_TextStyle,
        decorationStyle: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the decoration thickness scale.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decorationThicknessScale Indicates the thickness scale of text decoration to set.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleDecorationThicknessScale(
        style: *mut OH_Drawing_TextStyle,
        decorationThicknessScale: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets the letter spacing.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param letterSpacing Indicates the letter space to set.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleLetterSpacing(
        style: *mut OH_Drawing_TextStyle,
        letterSpacing: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets the word spacing.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param wordSpacing Indicates the word space to set.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleWordSpacing(style: *mut OH_Drawing_TextStyle, wordSpacing: f64);
}
extern "C" {
    #[doc = " @brief Sets the half leading.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param halfLeading Indicates the half leading to set.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleHalfLeading(style: *mut OH_Drawing_TextStyle, halfLeading: bool);
}
extern "C" {
    #[doc = " @brief Sets the ellipsis.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param ellipsis Indicates the pointer to ellipsis style.\n @since 11\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_SetTypographyTextEllipsis"]
    pub fn OH_Drawing_SetTextStyleEllipsis(
        style: *mut OH_Drawing_TextStyle,
        ellipsis: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " @brief Sets the ellipsis modal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param ellipsisModal Indicates the ellipsis model to set. For details, see the enum <b>OH_Drawing_EllipsisModal</b>.\n @since 11\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_SetTypographyTextEllipsisModal"]
    pub fn OH_Drawing_SetTextStyleEllipsisModal(
        style: *mut OH_Drawing_TextStyle,
        ellipsisModal: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the break strategy.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param breakStrategy Indicates the break strategy to set. For details, see the enum <b>OH_Drawing_BreakStrategy</b>.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextBreakStrategy(
        style: *mut OH_Drawing_TypographyStyle,
        breakStrategy: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the word break type.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param wordBreakType Indicates the word break type to set. For details, see the enum <b>OH_Drawing_WordBreakType</b>.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextWordBreakType(
        style: *mut OH_Drawing_TypographyStyle,
        wordBreakType: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the ellipsis modal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param ellipsisModal Indicates the ellipsis modal to set. For details, see the enum <b>OH_Drawing_EllipsisModal</b>.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextEllipsisModal(
        style: *mut OH_Drawing_TypographyStyle,
        ellipsisModal: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief get line height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param lineNumber Indicates the line number.\n @return Returns line height.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetLineHeight(
        typography: *mut OH_Drawing_Typography,
        lineNumber: ::std::os::raw::c_int,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief get line width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param lineNumber Indicates the line number.\n @return Returns line width.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetLineWidth(
        typography: *mut OH_Drawing_Typography,
        lineNumber: ::std::os::raw::c_int,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief get line text range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param lineNumber Indicates the line number.\n @param includeSpaces Indicates whether spaces are contained.\n @return Returns line text range.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetLineTextRange(
        typography: *mut OH_Drawing_Typography,
        lineNumber: ::std::os::raw::c_int,
        includeSpaces: bool,
    ) -> *mut OH_Drawing_Range;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_FontDescriptor</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the font descriptor object <b>OH_Drawing_FontDescriptor</b> created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CreateFontDescriptor() -> *mut OH_Drawing_FontDescriptor;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontDescriptor</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param descriptor the pointer to the font descriptor object <b>OH_Drawing_FontDescriptor</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyFontDescriptor(descriptor: *mut OH_Drawing_FontDescriptor);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_FontParser</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the font parser object <b>OH_Drawing_FontParser</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CreateFontParser() -> *mut OH_Drawing_FontParser;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontParser</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param parser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyFontParser(parser: *mut OH_Drawing_FontParser);
}
extern "C" {
    #[doc = " @brief Gets a list of system font names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontParser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.\n @param num Returns the number of obtained system font names.\n @return Returns a list of obtained system fonts.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontParserGetSystemFontList(
        fontParser: *mut OH_Drawing_FontParser,
        num: *mut usize,
    ) -> *mut *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by a list of system font names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontList Indicates the pointer to a list of system font names.\n @param num The number of obtained system font names.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroySystemFontList(fontList: *mut *mut ::std::os::raw::c_char, num: usize);
}
extern "C" {
    #[doc = " @brief Gets information about the system font by font name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontParser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.\n @param name font name.\n @return Returns system fonts information.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontParserGetFontByName(
        fontParser: *mut OH_Drawing_FontParser,
        name: *const ::std::os::raw::c_char,
    ) -> *mut OH_Drawing_FontDescriptor;
}
extern "C" {
    #[doc = " @brief Get line metrics information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @return Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetLineMetrics(
        typography: *mut OH_Drawing_Typography,
    ) -> *mut OH_Drawing_LineMetrics;
}
extern "C" {
    #[doc = " @brief Get the number of lines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @return Returns the number of lines.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_LineMetricsGetSize(lineMetrics: *mut OH_Drawing_LineMetrics) -> usize;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by line metrics.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyLineMetrics(lineMetrics: *mut OH_Drawing_LineMetrics);
}
extern "C" {
    #[doc = " @brief Gets the specified line by line number.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param lineNumber Line number.\n @param lineMetric Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @return Whether the line metrics was obtained.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetLineMetricsAt(
        typography: *mut OH_Drawing_Typography,
        lineNumber: ::std::os::raw::c_int,
        lineMetric: *mut OH_Drawing_LineMetrics,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief  Sets the ellipsis of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param ellipsis Indicates the line textellipsis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextEllipsis(
        style: *mut OH_Drawing_TypographyStyle,
        ellipsis: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " @brief Sets the locale of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param locale Indicates the pointer to the locale to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLocale(
        style: *mut OH_Drawing_TypographyStyle,
        locale: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " @brief Sets the textSplitRatio of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param textSplitRatio Indicates the textSplitRatio of lines to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextSplitRatio(
        style: *mut OH_Drawing_TypographyStyle,
        textSplitRatio: f32,
    );
}
extern "C" {
    #[doc = " @brief Gets the TextStyle of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns line text textstyle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetTextStyle(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> *mut OH_Drawing_TextStyle;
}
extern "C" {
    #[doc = " @brief Gets the EffectiveAlign of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns line text align.\n @since 12\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_TypographyStyleGetEffectiveAlignment"]
    pub fn OH_Drawing_TypographyGetEffectiveAlignment(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Gets the UnlimitedLines of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns whether the text has a maximum line limit,\n with true indicating a maximum line limit and false indicating no maximum line limit.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyIsLineUnlimited(style: *mut OH_Drawing_TypographyStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Gets the IsEllipsized of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns whether the text has ellipsis,\n true meaning there is an ellipsis and false meaning there is no ellipsis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyIsEllipsized(style: *mut OH_Drawing_TypographyStyle) -> bool;
}
extern "C" {
    #[doc = " @brief set line textstyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextStyle(
        handler: *mut OH_Drawing_TypographyStyle,
        style: *mut OH_Drawing_TextStyle,
    );
}
extern "C" {
    #[doc = " @brief get line fontmetrics.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param fontmetrics Indicates the pointer to a font metrics object <b>OH_Drawing_Font_Metrics</b>.\n @return Whether the font metrics was obtained.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontMetrics(
        typography: *mut OH_Drawing_Typography,
        style: *mut OH_Drawing_TextStyle,
        fontmetrics: *mut OH_Drawing_Font_Metrics,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Gets the position of the specified line or the first text of the specified line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param lineNumber Line number.\n @param oneLine True is the information for the whole line, and false is the information to get the first character\n @param includeWhitespace Whether the text width contains whitespace.\n @param drawingLineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @return return whether the information was successfully fetched.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetLineInfo(
        typography: *mut OH_Drawing_Typography,
        lineNumber: ::std::os::raw::c_int,
        oneLine: bool,
        includeWhitespace: bool,
        drawingLineMetrics: *mut OH_Drawing_LineMetrics,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Sets the font weight of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param weight Indicates the font weight of text typography to set. For details,\n see the enum <b>OH_Drawing_FontWeight</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextFontWeight(
        style: *mut OH_Drawing_TypographyStyle,
        weight: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the font style of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontStyle Indicates the font style of text typography to set. For details,\n see the enum <b>OH_Drawing_FontStyle</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextFontStyle(
        style: *mut OH_Drawing_TypographyStyle,
        fontStyle: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the font family of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontFamily Indicates the pointer to the font family of text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextFontFamily(
        style: *mut OH_Drawing_TypographyStyle,
        fontFamily: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " @brief Sets the font size of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontSize Indicates the font size of text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextFontSize(
        style: *mut OH_Drawing_TypographyStyle,
        fontSize: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets the font height of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontHeight Indicates the font height of text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextFontHeight(
        style: *mut OH_Drawing_TypographyStyle,
        fontHeight: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets the half leading of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param halfLeading Indicates the half leading of text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextHalfLeading(
        style: *mut OH_Drawing_TypographyStyle,
        halfLeading: bool,
    );
}
extern "C" {
    #[doc = " @brief Sets whether to enable line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param useLineStyle Indicates whether the line style for text typography is used.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextUseLineStyle(
        style: *mut OH_Drawing_TypographyStyle,
        useLineStyle: bool,
    );
}
extern "C" {
    #[doc = " @brief Sets the font weight of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param weight Indicates the font weight of line style for text typography to set.\n For details, see the enum <b>OH_Drawing_FontWeight</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleFontWeight(
        style: *mut OH_Drawing_TypographyStyle,
        weight: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the font style of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontStyle Indicates the font style of line style for text typography to set. For details,\n see the enum <b>OH_Drawing_FontStyle</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleFontStyle(
        style: *mut OH_Drawing_TypographyStyle,
        fontStyle: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets the font families of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontFamiliesNumber Indicates the number of font families to set.\n @param fontFamilies Indicates the pointer to the font families of line style for text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleFontFamilies(
        style: *mut OH_Drawing_TypographyStyle,
        fontFamiliesNumber: ::std::os::raw::c_int,
        fontFamilies: *mut *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " @brief Sets the font size of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param lineStyleFontSize Indicates the font size of line style for text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleFontSize(
        style: *mut OH_Drawing_TypographyStyle,
        lineStyleFontSize: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets the font height of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param lineStyleFontHeight Indicates the font height of line style for text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleFontHeight(
        style: *mut OH_Drawing_TypographyStyle,
        lineStyleFontHeight: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets the half leading of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param lineStyleHalfLeading Indicates the half leading of line for text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleHalfLeading(
        style: *mut OH_Drawing_TypographyStyle,
        lineStyleHalfLeading: bool,
    );
}
extern "C" {
    #[doc = " @brief Sets the spacing scale of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param spacingScale Indicates the space scale of line for text typography to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleSpacingScale(
        style: *mut OH_Drawing_TypographyStyle,
        spacingScale: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets whether only line style is enabled for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param lineStyleOnly Indicates the line style for text typography to set only.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleOnly(
        style: *mut OH_Drawing_TypographyStyle,
        lineStyleOnly: bool,
    );
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_TextShadow</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the text shadow object created <b>OH_Drawing_TextShadow</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CreateTextShadow() -> *mut OH_Drawing_TextShadow;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the text shadow object <b>OH_Drawing_TextShadow</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyTextShadow(shadow: *mut OH_Drawing_TextShadow);
}
extern "C" {
    #[doc = " @brief Gets the vector of TextShadow in TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param int Indicates the number in vector to set.\n @param style Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.\n @return Returns the vector of TextShadow.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetShadows(
        style: *mut OH_Drawing_TextStyle,
    ) -> *mut OH_Drawing_TextShadow;
}
extern "C" {
    #[doc = " @brief Gets the size of vector of TextShadow in TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @return Returns the size of vector.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetShadowCount(
        style: *mut OH_Drawing_TextStyle,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Adds element in vector of TextShadow in TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param shadow Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleAddShadow(
        style: *mut OH_Drawing_TextStyle,
        shadow: *const OH_Drawing_TextShadow,
    );
}
extern "C" {
    #[doc = " @brief clear elements in vector of TextShadow in TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleClearShadows(style: *mut OH_Drawing_TextStyle);
}
extern "C" {
    #[doc = " @brief Gets element in vector of TextShadow with index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param index Indicates the index to set.\n @return Returns the pointer to element with the index in vector of the text style object\n <b>OH_Drawing_TextStyle</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetShadowWithIndex(
        style: *mut OH_Drawing_TextStyle,
        index: ::std::os::raw::c_int,
    ) -> *mut OH_Drawing_TextShadow;
}
extern "C" {
    #[doc = " @brief Set indents of the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param indentsNumber Indicates the pointer to the indents to set.\n @param indents Indicates the pointer to the indents to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographySetIndents(
        typography: *mut OH_Drawing_Typography,
        indentsNumber: ::std::os::raw::c_int,
        indents: *const f32,
    );
}
extern "C" {
    #[doc = " @brief Gets element with index in vector of Indents.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param index Indicates the index to set.\n @return float Indicates the element with the index in vector of Indents.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetIndentsWithIndex(
        typography: *mut OH_Drawing_Typography,
        index: ::std::os::raw::c_int,
    ) -> f32;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by vector with the text shadow object <b>OH_Drawing_TextShadow</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyTextShadows(shadow: *mut OH_Drawing_TextShadow);
}
extern "C" {
    #[doc = " @brief Set mode of applying the leading over and under text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param heightMode Indicates the mode to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextSetHeightBehavior(
        style: *mut OH_Drawing_TypographyStyle,
        heightMode: OH_Drawing_TextHeightBehavior,
    );
}
extern "C" {
    #[doc = " @brief Get mode of applying the leading over and under text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns the mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextGetHeightBehavior(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_TextHeightBehavior;
}
extern "C" {
    #[doc = " @brief Set struct of background rect and styleId of text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param rectStyleInfo Indicates the pointer to an <b>OH_Drawing_RectStyle_Info</b> object.\n @param styleId Indicates the styleId of text to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleSetBackgroundRect(
        style: *mut OH_Drawing_TextStyle,
        rectStyleInfo: *const OH_Drawing_RectStyle_Info,
        styleId: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Add symbols in creating typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param symbol Indicates the symbol to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyHandlerAddSymbol(
        handler: *mut OH_Drawing_TypographyCreate,
        symbol: u32,
    );
}
extern "C" {
    #[doc = " @brief Add font feature.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param tag Indicates the pointer to the tag to set.\n @param value Indicates the value to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleAddFontFeature(
        style: *mut OH_Drawing_TextStyle,
        tag: *const ::std::os::raw::c_char,
        value: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Add font variation.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param axis Indicates the pointer to font variation axis.\n @param value Indicates the font variation value to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleAddFontVariation(
        style: *mut OH_Drawing_TextStyle,
        axis: *const ::std::os::raw::c_char,
        value: f32,
    );
}
extern "C" {
    #[doc = " @brief Get all font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return OH_Drawing_FontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature.\n Get size of font feature by OH_Drawing_TextStyleGetFontFeatureSize.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontFeatures(
        style: *mut OH_Drawing_TextStyle,
    ) -> *mut OH_Drawing_FontFeature;
}
extern "C" {
    #[doc = " @brief Release the memory occupied by array of structures of font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature.\n @param fontFeatureSize Indicates the size of array of structures of OH_Drawing_FontFeature.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleDestroyFontFeatures(
        fontFeature: *mut OH_Drawing_FontFeature,
        fontFeatureSize: usize,
    );
}
extern "C" {
    #[doc = " @brief Get size of font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the size of fontfeatures map.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontFeatureSize(style: *mut OH_Drawing_TextStyle) -> usize;
}
extern "C" {
    #[doc = " @brief Clear font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleClearFontFeature(style: *mut OH_Drawing_TextStyle);
}
extern "C" {
    #[doc = " @brief Set baseline shift of text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param lineShift Indicates the baseline shift to set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleSetBaselineShift(style: *mut OH_Drawing_TextStyle, lineShift: f64);
}
extern "C" {
    #[doc = " @brief Get baseline shift of text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the baseline shift.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetBaselineShift(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Gets the text color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the text color.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetColor(style: *mut OH_Drawing_TextStyle) -> u32;
}
extern "C" {
    #[doc = " @brief Gets text decoration style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns text decoration style.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetDecorationStyle(
        style: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_TextDecorationStyle;
}
extern "C" {
    #[doc = " @brief Gets font weight.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns font Weight.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontWeight(
        style: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_FontWeight;
}
extern "C" {
    #[doc = " @brief Gets font style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns font style.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontStyle(
        style: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_FontStyle;
}
extern "C" {
    #[doc = " @brief Gets the font baseline.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the font baseline.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetBaseline(
        style: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_TextBaseline;
}
extern "C" {
    #[doc = " @brief Gets a list of font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param num Indicates count of font families result.\n @return Returns a list of font families.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontFamilies(
        style: *mut OH_Drawing_TextStyle,
        num: *mut usize,
    ) -> *mut *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by a list of font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFamilies Indicates the pointer to a list of font families.\n @param num Indicates the count of obtained font families.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleDestroyFontFamilies(
        fontFamilies: *mut *mut ::std::os::raw::c_char,
        num: usize,
    );
}
extern "C" {
    #[doc = " @brief Gets font size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns font size.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontSize(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Gets the letter spacing of the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the size of the letter spacing.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetLetterSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Gets the word spacing of the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns word spacing size.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetWordSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Gets font height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns font height.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontHeight(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Gets whether to set the text to half line spacing.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns true indicates that the spacing takes effect,\n false indicates that the spacing does not take effect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetHalfLeading(style: *mut OH_Drawing_TextStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Sets the typography vertical alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param align Indicates the typography vertical alignment mode. For details,\n see the enum <b>OH_Drawing_TextVerticalAlignment</b>.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTypographyVerticalAlignment(
        style: *mut OH_Drawing_TypographyStyle,
        align: OH_Drawing_TextVerticalAlignment,
    );
}
extern "C" {
    #[doc = " @brief Gets the locale.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns a locale of data type as a pointer to a char. As with the TextStyle lifecycle.\n No release is required and the return value is invalidated after the set method is called.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetLocale(
        style: *mut OH_Drawing_TextStyle,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @brief Sets whether to use superscript or subscript in text layout.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to an OH_Drawing_TextStyle object.\n @param textBadgeType Superscript or subscript to use.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTextStyleBadgeType(
        style: *mut OH_Drawing_TextStyle,
        textBadgeType: OH_Drawing_TextBadgeType,
    );
}
extern "C" {
    #[doc = " @brief Sets the text style, including font weight, font width and font slant.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingTextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontStyle Indicates an <b>OH_Drawing_FontStyleStruct</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleFontStyleStruct(
        drawingTextStyle: *mut OH_Drawing_TextStyle,
        fontStyle: OH_Drawing_FontStyleStruct,
    );
}
extern "C" {
    #[doc = " @brief Gets the text style, including font weight, font width and font slant.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingTextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the <b>OH_Drawing_FontStyleStruct</b> object getted.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontStyleStruct(
        drawingTextStyle: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_FontStyleStruct;
}
extern "C" {
    #[doc = " @brief Sets the typography style, including font weight, font width and font slant.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param fontStyle Indicates an <b>OH_Drawing_FontStyleStruct</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyStyleFontStyleStruct(
        drawingStyle: *mut OH_Drawing_TypographyStyle,
        fontStyle: OH_Drawing_FontStyleStruct,
    );
}
extern "C" {
    #[doc = " @brief Gets the typography style, including font weight, font width and font slant.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns the <b>OH_Drawing_FontStyleStruct</b> object getted.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleGetFontStyleStruct(
        drawingStyle: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_FontStyleStruct;
}
extern "C" {
    #[doc = " @brief Gets whether the two TextStyle objects are equal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates source of comparison <b>OH_Drawing_TextStyle</b> object.\n @param comparedStyle Indicates comparison <b>OH_Drawing_TextStyle</b> object.\n @return Compare result.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleIsEqual(
        style: *const OH_Drawing_TextStyle,
        comparedStyle: *const OH_Drawing_TextStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Gets whether the font properties of two TextStyle objects are equal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates source of <b>comparison OH_Drawing_TextStyle</b> object.\n @param comparedStyle Indicates comparison <b>OH_Drawing_TextStyle</b> object.\n @return Compare result.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleIsEqualByFont(
        style: *const OH_Drawing_TextStyle,
        comparedStyle: *const OH_Drawing_TextStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Gets whether two TextStyle objects match attributes\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates enumerates of text style type.\n @param comparedStyle Indicates source of comparison <b>OH_Drawing_TextStyle</b> object.\n @param textStyleType Indicates comparison <b>OH_Drawing_TextStyle</b> object.\n @return Match attributes result.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleIsAttributeMatched(
        style: *const OH_Drawing_TextStyle,
        comparedStyle: *const OH_Drawing_TextStyle,
        textStyleType: OH_Drawing_TextStyleType,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Set placeholder of TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleSetPlaceholder(style: *mut OH_Drawing_TextStyle);
}
extern "C" {
    #[doc = " @brief Gets whether placeholder is enable.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Whether placeholder is enable.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleIsPlaceholder(style: *mut OH_Drawing_TextStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Gets text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns text alignment mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleGetEffectiveAlignment(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_TextAlign;
}
extern "C" {
    #[doc = " @brief Gets whether the hinting is enabled.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return True, if the hinting takes effect; False, if the hinting does not take effect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleIsHintEnabled(style: *mut OH_Drawing_TypographyStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Gets system font configuration information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param errorCode Indicates error code returned, based on the error code to\n release the memory of system font configuration information.\n For details, see the enum <b>OH_Drawing_FontConfigInfoErrorCode</b>.\n @return Returns a pointer to system font configuration information.\n Indicates the pointer to an <b>OH_Drawing_FontConfigInfo</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_GetSystemFontConfigInfo(
        errorCode: *mut OH_Drawing_FontConfigInfoErrorCode,
    ) -> *mut OH_Drawing_FontConfigInfo;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by system font configuration information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawFontCfgInfo Indicates the pointer to an <b>OH_Drawing_FontConfigInfo</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroySystemFontConfigInfo(drawFontCfgInfo: *mut OH_Drawing_FontConfigInfo);
}
extern "C" {
    #[doc = " @brief Sets the strut style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param strutstyle Indicates the pointer of <b>OH_Drawing_StrutStyle</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyStyleTextStrutStyle(
        style: *mut OH_Drawing_TypographyStyle,
        strutstyle: *mut OH_Drawing_StrutStyle,
    );
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_StrutStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param strutstyle Indicates the pointer of <b>OH_Drawing_StrutStyle</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleDestroyStrutStyle(strutstyle: *mut OH_Drawing_StrutStyle);
}
extern "C" {
    #[doc = " @brief Gets the strut style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns the pointer of <b>OH_Drawing_StrutStyle</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleGetStrutStyle(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> *mut OH_Drawing_StrutStyle;
}
extern "C" {
    #[doc = " @brief Overriding the struct StrutStyle equals operator.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param from Indicates source of comparison object.\n @param to Indicates comparison object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleStrutStyleEquals(
        from: *mut OH_Drawing_StrutStyle,
        to: *mut OH_Drawing_StrutStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Sets the hinting of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param hintsEnabled Indicates the hinting of text typography..\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleSetHintsEnabled(
        style: *mut OH_Drawing_TypographyStyle,
        hintsEnabled: bool,
    );
}
extern "C" {
    #[doc = " @brief Getting all font metrics from target row.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates a pointer to a typesetting object.\n @param lineNumber Indicates specifies the number of rows.\n @param fontMetricsSize Indicates the return size of font metrics struct from current line.\n @return Returns all character measures for the current row.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetLineFontMetrics(
        typography: *mut OH_Drawing_Typography,
        lineNumber: usize,
        fontMetricsSize: *mut usize,
    ) -> *mut OH_Drawing_Font_Metrics;
}
extern "C" {
    #[doc = " @brief Free up all the space taken up by the lineFontMetric.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineFontMetric Indicates the first address of the lineFontMetric gather to be destroyed.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyDestroyLineFontMetrics(
        lineFontMetric: *mut OH_Drawing_Font_Metrics,
    );
}
extern "C" {
    #[doc = " @brief Mark the Typography as dirty, and initially state the Typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyMarkDirty(typography: *mut OH_Drawing_Typography);
}
extern "C" {
    #[doc = " @brief Get the unresolved Glyphs count of lines in a text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @return Returns unresolved Glyphs count.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetUnresolvedGlyphsCount(
        typography: *mut OH_Drawing_Typography,
    ) -> i32;
}
extern "C" {
    #[doc = " @brief Update the font size of lines in a text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param from Indicates the source of the original font size.\n @param to Indicates the destination of the updated font size.\n @param fontSize Indicates the size of the font.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyUpdateFontSize(
        typography: *mut OH_Drawing_Typography,
        from: usize,
        to: usize,
        fontSize: f32,
    );
}
extern "C" {
    #[doc = " @brief Update the font color of the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param color Indicates the color to update.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_TypographyUpdateFontColor(typography: *mut OH_Drawing_Typography, color: u32);
}
extern "C" {
    #[doc = " @brief Update the decoration of the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param decoration Indicates the text decoration to update. For details, see the enum\n <b>OH_Drawing_TextDecoration</b>.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_TypographyUpdateDecoration(
        typography: *mut OH_Drawing_Typography,
        decoration: OH_Drawing_TextDecoration,
    );
}
extern "C" {
    #[doc = " @brief Update the decoration thickness scale of the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param decorationThicknessScale Indicates the thickness scale of the text decoration to update.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_TypographyUpdateDecorationThicknessScale(
        typography: *mut OH_Drawing_Typography,
        decorationThicknessScale: f64,
    );
}
extern "C" {
    #[doc = " @brief Update the decoration style of the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param decorationStyle Indicates the text decoration style to update.\n For details, see the enum <b>OH_Drawing_TextDecorationStyle</b>.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_TypographyUpdateDecorationStyle(
        typography: *mut OH_Drawing_Typography,
        decorationStyle: OH_Drawing_TextDecorationStyle,
    );
}
extern "C" {
    #[doc = " @brief Updates the decoration color of the paragraph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param color Indicates the text decoration color to update.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_TypographyUpdateDecorationColor(
        typography: *mut OH_Drawing_Typography,
        color: u32,
    );
}
extern "C" {
    #[doc = " @brief Get whether the text layout enables line styles.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to the text <b>OH_Drawing_TypographyStyle</b> object.\n @return Whether or not to enable line styles in text layout only, true means enable, false means disable.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextGetLineStyle(style: *mut OH_Drawing_TypographyStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Get the font weight of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the font weight of line style for text typography.\n For details, see the enum <b>OH_Drawing_FontWeight</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetFontWeight(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_FontWeight;
}
extern "C" {
    #[doc = " @brief Get the font style of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the font style of line style for text typography.\n For details, see the enum <b>OH_Drawing_FontStyle</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetFontStyle(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_FontStyle;
}
extern "C" {
    #[doc = " @brief Get the font families of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param num The number of obtained font names.\n @return Return the font families of line style for text typography.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetFontFamilies(
        style: *mut OH_Drawing_TypographyStyle,
        num: *mut usize,
    ) -> *mut *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by a list of font families names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFamilies Indicates the pointer to a list of font families names.\n @param fontFamiliesNum Indicates the number of obtained font names.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleDestroyFontFamilies(
        fontFamilies: *mut *mut ::std::os::raw::c_char,
        fontFamiliesNum: usize,
    );
}
extern "C" {
    #[doc = " @brief Get the font size of font size for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the font size of font size for text typography.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetFontSize(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Get the font height scale in text layout.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Retrun the font height scale in text layout.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetHeightScale(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Get whether to enable font height for line styles in text layout only.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Whether or not to enable the font height for line styles in text layout only,\n true means enable, false means disable.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetHeightOnly(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Get the half leading of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Whether to enable the text line half leading style, true means enable, false means disable.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetHalfLeading(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Get the spacing scale of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the spacing scale of line style for text typography.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetSpacingScale(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Get whether only line style is enabled for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns whether only line style is enabled for text layout, true means it is enabled,\n false means it is not.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineGetStyleOnly(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Get the text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the text alignment mode. For details, see the enum <b>OH_Drawing_TextAlign</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetTextAlign(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_TextAlign;
}
extern "C" {
    #[doc = " @brief Get the text direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the text direction. For details, see the enum <b>OH_Drawing_TextDirection</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetTextDirection(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_TextDirection;
}
extern "C" {
    #[doc = " @brief Sets the maximum number of lines in a text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the maximum number of lines in a text.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetTextMaxLines(style: *mut OH_Drawing_TypographyStyle) -> usize;
}
extern "C" {
    #[doc = " @brief Get the ellipsis of lines in a text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the ellipsis of lines in a text.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetTextEllipsis(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by a list of Ellipsis names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param ellipsis Indicates the pointer to a list of Ellipsis names.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyDestroyEllipsis(ellipsis: *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " @brief Overriding the class ParagraphStyle equals operator.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param from Indicates source of comparison object.\n @param to Indicates comparison object.\n @return Compare result.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleEquals(
        from: *mut OH_Drawing_TypographyStyle,
        to: *mut OH_Drawing_TypographyStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by text box.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBox Indicates the pointer to a text box object <b>OH_Drawing_TextBox</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyDestroyTextBox(textBox: *mut OH_Drawing_TextBox);
}
extern "C" {
    #[doc = " @brief Sets the parameter of text-shadow.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.\n @param color Indicates the color setting of text-shadow.\n @param offset Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param blurRadius Indicates the radius of blur for text-shadow.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTextShadow(
        shadow: *mut OH_Drawing_TextShadow,
        color: u32,
        offset: *mut OH_Drawing_Point,
        blurRadius: f64,
    );
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_TextTab</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param alignment Indicates enumerates text tab alignment modes. TAB alignment, Support left alignment\n right alignment center alignment, other enumeration values are left alignment effect.\n @param location Indicates location of text tab.\n @return Returns the pointer to the <b>OH_Drawing_TextTab</b> object created. If the object returns NULL,\n the creation failed. The possible cause of the failure is that the application address space is used up.\n As a result, space cannot be allocated.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CreateTextTab(
        alignment: OH_Drawing_TextAlign,
        location: f32,
    ) -> *mut OH_Drawing_TextTab;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_TextTab</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyTextTab(tab: *mut OH_Drawing_TextTab);
}
extern "C" {
    #[doc = " @brief Get alignment of an <b>OH_Drawing_TextTab</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.\n @return Returns align of an <b>OH_Drawing_TextTab</b> object.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetTextTabAlignment(tab: *mut OH_Drawing_TextTab) -> OH_Drawing_TextAlign;
}
extern "C" {
    #[doc = " @brief Get location of an <b>OH_Drawing_TextTab</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.\n @return Returns location of an <b>OH_Drawing_TextTab</b> object.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetTextTabLocation(tab: *mut OH_Drawing_TextTab) -> f32;
}
extern "C" {
    #[doc = " @brief Sets the text tab of <b>OH_Drawing_TypographyStyle</b> object.\n Tab alignment does not take effect when text alignment is also set, Or when the ellipsis style is configured.\n When the tab is not set or the tab's location property is less than or equal to 0, it is the default space effect.\n And all tabs in the paragraph after the setting are aligned according to this tab effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param tab Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_SetTypographyTextTab(
        style: *mut OH_Drawing_TypographyStyle,
        tab: *mut OH_Drawing_TextTab,
    );
}
extern "C" {
    #[doc = " @brief Get DrawingArray size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingArray Indicates the pointer to the array object <b>OH_Drawing_Array</b>.\n @return Size of array.\n @since 14\n @version 1.0"]
    #[cfg(feature = "api-14")]
    pub fn OH_Drawing_GetDrawingArraySize(drawingArray: *mut OH_Drawing_Array) -> usize;
}
extern "C" {
    #[doc = " @brief Sets whether to optimize whitespace at the end of each line for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param trailingSpaceOptimized Boolean value indicating whether to optimize whitespace at the end of each line\n for text typography to set.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTypographyTextTrailingSpaceOptimized(
        style: *mut OH_Drawing_TypographyStyle,
        trailingSpaceOptimized: bool,
    );
}
extern "C" {
    #[doc = " @brief Sets the text content. The content supports UTF-8, UTF-16, and UTF-32 formats.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param text Indicates the pointer to the text content to set.\n @param byteLength Set the byte length of the text content.\n @param textEncodingType Indicates the text encoding type <b>OH_Drawing_TextEncoding</b>.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_TypographyHandlerAddEncodedText(
        handler: *mut OH_Drawing_TypographyCreate,
        text: *const ::std::os::raw::c_void,
        byteLength: usize,
        textEncodingType: OH_Drawing_TextEncoding,
    );
}
extern "C" {
    #[doc = " @brief Set whether to enable automatic spacing between Chinese and English for paragraph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param enableAutoSpace Indicates Whether to enable automatic spacing between Chinese and English.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTypographyTextAutoSpace(
        style: *mut OH_Drawing_TypographyStyle,
        enableAutoSpace: bool,
    );
}
extern "C" {
    #[doc = " @brief Copy a typography style object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns the pointer to the copied <b>OH_Drawing_TypographyStyle</b> object.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_CopyTypographyStyle(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> *mut OH_Drawing_TypographyStyle;
}
extern "C" {
    #[doc = " @brief Copy a text style object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the pointer to the copied <b>OH_Drawing_TextStyle</b> object.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_CopyTextStyle(style: *mut OH_Drawing_TextStyle) -> *mut OH_Drawing_TextStyle;
}
extern "C" {
    #[doc = " @brief Copy a text shadow object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.\n @return Returns the pointer to the copied <b>OH_Drawing_TextShadow</b> object.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_CopyTextShadow(
        shadow: *mut OH_Drawing_TextShadow,
    ) -> *mut OH_Drawing_TextShadow;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_PositionAndAffinity</b> object.\n\n @param positionAndAffinity Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_DestroyPositionAndAffinity(
        positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
    );
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_FontMgr</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontMgr</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrCreate() -> *mut OH_Drawing_FontMgr;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontMgr</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrDestroy(drawingFontMgr: *mut OH_Drawing_FontMgr);
}
extern "C" {
    #[doc = " @brief Gets the count of font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @return Returns the count of font families.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrGetFamilyCount(
        drawingFontMgr: *mut OH_Drawing_FontMgr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Gets the font family name by the index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param index Indicates the index to get the font family name.\n @return Returns the font family name corresponding to the index value.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrGetFamilyName(
        drawingFontMgr: *mut OH_Drawing_FontMgr,
        index: ::std::os::raw::c_int,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by font family name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param familyName Indicates the font family name.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrDestroyFamilyName(familyName: *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_FontStyleSet</b> object by <b>OH_Drawing_FontMgr</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param index Indicates the index used to get the font style set object from the font manager object.\n @return Returns the pointer to the <b>OH_Drawing_FontStyleSet</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrCreateFontStyleSet(
        drawingFontMgr: *mut OH_Drawing_FontMgr,
        index: ::std::os::raw::c_int,
    ) -> *mut OH_Drawing_FontStyleSet;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontStyleSet</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrDestroyFontStyleSet(drawingFontStyleSet: *mut OH_Drawing_FontStyleSet);
}
extern "C" {
    #[doc = " @brief Get the pointer to an <b>OH_Drawing_FontStyleSet</b> object for the given font style set family name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param familyName Indicates the family name of a font style set to be matched.\n @return Returns the pointer to the <b>OH_Drawing_FontStyleSet</b> object matched.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrMatchFamily(
        drawingFontMgr: *mut OH_Drawing_FontMgr,
        familyName: *const ::std::os::raw::c_char,
    ) -> *mut OH_Drawing_FontStyleSet;
}
extern "C" {
    #[doc = " @brief Get the pointer to an <b>OH_Drawing_Typeface</b> object based on the given font style and family name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param familyName Indicates the family name of a font style set to be matched.\n @param fontStyle Indicates an <b>OH_Drawing_FontStyleStruct</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object matched.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrMatchFamilyStyle(
        drawingFontMgr: *mut OH_Drawing_FontMgr,
        familyName: *const ::std::os::raw::c_char,
        fontStyle: OH_Drawing_FontStyleStruct,
    ) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Get the pointer to an <b>OH_Drawing_Typeface</b> object for the given character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param familyName Indicates the family name of a font style set to be matched.\n @param fontStyle Indicates an <b>OH_Drawing_FontStyleStruct</b> object.\n @param bcp47 Indicates an array of languages which indicate the language of character.\n @param bcp47Count Indicates the array size of bcp47.\n @param character Indicates a UTF8 value to be matched.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object matched.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrMatchFamilyStyleCharacter(
        drawingFontMgr: *mut OH_Drawing_FontMgr,
        familyName: *const ::std::os::raw::c_char,
        fontStyle: OH_Drawing_FontStyleStruct,
        bcp47: *mut *const ::std::os::raw::c_char,
        bcp47Count: ::std::os::raw::c_int,
        character: i32,
    ) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Create a typeface for the given index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @param index Indicates the index of the typeface in this fontStyleSet.\n @return If successful, return a pointer to <b>OH_Drawing_Typeface</b> object; if failed, return nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontStyleSetCreateTypeface(
        fontStyleSet: *mut OH_Drawing_FontStyleSet,
        index: ::std::os::raw::c_int,
    ) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Get font style for the specified typeface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @param index Indicates the index of the typeface in this fontStyleSet.\n @param styleName Indicates the style name returned.\n @return Return the <b>OH_Drawing_FontStyleStruct<b> structure.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontStyleSetGetStyle(
        fontStyleSet: *mut OH_Drawing_FontStyleSet,
        index: i32,
        styleName: *mut *mut ::std::os::raw::c_char,
    ) -> OH_Drawing_FontStyleStruct;
}
extern "C" {
    #[doc = " @brief Releases the memory  styleName string.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param styleName Indicates the pointer to a string type.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontStyleSetFreeStyleName(styleName: *mut *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " @brief Get the closest matching typeface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @param fontStyleStruct Indicates the <b>OH_Drawing_FontStyleStruct</b> structure.\n @return A pointer to matched <b>OH_Drawing_Typeface</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontStyleSetMatchStyle(
        fontStyleSet: *mut OH_Drawing_FontStyleSet,
        fontStyleStruct: OH_Drawing_FontStyleStruct,
    ) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Get the count of typeface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @return The count of typeface in this font style set.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontStyleSetCount(
        fontStyleSet: *mut OH_Drawing_FontStyleSet,
    ) -> ::std::os::raw::c_int;
}
#[doc = " @brief Defines the options about GPU context.\n\n @since 12\n @version 1.0\n @deprecated since 18"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_GpuContextOptions {
    #[doc = " If true this allows path mask textures to be cached"]
    pub allowPathMaskCaching: bool,
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_GpuContext</b> object, whose GPU backend context is GL.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param gpuContextOptions Indicates the GPU context options.\n @return Returns the pointer to the <b>OH_Drawing_GpuContext</b> object created.\n @since 12\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_GpuContextCreate"]
    pub fn OH_Drawing_GpuContextCreateFromGL(
        gpuContextOptions: OH_Drawing_GpuContextOptions,
    ) -> *mut OH_Drawing_GpuContext;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_GpuContext</b> object, whose GPU backend context depends on device.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_GpuContext</b> object created.\n @since 16\n @version 1.0"]
    #[cfg(feature = "api-16")]
    pub fn OH_Drawing_GpuContextCreate() -> *mut OH_Drawing_GpuContext;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_GpuContext</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param gpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_GpuContextDestroy(gpuContext: *mut OH_Drawing_GpuContext);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Image</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Image</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageCreate() -> *mut OH_Drawing_Image;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Image</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageDestroy(image: *mut OH_Drawing_Image);
}
extern "C" {
    #[doc = " @brief Rebuilds an <b>OH_Drawing_Image</b> object, sharing or copying bitmap pixels.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns true if successed.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageBuildFromBitmap(
        image: *mut OH_Drawing_Image,
        bitmap: *mut OH_Drawing_Bitmap,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Gets pixel count in each row of image.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @return Returns the width.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageGetWidth(image: *mut OH_Drawing_Image) -> i32;
}
extern "C" {
    #[doc = " @brief Gets pixel row count of image.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @return Returns the height.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageGetHeight(image: *mut OH_Drawing_Image) -> i32;
}
extern "C" {
    #[doc = " @brief Gets the image info.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageGetImageInfo(
        image: *mut OH_Drawing_Image,
        imageInfo: *mut OH_Drawing_Image_Info,
    );
}
#[doc = " Replicate the edge color if the shader effect draws outside of its original bounds."]
pub const OH_Drawing_TileMode_CLAMP: OH_Drawing_TileMode = 0;
#[doc = " Repeat the shader effect image horizontally and vertically."]
pub const OH_Drawing_TileMode_REPEAT: OH_Drawing_TileMode = 1;
#[doc = " Repeat the shader effect image horizontally and vertically, alternating mirror images\n so that adjacent images always seam."]
pub const OH_Drawing_TileMode_MIRROR: OH_Drawing_TileMode = 2;
#[doc = " Only draw within the original domain, return transparent-black everywhere else."]
pub const OH_Drawing_TileMode_DECAL: OH_Drawing_TileMode = 3;
#[doc = " @brief Enumerates tile mode.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_TileMode = u32;
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a shader with single color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param color Indicates the color used by the shader.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateColorShader(color: u32) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a linear gradient between the two specified points.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param startPt Indicates the start point for the gradient.\n @param endPt Indicates the end point for the gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateLinearGradient(
        startPt: *const OH_Drawing_Point,
        endPt: *const OH_Drawing_Point,
        colors: *const u32,
        pos: *const f32,
        size: u32,
        tileMode: OH_Drawing_TileMode,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a linear gradient between the two specified points.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param startPt Indicates the start point for the gradient.\n @param endPt Indicates the end point for the gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n            If pos is nullptr, the colors are evenly distributed between the start and end point.\n @param size Indicates the number of colors and pos(if pos is not nullptr).\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is any of startPt, endPt, colors and pos is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMatrix(
        startPt: *const OH_Drawing_Point2D,
        endPt: *const OH_Drawing_Point2D,
        colors: *const u32,
        pos: *const f32,
        size: u32,
        tileMode: OH_Drawing_TileMode,
        matrix: *const OH_Drawing_Matrix,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a radial gradient given the center and radius.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param centerPt Indicates the center of the circle for the gradient.\n @param radius Indicates the radius of the circle for this gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateRadialGradient(
        centerPt: *const OH_Drawing_Point,
        radius: f32,
        colors: *const u32,
        pos: *const f32,
        size: u32,
        tileMode: OH_Drawing_TileMode,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a radial gradient given the center and radius.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param centerPt Indicates the center of the circle for the gradient.\n @param radius Indicates the radius of the circle for this gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is any of centerPt, colors and pos is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix(
        centerPt: *const OH_Drawing_Point2D,
        radius: f32,
        colors: *const u32,
        pos: *const f32,
        size: u32,
        tileMode: OH_Drawing_TileMode,
        matrix: *const OH_Drawing_Matrix,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a sweep gradient given a center.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param centerPt Indicates the center of the circle for the gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_ShaderEffectCreateSweepGradientWithLocalMatrix(
        centerPt: *const OH_Drawing_Point,
        colors: *const u32,
        pos: *const f32,
        size: u32,
        tileMode: OH_Drawing_TileMode,
        matrix: *const OH_Drawing_Matrix,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a sweep gradient given a center.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param centerPt Indicates the center of the circle for the gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateSweepGradient(
        centerPt: *const OH_Drawing_Point,
        colors: *const u32,
        pos: *const f32,
        size: u32,
        tileMode: OH_Drawing_TileMode,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a image shader.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param tileX Indicates the tileX.\n @param tileY Indicates the tileY.\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n                          If matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateImageShader(
        image: *mut OH_Drawing_Image,
        tileX: OH_Drawing_TileMode,
        tileY: OH_Drawing_TileMode,
        samplingOptions: *const OH_Drawing_SamplingOptions,
        matrix: *const OH_Drawing_Matrix,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a pixel map shader.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @param tileX Indicates the horizontal tile mode.\n @param tileY Indicates the vertical tile mode.\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object. It cannot be null.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n                          If matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_ShaderEffectCreatePixelMapShader(
        pixelMap: *mut OH_Drawing_PixelMap,
        tileX: OH_Drawing_TileMode,
        tileY: OH_Drawing_TileMode,
        samplingOptions: *const OH_Drawing_SamplingOptions,
        matrix: *const OH_Drawing_Matrix,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a conical gradient given two circles.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param startPt Indicates the center of the start circle for the gradient.\n @param startRadius Indicates the radius of the start circle for this gradient.\n @param endPt Indicates the center of the start circle for the gradient.\n @param endRadius Indicates the radius of the start circle for this gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is any of startPt, endPt, colors and pos is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(
        startPt: *const OH_Drawing_Point2D,
        startRadius: f32,
        endPt: *const OH_Drawing_Point2D,
        endRadius: f32,
        colors: *const u32,
        pos: *const f32,
        size: u32,
        tileMode: OH_Drawing_TileMode,
        matrix: *const OH_Drawing_Matrix,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates by two shaders.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param dst Indicates the destination ShaderEffect pointer.\n @param src Indicates the source ShaderEffect pointer.\n @param mode Indicates the blend mode.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty or any of dst and src is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_ShaderEffectCreateCompose(
        dst: *mut OH_Drawing_ShaderEffect,
        src: *mut OH_Drawing_ShaderEffect,
        mode: OH_Drawing_BlendMode,
    ) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_ShaderEffect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectDestroy(shaderEffect: *mut OH_Drawing_ShaderEffect);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object that blurs its input by the separate x and y sigmas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param sigmaX Indicates the Gaussian sigma value for blurring along the x axis.\n @param sigmaY Indicates the Gaussian sigma value for blurring along the y axis.\n @param tileMode Indicates the tile mode applied at edges.\n @param imageFilter Indicates the input filter that is blurred, uses source bitmap if this is null.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageFilterCreateBlur(
        sigmaX: f32,
        sigmaY: f32,
        tileMode: OH_Drawing_TileMode,
        imageFilter: *mut OH_Drawing_ImageFilter,
    ) -> *mut OH_Drawing_ImageFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object that blurs its input by the separate x and y sigmas.\n Supports an optional crop rectangle to restrict the blur effect to a specific region of the input.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param sigmaX Indicates the Gaussian sigma value for blurring along the x axis.\n @param sigmaY Indicates the Gaussian sigma value for blurring along the y axis.\n @param tileMode Indicates the tile mode applied at edges.\n @param input Indicates the input filter that is blurred, uses source bitmap if this is null.\n @param rect Indicates optional rectangle that crops the input and output.\n             If rect is null, the blur effect applies to the entire input image.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_ImageFilterCreateBlurWithCrop(
        sigmaX: f32,
        sigmaY: f32,
        tileMode: OH_Drawing_TileMode,
        input: *mut OH_Drawing_ImageFilter,
        rect: *const OH_Drawing_Rect,
    ) -> *mut OH_Drawing_ImageFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object that applies the color filter to the input.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param colorFilter Indicates the color filter that transforms the input image.\n @param imageFilter Indicates the input filter, or uses the source bitmap if this is null.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty or\n         a nullptr <b>OH_Drawing_ColorFilter</b> is passed.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageFilterCreateFromColorFilter(
        colorFilter: *mut OH_Drawing_ColorFilter,
        imageFilter: *mut OH_Drawing_ImageFilter,
    ) -> *mut OH_Drawing_ImageFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object with the provided x and y offset.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param x Indicates the x offset.\n @param y Indicates the y offset.\n @param imageFilter Indicates the input filter, or uses the source bitmap if this is null.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_ImageFilterCreateOffset(
        x: f32,
        y: f32,
        imageFilter: *mut OH_Drawing_ImageFilter,
    ) -> *mut OH_Drawing_ImageFilter;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object that applies the shader to the input.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shaderEffect Indicates the shader effect to be applied to the image.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty or\n         a nullptr <b>OH_Drawing_ShaderEffect</b> is passed.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_ImageFilterCreateFromShaderEffect(
        shaderEffect: *mut OH_Drawing_ShaderEffect,
    ) -> *mut OH_Drawing_ImageFilter;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_ImageFilter</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param imageFilter Indicates the pointer to an <b>OH_Drawing_ImageFilter</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageFilterDestroy(imageFilter: *mut OH_Drawing_ImageFilter);
}
#[doc = " Fuzzy inside and outside."]
pub const OH_Drawing_BlurType_NORMAL: OH_Drawing_BlurType = 0;
#[doc = " Solid inside, fuzzy outside."]
pub const OH_Drawing_BlurType_SOLID: OH_Drawing_BlurType = 1;
#[doc = " Nothing inside, fuzzy outside."]
pub const OH_Drawing_BlurType_OUTER: OH_Drawing_BlurType = 2;
#[doc = " Fuzzy inside, nothing outside."]
pub const OH_Drawing_BlurType_INNER: OH_Drawing_BlurType = 3;
#[doc = " @brief Enumerates blur type.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_BlurType = u32;
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_MaskFilter</b> with a blur effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param blurType Indicates the blur type.\n @param sigma Indicates the standard deviation of the Gaussian blur to apply. Must be > 0.\n @param respectCTM Indicates the blur's sigma is modified by the CTM, default is true.\n @return Returns the pointer to the <b>OH_Drawing_MaskFilter</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_MaskFilterCreateBlur(
        blurType: OH_Drawing_BlurType,
        sigma: f32,
        respectCTM: bool,
    ) -> *mut OH_Drawing_MaskFilter;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_MaskFilter</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param maskFilter Indicates the pointer to an <b>OH_Drawing_MaskFilter</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_MaskFilterDestroy(maskFilter: *mut OH_Drawing_MaskFilter);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_MatrixCreate() -> *mut OH_Drawing_Matrix;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_MatrixCopy(matrix: *const OH_Drawing_Matrix) -> *mut OH_Drawing_Matrix;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> object with rotation. Sets matrix to\n rotate by degrees about a pivot point at (px, py).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param deg  angle of axes relative to upright axes\n @param x  pivot on x-axis.\n @param y  pivot on y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixCreateRotation(deg: f32, x: f32, y: f32) -> *mut OH_Drawing_Matrix;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> object with scale. Sets matrix to scale\n by sx and sy, about a pivot point at (px, py).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param sx  horizontal scale factor.\n @param sy  vertical scale factor.\n @param px  pivot on x-axis.\n @param py  pivot on y-axis.\n @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixCreateScale(
        sx: f32,
        sy: f32,
        px: f32,
        py: f32,
    ) -> *mut OH_Drawing_Matrix;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> object with translation.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param dx  horizontal translation.\n @param dy  vertical translation.\n @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixCreateTranslation(dx: f32, dy: f32) -> *mut OH_Drawing_Matrix;
}
extern "C" {
    #[doc = " @brief Sets the params for a matrix.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param scaleX  horizontal scale factor to store\n @param skewX   horizontal skew factor to store\n @param transX  horizontal translation to store\n @param skewY   vertical skew factor to store\n @param scaleY  vertical scale factor to store\n @param transY  vertical translation to store\n @param persp0  input x-axis values perspective factor to store\n @param persp1  input y-axis values perspective factor to store\n @param persp2  perspective scale factor to store\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_MatrixSetMatrix(
        matrix: *mut OH_Drawing_Matrix,
        scaleX: f32,
        skewX: f32,
        transX: f32,
        skewY: f32,
        scaleY: f32,
        transY: f32,
        persp0: f32,
        persp1: f32,
        persp2: f32,
    );
}
#[doc = " Scales in x and y to fill destination rect."]
pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_FILL: OH_Drawing_ScaleToFit = 0;
#[doc = " Scales and aligns to left and top."]
pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_START: OH_Drawing_ScaleToFit = 1;
#[doc = " Scales and aligns to center."]
pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_CENTER: OH_Drawing_ScaleToFit = 2;
#[doc = " Scales and aligns to right and bottom."]
pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_END: OH_Drawing_ScaleToFit = 3;
#[doc = " @brief Enumerates of scale to fit flags, how matrix is constructed to map one rect to another.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_ScaleToFit = u32;
extern "C" {
    #[doc = " @brief Sets matrix to scale and translate src rect to dst rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Rect</b> object rect to map from.\n @param dst Indicates the pointer to an <b>OH_Drawing_Rect</b> object rect to map to.\n @param stf Scales to fit enum method.\n @return Returns true if dst is empty, and sets matrix to:\n         | 0 0 0 |\n         | 0 0 0 |\n         | 0 0 1 |\n\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixSetRectToRect(
        matrix: *mut OH_Drawing_Matrix,
        src: *const OH_Drawing_Rect,
        dst: *const OH_Drawing_Rect,
        stf: OH_Drawing_ScaleToFit,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Sets matrix to matrix multiplied by matrix constructed from rotating by degrees\n about pivot point(px, py), positive degrees rotates clockwise.\n        Given:\n\n                     | A B C |                        | c -s dx |\n            Matrix = | D E F |,  R(degrees, px, py) = | s  c dy |\n                     | G H I |                        | 0  0  1 |\n\n        where:\n\n            c  = cos(degrees)\n            s  = sin(degrees)\n            dx =  s * py + (1 - c) * px\n            dy = -s * px + (1 - c) * py\n\n        sets Matrix to:\n\n                                          | A B C | | c -s dx |   | Ac+Bs -As+Bc A*dx+B*dy+C |\n            Matrix * R(degrees, px, py) = | D E F | | s  c dy | = | Dc+Es -Ds+Ec D*dx+E*dy+F |\n                                          | G H I | | 0  0  1 |   | Gc+Hs -Gs+Hc G*dx+H*dy+I |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param degree Indicates the angle of axes relative to upright axes.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixPreRotate(
        matrix: *mut OH_Drawing_Matrix,
        degree: f32,
        px: f32,
        py: f32,
    );
}
extern "C" {
    #[doc = " @brief Sets matrix to forward scale by sx and sy, about a pivot point at (px, py).\n        Given:\n\n                    | A B C |                       | sx  0 dx |\n            Matrix =| D E F |,  S(sx, sy, px, py) = |  0 sy dy |\n                    | G H I |                       |  0  0  1 |\n\n        where:\n\n            dx = px - sx * px\n            dy = py - sy * py\n\n        sets Matrix to:\n\n                                         | A B C | | sx  0 dx |   | A*sx B*sy A*dx+B*dy+C |\n            Matrix * S(sx, sy, px, py) = | D E F | |  0 sy dy | = | D*sx E*sy D*dx+E*dy+F |\n                                         | G H I | |  0  0  1 |   | G*sx H*sy G*dx+H*dy+I |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param sx Horizontal scale factor.\n @param sy Vertical scale factor.\n @param px Pivot on x-axis.\n @param py Pivot on y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixPreScale(
        matrix: *mut OH_Drawing_Matrix,
        sx: f32,
        sy: f32,
        px: f32,
        py: f32,
    );
}
extern "C" {
    #[doc = " @brief Sets forward matrix to translate by dx and dy.\n        Given:\n                     | A B C |               | 1 0 dx |\n            Matrix = | D E F |,  T(dx, dy) = | 0 1 dy |\n                     | G H I |               | 0 0  1 |\n        sets Matrix to:\n                                 | A B C | | 1 0 dx |   | A B A*dx+B*dy+C |\n            Matrix * T(dx, dy) = | D E F | | 0 1 dy | = | D E D*dx+E*dy+F |\n                                 | G H I | | 0 0  1 |   | G H G*dx+H*dy+I |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param dx Indicates the horizontal translation.\n @param dy Indicates the vertical translation.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixPreTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
}
extern "C" {
    #[doc = " @brief Sets matrix to matrix constructed from rotating by degrees about pivot point(px, py),\n multiplied by matrix, positive degrees rotates clockwise.\n        Given:\n\n                     | J K L |                        | c -s dx |\n            Matrix = | M N O |,  R(degrees, px, py) = | s  c dy |\n                     | P Q R |                        | 0  0  1 |\n\n        where:\n\n            c  = cos(degrees)\n            s  = sin(degrees)\n            dx =  s * py + (1 - c) * px\n            dy = -s * px + (1 - c) * py\n\n        sets Matrix to:\n\n                                          |c -s dx| |J K L|   |cJ-sM+dx*P cK-sN+dx*Q cL-sO+dx+R|\n            R(degrees, px, py) * Matrix = |s  c dy| |M N O| = |sJ+cM+dy*P sK+cN+dy*Q sL+cO+dy*R|\n                                          |0  0  1| |P Q R|   |         P          Q          R|\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param degree Indicates the angle of axes relative to upright axes.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixPostRotate(
        matrix: *mut OH_Drawing_Matrix,
        degree: f32,
        px: f32,
        py: f32,
    );
}
extern "C" {
    #[doc = " @brief Sets matrix to backward scale by sx and sy, about a pivot point at (px, py).\n        Given:\n                     | J K L |                       | sx  0 dx |\n            Matrix = | M N O |,  S(sx, sy, px, py) = |  0 sy dy |\n                     | P Q R |                       |  0  0  1 |\n        where:\n            dx = px - sx * px\n            dy = py - sy * py\n        sets Matrix to:\n                                         | sx  0 dx | | J K L |   | sx*J+dx*P sx*K+dx*Q sx*L+dx+R |\n            S(sx, sy, px, py) * Matrix = |  0 sy dy | | M N O | = | sy*M+dy*P sy*N+dy*Q sy*O+dy*R |\n                                         |  0  0  1 | | P Q R |   |         P         Q         R |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param sx Horizontal scale factor.\n @param sy Vertical scale factor.\n @param px Pivot on x-axis.\n @param py Pivot on y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixPostScale(
        matrix: *mut OH_Drawing_Matrix,
        sx: f32,
        sy: f32,
        px: f32,
        py: f32,
    );
}
extern "C" {
    #[doc = " @brief Sets backward matrix to translate by (dx, dy).\n        Given:\n\n                     | J K L |               | 1 0 dx |\n            Matrix = | M N O |,  T(dx, dy) = | 0 1 dy |\n                     | P Q R |               | 0 0  1 |\n\n        sets Matrix to:\n\n                                 | 1 0 dx | | J K L |   | J+dx*P K+dx*Q L+dx*R |\n            T(dx, dy) * Matrix = | 0 1 dy | | M N O | = | M+dy*P N+dy*Q O+dy*R |\n                                 | 0 0  1 | | P Q R |   |      P      Q      R |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param dx Indicates the horizontal translation.\n @param dy Indicates the vertical translation.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixPostTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
}
extern "C" {
    #[doc = " @brief Reset matrix to identity, which has no effect on mapped point, sets matrix to:\n        | 1 0 0 |\n        | 0 1 0 |\n        | 0 0 1 |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixReset(matrix: *mut OH_Drawing_Matrix);
}
extern "C" {
    #[doc = " @brief Sets matrix total to matrix a multiplied by matrix b.\n       Given:\n                    | A B C |          | J K L |\n                a = | D E F |,     b = | M N O |\n                    | G H I |          | P Q R |\n       sets Matrix total to:\n                            | A B C |   | J K L |   | AJ+BM+CP AK+BN+CQ AL+BO+CR |\n           total = a * b =  | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR |\n                            | G H I |   | P Q R |   | GJ+HM+IP GK+HN+IQ GL+HO+IR |\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param total Indicates the pointer to an <b>OH_Drawing_Matrix</b> object that a * b.\n @param a Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param b Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixConcat(
        total: *mut OH_Drawing_Matrix,
        a: *const OH_Drawing_Matrix,
        b: *const OH_Drawing_Matrix,
    );
}
extern "C" {
    #[doc = " @brief Gets nine matrix values contained by matrix into array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param value Storages for nine matrix values.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if matrix or value is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixGetAll(
        matrix: *mut OH_Drawing_Matrix,
        value: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Matrix a left-multiplied by matrix b.\n       Given:\n                    | A B C |          | J K L |\n                a = | D E F |,     b = | M N O |\n                    | G H I |          | P Q R |\n       Get:\n                   | J K L |     | A B C |     | AJ+DK+GL BJ+EK+HL CJ+FK+IL |\n           b * a = | M N O |  *  | D E F |  =  | AM+DN+GO BM+EN+HO CM+FN+IO |\n                   | P Q R |     | G H I |     | AP+DQ+GR BP+EQ+HR CP+FQ+IR |\n @param a Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param b Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if a or b is nullptr.\n @since 22\n @version 1.0"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_MatrixPreConcat(
        a: *mut OH_Drawing_Matrix,
        b: *mut OH_Drawing_Matrix,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get one matrix value. Index is between the range of 0-8.\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param index one of 0-8.\n @return Returns value corresponding to index.Returns 0 if out of range.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixGetValue(
        matrix: *mut OH_Drawing_Matrix,
        index: ::std::os::raw::c_int,
    ) -> f32;
}
extern "C" {
    #[doc = " @brief Sets matrix to rotate by degrees about a pivot point at (px, py). The pivot point is unchanged\n when mapped with matrix. Positive degrees rotates clockwise.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param degree Indicates the angle of axes relative to upright axes.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixRotate(matrix: *mut OH_Drawing_Matrix, degree: f32, px: f32, py: f32);
}
extern "C" {
    #[doc = " @brief Sets matrix to translate by (dx, dy)\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param dx Indicates the horizontal translation.\n @param dy Indicates the vertical translation.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
}
extern "C" {
    #[doc = " @brief Sets matrix to scale by sx and sy, about a pivot point at (px, py).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param sx Indicates the horizontal scale factor.\n @param sy Indicates the vertical scale factor.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixScale(
        matrix: *mut OH_Drawing_Matrix,
        sx: f32,
        sy: f32,
        px: f32,
        py: f32,
    );
}
extern "C" {
    #[doc = " @brief Sets inverse to reciprocal matrix, returning true if matrix can be inverted.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param inverse Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns true if the matrix is not nullptr and can be inverted;\n         returns false if the matrix is nullptr or cannot be inverted.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixInvert(
        matrix: *mut OH_Drawing_Matrix,
        inverse: *mut OH_Drawing_Matrix,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Sets the params of matrix to map src to dst.\n Count must greater than or equal to zero, and less than or equal to four.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param src Points to map from.\n @param dst Points to map to.\n @param count Number of point in src and dst.\n @return Returns true if matrix is constructed successfully.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixSetPolyToPoly(
        matrix: *mut OH_Drawing_Matrix,
        src: *const OH_Drawing_Point2D,
        dst: *const OH_Drawing_Point2D,
        count: u32,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Maps the src point array to the dst point array by matrix transformation.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param src Points to map from.\n @param dst Points to map to.\n @param count Number of point in src and dst.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixMapPoints(
        matrix: *const OH_Drawing_Matrix,
        src: *const OH_Drawing_Point2D,
        dst: *mut OH_Drawing_Point2D,
        count: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " @brief Sets dst to bounds of src corners mapped by matrix transformation.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param src Rect to map from.\n @param dst Rect to map to.\n @return Returns true if the mapped src is equal to the dst; returns false is not equal.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixMapRect(
        matrix: *const OH_Drawing_Matrix,
        src: *const OH_Drawing_Rect,
        dst: *mut OH_Drawing_Rect,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Returns true if the first matrix equals the second matrix.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns true if the two matrices are equal; returns false if not equal.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixIsEqual(
        matrix: *mut OH_Drawing_Matrix,
        other: *mut OH_Drawing_Matrix,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Returns true if matrix is identity.\n Identity matrix is :  | 1 0 0 |\n                       | 0 1 0 |\n                       | 0 0 1 |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns true if matrix is identity; returns false if not identity.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixIsIdentity(matrix: *mut OH_Drawing_Matrix) -> bool;
}
extern "C" {
    #[doc = " @brief Checks if the matrix is affine. An affine matrix preserves straight lines and has no perspective.\n\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param isAffine Indicates if the matrix is affine.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if matrix or isAffine is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_MatrixIsAffine(
        matrix: *const OH_Drawing_Matrix,
        isAffine: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets matrix to matrix multiplied by matrix constructed from skewing by (kx, ky) about pivot point (px, py).\n\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param kx Indicates the horizontal skew factor.\n @param ky Indicates the vertical skew factor.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if matrix is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_MatrixPreSkew(
        matrix: *mut OH_Drawing_Matrix,
        kx: f32,
        ky: f32,
        px: f32,
        py: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if a rectangle will map to another rectangle after applying this matrix.\n\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param isRectStaysRect Indicates if the transformation keeps rectangles as rectangles.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if matrix or isRectStaysRect is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_MatrixRectStaysRect(
        matrix: *const OH_Drawing_Matrix,
        isRectStaysRect: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the sine and cosine values for a rotation transformation around a point.\n\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param sinValue Indicates the sine of the angle of rotation.\n @param cosValue Indicates the cosine of the angle of rotation.\n @param px Indicates the x-coordinate of the point around which to rotate.\n @param py Indicates the y-coordinate of the point around which to rotate.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if matrix is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_MatrixSetSinCos(
        matrix: *mut OH_Drawing_Matrix,
        sinValue: f32,
        cosValue: f32,
        px: f32,
        py: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Matrix</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_MatrixDestroy(matrix: *mut OH_Drawing_Matrix);
}
extern "C" {
    #[doc = " @brief Creates a <b>OH_Drawing_MemoryStream</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_MemoryStream</b> object created.\n @param data  file path.\n @param length  Data length.\n @param copyData  Copy data or not.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MemoryStreamCreate(
        data: *const ::std::os::raw::c_void,
        length: usize,
        copyData: bool,
    ) -> *mut OH_Drawing_MemoryStream;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_MemoryStream</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param memoryStream Indicates the pointer to an <b>OH_Drawing_MemoryStream</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MemoryStreamDestroy(memoryStream: *mut OH_Drawing_MemoryStream);
}
#[doc = " clockwise direction for adding closed contours"]
pub const OH_Drawing_PathDirection_PATH_DIRECTION_CW: OH_Drawing_PathDirection = 0;
#[doc = " counter-clockwise direction for adding closed contours"]
pub const OH_Drawing_PathDirection_PATH_DIRECTION_CCW: OH_Drawing_PathDirection = 1;
#[doc = " @brief Direction for adding closed contours.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathDirection = u32;
#[doc = " Specifies that \"inside\" is computed by a non-zero sum of signed edge crossings"]
pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_WINDING: OH_Drawing_PathFillType = 0;
#[doc = " Specifies that \"inside\" is computed by an odd number of edge crossings"]
pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_EVEN_ODD: OH_Drawing_PathFillType = 1;
#[doc = " Same as Winding, but draws outside of the path, rather than inside"]
pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_INVERSE_WINDING: OH_Drawing_PathFillType = 2;
#[doc = " Same as EvenOdd, but draws outside of the path, rather than inside"]
pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_INVERSE_EVEN_ODD: OH_Drawing_PathFillType = 3;
#[doc = " @brief FillType of path.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathFillType = u32;
#[doc = " Appended to destination unaltered"]
pub const OH_Drawing_PathAddMode_PATH_ADD_MODE_APPEND: OH_Drawing_PathAddMode = 0;
#[doc = " Add line if prior contour is not closed"]
pub const OH_Drawing_PathAddMode_PATH_ADD_MODE_EXTEND: OH_Drawing_PathAddMode = 1;
#[doc = " @brief Add mode of path.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathAddMode = u32;
#[doc = " Difference operation."]
pub const OH_Drawing_PathOpMode_PATH_OP_MODE_DIFFERENCE: OH_Drawing_PathOpMode = 0;
#[doc = " Intersect operation."]
pub const OH_Drawing_PathOpMode_PATH_OP_MODE_INTERSECT: OH_Drawing_PathOpMode = 1;
#[doc = " Union operation."]
pub const OH_Drawing_PathOpMode_PATH_OP_MODE_UNION: OH_Drawing_PathOpMode = 2;
#[doc = " Xor operation."]
pub const OH_Drawing_PathOpMode_PATH_OP_MODE_XOR: OH_Drawing_PathOpMode = 3;
#[doc = " Reverse difference operation."]
pub const OH_Drawing_PathOpMode_PATH_OP_MODE_REVERSE_DIFFERENCE: OH_Drawing_PathOpMode = 4;
#[doc = " @brief Operations when two paths are combined.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathOpMode = u32;
#[doc = " Gets position."]
pub const OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
    0;
#[doc = " Gets tangent."]
pub const OH_Drawing_PathMeasureMatrixFlags_GET_TANGENT_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
    1;
#[doc = " Gets both position and tangent."]
pub const OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_AND_TANGENT_MATRIX:
    OH_Drawing_PathMeasureMatrixFlags = 2;
#[doc = " @brief Enumerates the matrix information corresponding to the path measurements.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathMeasureMatrixFlags = u32;
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Path</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Path</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathCreate() -> *mut OH_Drawing_Path;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Path</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Path</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathCopy(path: *mut OH_Drawing_Path) -> *mut OH_Drawing_Path;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Path</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathDestroy(path: *mut OH_Drawing_Path);
}
extern "C" {
    #[doc = " @brief Sets <b>OH_Drawing_Path</b> object with the same content of another.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object to copy content from.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or other is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PathSetPath(
        path: *mut OH_Drawing_Path,
        other: *mut OH_Drawing_Path,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if <b>OH_Drawing_Path</b> object is empty.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param isEmpty Indicates the return value.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or isEmpty is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PathIsEmpty(
        path: *mut OH_Drawing_Path,
        isEmpty: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if <b>OH_Drawing_Path</b> represents a rectangle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the Pointer to an <b>OH_Drawing_Rect</b> object.\n @param isRect Indicates the return value.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or isRect is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PathIsRect(
        path: *mut OH_Drawing_Path,
        rect: *mut OH_Drawing_Rect,
        isRect: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the start point of a path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the start point.\n @param y Indicates the y coordinate of the start point.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathMoveTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
}
extern "C" {
    #[doc = " @brief Draws a line segment from the last point of a path to the target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the target point.\n @param y Indicates the y coordinate of the target point.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathLineTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
}
extern "C" {
    #[doc = " @brief Draws an arc to a path.\n\n This is done by using angle arc mode. In this mode, a rectangle that encloses an ellipse is specified first,\n and then a start angle and a sweep angle are specified.\n The arc is a portion of the ellipse defined by the start angle and the sweep angle.\n By default, a line segment from the last point of the path to the start point of the arc is also added.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x1 Indicates the x coordinate of the upper left corner of the rectangle.\n @param y1 Indicates the y coordinate of the upper left corner of the rectangle.\n @param x2 Indicates the x coordinate of the lower right corner of the rectangle.\n @param y2 Indicates the y coordinate of the lower right corner of the rectangle.\n @param startDeg Indicates the start angle, in degrees.\n @param sweepDeg Indicates the angle to sweep, in degrees.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathArcTo(
        path: *mut OH_Drawing_Path,
        x1: f32,
        y1: f32,
        x2: f32,
        y2: f32,
        startDeg: f32,
        sweepDeg: f32,
    );
}
extern "C" {
    #[doc = " @brief Draws a quadratic Bezier curve from the last point of a path to the target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX Indicates the x coordinate of the control point.\n @param ctrlY Indicates the y coordinate of the control point.\n @param endX Indicates the x coordinate of the target point.\n @param endY Indicates the y coordinate of the target point.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathQuadTo(
        path: *mut OH_Drawing_Path,
        ctrlX: f32,
        ctrlY: f32,
        endX: f32,
        endY: f32,
    );
}
extern "C" {
    #[doc = " @brief Draws a conic from the last point of a path to the target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX Indicates the x coordinate of the control point.\n @param ctrlY Indicates the y coordinate of the control point.\n @param endX Indicates the x coordinate of the target point.\n @param endY Indicates the y coordinate of the target point.\n @param weight Indicates the weight of added conic.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathConicTo(
        path: *mut OH_Drawing_Path,
        ctrlX: f32,
        ctrlY: f32,
        endX: f32,
        endY: f32,
        weight: f32,
    );
}
extern "C" {
    #[doc = " @brief Draws a cubic Bezier curve from the last point of a path to the target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX1 Indicates the x coordinate of the first control point.\n @param ctrlY1 Indicates the y coordinate of the first control point.\n @param ctrlX2 Indicates the x coordinate of the second control point.\n @param ctrlY2 Indicates the y coordinate of the second control point.\n @param endX Indicates the x coordinate of the target point.\n @param endY Indicates the y coordinate of the target point.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathCubicTo(
        path: *mut OH_Drawing_Path,
        ctrlX1: f32,
        ctrlY1: f32,
        ctrlX2: f32,
        ctrlY2: f32,
        endX: f32,
        endY: f32,
    );
}
extern "C" {
    #[doc = " @brief Sets the relative starting point of a path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the relative starting point.\n @param y Indicates the y coordinate of the relative starting point.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathRMoveTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
}
extern "C" {
    #[doc = " @brief Draws a line segment from the last point of a path to the relative target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the relative target point.\n @param y Indicates the y coordinate of the relative target point.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathRLineTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
}
extern "C" {
    #[doc = " @brief Draws a quadratic bezier curve from the last point of a path to the relative target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX Indicates the x coordinate of the relative control point.\n @param ctrlY Indicates the y coordinate of the relative control point.\n @param endX Indicates the x coordinate of the relative target point.\n @param endY Indicates the y coordinate of the relative target point.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathRQuadTo(
        path: *mut OH_Drawing_Path,
        ctrlX: f32,
        ctrlY: f32,
        endX: f32,
        endY: f32,
    );
}
extern "C" {
    #[doc = " @brief Draws a conic from the last point of a path to the relative target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX Indicates the x coordinate of the relative control point.\n @param ctrlY Indicates the y coordinate of the relative control point.\n @param endX Indicates the x coordinate of the relative target point.\n @param endY Indicates the y coordinate of the relative target point.\n @param weight Indicates the weight of added conic.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathRConicTo(
        path: *mut OH_Drawing_Path,
        ctrlX: f32,
        ctrlY: f32,
        endX: f32,
        endY: f32,
        weight: f32,
    );
}
extern "C" {
    #[doc = " @brief Draws a cubic bezier curve from the last point of a path to the relative target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX1 Indicates the x coordinate of the first relative control point.\n @param ctrlY1 Indicates the y coordinate of the first relative control point.\n @param ctrlX2 Indicates the x coordinate of the second relative control point.\n @param ctrlY2 Indicates the y coordinate of the second relative control point.\n @param endX Indicates the x coordinate of the relative target point.\n @param endY Indicates the y coordinate of the relative target point.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathRCubicTo(
        path: *mut OH_Drawing_Path,
        ctrlX1: f32,
        ctrlY1: f32,
        ctrlX2: f32,
        ctrlY2: f32,
        endX: f32,
        endY: f32,
    );
}
extern "C" {
    #[doc = " @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param left Indicates the left coordinate of the upper left corner of the rectangle.\n @param top Indicates the top coordinate of the upper top corner of the rectangle.\n @param right Indicates the right coordinate of the lower right corner of the rectangle.\n @param bottom Indicates the bottom coordinate of the lower bottom corner of the rectangle.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddRect(
        path: *mut OH_Drawing_Path,
        left: f32,
        top: f32,
        right: f32,
        bottom: f32,
        pathDirection: OH_Drawing_PathDirection,
    );
}
extern "C" {
    #[doc = " @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param pathDirection Indicates the path direction.\n @param start Indicates initial corner of rect to add.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddRectWithInitialCorner(
        path: *mut OH_Drawing_Path,
        rect: *const OH_Drawing_Rect,
        pathDirection: OH_Drawing_PathDirection,
        start: u32,
    );
}
extern "C" {
    #[doc = " @brief Adds a new contour to the path, defined by the round rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddRoundRect(
        path: *mut OH_Drawing_Path,
        roundRect: *const OH_Drawing_RoundRect,
        pathDirection: OH_Drawing_PathDirection,
    );
}
extern "C" {
    #[doc = " @brief Adds a oval to the path, defined by the rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param start Index of initial point of ellipse.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddOvalWithInitialPoint(
        path: *mut OH_Drawing_Path,
        rect: *const OH_Drawing_Rect,
        start: u32,
        pathDirection: OH_Drawing_PathDirection,
    );
}
extern "C" {
    #[doc = " @brief Adds a oval to the path, defined by the rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddOval(
        path: *mut OH_Drawing_Path,
        rect: *const OH_Drawing_Rect,
        pathDirection: OH_Drawing_PathDirection,
    );
}
extern "C" {
    #[doc = " @brief Appends arc to path, as the start of new contour.Arc added is part of ellipse bounded by oval,\n from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees\n is aligned with the positive x-axis, and positive sweeps extends arc clockwise.If sweepAngle <= -360, or\n sweepAngle >= 360; and startAngle modulo 90 is nearly zero, append oval instead of arc. Otherwise, sweepAngle\n values are treated modulo 360, and arc may or may not draw depending on numeric rounding.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param startAngle Indicates the starting angle of arc in degrees.\n @param sweepAngle Indicates the sweep, in degrees. Positive is clockwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddArc(
        path: *mut OH_Drawing_Path,
        rect: *const OH_Drawing_Rect,
        startAngle: f32,
        sweepAngle: f32,
    );
}
extern "C" {
    #[doc = " @brief Appends src path to path, transformed by matrix. Transformed curves may have different verbs,\n point, and conic weights.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddPath(
        path: *mut OH_Drawing_Path,
        src: *const OH_Drawing_Path,
        matrix: *const OH_Drawing_Matrix,
    );
}
extern "C" {
    #[doc = " @brief Appends src path to path, transformed by matrix and mode. Transformed curves may have different verbs,\n point, and conic weights.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.\n @param pathAddMode Indicates the add path's add mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddPathWithMatrixAndMode(
        path: *mut OH_Drawing_Path,
        src: *const OH_Drawing_Path,
        matrix: *const OH_Drawing_Matrix,
        pathAddMode: OH_Drawing_PathAddMode,
    );
}
extern "C" {
    #[doc = " @brief Appends src path to path, transformed by mode. Transformed curves may have different verbs,\n point, and conic weights.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object, which is Appends src path to path.\n @param pathAddMode Indicates the add path's add mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddPathWithMode(
        path: *mut OH_Drawing_Path,
        src: *const OH_Drawing_Path,
        pathAddMode: OH_Drawing_PathAddMode,
    );
}
extern "C" {
    #[doc = " @brief Appends src path to path, transformed by offset and mode. Transformed curves may have different verbs,\n point, and conic weights.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param dx Indicates offset added to src path x-axis coordinates.\n @param dy Indicates offset added to src path y-axis coordinates.\n @param pathAddMode Indicates the add path's add mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddPathWithOffsetAndMode(
        path: *mut OH_Drawing_Path,
        src: *const OH_Drawing_Path,
        dx: f32,
        dy: f32,
        pathAddMode: OH_Drawing_PathAddMode,
    );
}
extern "C" {
    #[doc = " @brief Adds contour created from point array, adding (count - 1) line segments.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param points Indicates the point array.\n @param count Indicates the size of point array.\n @param isClosed Indicates Whether to add lines that connect the end and start.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddPolygon(
        path: *mut OH_Drawing_Path,
        points: *const OH_Drawing_Point2D,
        count: u32,
        isClosed: bool,
    );
}
extern "C" {
    #[doc = " @brief  Adds a circle to the path, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the center of the circle.\n @param y Indicates the y coordinate of the center of the circle.\n @param radius Indicates the radius of the circle.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathAddCircle(
        path: *mut OH_Drawing_Path,
        x: f32,
        y: f32,
        radius: f32,
        pathDirection: OH_Drawing_PathDirection,
    );
}
extern "C" {
    #[doc = " @brief Parses the svg path from the string.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param str Indicates the string of the SVG path.\n @return Returns true if build path is successful, returns false otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathBuildFromSvgString(
        path: *mut OH_Drawing_Path,
        str_: *const ::std::os::raw::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Return the status that point (x, y) is contained by path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x-axis value of containment test.\n @param y Indicates the y-axis value of containment test.\n @return Returns true if the point (x, y) is contained by path.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathContains(path: *mut OH_Drawing_Path, x: f32, y: f32) -> bool;
}
extern "C" {
    #[doc = " @brief Transforms verb array, point array, and weight by matrix. transform may change verbs\n and increase their number. path is replaced by transformed data.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathTransform(path: *mut OH_Drawing_Path, matrix: *const OH_Drawing_Matrix);
}
extern "C" {
    #[doc = " @brief Transforms verb array, point array, and weight by matrix.\n Transform may change verbs and increase their number.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param dst Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param applyPerspectiveClip Indicates whether to apply perspective clip.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathTransformWithPerspectiveClip(
        src: *mut OH_Drawing_Path,
        matrix: *const OH_Drawing_Matrix,
        dst: *mut OH_Drawing_Path,
        applyPerspectiveClip: bool,
    );
}
extern "C" {
    #[doc = " @brief Sets FillType, the rule used to fill path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param pathFillType Indicates the add path's fill type.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathSetFillType(
        path: *mut OH_Drawing_Path,
        pathFillType: OH_Drawing_PathFillType,
    );
}
extern "C" {
    #[doc = " @brief Gets FillType, the rule used to fill path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param pathFillType Indicates the FillType apply to path.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or pathFillType is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PathGetFillType(
        path: *mut OH_Drawing_Path,
        pathFillType: *mut OH_Drawing_PathFillType,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the length of the current path object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Indicates whether free to modify/delete the path after this call.\n @return Returns the length of the current path object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathGetLength(path: *mut OH_Drawing_Path, forceClosed: bool) -> f32;
}
extern "C" {
    #[doc = " @brief Gets the smallest bounding box that contains the path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathGetBounds(path: *mut OH_Drawing_Path, rect: *mut OH_Drawing_Rect);
}
extern "C" {
    #[doc = " @brief Closes a path. A line segment from the start point to the last point of the path is added.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathClose(path: *mut OH_Drawing_Path);
}
extern "C" {
    #[doc = " @brief Offset path replaces dst.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param dst Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param dx Indicates offset added to dst path x-axis coordinates.\n @param dy Indicates offset added to dst path y-axis coordinates.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathOffset(
        path: *mut OH_Drawing_Path,
        dst: *mut OH_Drawing_Path,
        dx: f32,
        dy: f32,
    );
}
extern "C" {
    #[doc = " @brief Resets path data.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathReset(path: *mut OH_Drawing_Path);
}
extern "C" {
    #[doc = " @brief Determines whether the path current contour is closed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Whether to close the Path.\n @return Returns <b>true</b> if the path current contour is closed; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathIsClosed(path: *mut OH_Drawing_Path, forceClosed: bool) -> bool;
}
extern "C" {
    #[doc = " @brief Gets the position and tangent of the distance from the starting position of the Path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Whether to close the Path.\n @param distance The distance from the start of the Path.\n @param position Sets to the position of distance from the starting position of the Path.\n @param tangent Sets to the tangent of distance from the starting position of the Path.\n @return Returns <b>true</b> if succeeded; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathGetPositionTangent(
        path: *mut OH_Drawing_Path,
        forceClosed: bool,
        distance: f32,
        position: *mut OH_Drawing_Point2D,
        tangent: *mut OH_Drawing_Point2D,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Gets the path between the start and end points.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Whether to close the path.\n @param start The distance from the starting point of the segment to the starting point of the path.\n @param stop The distance from the end point of the segment to the starting point of the path.\n @param startWithMoveTo Whether the path obtained moveTo to the starting segment.\n @param dst The path obtained.\n @param result Indicates the result of getting the path segment.\n               The value is false if the segment is zero-length or start >= stop, and true otherwise.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of path, dst and result is nullptr.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_PathGetSegment(
        path: *mut OH_Drawing_Path,
        forceClosed: bool,
        start: f32,
        stop: f32,
        startWithMoveTo: bool,
        dst: *mut OH_Drawing_Path,
        result: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Combines two paths.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param op Indicates the operation to apply to combine.\n @return Returns <b>true</b> if constructed path is not empty; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathOp(
        path: *mut OH_Drawing_Path,
        other: *const OH_Drawing_Path,
        op: OH_Drawing_PathOpMode,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Computes the corresponding matrix at the specified distance.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Whether to close the Path.\n @param distance The distance from the start of the Path.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param flag Indicates what should be returned in the matrix.\n @return Returns <b>false</b> if path is nullptr or zero-length;\nreturns <b>true</b> if path is not nullptr and not zero-length.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathGetMatrix(
        path: *mut OH_Drawing_Path,
        forceClosed: bool,
        distance: f32,
        matrix: *mut OH_Drawing_Matrix,
        flag: OH_Drawing_PathMeasureMatrixFlags,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Approximates the path with a series of line segments.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param acceptableError Indicates the acceptable error for a line on the path. Should be no less than 0.\n @param vals Indicates the storage for the computed array containing point components.\n There are three components for each point:\n 1.Fraction along the length of the path that the point resides.\n 2.The x coordinate of the point.\n 3.The y coordinate of the point.\n @param count Returns with the size of array.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or count is nullptr.\n         Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if acceptableError is less than 0.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PathApproximate(
        path: *mut OH_Drawing_Path,
        acceptableError: f32,
        vals: *mut f32,
        count: *mut u32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Performs interpolation between the current path and another path based on a given weight, and stores the\n result in the target path object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object to be interpolated with path.\n @param weight Indicates the interpolation weight, which must be in the range [0, 1].\n @param success Indicates the interpolation is success or not.\n @param interpolatedPath Indicates the pointer to an <b>OH_Drawing_Path</b> object to store the result.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if either path, other, success or interpolatedPath is\n                 nullptr.\n         Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if weight is outside the range [0, 1].\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PathInterpolate(
        path: *mut OH_Drawing_Path,
        other: *mut OH_Drawing_Path,
        weight: f32,
        success: *mut bool,
        interpolatedPath: *mut OH_Drawing_Path,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks whether the current path is compatible with another path (other) for interpolation, which means\n they have exactly the same structure, both paths must have the same operations, in the same order.\n If any of the operations are of type CONIC, then the weights of those conics must also match.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object to be interpolated with path.\n @param result Indicates whether the current path and the other path are compatible for interpolation.\n               The value is true if the paths are compatible, and false otherwise.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if either path, other or result is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PathIsInterpolate(
        path: *mut OH_Drawing_Path,
        other: *mut OH_Drawing_Path,
        result: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the fill type is one of the INVERSE variants.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param isInverse Indicates if the filltype is one of the INVERSE variants.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if path or isInverse is nullptr.\n @since 23\n @version 1.0"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_PathIsInverseFillType(
        path: *const OH_Drawing_Path,
        isInverse: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Toggles the INVERSE state of the filltype.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if path is nullptr.\n @since 23\n @version 1.0"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_PathToggleInverseFillType(path: *mut OH_Drawing_Path)
        -> OH_Drawing_ErrorCode;
}
#[doc = " Indicates translation effect."]
#[cfg(feature = "api-18")]
pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_TRANSLATE: OH_Drawing_PathDashStyle = 0;
#[doc = " Indicates rotation effect."]
#[cfg(feature = "api-18")]
pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_ROTATE: OH_Drawing_PathDashStyle = 1;
#[doc = " Indicates morph effect."]
#[cfg(feature = "api-18")]
pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_MORPH: OH_Drawing_PathDashStyle = 2;
#[doc = " @brief Enumerate path dash style.\n\n @since 18\n @version 1.0"]
#[cfg(feature = "api-18")]
pub type OH_Drawing_PathDashStyle = u32;
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object that is a combination of paths,\n applying the inner path effect first and then the outer path effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param outer Indicates an <b>OH_Drawing_PathEffect</b> object\n @param inner Indicates an <b>OH_Drawing_PathEffect</b> object\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CreateComposePathEffect(
        outer: *mut OH_Drawing_PathEffect,
        inner: *mut OH_Drawing_PathEffect,
    ) -> *mut OH_Drawing_PathEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object\n that turns the included angle of the path into a fillet of a specified radius.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param radius Indicates the degree of curvature of the arc, the radius must be greater than zero.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is radius is zero or less.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CreateCornerPathEffect(radius: f32) -> *mut OH_Drawing_PathEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param intervals Indicates a array which contain an even number of entries.\n @param count Indicates the number of elements of the intervals array.\n @param phase Indicates the offset into intervals array.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CreateDashPathEffect(
        intervals: *mut f32,
        count: ::std::os::raw::c_int,
        phase: f32,
    ) -> *mut OH_Drawing_PathEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object\n that breaks the path and creates an irregular distribution on the path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param segLength Indicates the maximum segment length of the path.\n @param deviation Indicates the deviation during drawing.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CreateDiscretePathEffect(
        segLength: f32,
        deviation: f32,
    ) -> *mut OH_Drawing_PathEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object and sets the path effect to a dash effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param advance Indicates the distance between the dashed segments.\n @param phase Indicates the offset into intervals array.\n @param type Indicates the type of the path dash effect.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is advance and phase are zero or less.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CreatePathDashEffect(
        path: *const OH_Drawing_Path,
        advance: f32,
        phase: f32,
        type_: OH_Drawing_PathDashStyle,
    ) -> *mut OH_Drawing_PathEffect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object by overlaying two path effects.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param firstPathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.\n @param secondPathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CreateSumPathEffect(
        firstPathEffect: *mut OH_Drawing_PathEffect,
        secondPathEffect: *mut OH_Drawing_PathEffect,
    ) -> *mut OH_Drawing_PathEffect;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_PathEffect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathEffectDestroy(pathEffect: *mut OH_Drawing_PathEffect);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Pen</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Pen</b> object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenCreate() -> *mut OH_Drawing_Pen;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Pen</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Pen</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty or a nullptr is passed.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PenCopy(pen: *mut OH_Drawing_Pen) -> *mut OH_Drawing_Pen;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Pen</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenDestroy(pen: *mut OH_Drawing_Pen);
}
extern "C" {
    #[doc = " @brief Checks whether anti-aliasing is enabled for a pen. If anti-aliasing is enabled,\n edges will be drawn with partial transparency.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns <b>true</b> if anti-aliasing is enabled; returns <b>false</b> otherwise.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenIsAntiAlias(pen: *const OH_Drawing_Pen) -> bool;
}
extern "C" {
    #[doc = " @brief Enables or disables anti-aliasing for a pen. If anti-aliasing is enabled,\n edges will be drawn with partial transparency.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param antiAlias Specifies whether to enable anti-aliasing. The value <b>true</b> means\n             to enable anti-aliasing, and <b>false</b> means the opposite.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenSetAntiAlias(pen: *mut OH_Drawing_Pen, antiAlias: bool);
}
extern "C" {
    #[doc = " @brief Obtains the color of a pen. The color is used by the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns a 32-bit (ARGB) variable that describes the color.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenGetColor(pen: *const OH_Drawing_Pen) -> u32;
}
extern "C" {
    #[doc = " @brief Sets the color for a pen. The color is used by the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param color Indicates the color to set, which is a 32-bit (ARGB) variable.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenSetColor(pen: *mut OH_Drawing_Pen, color: u32);
}
extern "C" {
    #[doc = " @brief Obtains the alpha of a pen. The alpha is used by the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns a 8-bit variable that describes the alpha.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_PenGetAlpha(pen: *const OH_Drawing_Pen) -> u8;
}
extern "C" {
    #[doc = " @brief Sets the alpha for a pen. The alpha is used by the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param alpha Indicates the alpha to set, which is a 8-bit variable.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_PenSetAlpha(pen: *mut OH_Drawing_Pen, alpha: u8);
}
extern "C" {
    #[doc = " @brief Sets the color for a pen. The color will be used by the pen to fill in a shape.\n The color is an ARGB structure described by floating point numbers and interpreted as being in the colorSpaceManager.\n If colorSpaceManager is nullptr, then color is assumed to be in the sRGB color space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param a Indicates the alpha component of color, represented as a floating point number between 0 and 1.\n @param r Indicates the red component of color, represented as a floating point number between 0 and 1.\n @param g Indicates the green component of color, represented as a floating point number between 0 and 1.\n @param b Indicates the blue component of color, represented as a floating point number between 0 and 1.\n @param colorSpaceManager Indicates the pointer to an <b>OH_NativeColorSpaceManager</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PenSetColor4f(
        pen: *mut OH_Drawing_Pen,
        a: f32,
        r: f32,
        g: f32,
        b: f32,
        colorSpaceManager: *mut OH_NativeColorSpaceManager,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the alpha component of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param a Indicates the alpha component of color.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or a is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PenGetAlphaFloat(
        pen: *mut OH_Drawing_Pen,
        a: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the red component of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param r Indicates the red component of color.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or r is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PenGetRedFloat(pen: *mut OH_Drawing_Pen, r: *mut f32)
        -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the green component of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param g Indicates the green component of color.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or g is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PenGetGreenFloat(
        pen: *mut OH_Drawing_Pen,
        g: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the blue component of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param b Indicates the blue component of color.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or b is nullptr.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_PenGetBlueFloat(
        pen: *mut OH_Drawing_Pen,
        b: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the thickness of a pen. This thickness determines the width of the outline of a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the thickness.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenGetWidth(pen: *const OH_Drawing_Pen) -> f32;
}
extern "C" {
    #[doc = " @brief Sets the thickness for a pen. This thickness determines the width of the outline of a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param width Indicates the thickness to set, which is a variable.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenSetWidth(pen: *mut OH_Drawing_Pen, width: f32);
}
extern "C" {
    #[doc = " @brief Obtains the stroke miter limit of a polyline drawn by a pen.\n\n When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded,\n and a mitered corner is displayed if the miter limit is not exceeded.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the miter limit.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenGetMiterLimit(pen: *const OH_Drawing_Pen) -> f32;
}
extern "C" {
    #[doc = " @brief Sets the stroke miter limit for a polyline drawn by a pen.\n\n When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded,\n and a mitered corner is displayed if the miter limit is not exceeded.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param miter Indicates a variable that describes the miter limit.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenSetMiterLimit(pen: *mut OH_Drawing_Pen, miter: f32);
}
#[doc = " There is no cap style. Both ends of the line segment are cut off square."]
pub const OH_Drawing_PenLineCapStyle_LINE_FLAT_CAP: OH_Drawing_PenLineCapStyle = 0;
#[doc = " Square cap style. Both ends have a square, the height of which\n is half of the width of the line segment, with the same width."]
pub const OH_Drawing_PenLineCapStyle_LINE_SQUARE_CAP: OH_Drawing_PenLineCapStyle = 1;
#[doc = " Round cap style. Both ends have a semicircle centered, the diameter of which\n is the same as the width of the line segment."]
pub const OH_Drawing_PenLineCapStyle_LINE_ROUND_CAP: OH_Drawing_PenLineCapStyle = 2;
#[doc = " @brief Enumerates line cap styles of a pen. The line cap style defines\n the style of both ends of a line segment drawn by the pen.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_PenLineCapStyle = u32;
extern "C" {
    #[doc = " @brief Obtains the line cap style of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the line cap style.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenGetCap(pen: *const OH_Drawing_Pen) -> OH_Drawing_PenLineCapStyle;
}
extern "C" {
    #[doc = " @brief Sets the line cap style for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param capStyle Indicates a variable that describes the line cap style.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenSetCap(pen: *mut OH_Drawing_Pen, capStyle: OH_Drawing_PenLineCapStyle);
}
#[doc = " Mitered corner. If the angle of a polyline is small, its miter length may be inappropriate.\n In this case, you need to use the miter limit to limit the miter length."]
pub const OH_Drawing_PenLineJoinStyle_LINE_MITER_JOIN: OH_Drawing_PenLineJoinStyle = 0;
#[doc = " Round corner."]
pub const OH_Drawing_PenLineJoinStyle_LINE_ROUND_JOIN: OH_Drawing_PenLineJoinStyle = 1;
#[doc = " Beveled corner."]
pub const OH_Drawing_PenLineJoinStyle_LINE_BEVEL_JOIN: OH_Drawing_PenLineJoinStyle = 2;
#[doc = " @brief Enumerates pen line join styles. The line join style defines\n the shape of the joints of a polyline segment drawn by the pen.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_PenLineJoinStyle = u32;
extern "C" {
    #[doc = " @brief Obtains the line join style of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the line join style.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenGetJoin(pen: *const OH_Drawing_Pen) -> OH_Drawing_PenLineJoinStyle;
}
extern "C" {
    #[doc = " @brief Sets the line join style for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param joinStyle Indicates a variable that describes the line join style.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenSetJoin(pen: *mut OH_Drawing_Pen, joinStyle: OH_Drawing_PenLineJoinStyle);
}
extern "C" {
    #[doc = " @brief Sets the shaderEffect for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_PenSetShaderEffect(
        pen: *mut OH_Drawing_Pen,
        shaderEffect: *mut OH_Drawing_ShaderEffect,
    );
}
extern "C" {
    #[doc = " @brief Sets the shadowLayer for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PenSetShadowLayer(
        pen: *mut OH_Drawing_Pen,
        shadowLayer: *mut OH_Drawing_ShadowLayer,
    );
}
extern "C" {
    #[doc = " @brief Sets the pathEffect for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param pathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PenSetPathEffect(
        pen: *mut OH_Drawing_Pen,
        pathEffect: *mut OH_Drawing_PathEffect,
    );
}
extern "C" {
    #[doc = " @brief Sets the filter for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_PenSetFilter(pen: *mut OH_Drawing_Pen, filter: *mut OH_Drawing_Filter);
}
extern "C" {
    #[doc = " @brief Gets the filter from a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PenGetFilter(pen: *mut OH_Drawing_Pen, filter: *mut OH_Drawing_Filter);
}
extern "C" {
    #[doc = " @brief Sets a blender that implements the specified blendmode enum for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param blendMode Indicates the blend mode.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PenSetBlendMode(pen: *mut OH_Drawing_Pen, blendMode: OH_Drawing_BlendMode);
}
extern "C" {
    #[doc = " @brief Gets the filled equivalent of the src path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param src Indicates the Path read to create a filled version.\n @param dst Indicates the resulting Path.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object that limits the PathEffect area if\nPen has PathEffect.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object that tranfomation applied to\nPathEffect if Pen has PathEffect.\n @return Returns true if get successes; false if get fails.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PenGetFillPath(
        pen: *mut OH_Drawing_Pen,
        src: *const OH_Drawing_Path,
        dst: *mut OH_Drawing_Path,
        rect: *const OH_Drawing_Rect,
        matrix: *const OH_Drawing_Matrix,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Resets all pen contents to their initial values.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PenReset(pen: *mut OH_Drawing_Pen);
}
extern "C" {
    #[doc = " @brief Gets an <b>OH_Drawing_PixelMap</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param nativePixelMap Indicates a pointer to an native pixelmap supported by image framework.\n @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PixelMapGetFromNativePixelMap(
        nativePixelMap: *mut NativePixelMap_,
    ) -> *mut OH_Drawing_PixelMap;
}
extern "C" {
    #[doc = " @brief Gets an <b>OH_Drawing_PixelMap</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pixelmapNative Indicates a pointer to the <b>OH_PixelmapNative</b> object supported by image framework.\n @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.\n         If nullptr is returned, the get operation fails.\n         The possible cause of the failure is that a nullptr is passed.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PixelMapGetFromOhPixelMapNative(
        pixelmapNative: *mut OH_PixelmapNative,
    ) -> *mut OH_Drawing_PixelMap;
}
extern "C" {
    #[doc = " @brief Dissolves the relationship between <b>OH_Drawing_PixelMap</b> object and <b>NativePixelMap_</b> or\n<b>OH_PixelmapNative</b> which is build by 'GetFrom' function.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pixelMap Indicates a pointer to the <b>OH_Drawing_PixelMap</b>.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PixelMapDissolve(pixelMap: *mut OH_Drawing_PixelMap);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Point</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param x Indicates the x-axis coordinates of the point.\n @param y Indicates the y-axis coordinates of the point.\n @return Returns the pointer to the <b>OH_Drawing_Point</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_PointCreate(x: f32, y: f32) -> *mut OH_Drawing_Point;
}
extern "C" {
    #[doc = " @brief Gets the x-axis coordinate of the point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param x Indicates the x-axis coordinate of the point.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point or x is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PointGetX(
        point: *const OH_Drawing_Point,
        x: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the y-axis coordinate of the point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param y Indicates the y-axis coordinate of the point.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point or y is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PointGetY(
        point: *const OH_Drawing_Point,
        y: *mut f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the x-axis and y-axis coordinates of the point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param x Indicates the x-axis coordinate of the point.\n @param y Indicates the y-axis coordinate of the point.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PointSet(
        point: *mut OH_Drawing_Point,
        x: f32,
        y: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Point</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_PointDestroy(point: *mut OH_Drawing_Point);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_RecordCmdUtils</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_RecordCmdUtils</b> object created.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_RecordCmdUtilsCreate() -> *mut OH_Drawing_RecordCmdUtils;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_RecordCmdUtils</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param recordCmdUtils Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if recordCmdUtils is nullptr.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_RecordCmdUtilsDestroy(
        recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get the canvas that records the drawing command.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param recordCmdUtils Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object.\n @param width Width of canvas object.\n @param height Height of canvas object.\n @param canvas Indicates a secondary pointer to an <b>OH_Drawing_Canvas</b>object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if recordCmdUtils or canvas is nullptr,\n         width less than or equal to 0 or height less than or equal to 0.\n         Returns {@link OH_DRAWING_ERROR_ALLOCATION_FAILED} if no memory.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_RecordCmdUtilsBeginRecording(
        recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
        width: i32,
        height: i32,
        canvas: *mut *mut OH_Drawing_Canvas,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Finish the recording and get the recording command object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param recordCmdUtils Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object.\n @param recordCmd Indicates a secondary pointer to an <b>OH_Drawing_RecordCmd</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if recordCmdUtils or recordCmd is nullptr.\n         Returns {@link OH_DRAWING_ERROR_ALLOCATION_FAILED} if no memory.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_RecordCmdUtilsFinishRecording(
        recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
        recordCmd: *mut *mut OH_Drawing_RecordCmd,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_RecordCmd</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param recordCmd Indicates the pointer to an <b>OH_Drawing_RecordCmd</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if recordCmd is nullptr.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_RecordCmdDestroy(
        recordCmd: *mut OH_Drawing_RecordCmd,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Rect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param left Indicates the left position of the rect.\n @param top Indicates the top position of the rect.\n @param right Indicates the right position of the rect.\n @param bottom Indicates the bottom position of the rect.\n @return Returns the pointer to the <b>OH_Drawing_Rect</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RectCreate(
        left: f32,
        top: f32,
        right: f32,
        bottom: f32,
    ) -> *mut OH_Drawing_Rect;
}
extern "C" {
    #[doc = " @brief If rect intersects other, sets rect to intersection.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns true if have area in common.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectIntersect(
        rect: *mut OH_Drawing_Rect,
        other: *const OH_Drawing_Rect,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Sets rect to the union of rect and other.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns true if rect and other are not nullptr, and other is not empty;\n         false if rect or other is nullptr, or other is empty.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectJoin(rect: *mut OH_Drawing_Rect, other: *const OH_Drawing_Rect) -> bool;
}
extern "C" {
    #[doc = " @brief Set the left position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param left Indicates the left position of the rect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectSetLeft(rect: *mut OH_Drawing_Rect, left: f32);
}
extern "C" {
    #[doc = " @brief Set the top position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param top Indicates the top position of the rect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectSetTop(rect: *mut OH_Drawing_Rect, top: f32);
}
extern "C" {
    #[doc = " @brief Set the right position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param right Indicates the right position of the rect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectSetRight(rect: *mut OH_Drawing_Rect, right: f32);
}
extern "C" {
    #[doc = " @brief Set the bottom position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param bottom Indicates the bottom position of the rect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectSetBottom(rect: *mut OH_Drawing_Rect, bottom: f32);
}
extern "C" {
    #[doc = " @brief Get the left position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return the left position of the rect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetLeft(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Get the top position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return the top position of the rect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetTop(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Get the right position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return the right position of the rect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetRight(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Get the bottom position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return the bottom position of the rect.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetBottom(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Get the height position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetHeight(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Get the width position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the width.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetWidth(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Copy the original rectangular object to the destination rectangular object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param src Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param dst Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectCopy(src: *mut OH_Drawing_Rect, dst: *mut OH_Drawing_Rect);
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Rect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RectDestroy(rect: *mut OH_Drawing_Rect);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Array</b> object, which is used to store multiple <b>OH_Drawing_Rect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param size Indicates the size of the array object.\n @return Returns the pointer to the <b>OH_Drawing_Array</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty,\n         or size is invalid.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_RectCreateArray(size: usize) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Gets the size of an <b>OH_Drawing_Array</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rectArray Indicates the array object.\n @param pSize Indicates the size pointer.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or pSize is nullptr.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_RectGetArraySize(
        rectArray: *mut OH_Drawing_Array,
        pSize: *mut usize,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Gets the specified <b>OH_Drawing_Rect</b> object from <b>OH_Drawing_Array</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rectArray Indicates the array object.\n @param index Indicates the index of array, caller must make sure the index is valid.\n @param rect Pointers to Pointer of <b>OH_Drawing_Rect</b> object, returned to the caller.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or rect is nullptr,\n                 or index is valid.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_RectGetArrayElement(
        rectArray: *mut OH_Drawing_Array,
        index: usize,
        rect: *mut *mut OH_Drawing_Rect,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an array <b>OH_Drawing_Rect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rectArray Indicates the pointer to an <b>OH_Drawing_Array</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray is nullptr.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_RectDestroyArray(rectArray: *mut OH_Drawing_Array) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Determine whether one <b>OH_Drawing_Rect</b> object totally contains another <b>OH_Drawing_Rect</b> object.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param isContains Indicates whether rect totally contains other.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect, other or isContains is nullptr.\n @since 22\n @version 1.0"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_RectContains(
        rect: *mut OH_Drawing_Rect,
        other: *const OH_Drawing_Rect,
        isContains: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Add the specified values to the left and top boundaried of an <b>OH_Drawing_Rect</b> object.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param left Indicates the value added to the left boundary of an <b>OH_Drawing_Rect</b> object.\n @param top Indicates the value added to the top boundary of an <b>OH_Drawing_Rect</b> object.\n @param right Indicates the value added to the right boundary of an <b>OH_Drawing_Rect</b> object.\n @param bottom Indicates the value added to the bottom boundary of an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 22\n @version 1.0"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_RectInset(
        rect: *mut OH_Drawing_Rect,
        left: f32,
        top: f32,
        right: f32,
        bottom: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if rect is empty.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param isEmpty Indicates whether rect is empty.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect or isEmpty is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RectIsEmpty(
        rect: *const OH_Drawing_Rect,
        isEmpty: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Offsets rect by adding dx to its left and right coordinates, and adding dy to its top and bottom\n coordinates.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param dx Indicates the distance to offset on the x-axis in pixels.\n @param dy Indicates the distance to offset on the y-axis in pixels.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RectOffset(
        rect: *mut OH_Drawing_Rect,
        dx: f32,
        dy: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Offsets rect to a specific position and keeps the width and height unchanged.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param newLeft Indicates the new left coordinate.\n @param newTop Indicates the new top coordinate.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RectOffsetTo(
        rect: *mut OH_Drawing_Rect,
        newLeft: f32,
        newTop: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the boundary coordinates of rect to zero.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RectSetEmpty(rect: *mut OH_Drawing_Rect) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Swaps the left and right if the left is greater than right; and swaps top and bottom if the top is greater\n than bottom. If the edges are already valid, then nothing is done.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RectSort(rect: *mut OH_Drawing_Rect) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets rect to the union of itself and another.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect or other is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RectUnion(
        rect: *mut OH_Drawing_Rect,
        other: *const OH_Drawing_Rect,
    ) -> OH_Drawing_ErrorCode;
}
#[doc = " Difference operation."]
pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_DIFFERENCE: OH_Drawing_RegionOpMode = 0;
#[doc = " Intersect operation."]
pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_INTERSECT: OH_Drawing_RegionOpMode = 1;
#[doc = " Union operation."]
pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_UNION: OH_Drawing_RegionOpMode = 2;
#[doc = " Xor operation."]
pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_XOR: OH_Drawing_RegionOpMode = 3;
#[doc = " Reverse difference operation."]
pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_REVERSE_DIFFERENCE: OH_Drawing_RegionOpMode = 4;
#[doc = " Replace operation."]
pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_REPLACE: OH_Drawing_RegionOpMode = 5;
#[doc = " @brief Operations when two regions are combined.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_RegionOpMode = u32;
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Region</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Region</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RegionCreate() -> *mut OH_Drawing_Region;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Region</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object to copy.\n @return Returns the pointer to the <b>OH_Drawing_Region</b> object created.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_RegionCopy(region: *const OH_Drawing_Region) -> *mut OH_Drawing_Region;
}
extern "C" {
    #[doc = " @brief Determines whether the region contains the specified coordinates.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param x x-coordinate.\n @param y y-coordinate.\n @return Returns <b>true</b> if (x, y) is inside region; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RegionContains(region: *mut OH_Drawing_Region, x: i32, y: i32) -> bool;
}
extern "C" {
    #[doc = " @brief Combines two regions.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param op Indicates the operation to apply to combine.\n @return Returns <b>true</b> if constructed Region is not empty; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RegionOp(
        region: *mut OH_Drawing_Region,
        other: *const OH_Drawing_Region,
        op: OH_Drawing_RegionOpMode,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Sets the region to the specified rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return true if constructed Region is not empty.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RegionSetRect(
        region: *mut OH_Drawing_Region,
        rect: *const OH_Drawing_Rect,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Constructs region that matchs outline of path within clip.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param clip Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @return Returns <b>true</b> if constructed Region is not empty; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RegionSetPath(
        region: *mut OH_Drawing_Region,
        path: *const OH_Drawing_Path,
        clip: *const OH_Drawing_Region,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Region</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RegionDestroy(region: *mut OH_Drawing_Region);
}
extern "C" {
    #[doc = " @brief Set an <b>OH_Drawing_Region</b> empty.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region is nullptr.\n @since 22\n @version 1.0"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_RegionEmpty(region: *mut OH_Drawing_Region) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Set the path to the boundary of the region. If the region is empty, the path will also be empty.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or path is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegionGetBoundaryPath(
        region: *const OH_Drawing_Region,
        path: *mut OH_Drawing_Path,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the minimum bounding rectangle that encloses this path.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or rect is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegionGetBounds(
        region: *const OH_Drawing_Region,
        rect: *mut OH_Drawing_Rect,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the region contains more than one rectangle.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param isComplex Indicates if the region is complex.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isComplex is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegionIsComplex(
        region: *const OH_Drawing_Region,
        isComplex: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the region is empty.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param isEmpty Indicates if the region is empty.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isEmpty is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegionIsEmpty(
        region: *const OH_Drawing_Region,
        isEmpty: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the region is equivalent to a single rectangle.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param isRect Indicates if the region contains a single rectangle.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isRect is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegionIsRect(
        region: *const OH_Drawing_Region,
        isRect: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the region is equivalent to a single rectangle and it contains the specified rectangle.\n A false indicates that the region is not equivalent to a single rectangle or the rectangle is not contained by\n this region. A true is a guarantee that the rectangle is contained by this region.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param left Indicates the left position of the rect.\n @param top Indicates the top position of the rect.\n @param right Indicates the right position of the rect.\n @param bottom Indicates the bottom position of the rect.\n @param isContained Indicates if the specified rectangle is contained in the region.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isContained is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegionQuickContains(
        region: *const OH_Drawing_Region,
        left: i32,
        top: i32,
        right: i32,
        bottom: i32,
        isContained: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the region is empty, or if the specified rectangle does not intersect the region.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param left Indicates the left position of the rect.\n @param top Indicates the top position of the rect.\n @param right Indicates the right position of the rect.\n @param bottom Indicates the bottom position of the rect.\n @param isReject Indicates if the specified rectangle does not intersect the region.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isReject is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegionQuickReject(
        region: *const OH_Drawing_Region,
        left: i32,
        top: i32,
        right: i32,
        bottom: i32,
        isReject: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Translates the region by dx, dy. If the region is empty, do nothing.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param dx Indicates the distance to translate on x-axis in pixels.\n @param dy Indicates the distance to translate on y-axis in pixels.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region is nullptr.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegionTranslate(
        region: *mut OH_Drawing_Region,
        dx: i32,
        dy: i32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Defines an <b>OH_Drawing_RegisterFont</b>, which is used to register a customized font in the FontManager.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param OH_Drawing_FontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family-name of the font which need to register.\n @param familySrc Indicates the path of the font file which need to register.\n @return error code.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RegisterFont(
        arg1: *mut OH_Drawing_FontCollection,
        fontFamily: *const ::std::os::raw::c_char,
        familySrc: *const ::std::os::raw::c_char,
    ) -> u32;
}
extern "C" {
    #[doc = " @brief Defines an <b>OH_Drawing_RegisterFontBuffer</b>, which is used to register a customized font in the\n        FontManager.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param OH_Drawing_FontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family-name of the font which need to register.\n @param fontBuffer Indicates the buffer of the font file which need to register.\n @param length Indicates the length of the font file which need to register.\n @return error code.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RegisterFontBuffer(
        arg1: *mut OH_Drawing_FontCollection,
        fontFamily: *const ::std::os::raw::c_char,
        fontBuffer: *mut u8,
        length: usize,
    ) -> u32;
}
extern "C" {
    #[doc = " @brief Defines an <b>OH_Drawing_RegisterFontByIndex</b>, which is used to register font from ttc file.\n\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family name of the font which need to register.\n @param familySrc Indicates the path of the font file which need to register.\n @param index Indicates the index of the font data in the ttc file.\n @return error code.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegisterFontByIndex(
        fontCollection: *mut OH_Drawing_FontCollection,
        fontFamily: *const ::std::os::raw::c_char,
        familySrc: *const ::std::os::raw::c_char,
        index: u32,
    ) -> u32;
}
extern "C" {
    #[doc = " @brief Defines an <b>OH_Drawing_RegisterFontBufferByIndex</b>, which is used to register font from ttc buffer.\n\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family name of the font which need to register.\n @param fontBuffer Indicates the font data which need to register.\n @param length Indicates the font data length.\n @param index Indicates the index of the font data in the ttc file.\n @return error code.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RegisterFontBufferByIndex(
        fontCollection: *mut OH_Drawing_FontCollection,
        fontFamily: *const ::std::os::raw::c_char,
        fontBuffer: *mut u8,
        length: usize,
        index: u32,
    ) -> u32;
}
extern "C" {
    #[doc = " @brief Unregister a customized font by the font family.\n Unregistering a font that is currently in use by UI components may lead to text rendering anomalies,\n including garbled characters or missing glyphs.\n All typography using the unregistered font family should be destroyed and re-created.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family-name of the font which need to be unregistered.\n @return error code.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_UnregisterFont(
        fontCollection: *mut OH_Drawing_FontCollection,
        fontFamily: *const ::std::os::raw::c_char,
    ) -> u32;
}
extern "C" {
    #[doc = " @brief Checks whether the font format specified by the path is supported.\n\n @param path The absolute path to the font file.\n @return Returns true if the font is supported; otherwise, returns false.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_IsFontSupportedFromPath(path: *const ::std::os::raw::c_char) -> bool;
}
extern "C" {
    #[doc = " @brief Checks whether the font format specified by the buffer is supported.\n\n @param data A pointer to the memory buffer containing font data.\n @param dataLength The size of the font data in bytes.\n @return Returns true if the font is supported; otherwise, returns false.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_IsFontSupportedFromBuffer(data: *mut u8, dataLength: usize) -> bool;
}
#[doc = " Index of top-left corner radii."]
pub const OH_Drawing_CornerPos_CORNER_POS_TOP_LEFT: OH_Drawing_CornerPos = 0;
#[doc = " Index of top-right corner radii."]
pub const OH_Drawing_CornerPos_CORNER_POS_TOP_RIGHT: OH_Drawing_CornerPos = 1;
#[doc = " Index of bottom-right corner radii."]
pub const OH_Drawing_CornerPos_CORNER_POS_BOTTOM_RIGHT: OH_Drawing_CornerPos = 2;
#[doc = " Index of bottom-left corner radii."]
pub const OH_Drawing_CornerPos_CORNER_POS_BOTTOM_LEFT: OH_Drawing_CornerPos = 3;
#[doc = " @brief Enumerates of corner radii position.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_CornerPos = u32;
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_RoundRect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param xRad Indicates the corner radii on x-axis.\n @param yRad Indicates the corner radii on y-axis.\n @return Returns the pointer to the <b>OH_Drawing_RoundRect</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RoundRectCreate(
        rect: *const OH_Drawing_Rect,
        xRad: f32,
        yRad: f32,
    ) -> *mut OH_Drawing_RoundRect;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_RoundRect</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object to copy.\n @return Returns the pointer to the <b>OH_Drawing_RoundRect</b> object created.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_RoundRectCopy(
        roundRect: *const OH_Drawing_RoundRect,
    ) -> *mut OH_Drawing_RoundRect;
}
extern "C" {
    #[doc = " @brief Sets the radiusX and radiusY for a specific corner position.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param pos Indicates the corner radii position.\n @param radii Indicates the corner radii on x-axis and y-axis.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RoundRectSetCorner(
        roundRect: *mut OH_Drawing_RoundRect,
        pos: OH_Drawing_CornerPos,
        radii: OH_Drawing_Corner_Radii,
    );
}
extern "C" {
    #[doc = " @brief Gets an <b>OH_Drawing_Corner_Radii</b> struct, the point is round corner radiusX and radiusY.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @param pos Indicates the corner radii position.\n @return Returns the corner radii of <b>OH_Drawing_Corner_Radii</b> struct.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RoundRectGetCorner(
        roundRect: *mut OH_Drawing_RoundRect,
        pos: OH_Drawing_CornerPos,
    ) -> OH_Drawing_Corner_Radii;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_RoundRect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RoundRectDestroy(roundRect: *mut OH_Drawing_RoundRect);
}
extern "C" {
    #[doc = " @brief Translates round rect by (dx, dy).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @param dx Indicates the offsets added to rect left and rect right.\n @param dy Indicates the offsets added to rect top and rect bottom.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if roundRect is nullptr.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RoundRectOffset(
        roundRect: *mut OH_Drawing_RoundRect,
        dx: f32,
        dy: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_ShadowLayer</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param blurRadius Indicates the blur radius of the shadow.\n @param x Indicates the offset point on x-axis.\n @param y Indicates the offset point on y-axis.\n @param color Indicates the shadow color.\n @return Returns the pointer to the <b>OH_Drawing_ShadowLayer</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShadowLayerCreate(
        blurRadius: f32,
        x: f32,
        y: f32,
        color: u32,
    ) -> *mut OH_Drawing_ShadowLayer;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_ShadowLayer</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShadowLayerDestroy(shadowLayer: *mut OH_Drawing_ShadowLayer);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Surface</b> object on GPU indicated by context.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param gpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.\n @param flag Indicates whether an allocation should count against a cache budget.\n @param imageInfo Indicates the image info.\n @return Returns the pointer to the <b>OH_Drawing_Surface</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SurfaceCreateFromGpuContext(
        gpuContext: *mut OH_Drawing_GpuContext,
        flag: bool,
        imageInfo: OH_Drawing_Image_Info,
    ) -> *mut OH_Drawing_Surface;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Surface</b> object on GPU indicated by context which is on-screen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param gpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.\n @param imageInfo Indicates the image info.\n @param window Indicates the pointer of the screen window.\n @return Returns the pointer to the <b>OH_Drawing_Surface</b> object created.\n @since 16\n @version 1.0"]
    #[cfg(feature = "api-16")]
    pub fn OH_Drawing_SurfaceCreateOnScreen(
        gpuContext: *mut OH_Drawing_GpuContext,
        imageInfo: OH_Drawing_Image_Info,
        window: *mut ::std::os::raw::c_void,
    ) -> *mut OH_Drawing_Surface;
}
extern "C" {
    #[doc = " @brief Gets the canvas that draws into surface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Canvas</b> object. The returned pointer does not need to be managed\n         by the caller.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SurfaceGetCanvas(surface: *mut OH_Drawing_Surface) -> *mut OH_Drawing_Canvas;
}
extern "C" {
    #[doc = " @brief Resolves all pending GPU operations on the surface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if surface is nullptr.\n @since 16\n @version 1.0"]
    #[cfg(feature = "api-16")]
    pub fn OH_Drawing_SurfaceFlush(surface: *mut OH_Drawing_Surface) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Surface</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SurfaceDestroy(surface: *mut OH_Drawing_Surface);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_TextBlobBuilder</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_TextBlobBuilder</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TextBlobBuilderCreate() -> *mut OH_Drawing_TextBlobBuilder;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_TextBlob</b> object from text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param text Indicates the the pointer to text.\n @param byteLength Indicates the text length.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextBlobCreateFromText(
        text: *const ::std::os::raw::c_void,
        byteLength: usize,
        font: *const OH_Drawing_Font,
        textEncoding: OH_Drawing_TextEncoding,
    ) -> *mut OH_Drawing_TextBlob;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_TextBlob</b> object from pos text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param text Indicates the the pointer to text.\n @param byteLength Indicates the text length.\n @param point2D Indicates the pointer to an <b>OH_Drawing_Point2D</b> array object.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextBlobCreateFromPosText(
        text: *const ::std::os::raw::c_void,
        byteLength: usize,
        point2D: *mut OH_Drawing_Point2D,
        font: *const OH_Drawing_Font,
        textEncoding: OH_Drawing_TextEncoding,
    ) -> *mut OH_Drawing_TextBlob;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_TextBlob</b> object from pos text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param str Indicates the the pointer to text.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextBlobCreateFromString(
        str_: *const ::std::os::raw::c_char,
        font: *const OH_Drawing_Font,
        textEncoding: OH_Drawing_TextEncoding,
    ) -> *mut OH_Drawing_TextBlob;
}
extern "C" {
    #[doc = " @brief Gets the bounds of textblob, assigned to the pointer to an <b>OH_Drawing_Rect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextBlobGetBounds(
        textBlob: *mut OH_Drawing_TextBlob,
        rect: *mut OH_Drawing_Rect,
    );
}
extern "C" {
    #[doc = " @brief Gets a non-zero value unique among all <b>OH_Drawing_TextBlob</b> objects.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.\n @return Returns identifier for the <b>OH_Drawing_TextBlob</b> object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextBlobUniqueID(textBlob: *const OH_Drawing_TextBlob) -> u32;
}
#[doc = " @brief Defines a run, supplies storage for glyphs and positions.\n\n @since 11\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RunBuffer {
    #[doc = " storage for glyph indexes in run"]
    pub glyphs: *mut u16,
    #[doc = " storage for glyph positions in run"]
    pub pos: *mut f32,
    #[doc = " storage for text UTF-8 code units in run"]
    pub utf8text: *mut ::std::os::raw::c_char,
    #[doc = " storage for glyph clusters (index of UTF-8 code unit)"]
    pub clusters: *mut u32,
}
extern "C" {
    #[doc = " @brief Alloc run with storage for glyphs and positions. The returned pointer does not need to be managed\n by the caller and is forbidden to be used after OH_Drawing_TextBlobBuilderMake is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param count Indicates the number of glyphs.\n @param rect Indicates the optional run bounding box.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TextBlobBuilderAllocRunPos(
        textBlobBuilder: *mut OH_Drawing_TextBlobBuilder,
        font: *const OH_Drawing_Font,
        count: i32,
        rect: *const OH_Drawing_Rect,
    ) -> *const OH_Drawing_RunBuffer;
}
extern "C" {
    #[doc = " @brief Make an <b>OH_Drawing_TextBlob</b> from <b>OH_Drawing_TextBlobBuilder</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TextBlobBuilderMake(
        textBlobBuilder: *mut OH_Drawing_TextBlobBuilder,
    ) -> *mut OH_Drawing_TextBlob;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_TextBlob</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TextBlobDestroy(textBlob: *mut OH_Drawing_TextBlob);
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_TextBlobBuilder</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TextBlobBuilderDestroy(textBlobBuilder: *mut OH_Drawing_TextBlobBuilder);
}
#[doc = " All font types"]
#[cfg(feature = "api-14")]
pub const OH_Drawing_SystemFontType_ALL: OH_Drawing_SystemFontType = 1;
#[doc = " System generic font type"]
#[cfg(feature = "api-14")]
pub const OH_Drawing_SystemFontType_GENERIC: OH_Drawing_SystemFontType = 2;
#[doc = " Stylish font type"]
#[cfg(feature = "api-14")]
pub const OH_Drawing_SystemFontType_STYLISH: OH_Drawing_SystemFontType = 4;
#[doc = " Installed font types"]
#[cfg(feature = "api-14")]
pub const OH_Drawing_SystemFontType_INSTALLED: OH_Drawing_SystemFontType = 8;
#[doc = " Customized font types\n @since 18"]
#[cfg(feature = "api-18")]
pub const OH_Drawing_SystemFontType_CUSTOMIZED: OH_Drawing_SystemFontType = 16;
#[doc = " @brief An enumeration of system font types.\n\n @since 14"]
#[cfg(feature = "api-14")]
pub type OH_Drawing_SystemFontType = u32;
#[doc = " The file path of the font"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_PATH:
    OH_Drawing_FontFullDescriptorAttributeId = 0;
#[doc = " A name that uniquely identifies the font"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_POSTSCRIPT_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 1;
#[doc = " The full name of the font"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_FULL_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 2;
#[doc = " The family name of the font"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_FAMILY_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 3;
#[doc = " The subfont family of the font"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_SUB_FAMILY_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 4;
#[doc = " The weight of the font"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_WEIGHT:
    OH_Drawing_FontFullDescriptorAttributeId = 5;
#[doc = " The width of the font"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_WIDTH:
    OH_Drawing_FontFullDescriptorAttributeId = 6;
#[doc = " Whether the font is tilted"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_ITALIC:
    OH_Drawing_FontFullDescriptorAttributeId = 7;
#[doc = " Whether the font is monospaced"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_B_MONO:
    OH_Drawing_FontFullDescriptorAttributeId = 8;
#[doc = " whether symbolic fonts are supported"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_B_SYMBOLIC:
    OH_Drawing_FontFullDescriptorAttributeId = 9;
#[doc = " The local postscript name of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_POSTSCRIPT_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 10;
#[doc = " The local full name of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_FULL_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 11;
#[doc = " The local family name of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_FAMILY_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 12;
#[doc = " The local sub family name of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_SUB_FAMILY_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 13;
#[doc = " The version of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_VERSION:
    OH_Drawing_FontFullDescriptorAttributeId = 14;
#[doc = " The manufacture of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_MANUFACTURE:
    OH_Drawing_FontFullDescriptorAttributeId = 15;
#[doc = " The copyright of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_COPYRIGHT:
    OH_Drawing_FontFullDescriptorAttributeId = 16;
#[doc = " The trademark of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_TRADEMARK:
    OH_Drawing_FontFullDescriptorAttributeId = 17;
#[doc = " The license of the font\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LICENSE:
    OH_Drawing_FontFullDescriptorAttributeId = 18;
#[doc = " The font index in ttc file\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_INDEX:
    OH_Drawing_FontFullDescriptorAttributeId = 21;
#[doc = " @brief An enumeration of font full descriptor attribute.\n\n @since 22"]
#[cfg(feature = "api-22")]
pub type OH_Drawing_FontFullDescriptorAttributeId = u32;
extern "C" {
    #[doc = " @brief Obtain all system font descriptive symbols that match the specified font descriptor. Where the 'path'\n fields are not considered as valid matching values, It takes effect when the remaining fields are not\n default values, If all the fields of the parameters <b>OH_Drawing_FontDescriptor</b> are default, obtain all system\n font descriptors. If the match fails, return nullptr.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param desc The pointer to the <b>OH_Drawing_FontDescriptor</b> object. It is recommended to\n use <b>OH_Drawing_CreateFontDescriptor</b> to obtain a valid <b>OH_Drawing_FontDescriptor</b> instance.\n If you create your own <b>OH_Drawing_FontDescriptor</b> object, ensure that fields not intended for matching are\n set to their default values.\n @param num Indicates the count of obtained <b>OH_Drawing_FontDescriptor</b>.\n @return Returns an array of <b>OH_Drawing_FontDescriptor</b>. Released through the\n <b>OH_Drawing_DestroyFontDescriptors</b> interface after use.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_MatchFontDescriptors(
        desc: *mut OH_Drawing_FontDescriptor,
        num: *mut usize,
    ) -> *mut OH_Drawing_FontDescriptor;
}
extern "C" {
    #[doc = " @brief Releases the <b>OH_Drawing_FontDescriptor</b> array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param descriptors <b>OH_Drawing_FontDescriptor</b> object array.\n @param num Represents the number of members of the <b>OH_Drawing_FontDescriptor</b> array.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyFontDescriptors(
        descriptors: *mut OH_Drawing_FontDescriptor,
        num: usize,
    );
}
extern "C" {
    #[doc = " @brief Get the <b>OH_Drawing_FontDescriptor</b> object by the font full name and the font type, supporting generic\n fonts, stylish fonts, and installed fonts.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullName Indicates the full name object <b>OH_Drawing_String</b>.\n @param fontType Indicates enumerates of system font type object <b>OH_Drawing_SystemFontType</b>.\n @return Returns the pointer to a font descriptor object <b>OH_Drawing_FontDescriptor</b>.\n @since 14"]
    #[cfg(feature = "api-14")]
    pub fn OH_Drawing_GetFontDescriptorByFullName(
        fullName: *const OH_Drawing_String,
        fontType: OH_Drawing_SystemFontType,
    ) -> *mut OH_Drawing_FontDescriptor;
}
extern "C" {
    #[doc = " @brief Obtain the corresponding font full name array by the font type.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontType Indicates enumerates of system font type object <b>OH_Drawing_SystemFontType</b>.\n @return Returns the pointer to full name array object <b>OH_Drawing_Array</b>.\n @since 14"]
    #[cfg(feature = "api-14")]
    pub fn OH_Drawing_GetSystemFontFullNamesByType(
        fontType: OH_Drawing_SystemFontType,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Get the specified full name object <b>OH_Drawing_String</b> by index from the\n <b>OH_Drawing_Array</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullNameArray Indicates an array of full name object <b>OH_Drawing_Array</b>.\n @param index The index of full name.\n @return Returns a full name object <b>OH_Drawing_String</b>.\n @since 14"]
    #[cfg(feature = "api-14")]
    pub fn OH_Drawing_GetSystemFontFullNameByIndex(
        fullNameArray: *mut OH_Drawing_Array,
        index: usize,
    ) -> *const OH_Drawing_String;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an array of font full names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullNameArray Indicates an array of full name object <b>OH_Drawing_Array</b>.\n @since 14"]
    #[cfg(feature = "api-14")]
    pub fn OH_Drawing_DestroySystemFontFullNames(fullNameArray: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Retrieves an array of font full descriptors from raw binary data.\n\n @param data Pointer to the raw binary font data buffer.\n @param size Size of the font data buffer in bytes.\n @return Returns a pointer to <b>OH_Drawing_Array</b> containing font full descriptors.\n         Returns <b>NULL</b> if the operation fails due to invalid data format or parsing errors.\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_GetFontFullDescriptorsFromStream(
        data: *const ::std::os::raw::c_void,
        size: usize,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Obtains an array of font full descriptors from font file path.\n\n @param path The font file path.\n @return Returns a pointer to <b>OH_Drawing_Array</b> structure containing font full descriptors.\n         Returns <b>NULL</b> if no fonts are found, invalid path, no permission, or non-font file.\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_GetFontFullDescriptorsFromPath(
        path: *const ::std::os::raw::c_char,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Retrieves a font full descriptor from an array by index.\n\n @param descriptorArray Pointer to the array of font full descriptors <b>OH_Drawing_Array</b>.\n @param index Zero-based index position of the descriptor to retrieve.\n @return Returns a pointer to <b>OH_Drawing_FontFullDescriptor</b> at the specified index.\n         Returns <b>NULL</b> if the index is out of bounds or the array is invalid.\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_GetFontFullDescriptorByIndex(
        descriptorArray: *mut OH_Drawing_Array,
        index: usize,
    ) -> *const OH_Drawing_FontFullDescriptor;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an array of font full descriptors.\n\n @param descriptorArray Pointer to the array of font full descriptors <b>OH_Drawing_Array</b>.\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_DestroyFontFullDescriptors(descriptorArray: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Defines an <b>OH_Drawing_GetFontUnicodeArrayFromFile</b>, which is used to get unicode from font file.\n\n @param fontSrc Indicates the path of the font file.\n @param index Indicates the index of the font data in the ttc file.\n @param unicodeArray Output parameter to receive unicode, When no longer needed, use 'free()' to release.\n @param arrayLength Output parameter to receive the length of the unicode array.\n @return error code.\n         Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n         Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the fontSrc is invalid or non-font file.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetFontUnicodeArrayFromFile(
        fontSrc: *const ::std::os::raw::c_char,
        index: u32,
        unicodeArray: *mut *mut i32,
        arrayLength: *mut i32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Defines an <b>OH_Drawing_GetFontUnicodeArrayFromBuffer</b>, which is used to get unicode from font buffer.\n\n @param fontBuffer Indicates the font data.\n @param length Indicates the font data length.\n @param index Indicates the index of the font data in the ttc file.\n @param unicodeArray Output parameter to receive unicode, When no longer needed, use 'free()' to release.\n @param arrayLength Output parameter to receive the length of the unicode array.\n @return error code.\n         Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n         Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the fontBuffer is invalid or non-font buffer.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetFontUnicodeArrayFromBuffer(
        fontBuffer: *mut u8,
        length: usize,
        index: u32,
        unicodeArray: *mut *mut i32,
        arrayLength: *mut i32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Retrieves an integer attribute value from a font full descriptor.\n\n @param descriptor Pointer to the font full descriptor <b>OH_Drawing_FontFullDescriptor</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontFullDescriptorAttributeId</b> enumeration.\n @param value Output parameter to receive the requested integer attribute value.\n @return Returns the error code.\n         Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n         Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the descriptor or value is NULL.\n         Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_GetFontFullDescriptorAttributeInt(
        descriptor: *const OH_Drawing_FontFullDescriptor,
        id: OH_Drawing_FontFullDescriptorAttributeId,
        value: *mut ::std::os::raw::c_int,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Retrieves a boolean attribute value from a font full descriptor.\n\n @param descriptor Pointer to the font full descriptor <b>OH_Drawing_FontFullDescriptor</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontFullDescriptorAttributeId</b> enumeration.\n @param value Output parameter to receive the requested boolean attribute value.\n @return Returns the error code.\n         Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n         Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the descriptor or value is NULL.\n         Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_GetFontFullDescriptorAttributeBool(
        descriptor: *const OH_Drawing_FontFullDescriptor,
        id: OH_Drawing_FontFullDescriptorAttributeId,
        value: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Retrieves a string attribute value from a font full descriptor.\n\n @note The caller is responsible for manually releasing the internal <b>strData</b> member of the\n       <b>OH_Drawing_String</b> structure when it is no longer needed.\n\n @param descriptor Pointer to the font full descriptor <b>OH_Drawing_FontFullDescriptor</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontFullDescriptorAttributeId</b> enumeration.\n @param str Output parameter to receive pointer to the requested string attribute value.\n @return Returns the error code.\n         Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n         Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the descriptor or str is NULL.\n         Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_GetFontFullDescriptorAttributeString(
        descriptor: *const OH_Drawing_FontFullDescriptor,
        id: OH_Drawing_FontFullDescriptorAttributeId,
        str_: *mut OH_Drawing_String,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Defines an <b>OH_Drawing_GetFontCountFromFile</b>, which is used to get font count from font file.\n\n @param fontSrc Indicates the path of the font file.\n @return font count.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetFontCountFromFile(fontSrc: *const ::std::os::raw::c_char) -> u32;
}
extern "C" {
    #[doc = " @brief Defines an <b>OH_Drawing_GetFontCountFromBuffer</b>, which is used to get font count from font buffer.\n\n @param fontBuffer Indicates the font data.\n @param length Indicates the font data length.\n @return font count.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetFontCountFromBuffer(fontBuffer: *mut u8, length: usize) -> u32;
}
extern "C" {
    #[doc = " @brief Get the font path list.\n @param fontType Indicates enumerates of system font type object <b>OH_Drawing_SystemFontType</b>.\n @param pathCount The count of return path list.\n @return Returns a font path object <b>OH_Drawing_String</b> list.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetFontPathsByType(
        fontType: OH_Drawing_SystemFontType,
        pathCount: *mut usize,
    ) -> *mut OH_Drawing_String;
}
#[doc = " Follow system's high contrast settings for text rendering"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextHighContrast_TEXT_FOLLOW_SYSTEM_HIGH_CONTRAST:
    OH_Drawing_TextHighContrast = 0;
#[doc = " Disable high contrast rendering regardless of system settings"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextHighContrast_TEXT_APP_DISABLE_HIGH_CONTRAST: OH_Drawing_TextHighContrast =
    1;
#[doc = " Enable high contrast rendering regardless of system settings"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextHighContrast_TEXT_APP_ENABLE_HIGH_CONTRAST: OH_Drawing_TextHighContrast =
    2;
#[doc = " @brief Defines text rendering high contrast mode to enhance readability.\n @since 20\n @version 1.0"]
#[cfg(feature = "api-20")]
pub type OH_Drawing_TextHighContrast = u32;
#[doc = " Uses the glyph defined in the font file, which could be an empty box, blank space, or custom symbol etc."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextUndefinedGlyphDisplay_TEXT_NO_GLYPH_USE_DEFAULT:
    OH_Drawing_TextUndefinedGlyphDisplay = 0;
#[doc = " Always render tofu blocks for missing glyphs."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextUndefinedGlyphDisplay_TEXT_NO_GLYPH_USE_TOFU:
    OH_Drawing_TextUndefinedGlyphDisplay = 1;
#[doc = " @brief Visual representations for undefined (.notdef) glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @since 20"]
#[cfg(feature = "api-20")]
pub type OH_Drawing_TextUndefinedGlyphDisplay = u32;
extern "C" {
    #[doc = " @brief Sets high contrast mode of text rendering.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param action <b>OH_Drawing_TextHighContrast</b> object.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTextHighContrast(action: OH_Drawing_TextHighContrast);
}
extern "C" {
    #[doc = " @brief Controls how undefined glyphs are visually presented, affects all text rendered after this call.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param undefinedGlyphDisplay Indicates a <b>OH_Drawing_TextUndefinedGlyphDisplay</b> to be set.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTextUndefinedGlyphDisplay(
        undefinedGlyphDisplay: OH_Drawing_TextUndefinedGlyphDisplay,
    );
}
extern "C" {
    #[doc = " @brief Get text line information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @return Indicates the pointer to a text line array object <b>OH_Drawing_Array</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TypographyGetTextLines(
        typography: *mut OH_Drawing_Typography,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the text line array object <b>OH_Drawing_Array</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lines Indicates the pointer to the text line array object <b>OH_Drawing_Array</b>.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyTextLines(lines: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the text line object <b>OH_Drawing_TextLine</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to the text line object <b>OH_Drawing_TextLine</b>.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyTextLine(line: *mut OH_Drawing_TextLine);
}
extern "C" {
    #[doc = " @brief Get the text line object by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lines Indicates the pointer to the text line array object <b>OH_Drawing_Array</b>.\n @param index The text line object index.\n @return Indicates the pointer to a text line object <b>OH_Drawing_TextLine</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetTextLineByIndex(
        lines: *mut OH_Drawing_Array,
        index: usize,
    ) -> *mut OH_Drawing_TextLine;
}
extern "C" {
    #[doc = " @brief Get the count of glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @return Returns the count of glyphs.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetGlyphCount(line: *mut OH_Drawing_TextLine) -> f64;
}
extern "C" {
    #[doc = " @brief Get the range of text line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param start Indicates the pointer to text line start position.\n @param end Indicates the pointer to text line end position.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetTextRange(
        line: *mut OH_Drawing_TextLine,
        start: *mut usize,
        end: *mut usize,
    );
}
extern "C" {
    #[doc = " @brief Get the glyph runs array of text line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @return Indicates the pointer to a glyph runs array object of text line <b>OH_Drawing_Array</b>.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetGlyphRuns(line: *mut OH_Drawing_TextLine)
        -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the run array object <b>OH_Drawing_Array</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param runs Indicates the pointer to the run array object <b>OH_Drawing_Array</b>.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRuns(runs: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Get the run object by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param runs Indicates the pointer to the run array object <b>OH_Drawing_Array</b>.\n @param index The run object index.\n @return Indicates the pointer to a run object <b>OH_Drawing_Run</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunByIndex(
        runs: *mut OH_Drawing_Array,
        index: usize,
    ) -> *mut OH_Drawing_Run;
}
extern "C" {
    #[doc = " @brief Paint the range of text line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param x Represents the X-axis position on the canvas.\n @param y Represents the Y-axis position on the canvas.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLinePaint(
        line: *mut OH_Drawing_TextLine,
        canvas: *mut OH_Drawing_Canvas,
        x: f64,
        y: f64,
    );
}
extern "C" {
    #[doc = " @brief Creates a truncated text line object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param width Indicates the text line width to set.\n @param mode Indicates the ellipsis model to set, EllipsisMode:MIDDLE is not supported.\n For details, see the enum <b>OH_Drawing_EllipsisModal</b>.\n @param ellipsis Indicates the ellipsis string to set.\n @return Returns the pointer to the <b>OH_Drawing_TextLine</b> object created.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineCreateTruncatedLine(
        line: *mut OH_Drawing_TextLine,
        width: f64,
        mode: ::std::os::raw::c_int,
        ellipsis: *const ::std::os::raw::c_char,
    ) -> *mut OH_Drawing_TextLine;
}
extern "C" {
    #[doc = " @brief Gets the text line typographic bounds.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param ascent Indicates the distance that the pointer points to remain above the baseline.\n @param descent Indicates the pointer to the distance that remains below the baseline.\n @param leading Indicates the pointer to the line Spacing.\n @return Returns The total width of the typesetting border.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetTypographicBounds(
        line: *mut OH_Drawing_TextLine,
        ascent: *mut f64,
        descent: *mut f64,
        leading: *mut f64,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Gets the text line image bounds.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Rect</b> struct created.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetImageBounds(
        line: *mut OH_Drawing_TextLine,
    ) -> *mut OH_Drawing_Rect;
}
extern "C" {
    #[doc = " @brief Gets the tail space width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @return Returns the tail space width.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetTrailingSpaceWidth(line: *mut OH_Drawing_TextLine) -> f64;
}
extern "C" {
    #[doc = " @brief Gets the string index of the given position.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @return Returns the string index for a given position.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetStringIndexForPosition(
        line: *mut OH_Drawing_TextLine,
        point: *mut OH_Drawing_Point,
    ) -> i32;
}
extern "C" {
    #[doc = " @brief Gets the offset of the given string index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param index The given string index.\n @return Returns the offset for a given string index.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetOffsetForStringIndex(
        line: *mut OH_Drawing_TextLine,
        index: i32,
    ) -> f64;
}
#[doc = " @brief User-defined callback functions for using offsets and indexes.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param offset Character offset is traversed as an argument to the callback function.\n @param index Character index is traversed as an argument to the callback function.\n @param leadingEdge Whether the current offset is at the character front, as an argument to the callback function.\n @return The return value of the user-defined callback function.\n         If false is returned, the traversal continues.\n         If true is returned, the traversal stops.\n @since 18\n @version 1.0"]
#[cfg(feature = "api-18")]
pub type Drawing_CaretOffsetsCallback =
    ::std::option::Option<unsafe extern "C" fn(offset: f64, index: i32, leadingEdge: bool) -> bool>;
extern "C" {
    #[doc = " @brief Enumerate caret offset and index in text lines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param callback User-defined callback functions, see <b>Drawing_CaretOffsetsCallback</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineEnumerateCaretOffsets(
        line: *mut OH_Drawing_TextLine,
        callback: Drawing_CaretOffsetsCallback,
    );
}
extern "C" {
    #[doc = " @brief Gets the text offset based on the given alignment factor and alignment width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param alignmentFactor The coefficients that text needs to be aligned.\n                        Less than or equal to 0 is left justified, 0.5 is center justified,\n                        and greater than or equal to 1 is right justified.\n @param alignmentWidth The width of the text to be aligned.\n                       Returns 0 if it is less than the actual width of the text.\n @return Returns the offset of the aligned text.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetAlignmentOffset(
        line: *mut OH_Drawing_TextLine,
        alignmentFactor: f64,
        alignmentWidth: f64,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_LineTypography</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @return Returns the pointer to the <b>OH_Drawing_LineTypography</b> object created.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_CreateLineTypography(
        handler: *mut OH_Drawing_TypographyCreate,
    ) -> *mut OH_Drawing_LineTypography;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_LineTypography</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Indicates the pointer to an <b>OH_Drawing_LineTypography</b> object.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyLineTypography(lineTypography: *mut OH_Drawing_LineTypography);
}
extern "C" {
    #[doc = " @brief Calculate the line breakpoint based on the width provided.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param startIndex Indicates the starting point for the line-break calculations.\n @param width Indicates the requested line-break width.\n @return Returns the count of the characters from startIndex that would cause the line break.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_LineTypographyGetLineBreak(
        lineTypography: *mut OH_Drawing_LineTypography,
        startIndex: usize,
        width: f64,
    ) -> usize;
}
extern "C" {
    #[doc = " @brief Creates a text line object based on the text range provided.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param startIndex Indicates the starting index of the text range.\n @param count Indicates the characters count of the text range.\n @return Returns the pointer to the <b>OH_Drawing_TextLine</b> object created.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_LineTypographyCreateLine(
        lineTypography: *mut OH_Drawing_LineTypography,
        startIndex: usize,
        count: usize,
    ) -> *mut OH_Drawing_TextLine;
}
extern "C" {
    #[doc = " @brief Gets the run glyph indices ,the offset of the index relative to the entire paragraph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param start The run of start index.\n @param length The run of length, if start and length are set to 0, then get all of the current run.\n @return Run of glyph indices array object <b>OH_Drawing_Array</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunStringIndices(
        run: *mut OH_Drawing_Run,
        start: i64,
        length: i64,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Gets the run glyph indices by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param stringIndices the run glyph indices array object <b>OH_Drawing_Array</b>.\n @param index The run of glyph index.\n @return Run of glyph indices element.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunStringIndicesByIndex(
        stringIndices: *mut OH_Drawing_Array,
        index: usize,
    ) -> u64;
}
extern "C" {
    #[doc = " @brief Releases the memory run glyph indices array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param stringIndices glyph indices array object <b>OH_Drawing_Array</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRunStringIndices(stringIndices: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Gets the range run glyph location and length.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param location The run of glyph location.\n @param length The run of glyph length.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunStringRange(
        run: *mut OH_Drawing_Run,
        location: *mut u64,
        length: *mut u64,
    );
}
extern "C" {
    #[doc = " @brief Gets the run typographic bound.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param ascent The run of ascent.\n @param descent The run of descent.\n @param leading The run of leading.\n @return run typographic width.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunTypographicBounds(
        run: *mut OH_Drawing_Run,
        ascent: *mut f32,
        descent: *mut f32,
        leading: *mut f32,
    ) -> f32;
}
extern "C" {
    #[doc = " @brief Paints text on the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param x Indicates the x coordinate.\n @param y Indicates the y coordinate.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_RunPaint(
        canvas: *mut OH_Drawing_Canvas,
        run: *mut OH_Drawing_Run,
        x: f64,
        y: f64,
    );
}
extern "C" {
    #[doc = " @brief Gets the run image bound.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @return The run image bounds to an <b>OH_Drawing_Rect</b> object.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunImageBounds(run: *mut OH_Drawing_Run) -> *mut OH_Drawing_Rect;
}
extern "C" {
    #[doc = " @brief Releases the memory run image bounds pointer.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Run image bounds to an <b>OH_Drawing_Rect</b> object.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRunImageBounds(rect: *mut OH_Drawing_Rect);
}
extern "C" {
    #[doc = " @brief Gets the range glyph identifier for each character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param start The run of start index.\n @param length The run of length, if start and length are set to 0, then get all of the current run.\n @return Run of glyph array object <b>OH_Drawing_Array</b.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunGlyphs(
        run: *mut OH_Drawing_Run,
        start: i64,
        length: i64,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Gets the glyph identifier by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param glyphs The run of glyph array object <b>OH_Drawing_Array</b>.\n @param index The run of glyph index.\n @return Run of glyph element.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunGlyphsByIndex(glyphs: *mut OH_Drawing_Array, index: usize) -> u16;
}
extern "C" {
    #[doc = " @brief Releases the memory run glyph array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param glyphs The run of glyph array object <b>OH_Drawing_Array</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRunGlyphs(glyphs: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Gets the range glyph position array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param start The run of start index.\n @param length The run of length, if start and length are set to 0, then get all of the current run.\n @return Run of position array object <b>OH_Drawing_Array</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunPositions(
        run: *mut OH_Drawing_Run,
        start: i64,
        length: i64,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Gets the glyph position by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positions The run of position array object <b>OH_Drawing_Array</b>.\n @param index The run of glyph index.\n @return Run of glyph position pointer to an <b>OH_Drawing_Point</b> object.\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunPositionsByIndex(
        positions: *mut OH_Drawing_Array,
        index: usize,
    ) -> *mut OH_Drawing_Point;
}
extern "C" {
    #[doc = " @brief Releases the memory run of position array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positions The run of position array object <b>OH_Drawing_Array</b>.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRunPositions(positions: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Gets the number of glyph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @return The number of glyph.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunGlyphCount(run: *mut OH_Drawing_Run) -> u32;
}
extern "C" {
    #[doc = " @brief Gets the Font Object of run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @return The Font Object of run.\n @since 20\n @version 1.0"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_GetRunFont(run: *mut OH_Drawing_Run) -> *mut OH_Drawing_Font;
}
extern "C" {
    #[doc = " @brief Get the text direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @return Return the text direction of an <b>OH_Drawing_TextDirection</b> object.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_GetRunTextDirection(run: *mut OH_Drawing_Run) -> OH_Drawing_TextDirection;
}
extern "C" {
    #[doc = " @brief Gets the glyph advance array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param start The run of start index.\n @param length The run of length, if start and length are set to 0, then get all of the current run.\n @return Indicates the pointer to the glyph advance array object <b>OH_Drawing_Array</b>.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_GetRunGlyphAdvances(
        run: *mut OH_Drawing_Run,
        start: u32,
        length: u32,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Gets the glyph advance by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param advances The glyph advance array object <b>OH_Drawing_Array</b>.\n @param index The run of glyph index.\n @return Run of glyph advance pointer to an <b>OH_Drawing_Point</b> object.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_GetRunGlyphAdvanceByIndex(
        advances: *mut OH_Drawing_Array,
        index: usize,
    ) -> *mut OH_Drawing_Point;
}
extern "C" {
    #[doc = " @brief Releases the memory of glyph advance array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param advances The run of glyph advance array object <b>OH_Drawing_Array</b>.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_DestroyRunGlyphAdvances(advances: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Creates a default <b>OH_Drawing_Typeface</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypefaceCreateDefault() -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Typeface</b> object by file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path  file path.\n @param index  file index.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypefaceCreateFromFile(
        path: *const ::std::os::raw::c_char,
        index: ::std::os::raw::c_int,
    ) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Typeface</b> object with the specified font arguments from a file.\n If the <b>OH_Drawing_Typeface</b> object does not support the variations described in fontArguments,\n this function creates an <b>OH_Drawing_Typeface</b> object without font arguments.\n In this case, this function provides the same capability as {@link OH_Drawing_TypefaceCreateFromFile}.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the file path.\n @param fontArguments Indicates the pointer to an <b>OH_Drawing_FontArguments</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty,\n         or either path or fontArguments is nullptr, or the path is invalid.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_TypefaceCreateFromFileWithArguments(
        path: *const ::std::os::raw::c_char,
        fontArguments: *const OH_Drawing_FontArguments,
    ) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Typeface</b> object with the specified font arguments from\n an existing <b>OH_Drawing_Typeface</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param current Indicates the existing <b>OH_Drawing_Typeface</b> object.\n @param fontArguments Indicates the pointer to an <b>OH_Drawing_FontArguments</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty,\n         or either current or fontArguments is nullptr,\n         or current does not support the variations described in fontArguments.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_TypefaceCreateFromCurrent(
        current: *const OH_Drawing_Typeface,
        fontArguments: *const OH_Drawing_FontArguments,
    ) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_Typeface</b> object by given a stream. If the stream is not a valid\n font file, returns nullptr. Ownership of the stream is transferred, so the caller must not reference\n it or free it again.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param memoryStream Indicates the pointer to an <b>OH_Drawing_MemoryStream</b> object.\n @param index  memory stream index.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypefaceCreateFromStream(
        memoryStream: *mut OH_Drawing_MemoryStream,
        index: i32,
    ) -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_Typeface</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypefaceDestroy(typeface: *mut OH_Drawing_Typeface);
}
extern "C" {
    #[doc = " @brief Creates an <b>OH_Drawing_FontArguments</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontArguments</b> object created.\n         If nullptr is returned, the creation fails.\n         The possible cause of the failure is that the available memory is empty.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_FontArgumentsCreate() -> *mut OH_Drawing_FontArguments;
}
extern "C" {
    #[doc = " @brief Adds a font variation axis for an <b>OH_Drawing_FontArguments</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontArguments Indicates the pointer to an <b>OH_Drawing_FontArguments</b> object.\n @param axis Indicates the axis tag, which must contain four ASCII characters.\n @param value Indicates the value of the axis field.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if either fontArguments or axis is nullptr,\n                 or the length of axis is not 4.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_FontArgumentsAddVariation(
        fontArguments: *mut OH_Drawing_FontArguments,
        axis: *const ::std::os::raw::c_char,
        value: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an <b>OH_Drawing_FontArguments</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontArguments Indicates the pointer to an <b>OH_Drawing_FontArguments</b> object.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if fontArguments is nullptr.\n @since 13\n @version 1.0"]
    #[cfg(feature = "api-13")]
    pub fn OH_Drawing_FontArgumentsDestroy(
        fontArguments: *mut OH_Drawing_FontArguments,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the typeface is bold.\n\n @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @param isBold Indicates if the typeface is bold.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if typeface or isBold is nullptr.\n @since 23\n @version 1.0"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_TypefaceIsBold(
        typeface: *const OH_Drawing_Typeface,
        isBold: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if the typeface is italic.\n\n @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @param isItalic Indicates if the typeface is italic.\n @return Returns the error code.\n         Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n         Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if typeface or italic is nullptr.\n @since 23\n @version 1.0"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_TypefaceIsItalic(
        typeface: *const OH_Drawing_Typeface,
        isItalic: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}