ohos-native-drawing-sys 0.2.4

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
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
/* 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)]
// bindgen's bitfield accessors transmute/cast between identical types.
#![allow(clippy::useless_transmute)]
#![allow(clippy::unnecessary_cast)]

#[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],
}
#[cfg(feature = "api-23")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_PathIterator {
    _unused: [u8; 0],
}
#[cfg(feature = "api-23")]
#[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 **OH_Drawing_Point2D** defines a two-dimensional coordinate point.<br>**OH_Drawing_Corner_Radii** defines\n rounded corner radii, consisting of an x-axis radius and a y-axis radius.\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 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 This struct describes a three-dimensional 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],
}
#[cfg(feature = "api-20")]
#[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],
}
#[cfg(feature = "api-13")]
#[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.\n\n @since 8"]
pub const OH_Drawing_ColorFormat_COLOR_FORMAT_UNKNOWN: OH_Drawing_ColorFormat = 0;
#[doc = " Each pixel is represented by 8 bits, which together indicate alpha.\n\n @since 8"]
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, the first 5\n bits indicate red, the subsequent 6 bits indicate green, and the last 5 bits indicate blue.\n\n @since 8"]
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, every 4 bits\n indicate alpha, red, green, and blue, respectively.\n\n @since 8"]
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, every 8 bits\n indicate alpha, red, green, and blue, respectively.\n\n @since 8"]
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, every 8 bits\n indicate blue, green, red, and alpha, respectively.\n\n @since 8"]
pub const OH_Drawing_ColorFormat_COLOR_FORMAT_BGRA_8888: OH_Drawing_ColorFormat = 5;
#[doc = " @brief Defines an enum for the storage formats of bitmap pixels.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_ColorFormat = u32;
#[doc = " Unknown format.\n\n @since 8"]
pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNKNOWN: OH_Drawing_AlphaFormat = 0;
#[doc = " The bitmap does not have the alpha component.\n\n @since 8"]
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.\n\n @since 8"]
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.\n\n @since 8"]
pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNPREMUL: OH_Drawing_AlphaFormat = 3;
#[doc = " @brief Defines an enum for the alpha formats of bitmap pixels.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_AlphaFormat = u32;
#[doc = " Clear mode. r = 0.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_CLEAR: OH_Drawing_BlendMode = 0;
#[doc = " r = s (The four channels of **result** are equal to the four channels of **source**, that is, the result is\n equal to the source.)\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC: OH_Drawing_BlendMode = 1;
#[doc = " r = d (The four channels of **result** are equal to the four channels of **destination**, that is, the result is\n equal to the destination.)\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST: OH_Drawing_BlendMode = 2;
#[doc = " r = s + (1 - sa) * d.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_OVER: OH_Drawing_BlendMode = 3;
#[doc = " r = d + (1 - da) * s.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST_OVER: OH_Drawing_BlendMode = 4;
#[doc = " r = s * da.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_IN: OH_Drawing_BlendMode = 5;
#[doc = " r = d * sa.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST_IN: OH_Drawing_BlendMode = 6;
#[doc = " r = s * (1 - da).\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_OUT: OH_Drawing_BlendMode = 7;
#[doc = " r = d * (1 - sa).\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST_OUT: OH_Drawing_BlendMode = 8;
#[doc = " r = s * da + d * (1 - sa).\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_ATOP: OH_Drawing_BlendMode = 9;
#[doc = " r = d * sa + s * (1 - da).\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_DST_ATOP: OH_Drawing_BlendMode = 10;
#[doc = " r = s * (1 - da) + d * (1 - sa).\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_XOR: OH_Drawing_BlendMode = 11;
#[doc = " r = min(s + d, 1).\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_PLUS: OH_Drawing_BlendMode = 12;
#[doc = " r = s * d.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_MODULATE: OH_Drawing_BlendMode = 13;
#[doc = " Screen mode. r = s + d - s * d.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_SCREEN: OH_Drawing_BlendMode = 14;
#[doc = " Overlay mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_OVERLAY: OH_Drawing_BlendMode = 15;
#[doc = " Darken mode. rc = s + d - max(s * da, d * sa), ra = s + (1 - sa) * d.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_DARKEN: OH_Drawing_BlendMode = 16;
#[doc = " Lighten mode. rc = rc = s + d - min(s * da, d * sa), ra = s + (1 - sa) * d.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_LIGHTEN: OH_Drawing_BlendMode = 17;
#[doc = " Color dodge mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR_DODGE: OH_Drawing_BlendMode = 18;
#[doc = " Color burn mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR_BURN: OH_Drawing_BlendMode = 19;
#[doc = " Hard light mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_HARD_LIGHT: OH_Drawing_BlendMode = 20;
#[doc = " Soft light mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_SOFT_LIGHT: OH_Drawing_BlendMode = 21;
#[doc = " Difference mode. rc = s + d - 2 * (min(s * da, d * sa)), ra = s + (1 - sa) * d.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_DIFFERENCE: OH_Drawing_BlendMode = 22;
#[doc = " Exclusion mode. rc = s + d - two(s * d), ra = s + (1 - sa) * d.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_EXCLUSION: OH_Drawing_BlendMode = 23;
#[doc = " Multiply mode. r = s * (1 - da) + d * (1 - sa) + s * d.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_MULTIPLY: OH_Drawing_BlendMode = 24;
#[doc = " Hue mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_HUE: OH_Drawing_BlendMode = 25;
#[doc = " Saturation mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_SATURATION: OH_Drawing_BlendMode = 26;
#[doc = " Color mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR: OH_Drawing_BlendMode = 27;
#[doc = " Luminosity mode.\n\n @since 11"]
pub const OH_Drawing_BlendMode_BLEND_MODE_LUMINOSITY: OH_Drawing_BlendMode = 28;
#[doc = " @brief Defines an enum for blend modes. In blend mode, each operation generates a new color from two colors (source\n color and destination color).\n These operations are the same for the red, green, and blue color channels (the alpha channel follows a different\n rule).\n For simplicity, the following description uses the alpha channel as an example rather than naming each channel\n individually. For brevity, the following abbreviations are used:\n **s**: source.\n **d**: destination.\n **sa**: source alpha.\n **da**: destination alpha.\n The following abbreviations are used in the calculation result:\n **r**: The calculation methods of the four channels are the same.\n **ra**: used when only the alpha channel is manipulated.\n **rc**: used when the other three color channels are manipulated.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_BlendMode = u32;
#[doc = " One byte used to indicate UTF-8 or ASCII characters.\n\n @since 12"]
pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF8: OH_Drawing_TextEncoding = 0;
#[doc = " Two bytes used to indicate most Unicode characters.\n\n @since 12"]
pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF16: OH_Drawing_TextEncoding = 1;
#[doc = " Four bytes used to indicate all Unicode characters.\n\n @since 12"]
pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF32: OH_Drawing_TextEncoding = 2;
#[doc = " Two bytes used to indicate the glyph index.\n\n @since 12"]
pub const OH_Drawing_TextEncoding_TEXT_ENCODING_GLYPH_ID: OH_Drawing_TextEncoding = 3;
#[doc = " @brief Defines an enum for the text encoding types.\n\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],
}
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RecordCmdUtils {
    _unused: [u8; 0],
}
#[cfg(feature = "api-13")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RecordCmd {
    _unused: [u8; 0],
}
#[cfg(feature = "api-14")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Array {
    _unused: [u8; 0],
}
#[doc = " @brief This struct describes the style of a rectangle.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RectStyle_Info {
    #[doc = " Color of the rectangle.\n\n @since 12"]
    pub color: u32,
    #[doc = " Left top radius of the rectangle.\n\n @since 12"]
    pub leftTopRadius: f64,
    #[doc = " Right top radius of the rectangle.\n\n @since 12"]
    pub rightTopRadius: f64,
    #[doc = " Right bottom radius of the rectangle.\n\n @since 12"]
    pub rightBottomRadius: f64,
    #[doc = " Left bottom radius of the rectangle.\n\n @since 12"]
    pub leftBottomRadius: f64,
}
#[doc = " @brief This struct describes the image information.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Image_Info {
    #[doc = " Width, in pixels.\n\n @since 12"]
    pub width: i32,
    #[doc = " Height, in pixels.\n\n @since 12"]
    pub height: i32,
    #[doc = " Color type.\n\n @since 12"]
    pub colorType: OH_Drawing_ColorFormat,
    #[doc = " Alpha type.\n\n @since 12"]
    pub alphaType: OH_Drawing_AlphaFormat,
}
#[doc = " @brief This struct describes a string of characters encoded in UTF-16.\n\n @since 14\n @version 1.0"]
#[cfg(feature = "api-14")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_String {
    #[doc = " Pointer to a byte array that stores characters in the UTF-16 encoding format.\n\n @since 14"]
    pub strData: *mut u8,
    #[doc = " Actual length of the string that **strData** points to, in bytes.\n\n @since 14"]
    pub strLen: u32,
}
#[doc = " Operation successful.\n\n @since 12"]
pub const OH_Drawing_ErrorCode_OH_DRAWING_SUCCESS: OH_Drawing_ErrorCode = 0;
#[doc = " Permission denied.\n\n @since 12"]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_NO_PERMISSION: OH_Drawing_ErrorCode = 201;
#[doc = " Invalid input parameter. For example, NULL is passed in.\n\n @since 12"]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INVALID_PARAMETER: OH_Drawing_ErrorCode = 401;
#[doc = " The input parameter is not in the valid range.\n\n @since 12"]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE: OH_Drawing_ErrorCode =
    26200001;
#[doc = " Failed to allocate memory.\n\n @since 13"]
#[cfg(feature = "api-13")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_ALLOCATION_FAILED: OH_Drawing_ErrorCode = 26200002;
#[doc = " No function matches the input attribute ID.\n\n @since 21"]
#[cfg(feature = "api-21")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH: OH_Drawing_ErrorCode =
    26200003;
#[doc = " The input parameter is incorrect. For example, the pointer of the input parameter is null.\n\n @since 22"]
#[cfg(feature = "api-22")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INCORRECT_PARAMETER: OH_Drawing_ErrorCode =
    26200004;
#[doc = " File not found. The specified file does not exist or the path is incorrect.\n\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_NOT_FOUND: OH_Drawing_ErrorCode = 26200005;
#[doc = " Failed to open the file, which is caused by insufficient permissions or I/O issues.\n\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_OPEN_FILE_FAILED: OH_Drawing_ErrorCode = 26200006;
#[doc = " Fails to seek the file. The system cannot reposition the file read pointer.\n\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_SEEK_FAILED: OH_Drawing_ErrorCode = 26200007;
#[doc = " Failed to obtain the file size. The system cannot obtain the file size information.\n\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_GET_FILE_SIZE_FAILED: OH_Drawing_ErrorCode =
    26200008;
#[doc = " Failed to read the file. The file cannot be read completely or contains unreadable data.\n\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_READ_FILE_FAILED: OH_Drawing_ErrorCode = 26200009;
#[doc = " Empty file. The specified font file is empty and does not contain valid data.\n\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_EMPTY_FILE: OH_Drawing_ErrorCode = 26200010;
#[doc = " Corrupted file. The file content is invalid or corrupted, and cannot be parsed.\n\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_CORRUPTED: OH_Drawing_ErrorCode = 26200011;
#[doc = " @brief Defines an enum for the error codes that may be generated by the module.\n\n @since 12"]
pub type OH_Drawing_ErrorCode = u32;
extern "C" {
    #[doc = " @brief Obtains the error code of the module.\n\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 this module to **OH_DRAWING_SUCCESS**.\n When a function that does not return an error code fails, the error code obtained through\n {@link OH_Drawing_ErrorCodeGet} is reset to the corresponding error number. However, it is not reset to\n **OH_DRAWING_SUCCESS** for a successful operation. By calling this function, you can manually reset the\n error code to **OH_DRAWING_SUCCESS**, avoiding interference between different functions and simplifying the\n debugging process.\n\n @since 18\n @version 1.0"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_ErrorCodeReset();
}
#[doc = " @brief This struct describes 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 **OH_Drawing_Bitmap** object.\n\n @return Returns the pointer to the **OH_Drawing_Bitmap** object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BitmapCreate() -> *mut OH_Drawing_Bitmap;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_Bitmap** object and reclaims the memory occupied by the object.\n\n @param bitmap Pointer to an **OH_Drawing_Bitmap** object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BitmapDestroy(bitmap: *mut OH_Drawing_Bitmap);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Bitmap** object, with the address of the memory for storing the bitmap pixels set to\n the memory address that you applied for.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **imageInfo** or **pixels** is NULL or **rowBytes** is **0**, **OH_DRAWING_ERROR_INVALID_PARAMETER** is\n returned.\n\n @param imageInfo Pointer to an {@link OH_Drawing_Image_Info} object.\n @param pixels Pointer to the start address of the memory for storing the bitmap pixels. You need to apply for the\n memory and ensure its validity.\n @param rowBytes Number of bytes in each row of pixels. The value is invalid if it is less than or equal to 0.\n @return Returns a pointer to the {@link OH_Drawing_Bitmap} 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 a bitmap and sets the pixel format for the bitmap.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **bitmap** or **bitmapFormat** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param bitmap Pointer to an **OH_Drawing_Bitmap** object.\n @param width Width of the bitmap to be initialized.\n @param height Height of the bitmap to be initialized.\n @param bitmapFormat Pointer to the pixel format of the bitmap to be initialized, including the pixel color type and\n 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param bitmap Pointer to an **OH_Drawing_Bitmap** 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param bitmap Pointer to an **OH_Drawing_Bitmap** 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 pixel format of a bitmap.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param bitmap Pointer to an **OH_Drawing_Bitmap** object.\n @return Returns the pixel format. For details about the supported formats, see {@link OH_Drawing_ColorFormat}.\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 component of a bitmap.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param bitmap Pointer to an **OH_Drawing_Bitmap** object.\n @return Returns the alpha component. For details about the supported formats, see {@link OH_Drawing_AlphaFormat}.\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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param bitmap Pointer to an **OH_Drawing_Bitmap** 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 Obtains the image information of a bitmap.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **bitmap** or **imageInfo** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param bitmap Pointer to the {@link OH_Drawing_Bitmap} object.\n @param imageInfo Pointer to an {@link OH_Drawing_Image_Info} 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 Reads pixels of a rectangle in a bitmap to the specified buffer.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **bitmap**, **dstInfo**, and **dstPixels** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param bitmap Pointer to the {@link OH_Drawing_Bitmap} object.\n @param dstInfo Pointer to an {@link OH_Drawing_Image_Info} object.\n @param dstPixels Pointer to the buffer for storing the pixels read.\n @param dstRowBytes Number of bytes in each row of the pixel data read. The value must be greater than or equal to\n the minimum number of bytes in each row in the **OH_Drawing_Image_Info** object.\n @param srcX Start X coordinate of the pixel data to read from the bitmap. The value must be less than the width of\n the bitmap.\n @param srcY Start Y coordinate of the pixel data to read from the bitmap. The value must be less than the height of\n the bitmap.\n @return Returns **true** if the pixels are read; returns **false** otherwise.\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;
}
extern "C" {
    #[doc = " @brief Gets the row bytes of the bitmap.\n\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param bytes Indicates the row bytes of the bitmap.\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 bitmap or bytes is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_BitmapGetRowBytes(
        bitmap: *mut OH_Drawing_Bitmap,
        bytes: *mut u32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Brush** object.\n\n @return Returns the pointer to the **OH_Drawing_Brush** object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_BrushCreate() -> *mut OH_Drawing_Brush;
}
extern "C" {
    #[doc = " @brief Copies an existing {@link OH_Drawing_Brush} object to create a new one.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @return Returns a pointer to the {@link OH_Drawing_Brush} object created. If NULL is returned, the creation fails.\n The possible failure cause is that no memory is available or **brush** is NULL.\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 **OH_Drawing_Brush** object and reclaims the memory occupied by the object.\n\n @param brush Pointer to an **OH_Drawing_Brush** 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. Anti-aliasing makes the pixels around the shape edges\n semi-transparent.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @return Returns **true** if anti-aliasing is enabled; returns **false** 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. Anti-aliasing makes the pixels around the shape edges semi-\n transparent.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @param antiAlias Whether to enable anti-aliasing. The value **true** means to enable anti-aliasing, and **false**\n 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** 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 is used by the brush to fill in a shape.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @param color Color, 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 value of a brush. This value is used by the alpha channel when the brush fills in a shape.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @return Returns an 8-bit variable that describes the alpha value.\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 value for a brush. This value is used by the alpha channel when the brush fills in a shape.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @param alpha Alpha value, which is an 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 a color for this brush. The color will be used by the brush to fill in a shape.\n The color is in ARGB format represented by floating-point numbers. The color space is specified by\n {@link OH_NativeColorSpaceManager}.\n If **colorSpaceManager** is a null pointer, the SRGB (standard red, green, and blue color space based on IEC 61966-2.\n 1:1999) color space is used as the default value.\n\n @param brush Pointer to an {@link OH_Drawing_Brush} object.\n @param a Alpha value of the color, which is a floating-point number ranging from 0.0 to 1.0. Values above 1.0\n default to 1.0, while values below 0.0 default to 0.0.\n @param r Red component of the color, which is a floating-point number ranging from 0.0 to 1.0. Values above 1.0\n default to 1.0, while values below 0.0 default to 0.0.\n @param g Green component of the color, which is a floating-point number ranging from 0.0 to 1.0. Values above 1.0\n default to 1.0, while values below 0.0 default to 0.0.\n @param b Blue component of the color, which is a floating-point number ranging from 0.0 to 1.0. Values above 1.0\n default to 1.0, while values below 0.0 default to 0.0.\n @param colorSpaceManager Pointer to an {@link OH_NativeColorSpaceManager} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **brush** is NULL.\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 value of the brush color.\n\n @param brush Pointer to an {@link OH_Drawing_Brush} object.\n @param a Alpha value of the color. The value is a floating-point number ranging from 0.0 to 1.0.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **brush** or **a** is NULL.\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 the brush color.\n\n @param brush Pointer to an {@link OH_Drawing_Brush} object.\n @param r Red component of the pen color. The value is a floating-point number ranging from 0.0 to 1.0.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **brush** or **r** is NULL.\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 the brush color.\n\n @param brush Pointer to an {@link OH_Drawing_Brush} object.\n @param g Green component of the pen color. The value is a floating-point number ranging from 0.0 to 1.0.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **brush** or **g** is NULL.\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 the brush color.\n\n @param brush Pointer to an {@link OH_Drawing_Brush} object.\n @param b Blue component of the pen color. The value is a floating-point number ranging from 0.0 to 1.0.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **brush** or **b** is NULL.\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 shader effect for a brush.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @param shaderEffect Pointer to an **OH_Drawing_ShaderEffect** object. If NULL is passed in, the shader effect of the\n brush will be cleared.\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 shadow layer for a brush. The shadow layer effect takes effect only when text is drawn.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @param shadowLayer Pointer to an **OH_Drawing_ShadowLayer** object. If NULL is passed in, the shadow layer effect of\n the brush will be cleared.\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 {@link OH_Drawing_Filter} for a brush. The filter is a container that holds a mask filter and\n color filter.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to an **OH_Drawing_Brush** object.\n @param filter Pointer to an **OH_Drawing_Filter** object. If null is passed in, the filter will be cleared.\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 Obtains the {@link OH_Drawing_Filter} object from the brush. The filter is a container that holds a mask\n filter and color filter.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **brush** or **filter** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to the {@link OH_Drawing_Brush} object.\n @param filter Pointer to an {@link OH_Drawing_Filter} 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 for a brush. The blender implements the specified blend mode.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **blendMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param brush Pointer to the {@link OH_Drawing_Brush} object.\n @param blendMode Enumeration of blend modes.\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 a brush to the initial state. All configured attributes are cleared.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param brush Pointer to the {@link OH_Drawing_Brush} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_BrushReset(brush: *mut OH_Drawing_Brush);
}
#[doc = " Nearest filter mode."]
pub const OH_Drawing_FilterMode_FILTER_MODE_NEAREST: OH_Drawing_FilterMode = 0;
#[doc = " Linear filter mode."]
pub const OH_Drawing_FilterMode_FILTER_MODE_LINEAR: OH_Drawing_FilterMode = 1;
#[doc = " @brief Defines an enum for the filter modes.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FilterMode = u32;
#[doc = " Mipmap level ignored."]
pub const OH_Drawing_MipmapMode_MIPMAP_MODE_NONE: OH_Drawing_MipmapMode = 0;
#[doc = " Nearest sampling from two adjacent mipmap levels."]
pub const OH_Drawing_MipmapMode_MIPMAP_MODE_NEAREST: OH_Drawing_MipmapMode = 1;
#[doc = " Linear interpolation sampling between two adjacent mipmap levels."]
pub const OH_Drawing_MipmapMode_MIPMAP_MODE_LINEAR: OH_Drawing_MipmapMode = 2;
#[doc = " @brief Defines an enum for the mipmap modes.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_MipmapMode = u32;
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_SamplingOptions** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **mipmapMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param filterMode Filter sampling mode.\n @param mipmapMode Mipmap mode.\n @return Returns a pointer to the created {@link OH_Drawing_SamplingOptions} object.\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 a copy of an {@link OH_Drawing_SamplingOptions} object.\n\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object.\n @return Returns a pointer to the created {@link OH_Drawing_SamplingOptions} object copy. If NULL is returned, the\n creation fails. The possible failure cause is that no memory is available or **samplingOptions** is NULL.\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 **OH_Drawing_SamplingOptions** object and reclaims the memory occupied by the object.\n\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SamplingOptionsDestroy(samplingOptions: *mut OH_Drawing_SamplingOptions);
}
#[doc = " The source rectangle must be completely contained in the image."]
pub const OH_Drawing_SrcRectConstraint_STRICT_SRC_RECT_CONSTRAINT: OH_Drawing_SrcRectConstraint = 0;
#[doc = " The source rectangle can be partly outside the image."]
pub const OH_Drawing_SrcRectConstraint_FAST_SRC_RECT_CONSTRAINT: OH_Drawing_SrcRectConstraint = 1;
#[doc = " @brief Enumerates the constraint types of the source rectangle.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_SrcRectConstraint = u32;
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Canvas** object.\n\n @return Returns the pointer to the **OH_Drawing_Canvas** object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasCreate() -> *mut OH_Drawing_Canvas;
}
extern "C" {
    #[doc = " @brief Binds a pixel map to a canvas so that the content drawn on the canvas is output to the pixel map. (This\n process is called CPU rendering.) A canvas bound to a pixel map is a non-recording canvas.\n You should unbind the pixel map object by calling {@link OH_Drawing_PixelMapDissolve} after the canvas object is\n destroyed.\n\n @param pixelMap Pointer to the {@link OH_Drawing_PixelMap} object.\n @return Pointer to the created canvas object {@link OH_Drawing_Canvas}. If the returned object is NULL, the creation\n fails due to insufficient memory or an empty pixel map object.\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 **OH_Drawing_Canvas** object and reclaims the memory occupied by the object.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** 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 is output to the bitmap. (This process is\n called CPU rendering.) A canvas bound to a bitmap is a non-recording canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param bitmap Pointer to an **OH_Drawing_Bitmap** 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 can use the style and color of the pen to outline a shape. If\n the pen effect changes after this function is called, you must call the function again to use the new effect in the\n subsequent drawing.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param pen Pointer to an **OH_Drawing_Pen** 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 can no longer use the style and color of the pen to outline\n a shape.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** 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 can use the style and color of the brush to fill in a shape.\n If the brush effect changes after this function is called, you must call the function again to use the new effect in\n the subsequent drawing.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param brush Pointer to an **OH_Drawing_Brush** 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 can no longer use the previously set brush to fill in a\n shape.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** 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. This function works with\n {@link OH_Drawing_CanvasRestore}.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasSave(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Saves the matrix and cropping region, and allocates a bitmap for subsequent drawing. If you call\n {@link OH_Drawing_CanvasRestore}, changes made to the matrix and clipping region are discarded,\n and the bitmap is drawn.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object, which is used to limit the layer size. A null pointer\n means no limit.\n @param brush Pointer to an {@link OH_Drawing_Brush} object. The alpha value, filter effect, and blend mode of the\n brush are applied when the bitmap is drawn. If NULL is passed in, no effect is applied.\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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CanvasRestore(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Obtains the number of canvas statuses (canvas matrices) saved in the stack.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @return Returns a 32-bit value that describes the number of canvas statuses (canvas matrices). The initial number is\n **1**.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetSaveCount(canvas: *mut OH_Drawing_Canvas) -> u32;
}
extern "C" {
    #[doc = " @brief Restores to a given number of canvas statuses (canvas matrices).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param saveCount Number of canvas statuses (canvas matrices). If the value is less than or equal to 1, the canvas is\n restored to the initial state. If the value is greater than the number of canvas statuses that have been saved, no\n operation is performed.\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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param x1 X coordinate of the start point of the line segment.\n @param y1 Y coordinate of the start point of the line segment.\n @param x2 X coordinate of the end point of the line segment.\n @param y2 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param path Pointer to an **OH_Drawing_Path** 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 Draws a PixelMap based on a mesh, where mesh vertices are evenly distributed across the PixelMap. (This API\n works with brushes but not pens.)\n\n @param cCanvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param pixelMap Pointer to the {@link OH_Drawing_PixelMap} object.\n @param meshWidth Number of columns in the mesh. The value is an integer greater than 0.\n @param meshHeight Number of rows in the mesh. The value is an integer greater than 0.\n @param vertices Pointer to the mesh vertex array.\n @param verticesSize Size of the mesh vertex array. The value must be ((meshWidth + 1) * (meshHeight + 1) +\n vertoffset) * 2.\n @param vertOffset Number of vertices to skip before drawing. The value is an integer greater than or equal to 0.\n @param colors Pointer to the mesh color array, which can be null.\n @param colorsSize Size of the mesh color array. If the array exists, the size must be (meshWidth + 1) * (meshHeight +\n 1) + colorOffset.\n @param colorOffset Number of colors to skip before drawing. The value is an integer greater than or equal to 0.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if any of the parameters, such as **cCanvas**, **pixelMap**, and **vertices*\n *, is empty or the input parameter does not meet the value rule.\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 Splits a pixel map into nine sections using two horizontal and two vertical lines: four edge sections, four\n corner sections, and a central section.\n If the four corner sections are smaller than the target rectangle, they will be drawn in the target rectangle\n without scaling. Otherwise, they will be scaled to fit the target rectangle.\n Any remaining space will be filled by stretching or compressing the other five sections to cover the entire target\n rectangle.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param pixelMap Pointer to the {@link OH_Drawing_PixelMap} object.\n @param center Pointer to the {@link OH_Drawing_Rect} object, which indicates the central rectangle splitting the\n pixel map. It divides the image into nine sections by extending its four edges.\n @param dst Pointer to the {@link OH_Drawing_Rect} object, which indicates the target region on the canvas.\n @param mode Enumeration of filter modes.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **canvas**, **pixelMap**, or **dst** is NULL.\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 Draws a portion of a pixel map onto a specified area of the canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If one of **canvas**, **pixelMap**, or **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param pixelMap Pointer to the {@link OH_Drawing_PixelMap} object.\n @param src Pointer to a rectangle on the pixel map. If NULL is passed in, it refers to the entire pixel map.\n @param dst Pointer to a rectangle on the canvas.\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object. A null pointer means that the\n default sampling options are used.\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 Draws a portion of a pixel map onto a specified area of the canvas.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param pixelMap Pointer to the {@link OH_Drawing_PixelMap} object.\n @param src Pointer to a rectangle on the pixel map. If NULL is passed in, it refers to the entire pixel map.\n @param dst Pointer to a rectangle on the canvas.\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object. A null pointer means that the\n default sampling options are used.\n @param constraint Constraint type. For details about the available options, see {@link OH_Drawing_SrcRectConstraint}.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **canvas**, **pixelMap**, or **dst** is NULL.\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 Draws a background filled with a brush.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **brush** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param brush Pointer to an **OH_Drawing_Brush** 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 a region.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **region** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param region Pointer to an **OH_Drawing_Region** object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasDrawRegion(
        canvas: *mut OH_Drawing_Canvas,
        region: *const OH_Drawing_Region,
    );
}
#[doc = " Draws each point separately."]
pub const OH_Drawing_PointMode_POINT_MODE_POINTS: OH_Drawing_PointMode = 0;
#[doc = " Draws every two points as a line segment."]
pub const OH_Drawing_PointMode_POINT_MODE_LINES: OH_Drawing_PointMode = 1;
#[doc = " Draws an array of points as an open polygon."]
pub const OH_Drawing_PointMode_POINT_MODE_POLYGON: OH_Drawing_PointMode = 2;
#[doc = " @brief Enumerates the modes of drawing multiple points. The modes include discrete points, line segments, and open\n polygons.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PointMode = u32;
extern "C" {
    #[doc = " @brief Draws a point.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param point Pointer to the {@link OH_Drawing_Point2D} object.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **canvas** or **point** is NULL.\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 multiple points. You can draw a single point, a line segment, or an open polygon.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **point2D** is NULL, or **count** is **0**, **OH_DRAWING_ERROR_INVALID_PARAMETER** is\n returned. If **mode** is not within the enumerated range, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param mode Mode for drawing multiple points. For details, see {@link OH_Drawing_PointMode}.\n @param count Number of vertices, that is, the number of vertices in the vertex array.\n @param point2D Pointer to an array holding the vertices.\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. A bitmap, also referred to as a dot matrix image, a pixel map image, or a grid image,\n includes single points called pixels (image elements).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param bitmap Pointer to an **OH_Drawing_Bitmap** object.\n @param left X coordinate of the upper left corner of the bitmap.\n @param top Y coordinate of the upper left corner of the bitmap.\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 Draws a portion of a bitmap onto a specified area of the canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If one of **canvas**, **bitmap**, or **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param bitmap Pointer to the {@link OH_Drawing_Bitmap} object.\n @param src Pointer to a rectangle on the bitmap. If NULL is passed in, it refers to the entire bitmap.\n @param dst Pointer to a rectangle on the canvas.\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object. A null pointer means that the\n default sampling options are used.\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 rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **OH_Drawing_Rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param rect Pointer to an **OH_Drawing_Rect** 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. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If\n either **canvas** or **point** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **radius** is less than or equal to 0, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param point Pointer to an **OH_Drawing_Point** object, which indicates the center of the circle.\n @param radius Radius of the circle. The value is invalid if it is less than or equal to 0.\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 @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param color Color, represented by a 32-bit (ARGB) variable.\n @param blendMode Blend mode.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **canvas** is NULL.\n **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** if **blendMode** is not set to one of the enumerated values.\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. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If\n either **canvas** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param rect Pointer to an **OH_Drawing_Rect** 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. If the absolute value of the sweep angle exceeds 360 degrees, an ellipse is drawn.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param startAngle Start angle. When the degree is 0, the start point is located at the right end of the oval. A\n positive number indicates that the start point is placed clockwise, and a negative number indicates that the start\n point is placed counterclockwise.\n @param sweepAngle Angle to sweep, in degrees. A positive number indicates a clockwise sweep, and a negative value\n indicates a counterclockwise swipe. The valid range is from -360 degrees to 360 degrees. If the absolute value of\n the sweep angle exceeds 360 degrees, an ellipse is drawn.\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. It enables you to define the start angle, sweep angle, and whether the arc's endpoints should\n connect to its center.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param startAngle Start angle, in degrees. The value is a floating point number. When the degree is 0, the start\n point is located at the right end of the oval. A positive number indicates that the start point is placed clockwise,\n and a negative number indicates that the start point is placed counterclockwise.\n @param sweepAngle Angle to sweep, in degrees. The value is a floating point number. A positive number indicates a\n clockwise sweep, and a negative value indicates a counterclockwise swipe. The swipe angle can exceed 360 degrees,\n and a complete ellipse is drawn.\n @param useCenter Whether the start point and end point of the arc are connected to its center. The value **true**\n means that they are connected to the center; the value **false** means the opposite.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **canvas** or **rect** is NULL.\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 rounded rectangle. This API may return an error code. For details, call\n {@link OH_Drawing_ErrorCodeGet}. If either **canvas** or **roundRect** is NULL,\n **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param roundRect Pointer to an **OH_Drawing_RoundRect** 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 Draws two nested rounded rectangles. The outer rectangle boundary must contain the inner rectangle boundary.\n Otherwise, there is no drawing effect.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param outer Pointer to the {@link OH_Drawing_RoundRect} object, indicating the outer rounded rectangle.\n @param inner Pointer to the {@link OH_Drawing_RoundRect} object, indicating the inner rounded rectangle.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **canvas**, **outer**, or **inner** is NULL.\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. If the typeface of the current font does not support the character to draw, the\n system typeface is used to draw the character.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param str Pointer to the single character to draw. A string can be passed in, but only the first character in the\n string is parsed and drawn in UTF-8 encoding.\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param x X coordinate of the left point of the character baseline.\n @param y Y coordinate of the left point of the character baseline.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if at least one of the parameters **canvas**, **str**, or **font** is NULL,\n or the length of **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. If the typeface of the current font does not support the\n character to draw, the system typeface is used to draw the character.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param str Pointer to the single character to draw. A string can be passed in, but only the first character in the\n string is parsed and drawn in UTF-8 encoding.\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param x X coordinate of the left point of the character baseline.\n @param y Y coordinate of the left point of the character baseline.\n @param fontFeatures Pointer to the {@link OH_Drawing_FontFeatures} object. If no font feature is set, the preset\n font feature in the TrueType fonts (TTF) file is used.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if at least one of the parameters **canvas**, **str**, **font**, or **\n fontFeatures** is NULL, or the length of **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 text blob. If the typeface used to construct **OH_Drawing_TextBlob** does not support a character,\n that character will not be drawn.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **textBlob** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param textBlob Pointer to an **OH_Drawing_TextBlob** object.\n @param x X coordinate of the left point of the text baseline.\n @param y Y coordinate of the left point of the text baseline.\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,
    );
}
extern "C" {
    #[doc = " @brief Draws the array of glyphs with specified font. Nothing is drawn if glyphCount is smaller than or equals to 0.\n\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param glyphIds Indicates an array of glyph IDs.\n @param glyphIdCount Indicates the size of glyphId array.\n @param glyphIdOffset Indicates the number of elements to skip before drawing in glyphIds array.\n @param positions Indicates an array of positions.\n @param positionCount Indicates the size of position array.\n @param positionOffset Indicates the number of elements to skip before drawing in positions array.\n @param glyphCount Indicates the number of glyphs to be drawn.\n @param font Indicates the font used for 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, glyphIds, positions and font is nullptr.\n Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if glyphIdOffset or positionOffset is less than 0, or if\n glyphIdCount is less than (glyphIdOffset + glyphCount) or positionCount is less than (positionOffset + glyphCount).\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_CanvasDrawGlyphs(
        canvas: *const OH_Drawing_Canvas,
        glyphIds: *const ::std::os::raw::c_int,
        glyphIdCount: ::std::os::raw::c_int,
        glyphIdOffset: ::std::os::raw::c_int,
        positions: *const OH_Drawing_Point2D,
        positionCount: ::std::os::raw::c_int,
        positionOffset: ::std::os::raw::c_int,
        glyphCount: ::std::os::raw::c_int,
        font: *const OH_Drawing_Font,
    ) -> OH_Drawing_ErrorCode;
}
#[doc = " Clips a specified area. That is, the difference set is obtained."]
pub const OH_Drawing_CanvasClipOp_DIFFERENCE: OH_Drawing_CanvasClipOp = 0;
#[doc = " Retains a specified area. That is, the intersection is obtained."]
pub const OH_Drawing_CanvasClipOp_INTERSECT: OH_Drawing_CanvasClipOp = 1;
#[doc = " @brief Enumerates the canvas clipping modes.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_CanvasClipOp = u32;
extern "C" {
    #[doc = " @brief Clips a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **clipOp** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param clipOp Clip mode. For details about the available options, see {@link OH_Drawing_CanvasClipOp}.\n @param doAntiAlias Whether to enable anti-aliasing. The value **true** means to enable anti-aliasing, and **false**\n means the opposite.\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 Clips a rounded rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **roundRect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **clipOp** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param roundRect Pointer to an **OH_Drawing_RoundRect** object.\n @param clipOp Clip mode. For details about the available options, see {@link OH_Drawing_CanvasClipOp}.\n @param doAntiAlias Whether to perform anti-aliasing. The value **true** means to perform anti-aliasing, and **false**\n means the opposite.\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 Clips a path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **clipOp** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param path Pointer to an **OH_Drawing_Path** object.\n @param clipOp Clip mode. For details about the available options, see {@link OH_Drawing_CanvasClipOp}.\n @param doAntiAlias Whether to enable anti-aliasing. The value **true** means to enable anti-aliasing, and **false**\n means the opposite.\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 rectangle.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param clipOp Clip mode. For details about the available options, see {@link OH_Drawing_CanvasClipOp}.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **canvas** or **region** is NULL.\n **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** if **clipOp** is not set to one of the enumerated values.\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 a canvas by a given angle. A positive value indicates a clockwise rotation, and a negative value\n indicates a counterclockwise rotation.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param degrees Rotation angle.\n @param px X coordinate of the rotation point.\n @param py Y coordinate of the rotation point.\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 a canvas by a given distance.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param dx Distance to translate on the X axis.\n @param dy Distance to translate on the 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 a canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param sx Scale ratio on the X axis.\n @param sy Scale ratio on the 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 Skews a canvas. This function premultiplies the current canvas matrix by a skew transformation matrix and\n applies the resulting matrix to the canvas. The skew transformation matrix is as follows:\n |1 sx 0|\n |sy 1 0|\n |0  0 1|\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param sx Amount of tilt on the X axis. A positive number tilts the drawing rightwards along the positive direction\n of the Y axis, and a negative number tilts the drawing leftwards along the positive direction of the Y axis.\n @param sy Amount of tilt on the Y axis. A positive number tilts the drawing downwards along the positive direction\n of the X axis, and a negative number tilts the drawing upwards along the positive direction of the X 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 Obtains the canvas width.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @return Returns the width.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetWidth(canvas: *mut OH_Drawing_Canvas) -> i32;
}
extern "C" {
    #[doc = " @brief Obtains the canvas height.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @return Returns the height.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasGetHeight(canvas: *mut OH_Drawing_Canvas) -> i32;
}
extern "C" {
    #[doc = " @brief Obtains the bounds of the cropping region of the canvas. This function cannot be used for a canvas of the\n recording type.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object. You can call {@link OH_Drawing_RectCreate} to create a\n rectangle 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 Obtains the 3x3 matrix of a canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object. You can call {@link OH_Drawing_MatrixCreate} to\n create a matrix 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 Preconcats the existing matrix of the canvas with the passed-in matrix. The drawing operation triggered\n before this API is called is not affected.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasConcatMatrix(
        canvas: *mut OH_Drawing_Canvas,
        matrix: *mut OH_Drawing_Matrix,
    );
}
#[doc = " There is no shadow flag."]
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 analysis on the shadows is required."]
pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_GEOMETRIC_ONLY: OH_Drawing_CanvasShadowFlags =
    2;
#[doc = " All the preceding shadow flags are used."]
pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_ALL: OH_Drawing_CanvasShadowFlags = 3;
#[doc = " @brief Enumerates the shadow flags.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_CanvasShadowFlags = u32;
extern "C" {
    #[doc = " @brief Draws a spot shadow and uses a given path to outline the ambient shadow.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **flag** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param path Pointer to the {@link OH_Drawing_Path} object, which is used to generate shadows.\n @param planeParams Z-axis offset of an occluder relative to the canvas, based on its x and y coordinates.\n @param devLightPos Position of the light relative to the canvas.\n @param lightRadius Radius of the light source. The value must be greater than or equal to 0.\n @param ambientColor Ambient shadow color, which is represented by a 32-bit (ARGB) variable.\n @param spotColor Point shadow color, which is represented by a 32-bit (ARGB) variable.\n @param flag Enumeration of shadow flags.\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 given color.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param color 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 the matrix status for a canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object. You can call {@link OH_Drawing_MatrixCreate} to\n create a matrix 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 Resets the matrix of this canvas to an identity matrix.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **canvas** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CanvasResetMatrix(canvas: *mut OH_Drawing_Canvas);
}
extern "C" {
    #[doc = " @brief Reset the clip status.\n\n @param canvas Indicates the 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 canvas is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_CanvasResetClip(canvas: *mut OH_Drawing_Canvas) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Draws a portion of an image onto a specified area of the canvas. The area selected by the source rectangle is\n scaled and translated to the destination rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If one of **canvas**, **image**, **src**, or **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param image Pointer to the {@link OH_Drawing_Image} object.\n @param src Pointer to the {@link OH_Drawing_Rect} object.\n @param dst Pointer to the {@link OH_Drawing_Rect} object.\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object. A null pointer means that the\n default sampling options are used.\n @param srcRectConstraint Constraint type. For details about the available options, see\n {@link OH_Drawing_SrcRectConstraint}.\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 an image onto a specified area of the canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If one of **canvas**, **image**, or **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param image Pointer to the {@link OH_Drawing_Image} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object. A null pointer means that the\n default sampling options are used.\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 = " Draws a triangle list. Specifically, a list of isolated triangles are drawn using every three vertices. If the\n number of vertices is not a multiple of 3, the extra vertices will be ignored."]
pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES: OH_Drawing_VertexMode = 0;
#[doc = " Draws a triangle strip. Specifically, the first triangle is drawn between the first 3 vertices, and all\n subsequent triangles use the previous 2 vertices plus the next additional vertex."]
pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES_STRIP: OH_Drawing_VertexMode = 1;
#[doc = " Draws a triangle fan. A triangle fan is similar to a triangle strip, except that all the triangles share one\n vertex (the first vertex)."]
pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLE_FAN: OH_Drawing_VertexMode = 2;
#[doc = " @brief Enumerates the modes of interpreting the geometry of a given vertex.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_VertexMode = u32;
extern "C" {
    #[doc = " @brief Draws a triangular grid described by a vertex array.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **positions** is NULL, **vertexCount** is less than 3, or **indexCount** is less than 3 but\n not 0, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If either **vertexMmode** or **mode** is not set to one of the enumerated values, **\n OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param canvas Pointer to an **OH_Drawing_Canvas** object.\n @param vertexMmode Mode for drawing vertices. For details about the available options, see\n {@link OH_Drawing_VertexMode}.\n @param vertexCount Number of elements in the vertex array. The value must be greater than or equal to 3.\n @param positions Pointer to the array that holds the position of every vertex. The array cannot be null and its\n length must be equal to the value of **vertexCount**.\n @param texs Pointer to the array that holds the texture space coordinate corresponding to each vertex. The array can\n be null. If the array is not null, its length must be equal to the value of **vertexCount**.\n @param colors Pointer to the array that holds the color corresponding to each vertex. It is used for interpolation\n in a triangle. The array can be null. If the array is not null, its length must be equal to the value of **\n vertexCount**.\n @param indexCount Number of indices. The value can be 0 or a value greater than or equal to 3.\n @param indices Pointer to the array that holds the index of each vertex. The array can be null. If the array is not\n null, its length must be equal to the value of **indexCount**.\n @param mode Enumeration of blend modes. For details about the available options, see {@link OH_Drawing_BlendMode}.\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 Copies pixel data from a canvas to a specified address. This function cannot be used for a canvas of the\n recording type.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If one of **canvas**, **imageInfo**, or **dstPixels** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param imageInfo Pointer to the {@link OH_Drawing_Image_Info} object.\n @param dstPixels Pointer to the start address for storing the pixel data.\n @param dstRowBytes Number of bytes in each row of pixels. The value is invalid if it is less than or equal to 0.\n @param srcX X offset of the pixels on the canvas, in px.\n @param srcY Y offset of the pixels on the canvas, in px.\n @return Returns **true** if the pixel data is copied to the start address of the storage; returns **false**\n otherwise.\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 Copies pixel data from a canvas to an image. This function cannot be used for a canvas of the recording type.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **canvas** or **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param bitmap Pointer to the {@link OH_Drawing_Bitmap} object.\n @param srcX X offset of the pixels on the canvas, in px.\n @param srcY Y offset of the pixels on the canvas, in px.\n @return Returns **true** if the pixel data is copied to the image; returns **false** otherwise.\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 region that can be drawn is empty after clipping.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param isClipEmpty Pointer to the variable that specifies whether the region is empty. The value **true** means that\n the region is empty, and **false** means the opposite.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **canvas** or **isClipEmpty** is NULL.\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 Obtains the image information of a canvas.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param imageInfo Pointer to the {@link OH_Drawing_Image_Info} object.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **canvas** or **imageInfo** is NULL.\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 Draws an **OH_Drawing_RecordCmd** object.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object. Only the canvas of the recording type is supported.\n @param recordCmd Pointer to the {@link OH_Drawing_RecordCmd} object.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **canvas** or **recordCmd** is NULL.\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 Draws an **OH_Drawing_RecordCmd** object. This API supports nesting.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object. Only the canvas of the recording type is supported.\n @param recordCmd Pointer to the {@link OH_Drawing_RecordCmd} object.\n @return Operation code.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **canvas** or **recordCmd** is NULL.\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 whether the path is not intersecting with the canvas area. The canvas area includes its boundaries.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param quickReject Pointer to the check result. The value **true** means that the path is not intersecting with the\n canvas area, and **false** means the opposite.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **canvas**, **path**, or **quickReject** is NULL.\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 whether the rectangle is not intersecting with the canvas area. The canvas area includes its\n boundaries.\n\n @param canvas Pointer to the {@link OH_Drawing_Canvas} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param quickReject Pointer to the check result. The value **true** means that the rectangle is not intersecting with\n the canvas area, and **false** means the opposite.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **canvas**, **rect**, or **quickReject** is NULL.\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 Checks if the current layer that drawn into the device is opaque.\n\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param isOpaque Indicates if the canvas is opaque.\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 canvas or isOpaque is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_CanvasIsOpaque(
        canvas: *const OH_Drawing_Canvas,
        isOpaque: *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 @param alpha Alpha, which is a variable ranging from 0x00 to 0xFF.\n @param red Read, which is a variable ranging from 0x00 to 0xFF.\n @param green Green, which is a variable ranging from 0x00 to 0xFF.\n @param blue Blue, which is a variable ranging 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 **OH_Drawing_ColorFilter** object with a given blend mode.\n\n @param color Color, which is a 32-bit (ARGB) variable.\n @param blendMode Blend mode. For details about the available options, see {@link OH_Drawing_BlendMode}.\n @return Returns the pointer to the **OH_Drawing_ColorFilter** 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 **OH_Drawing_ColorFilter** object by combining another two color filters.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **outerColorFilter** or **innerColorFilter** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param outerColorFilter Pointer to the first color filter.\n @param innerColorFilter Pointer to the second color filter.\n @return Returns the pointer to the **OH_Drawing_ColorFilter** 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 **OH_Drawing_ColorFilter** object with a given 5x4 color matrix.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Matrix, which is represented by a floating-point array with a length of 20.\n @return Returns the pointer to the **OH_Drawing_ColorFilter** 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 **OH_Drawing_ColorFilter** object that applies the sRGB gamma curve to the RGB channels.\n\n @return Returns the pointer to the **OH_Drawing_ColorFilter** object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateLinearToSrgbGamma() -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_ColorFilter** object that applies the RGB channels to the sRGB gamma curve.\n\n @return Returns the pointer to the **OH_Drawing_ColorFilter** object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateSrgbGammaToLinear() -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates a **ColorFilter** object that multiplies the luma into the alpha channel and sets the RGB channels to\n zero.\n\n @return Returns the pointer to the **OH_Drawing_ColorFilter** object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterCreateLuma() -> *mut OH_Drawing_ColorFilter;
}
extern "C" {
    #[doc = " @brief Creates a lighting color filter. It multiplies the RGB channel values by one color and then adds another\n color value. The final output stays between 0 and 255.\n\n @param mulColor Color value used for multiplication.\n @param addColor Color value used for addition.\n @return Returns the pointer to the **OH_Drawing_ColorFilter** 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 **OH_Drawing_ColorFilter** object and reclaims the memory occupied by the object.\n\n @param colorFilter Pointer to an **OH_Drawing_ColorFilter** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ColorFilterDestroy(colorFilter: *mut OH_Drawing_ColorFilter);
}
extern "C" {
    #[doc = " @brief Creates an sRGB color space.\n\n @return Returns a pointer to the {@link OH_Drawing_ColorSpace} object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ColorSpaceCreateSrgb() -> *mut OH_Drawing_ColorSpace;
}
extern "C" {
    #[doc = " @brief Creates an sRGB linear (Gamma 1.0) color space.\n\n @return Returns a pointer to the {@link OH_Drawing_ColorSpace} object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ColorSpaceCreateSrgbLinear() -> *mut OH_Drawing_ColorSpace;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_ColorSpace** object and reclaims the memory occupied by the object.\n\n @param colorSpace Pointer to an {@link OH_Drawing_ColorSpace} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ColorSpaceDestroy(colorSpace: *mut OH_Drawing_ColorSpace);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Filter** object.\n\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 **OH_Drawing_ImageFilter** object for an **OH_Drawing_Filter** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **filter** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param filter Pointer to an {@link OH_Drawing_Filter} object.\n @param imageFilter Pointer to an {@link OH_Drawing_ImageFilter} object. If NULL is passed in, the image filter\n effect of the object will be cleared.\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 **OH_Drawing_MaskFilter** object for an **OH_Drawing_Filter** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **filter** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param filter Pointer to an {@link OH_Drawing_Filter} object.\n @param maskFilter Pointer to an {@link OH_Drawing_ColorFilter} object. If NULL is passed in, the mask filter effect\n of the object will be cleared.\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 **OH_Drawing_ColorFilter** object for an **OH_Drawing_Filter** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **filter** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param filter Pointer to an {@link OH_Drawing_Filter} object.\n @param colorFilter Pointer to an {@link OH_Drawing_ColorFilter} object. If NULL is passed in, the color filter\n effect of the object will be cleared.\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 Obtains an **OH_Drawing_ColorFilter** object from an **OH_Drawing_Filter** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **filter** or **colorFilter** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param filter Pointer to an {@link OH_Drawing_Filter} object.\n @param colorFilter Pointer to an {@link OH_Drawing_ColorFilter} 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 **OH_Drawing_Filter** object and reclaims the memory occupied by the object.\n\n @param filter Pointer to an {@link OH_Drawing_Filter} object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FilterDestroy(filter: *mut OH_Drawing_Filter);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Font** object.\n\n @return Returns the pointer to the **OH_Drawing_Font** object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontCreate() -> *mut OH_Drawing_Font;
}
#[doc = " No font hinting is used.\n\n @since 12"]
pub const OH_Drawing_FontHinting_FONT_HINTING_NONE: OH_Drawing_FontHinting = 0;
#[doc = " Slight font hinting is used to improve contrast.\n\n @since 12"]
pub const OH_Drawing_FontHinting_FONT_HINTING_SLIGHT: OH_Drawing_FontHinting = 1;
#[doc = " Normal font hinting is used to improve contrast.\n\n @since 12"]
pub const OH_Drawing_FontHinting_FONT_HINTING_NORMAL: OH_Drawing_FontHinting = 2;
#[doc = " Full font hinting is used to improve contrast.\n\n @since 12"]
pub const OH_Drawing_FontHinting_FONT_HINTING_FULL: OH_Drawing_FontHinting = 3;
#[doc = " @brief Defines an enum for the font hinting types.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FontHinting = u32;
#[doc = " No anti-aliasing processing is used.\n\n @since 12"]
pub const OH_Drawing_FontEdging_FONT_EDGING_ALIAS: OH_Drawing_FontEdging = 0;
#[doc = " Uses anti-aliasing to smooth the jagged edges.\n\n @since 12"]
pub const OH_Drawing_FontEdging_FONT_EDGING_ANTI_ALIAS: OH_Drawing_FontEdging = 1;
#[doc = " Uses sub-pixel anti-aliasing to provide a smoother effect for jagged edges.\n\n @since 12"]
pub const OH_Drawing_FontEdging_FONT_EDGING_SUBPIXEL_ANTI_ALIAS: OH_Drawing_FontEdging = 2;
#[doc = " @brief Enumerates the font edging types.\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 axis aligned.\n\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 axis aligned.\n\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 to use sub-pixel rendering for a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param isSubpixel Whether sub-pixel rendering is used for a font. **true** means yes; **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetSubpixel(font: *mut OH_Drawing_Font, isSubpixel: bool);
}
extern "C" {
    #[doc = " @brief Checks whether sub-pixel rendering is used for a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Whether sub-pixel rendering is used for a font. **true** means yes; **false** 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 to forcibly use auto hinting, that is, whether to always hint glyphs.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param isForceAutoHinting Whether to forcibly use auto hinting, that is, whether to always hint glyphs. **true**\n means yes; **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetForceAutoHinting(font: *mut OH_Drawing_Font, isForceAutoHinting: bool);
}
extern "C" {
    #[doc = " @brief Checks whether auto hinting is forcibly used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Whether auto hinting is forcibly used. **true** means yes; **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsForceAutoHinting(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets a typeface for a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to an **OH_Drawing_Font** object.\n @param typeface Pointer to an **OH_Drawing_Typeface** object. If NULL is passed in, the default **\n OH_Drawing_Typeface** object is used.\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 Obtains the typeface of a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Returns a pointer to the {@link OH_Drawing_Typeface} 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 the text size for a font object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to an **OH_Drawing_Font** object.\n @param textSize Text size. The value is a floating point number. If a negative number is passed in, the size is set\n to 0. If the size is 0, the text drawn will not be displayed.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontSetTextSize(font: *mut OH_Drawing_Font, textSize: f32);
}
extern "C" {
    #[doc = " @brief Obtains the text size of a font object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Returns a floating point number representing the text size.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetTextSize(font: *const OH_Drawing_Font) -> f32;
}
extern "C" {
    #[doc = " @brief Obtains the number of glyphs represented by text.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **font** or **text** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param text Pointer to the start address of the storage.\n @param byteLength Text length, in bytes.\n @param encoding Text encoding type {@link OH_Drawing_TextEncoding}.\n @return Returns the number of characters represented by the text (non-negative integer) on success;\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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **font**, **text**, and **glyphs** is NULL, **byteLength** is **0**, or **maxGlyphCount** is less than or\n equal to 0, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param text Pointer to the start address of the storage.\n @param byteLength Text length, in bytes.\n @param encoding Text encoding type {@link OH_Drawing_TextEncoding}.\n @param glyphs Pointer to the start address for storing the glyph indices.\n @param maxGlyphCount Maximum number of glyphs.\n @return Returns the number of glyph indices.\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 Obtains the width of each glyph in a string of text.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **font**, **glyphs**, and **widths** is NULL, or **count** is **0**, **OH_DRAWING_ERROR_INVALID_PARAMETER**\n is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param glyphs Pointer to the start address for storing the glyph indices.\n @param count Number of glyph indices.\n @param widths Pointer to the start address for storing the glyph widths.\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. If the typeface of the current font does not support the character\n to measure, the system typeface is used to measure the character width.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param str Pointer to the single character to measure. A string can be passed in, but only the first character in\n the string is parsed and measured in UTF-8 encoding.\n @param textWidth Pointer to the character width obtained.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if at least one of the parameters **font**, **str**, or **textWidth** is NULL,\n  or the length of **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. If the typeface of the current font does not\n support the character to measure, the system typeface is used to measure the character width.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param str Pointer to the single character to measure. A string can be passed in, but only the first character in\n the string is parsed and measured in UTF-8 encoding.\n @param fontFeatures Pointer to the {@link OH_Drawing_FontFeatures} object. If no font feature is set, the preset\n font feature in the TrueType fonts (TTF) file is used.\n @param textWidth Pointer to the obtained text width, which is used as an output parameter.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if at least one of the parameters **font**, **str**, **fontFeatures**,\n  or **textWidth** is NULL, or the length of **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 Obtains the text width and bounding box.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param text Pointer to the text.\n @param byteLength Length of the text, in bytes.\n @param encoding Encoding type of the text.\n @param bounds Pointer to the bounding box. The value can be NULL.\n @param textWidth Pointer to the text width.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if at least one of the parameters **font**, **text**, and **textWidth** is\n NULL, 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 Obtains the width and bounding box of the text with a brush or pen.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param text Pointer to the text.\n @param byteLength Length of the text, in bytes.\n @param encoding Encoding type of the text.\n @param brush Pointer to the {@link OH_Drawing_Brush} object.\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param bounds Pointer to the bounding box. The value can be NULL.\n @param textWidth Pointer to the text width.\n @return Operation code.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if any of **font**, **text**, or **textWidth** is NULL, **byteLength**\n  is **0**, or a brush and a pen both exist.\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 Obtains the width and bounding box of each glyph in a glyph array.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param glyphs Pointer to the start address for storing the glyph indices.\n @param count Number of glyph indices, which must be the same as the size of glyphs array.\n @param brush Pointer to the {@link OH_Drawing_Brush} object.\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param widths Start address for storing the glyph width.\n @param bounds Start address for storing the glyph bounding box.\n @return Operation code.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **font** or **glyphs** is NULL, **count** is not greater\n than **0**, a brush and a pen both exist, or both **widths** and **bounds** are NULL.\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 Obtains the relative position of each glyph from the specified origin.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param glyphs Pointer to the start address for storing the glyph indices.\n @param count Number of glyph indices, which must be the same as the size of glyphs array.\n @param origin Position of the first glyph. The value can be NULL, which means that the default value **(0, 0)** is\n used.\n @param points Start address for storing the relative position of a glyph.\n @return Operation code.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if any of **font**, **glyphs**, and **points** is NULL, or **count**\n is less than or equal to **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 Obtains the recommended line spacing for a font.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param spacing Recommended line spacing for a font.\n @return Operation code.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **font** or **spacing** is NULL.\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 Sets linear scaling for a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to an **OH_Drawing_Font** object.\n @param isLinearText Whether to enable linear scaling. The value **true** means to enable linear scaling, and **false*\n * means the opposite.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontSetLinearText(font: *mut OH_Drawing_Font, isLinearText: bool);
}
extern "C" {
    #[doc = " @brief Checks whether linear scaling is used for a font object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Returns **true** if linear scaling is used; returns **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsLinearText(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets a horizontal skew factor for a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to an **OH_Drawing_Font** object.\n @param skewX Skew of the X axis relative to the 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 Obtains the horizontal skew factor of a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Returns a floating point number representing the horizontal skew factor.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetTextSkewX(font: *const OH_Drawing_Font) -> f32;
}
extern "C" {
    #[doc = " @brief Sets fake bold for a font by increasing the stroke width.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to an **OH_Drawing_Font** object.\n @param isFakeBoldText Whether to set fake bold. The value **true** means to set fake bold, and **false** means the\n opposite.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontSetFakeBoldText(font: *mut OH_Drawing_Font, isFakeBoldText: bool);
}
extern "C" {
    #[doc = " @brief Checks whether fake bold is used for a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Whether fake bold is used for a font. **true** means yes; **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsFakeBoldText(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets a horizontal scale factor for a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param scaleX Horizontal scale factor.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetScaleX(font: *mut OH_Drawing_Font, scaleX: f32);
}
extern "C" {
    #[doc = " @brief Obtains the horizontal scale ratio of this font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Returns the horizontal scale factor.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontGetScaleX(font: *const OH_Drawing_Font) -> f32;
}
extern "C" {
    #[doc = " @brief Sets a font hinting effect.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **fontHinting** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param fontHinting Enumeration of font hinting types {@link OH_Drawing_FontHinting}.\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 Obtains the font hinting effect.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Returns the enumeration of font hinting types {@link OH_Drawing_FontHinting}.\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 in a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param isEmbeddedBitmaps Whether to use bitmaps in the font. The value **true** means to use bitmaps in the font,\n and **false** means the opposite.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontSetEmbeddedBitmaps(font: *mut OH_Drawing_Font, isEmbeddedBitmaps: bool);
}
extern "C" {
    #[doc = " @brief Checks whether bitmaps are used in a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return Returns **true** if bitmaps are used; returns **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontIsEmbeddedBitmaps(font: *const OH_Drawing_Font) -> bool;
}
extern "C" {
    #[doc = " @brief Sets a font edging effect.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **fontEdging** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param fontEdging 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 Obtains the font edging effect.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @return 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 **OH_Drawing_Font** object and reclaims the memory occupied by the object.\n\n @param font Pointer to an **OH_Drawing_Font** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_FontDestroy(font: *mut OH_Drawing_Font);
}
#[doc = " @brief This struct describes the measurement information about a font.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Font_Metrics {
    #[doc = " Measurement information that is valid.\n\n @since 12"]
    pub flags: u32,
    #[doc = " Maximum distance from the baseline to the highest coordinate of a character.\n\n @since 12"]
    pub top: f32,
    #[doc = " Recommended distance from the baseline to the highest coordinate of a character.\n\n @since 12"]
    pub ascent: f32,
    #[doc = " Recommended distance from the baseline to the lowest coordinate of a character.\n\n @since 12"]
    pub descent: f32,
    #[doc = " Maximum distance from the baseline to the lowest coordinate of a character.\n\n @since 12"]
    pub bottom: f32,
    #[doc = " Gap between rows.\n\n @since 12"]
    pub leading: f32,
    #[doc = " Average character width, or zero if unknown.\n\n @since 12"]
    pub avgCharWidth: f32,
    #[doc = " Maximum character width, or zero if unknown.\n\n @since 12"]
    pub maxCharWidth: f32,
    #[doc = " Maximum distance to the leftmost of the font bounding box. Generally, the value is a negative value. Variable\n fonts are not recommended.\n\n @since 12"]
    pub xMin: f32,
    #[doc = " Maximum distance to the rightmost of the font bounding box. Generally, the value is a negative value. Variable\n fonts are not recommended.\n\n @since 12"]
    pub xMax: f32,
    #[doc = " Height of a lowercase letter, or zero if unknown. Generally, the value is a negative value.\n\n @since 12"]
    pub xHeight: f32,
    #[doc = " Height of an uppercase letter, or zero if unknown. Generally, the value is a negative value.\n\n @since 12"]
    pub capHeight: f32,
    #[doc = " @brief Thickness of the underline.\n\n @since 12"]
    pub underlineThickness: f32,
    #[doc = " Position of the underline, that is, vertical distance from the baseline to the top of the underline. Generally,\n the value is a positive value.\n\n @since 12"]
    pub underlinePosition: f32,
    #[doc = " Thickness of the strikethrough.\n\n @since 12"]
    pub strikeoutThickness: f32,
    #[doc = " Position of the strikethrough, that is, vertical distance from the baseline to the bottom of the strikethrough.\n Generally, the value is a negative value.\n\n @since 12"]
    pub strikeoutPosition: f32,
}
extern "C" {
    #[doc = " @brief Obtains the measurement information about a font.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **font** or **fontMetrics** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param fontMetrics Pointer to the {@link OH_Drawing_Font_Metrics} object.\n @return Returns a floating-point variable that indicates the recommended interline spacing.\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 Obtains the rectangular bounding box for each glyph in the glyph array.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param glyphs Pointer to a glyph array.\n @param count Length of the glyph array.\n @param bounds Pointer to a rectangular bounding box array.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if any of **font**, **glyphs**, or **bounds** is NULL 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 Obtains the path of a glyph.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param glyph Glyph index.\n @param path Pointer to the {@link OH_Drawing_Path} object, which is used to store the glyph path.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **font** or **path** is NULL or the specified glyph does 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 Obtains the text outline path.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param text Pointer to the text string.\n @param byteLength Length of the text path. If the length is greater than the length of the text string, undefined\n behavior occurs.\n @param encoding Text encoding format. UTF-8, UTF-16, UTF-32, and glyph indices are supported. For details about the\n format, see {@link OH_Drawing_TextEncoding}.\n @param x X coordinate of the text in the drawing area, with the origin as the start point.\n @param y Y coordinate of the text in the drawing area, with the origin as the start point.\n @param path Pointer to the text outline path.\n @return Returns one of the following error codes:\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 NULL.\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 Gets the path outline for the given text with font fallback support.\n\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the pointer to the text data.\n @param byteLength Indicates the length of the text in bytes.\n @param encoding Indicates the text encoding type.\n @param x Indicates the x coordinate for the text path.\n @param y Indicates the y coordinate for the text path.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object to store the text path outline.\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 font, text or path is nullptr, or\n                 byteLength is 0.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_FontGetTextPathWithFallback(
        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 **OH_Drawing_FontFeatures** object.\n\n @return Returns a pointer to the created {@link OH_Drawing_FontFeatures} object.\n If a null pointer is returned, the creation fails. A possible cause is that no memory is available.\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 to an **OH_Drawing_FontFeatures** object.\n\n @param fontFeatures Pointer to the {@link OH_Drawing_FontFeatures} object.\n @param name Name of a font feature. Common font feature names include **liga**, **frac**, and **case**. A font\n feature needs a TTF file to work.\n @param value Value of the font feature. You are advised to determine the valid value range by using a font viewing\n tool or referring to the font document.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if **fontFeatures** or **name** is a null pointer.\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 **OH_Drawing_FontFeatures** object and reclaims the memory occupied by the object.\n\n @param fontFeatures Pointer to the {@link OH_Drawing_FontFeatures} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if **fontFeatures** is NULL.\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. When **followed** is set to **true**, the theme font is used if it is\n enabled by the system and no typeface is set.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param followed Whether to follow the theme font. The value **true** means to follow the theme font, and **false**\n means the opposite.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if **font** is NULL.\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 Checks whether the font follows the theme font. By default, the theme font is not followed.\n\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param followed Check result. The value **true** means that the theme font is followed, and **false** means the\n opposite. It is used as an output parameter.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n Returns **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **font** or **followed** is NULL.\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],
}
#[cfg(feature = "api-18")]
#[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],
}
#[cfg(feature = "api-18")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextTab {
    _unused: [u8; 0],
}
#[cfg(feature = "api-18")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_TextLine {
    _unused: [u8; 0],
}
#[cfg(feature = "api-18")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_Run {
    _unused: [u8; 0],
}
#[cfg(feature = "api-22")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFullDescriptor {
    _unused: [u8; 0],
}
#[cfg(feature = "api-24")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontVariationAxis {
    _unused: [u8; 0],
}
#[cfg(feature = "api-24")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontVariationInstance {
    _unused: [u8; 0],
}
extern "C" {
    #[doc = " @brief Creates an {@link OH_Drawing_FontCollection} object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the created font collection object. The font collection pointer object created by this function\n     can only be used by one {@link OH_Drawing_TypographyCreate} object and does not support shared use among\n     multiple OH_Drawing_TypographyCreate objects. To share the same OH_Drawing_FontCollection among multiple\n     OH_Drawing_TypographyCreate objects, use the {@link OH_Drawing_CreateSharedFontCollection} function to create\n     the OH_Drawing_FontCollection object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CreateFontCollection() -> *mut OH_Drawing_FontCollection;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_FontCollection** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Pointer to an **OH_Drawing_FontCollection** object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyFontCollection(fontCollection: *mut OH_Drawing_FontCollection);
}
extern "C" {
    #[doc = " @brief Disables the system fonts.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Pointer to an {@link OH_Drawing_FontCollection} 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 Disables system fonts. After disabling, the font collection object can only use registered custom fonts for\n text rendering.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Pointer to the font collection object {@link OH_Drawing_FontCollection} for which system fonts\n     are to be disabled.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DisableFontCollectionSystemFont(
        fontCollection: *mut OH_Drawing_FontCollection,
    );
}
extern "C" {
    #[doc = " @brief Creates a shareable {@link OH_Drawing_FontCollection} object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the created font collection object, which can be used by multiple\n     {@link OH_Drawing_TypographyCreate} objects.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CreateSharedFontCollection() -> *mut OH_Drawing_FontCollection;
}
extern "C" {
    #[doc = " @brief Clears the font cache. (The font cache has a memory limit and a clearing mechanism. It occupies limited\n memory. You are not advised to clear it unless otherwise required.)\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Pointer to an {@link OH_Drawing_FontCollection} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ClearFontCaches(fontCollection: *mut OH_Drawing_FontCollection);
}
extern "C" {
    #[doc = " @brief Obtains the global font collection object {@link OH_Drawing_FontCollection}, which can be used to obtain\n theme font information. This object is prohibited from being released.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the global font collection object, which can be used by multiple\n     {@link OH_Drawing_TypographyCreate} objects and is prohibited from being released.\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 the 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 = " When **OH_Drawing_TextDirection** is set to **TEXT_DIRECTION_LTR**, **TEXT_ALIGN_START** and **TEXT_ALIGN_LEFT**\n are the same.<br>Similarly, when **OH_Drawing_TextDirection** is set to **TEXT_DIRECTION_RTL**, **\n TEXT_ALIGN_START** and **TEXT_ALIGN_RIGHT** are the same."]
pub const OH_Drawing_TextAlign_TEXT_ALIGN_START: OH_Drawing_TextAlign = 4;
#[doc = " When **OH_Drawing_TextDirection** is set to **TEXT_DIRECTION_LTR**, **TEXT_ALIGN_END** and **TEXT_ALIGN_RIGHT**\n are the same.<br>Similarly, when **OH_Drawing_TextDirection** is set to **TEXT_DIRECTION_RTL**, **TEXT_ALIGN_END*\n * and **TEXT_ALIGN_LEFT** are the same."]
pub const OH_Drawing_TextAlign_TEXT_ALIGN_END: OH_Drawing_TextAlign = 5;
#[doc = " @brief Enumerates the 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 the 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, where 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 the 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 = " An 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 the 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."]
pub const OH_Drawing_FontStyle_FONT_STYLE_ITALIC: OH_Drawing_FontStyle = 1;
#[doc = " Oblique."]
pub const OH_Drawing_FontStyle_FONT_STYLE_OBLIQUE: OH_Drawing_FontStyle = 2;
#[doc = " @brief Font styles, including non-italic, italic, and oblique.\n\n @since 8\n @version 1.0"]
pub type OH_Drawing_FontStyle = u32;
#[doc = " Aligned to the baseline."]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_OFFSET_AT_BASELINE:
    OH_Drawing_PlaceholderVerticalAlignment = 0;
#[doc = " Aligned above the baseline."]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_ABOVE_BASELINE:
    OH_Drawing_PlaceholderVerticalAlignment = 1;
#[doc = " Aligned below the baseline."]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BELOW_BASELINE:
    OH_Drawing_PlaceholderVerticalAlignment = 2;
#[doc = " Aligned to the top of the row box."]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_TOP_OF_ROW_BOX:
    OH_Drawing_PlaceholderVerticalAlignment = 3;
#[doc = " Aligned to the bottom of the row box."]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BOTTOM_OF_ROW_BOX:
    OH_Drawing_PlaceholderVerticalAlignment = 4;
#[doc = " Aligned to the center of the row box."]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_CENTER_OF_ROW_BOX:
    OH_Drawing_PlaceholderVerticalAlignment = 5;
#[doc = " Follows the text vertical alignment.\n @since 20"]
#[cfg(feature = "api-20")]
pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_FOLLOW_PARAGRAPH:
    OH_Drawing_PlaceholderVerticalAlignment = 6;
#[doc = " @brief Enumerates the vertical alignment modes of placeholders.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_PlaceholderVerticalAlignment = u32;
#[doc = " @brief This struct describes the placeholder that acts as a span.\n\n @since 11\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_PlaceholderSpan {
    #[doc = " Width of a placeholder."]
    pub width: f64,
    #[doc = " Height of a placeholder."]
    pub height: f64,
    #[doc = " Alignment mode of a placeholder."]
    pub alignment: OH_Drawing_PlaceholderVerticalAlignment,
    #[doc = " Baseline of a placeholder."]
    pub baseline: OH_Drawing_TextBaseline,
    #[doc = " Baseline offset of a 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 the text decoration styles.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_TextDecorationStyle = u32;
#[doc = " Header ellipsis mode, that is, the ellipsis appears at the beginning of a line. This enumerated value is valid\n only when the maximum number of text lines is set to **1** by calling\n {@link OH_Drawing_SetTypographyTextMaxLines}."]
pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_HEAD: OH_Drawing_EllipsisModal = 0;
#[doc = " Middle ellipsis mode, that is, the ellipsis appears in the middle of a line. This enumerated value is valid only\n when the maximum number of text lines is set to **1** by calling {@link OH_Drawing_SetTypographyTextMaxLines}."]
pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MIDDLE: OH_Drawing_EllipsisModal = 1;
#[doc = " End ellipsis mode, that is, the ellipsis appears at the end of a line. This enumerated value is valid when the\n maximum number of text lines is set to any value by calling {@link OH_Drawing_SetTypographyTextMaxLines}."]
pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_TAIL: OH_Drawing_EllipsisModal = 2;
#[doc = " Header ellipsis mode, that is, the ellipsis appears at the beginning of a line. This enumerated value is valid\n when the maximum number of text lines is set to any value by calling\n {@link OH_Drawing_SetTypographyTextMaxLines}.\n @since 24"]
#[cfg(feature = "api-24")]
pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MULTILINE_HEAD: OH_Drawing_EllipsisModal = 3;
#[doc = " Middle ellipsis mode, that is, the ellipsis appears in the middle of a line. This enumerated value is valid when\n the maximum number of text lines is set to any value by calling {@link OH_Drawing_SetTypographyTextMaxLines}.\n @since 24"]
#[cfg(feature = "api-24")]
pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MULTILINE_MIDDLE: OH_Drawing_EllipsisModal = 4;
#[doc = " @brief Enumerates the ellipsis styles.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_EllipsisModal = u32;
#[doc = " Each line is filled as much as possible during line break."]
pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_GREEDY: OH_Drawing_BreakStrategy = 0;
#[doc = " Text continuity is preferentially considered during line break."]
pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_HIGH_QUALITY: OH_Drawing_BreakStrategy = 1;
#[doc = " Line breaks are performed at the word boundary."]
pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_BALANCED: OH_Drawing_BreakStrategy = 2;
#[doc = " @brief Enumerates the text break strategies.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_BreakStrategy = u32;
#[doc = " Normal mode."]
pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_NORMAL: OH_Drawing_WordBreakType = 0;
#[doc = " Breaks the words at any character to prevent overflow."]
pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_ALL: OH_Drawing_WordBreakType = 1;
#[doc = " Breaks the words at arbitrary points to prevent overflow."]
pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_WORD: OH_Drawing_WordBreakType = 2;
#[doc = " Attempts to break words at the end of each line by inserting a hyphen (\"-\"). If a hyphen cannot be added, the\n behavior is the same as `WORD_BREAK_TYPE_BREAK_WORD`.\n @since 18"]
#[cfg(feature = "api-18")]
pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_HYPHEN: OH_Drawing_WordBreakType = 3;
#[doc = " @brief Enumerates the word break types.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_WordBreakType = u32;
#[doc = " Tight style. The text box height closely fits the text content boundary."]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_TIGHT: OH_Drawing_RectHeightStyle = 0;
#[doc = " Max style. The text box height takes the maximum height among all lines."]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_MAX: OH_Drawing_RectHeightStyle = 1;
#[doc = " Include line spacing middle style. The text box height includes the middle portion of the line spacing."]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEMIDDLE:
    OH_Drawing_RectHeightStyle = 2;
#[doc = " Include line spacing top style. The text box height includes the top portion of the line spacing."]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACETOP:
    OH_Drawing_RectHeightStyle = 3;
#[doc = " Include line spacing bottom style. The text box height includes the bottom portion of the line spacing."]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEBOTTOM:
    OH_Drawing_RectHeightStyle = 4;
#[doc = " Struct style. The Strut Style determines the text box height."]
pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_STRUCT: OH_Drawing_RectHeightStyle = 5;
#[doc = " @brief Enumerates the rectangle height styles.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_RectHeightStyle = u32;
#[doc = " Tight style. The text box height closely fits the text content boundary."]
pub const OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_TIGHT: OH_Drawing_RectWidthStyle = 0;
#[doc = " Max style. The text box height takes the maximum height among all lines."]
pub const OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_MAX: OH_Drawing_RectWidthStyle = 1;
#[doc = " @brief Enumerates the rectangle width styles.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_RectWidthStyle = u32;
#[doc = " Operation successful."]
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 = " Failed to parse the system configuration file."]
pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_PARSE_FILE:
    OH_Drawing_FontConfigInfoErrorCode = 2;
#[doc = " Memory allocation fails."]
pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_ALLOC_MEMORY:
    OH_Drawing_FontConfigInfoErrorCode = 3;
#[doc = " Failed to copy the string data."]
pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_COPY_STRING_DATA:
    OH_Drawing_FontConfigInfoErrorCode = 4;
#[doc = " @brief Enumerates the error codes for the system font configuration information list.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FontConfigInfoErrorCode = u32;
#[doc = " @brief This struct describes the information about a font fallback.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFallbackInfo {
    #[doc = " Pointer to the language supported by the font fallback. The language format is bcp47."]
    pub language: *mut ::std::os::raw::c_char,
    #[doc = " Pointer to the name of a font family."]
    pub familyName: *mut ::std::os::raw::c_char,
}
#[doc = " @brief This struct describes the information about a font fallback group.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFallbackGroup {
    #[doc = " Name of the font set corresponding to the fallback font group. If the value is empty, all fonts in the fallback\n font set list can be used."]
    pub groupName: *mut ::std::os::raw::c_char,
    #[doc = " Number of font fallbacks."]
    pub fallbackInfoSize: usize,
    #[doc = " List of fallback font sets."]
    pub fallbackInfoSet: *mut OH_Drawing_FontFallbackInfo,
}
#[doc = " @brief This struct describes the information about a font weight mapping.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontAdjustInfo {
    #[doc = " Original font weight."]
    pub weight: ::std::os::raw::c_int,
    #[doc = " Font weight displayed in the application."]
    pub to: ::std::os::raw::c_int,
}
#[doc = " @brief This struct describes the information about a font alias.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontAliasInfo {
    #[doc = " Pointer to the name of a font family."]
    pub familyName: *mut ::std::os::raw::c_char,
    #[doc = " Font weight value. If the value is greater than 0, the font family contains only the font with the specified\n weight. If the value is 0, the font family contains all fonts."]
    pub weight: ::std::os::raw::c_int,
}
#[doc = " @brief This struct describes the information about generic fonts supported by the system.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontGenericInfo {
    #[doc = " Pointer to the name of a font family."]
    pub familyName: *mut ::std::os::raw::c_char,
    #[doc = " Number of font aliases."]
    pub aliasInfoSize: usize,
    #[doc = " Number of font weight mappings."]
    pub adjustInfoSize: usize,
    #[doc = " Pointer to a set of font aliases."]
    pub aliasInfoSet: *mut OH_Drawing_FontAliasInfo,
    #[doc = " Pointer to a set of font weight mappings."]
    pub adjustInfoSet: *mut OH_Drawing_FontAdjustInfo,
}
#[doc = " @brief This struct describes the information about a system font configuration.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontConfigInfo {
    #[doc = " Number of system font file paths."]
    pub fontDirSize: usize,
    #[doc = " Number of generic fonts."]
    pub fontGenericInfoSize: usize,
    #[doc = " Number of font fallbacks."]
    pub fallbackGroupSize: usize,
    #[doc = " Double pointer to the system font file paths."]
    pub fontDirSet: *mut *mut ::std::os::raw::c_char,
    #[doc = " Pointer to a set of generic fonts."]
    pub fontGenericInfoSet: *mut OH_Drawing_FontGenericInfo,
    #[doc = " Pointer to a set of font fallbacks."]
    pub fallbackGroupSet: *mut OH_Drawing_FontFallbackGroup,
}
#[doc = " @brief This struct describes the detailed information about a system font.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontDescriptor {
    #[doc = " File path of the system font."]
    pub path: *mut ::std::os::raw::c_char,
    #[doc = " PostScript name that uniquely identifies the system font."]
    pub postScriptName: *mut ::std::os::raw::c_char,
    #[doc = " Full name of the system font."]
    pub fullName: *mut ::std::os::raw::c_char,
    #[doc = " Family of the system font."]
    pub fontFamily: *mut ::std::os::raw::c_char,
    #[doc = " Subfamily of the system font."]
    pub fontSubfamily: *mut ::std::os::raw::c_char,
    #[doc = " Weight of the system font."]
    pub weight: ::std::os::raw::c_int,
    #[doc = " Width of the system font."]
    pub width: ::std::os::raw::c_int,
    #[doc = " Slope of the system font."]
    pub italic: ::std::os::raw::c_int,
    #[doc = " Whether the system font is monospace. The value true means the font is monospace, and false means the opposite."]
    pub monoSpace: bool,
    #[doc = " Whether the system font supports symbols. **true** means yes; **false** otherwise."]
    pub symbolic: bool,
}
#[doc = " @brief This struct describes the measurement information about a line of text.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_LineMetrics {
    #[doc = " Height of a character above the baseline, after taking the absolute value."]
    pub ascender: f64,
    #[doc = " Height of a character below the baseline, after taking the absolute value."]
    pub descender: f64,
    #[doc = " Height of an uppercase letter above the baseline."]
    pub capHeight: f64,
    #[doc = " Height of a lowercase letter, specifically the lowercase x, not including ascenders and descenders."]
    pub xHeight: f64,
    #[doc = " Horizontal space taken up by a character."]
    pub width: f64,
    #[doc = " Line height."]
    pub height: f64,
    #[doc = " Distance from the left edge of the leftmost character to the left edge of the container. For left alignment, the\n value is 0. For right alignment, the value is the container width minus the text width."]
    pub x: f64,
    #[doc = " Height from the top edge of the character to the top of the container. The first line is 0, and the second line\n is the height of the first line."]
    pub y: f64,
    #[doc = " Index of the first character in the line."]
    pub startIndex: usize,
    #[doc = " Index of the last character in the line."]
    pub endIndex: usize,
    #[doc = " Measurement information of the first character."]
    pub firstCharMetrics: OH_Drawing_Font_Metrics,
}
#[doc = " Enables the height set by calling {@link OH_Drawing_SetTextStyleFontHeight} for the top of the first line and\n the bottom of the last line in a paragraph."]
pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_ALL: OH_Drawing_TextHeightBehavior = 0;
#[doc = " Disables the height set by calling {@link OH_Drawing_SetTextStyleFontHeight} for the top of the first line in a\n paragraph."]
pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_FIRST_ASCENT:
    OH_Drawing_TextHeightBehavior = 1;
#[doc = " Disables the height set by calling {@link OH_Drawing_SetTextStyleFontHeight} for the bottom of the last line in\n a paragraph."]
pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_LAST_ASCENT:
    OH_Drawing_TextHeightBehavior = 2;
#[doc = " Disables the height set by calling {@link OH_Drawing_SetTextStyleFontHeight} for both the top of the first line\n and the bottom of the last line in a paragraph."]
pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_ALL: OH_Drawing_TextHeightBehavior = 3;
#[doc = " @brief Enumerates the text height modifier patterns.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_TextHeightBehavior = u32;
#[doc = " No text style."]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_NONE: OH_Drawing_TextStyleType = 0;
#[doc = " All text styles."]
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 = " Text foreground style."]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_FOREGROUND: OH_Drawing_TextStyleType = 3;
#[doc = " Text background style."]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_BACKGROUND: OH_Drawing_TextStyleType = 4;
#[doc = " Text shadow style."]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_SHADOW: OH_Drawing_TextStyleType = 5;
#[doc = " Text decoration style."]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_DECORATIONS: OH_Drawing_TextStyleType = 6;
#[doc = " Text letter spacing style."]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_LETTER_SPACING: OH_Drawing_TextStyleType = 7;
#[doc = " Text word spacing style."]
pub const OH_Drawing_TextStyleType_TEXT_STYLE_WORD_SPACING: OH_Drawing_TextStyleType = 8;
#[doc = " @brief Enumerates the text style types.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_TextStyleType = u32;
#[doc = " Ultra condensed font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_CONDENSED: OH_Drawing_FontWidth = 1;
#[doc = " Extra condensed font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_CONDENSED: OH_Drawing_FontWidth = 2;
#[doc = " Condensed font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_CONDENSED: OH_Drawing_FontWidth = 3;
#[doc = " Semi-condensed font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_SEMI_CONDENSED: OH_Drawing_FontWidth = 4;
#[doc = " Normal font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_NORMAL: OH_Drawing_FontWidth = 5;
#[doc = " Semi-expanded font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_SEMI_EXPANDED: OH_Drawing_FontWidth = 6;
#[doc = " Expanded font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_EXPANDED: OH_Drawing_FontWidth = 7;
#[doc = " Extra expanded font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_EXPANDED: OH_Drawing_FontWidth = 8;
#[doc = " Ultra expanded font."]
pub const OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_EXPANDED: OH_Drawing_FontWidth = 9;
#[doc = " @brief Enumerates the font widths.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_FontWidth = u32;
#[doc = " Maximum line height.<br>If line height scaling is enabled, the maximum line height takes effect only when **\n FontHeight** (which can be obtained from {@link OH_Drawing_TextStyleGetFontHeight}) is greater than 0.<br>The\n value is the positive part of a single-precision floating point number."]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM:
    OH_Drawing_TextStyleAttributeId = 0;
#[doc = " Minimum line height.<br>If line height scaling is enabled, the minimum line height takes effect only when **\n FontHeight** (which can be obtained from {@link OH_Drawing_TextStyleGetFontHeight}) is greater than 0.<br>The\n value is the non-negative part of a single-precision floating point number. The default value is **0**."]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM:
    OH_Drawing_TextStyleAttributeId = 1;
#[doc = " Scaling base style of the line height. For details, see {@link OH_Drawing_LineHeightStyle}."]
#[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 = " Font edge processing mode. Anti-aliasing is used by default. For details about how to process font edges, see\n {@link OH_Drawing_FontEdging}.\n @since 24"]
#[cfg(feature = "api-24")]
pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_I_FONT_EDGING:
    OH_Drawing_TextStyleAttributeId = 4;
#[doc = " @brief Enumerates the text style attributes.\n\n @since 21"]
#[cfg(feature = "api-21")]
pub type OH_Drawing_TextStyleAttributeId = u32;
#[doc = " Uses the font size as the scaling base.<br>Formula for calculating the line height: **FontSize** x **FontHeight**\n .<br>**FontSize** can be obtained from the {@link OH_Drawing_TextStyleGetFontSize} API.<br>**FontHeight** can be\n obtained from the {@link OH_Drawing_TextStyleGetFontHeight} API."]
#[cfg(feature = "api-21")]
pub const OH_Drawing_LineHeightStyle_TEXT_LINE_HEIGHT_BY_FONT_SIZE: OH_Drawing_LineHeightStyle = 0;
#[doc = " Uses the font height as the scaling base.<br>Formula for calculating the line height: font height x **FontHeight*\n *.<br>The font height is obtained after the text is shaped using the font file.<br>**FontHeight** can be\n obtained from the {@link OH_Drawing_TextStyleGetFontHeight} API."]
#[cfg(feature = "api-21")]
pub const OH_Drawing_LineHeightStyle_TEXT_LINE_HEIGHT_BY_FONT_HEIGHT: OH_Drawing_LineHeightStyle =
    1;
#[doc = " @brief Enumerates the scaling base styles of the line height. The default style is **TEXT_LINE_HEIGHT_BY_FONT_SIZE**.\n\n @since 21"]
#[cfg(feature = "api-21")]
pub type OH_Drawing_LineHeightStyle = u32;
#[doc = " Maximum line height.<br>If line height scaling is enabled, the maximum line height takes effect only when **\n FontHeight** (which can be obtained from {@link OH_Drawing_TextStyleGetFontHeight}) is greater than 0.<br>The\n value is the positive part of a single-precision floating point number."]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM:
    OH_Drawing_TypographyStyleAttributeId = 0;
#[doc = " Minimum line height.<br>If line height scaling is enabled, the minimum line height takes effect only when **\n FontHeight** (which can be obtained from {@link OH_Drawing_TextStyleGetFontHeight}) is greater than 0.<br>The\n value is the non-negative part of a single-precision floating point number. The default value is **0**."]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM:
    OH_Drawing_TypographyStyleAttributeId = 1;
#[doc = " Interline spacing.<br>**lineSpacing** is not restricted by the maximum and minimum line heights.<br>By default,\n line spacing is added to the last line.<br>You can set **textHeightBehavior** to **DISABLE_LAST_ASCENT** in\n {@link OH_Drawing_TypographyTextSetHeightBehavior} to disable the line spacing of the last line.<br>The default\n value is **0**."]
#[cfg(feature = "api-21")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING:
    OH_Drawing_TypographyStyleAttributeId = 2;
#[doc = " Scaling base style of the line height. For details, see {@link OH_Drawing_LineHeightStyle}."]
#[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 = " Whether to enable line-start punctuation compression during text typography.<br>**NOTE**<br>1. The font file\n must support the \"ss08\" feature in {@link OH_Drawing_FontFeature}; otherwise, compression cannot be applied.<br>\n 2. Only punctuation within the line-start punctuation compression range is affected by this feature.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_COMPRESS_HEAD_PUNCTUATION : OH_Drawing_TypographyStyleAttributeId = 5 ;
#[doc = " Whether to enable the internal padding of the font during text typography.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_INCLUDE_FONT_PADDING:
    OH_Drawing_TypographyStyleAttributeId = 6;
#[doc = " Whether to enable the line spacing fallback mechanism during text typography.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_FALLBACK_LINE_SPACING:
    OH_Drawing_TypographyStyleAttributeId = 7;
#[doc = " Ellipsis style. For details about the ellipsis style, see {@link OH_Drawing_EllipsisModal}.\n @since 24"]
#[cfg(feature = "api-24")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_I_ELLIPSIS_MODAL:
    OH_Drawing_TypographyStyleAttributeId = 8;
#[doc = " First-line indent array.<br>All values in the indent array must be greater than or equal to 0. Each element in\n the array represents the indentation value of a single line. If the actual number of text lines exceeds the\n length of the indent array, the last value of the array is applied to the extra lines.\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_DA_LINE_HEAD_INDENT:
    OH_Drawing_TypographyStyleAttributeId = 9;
#[doc = " First-line indent of a paragraph. The indent value must be greater than or equal to 0.\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_FIRST_LINE_HEAD_INDENT:
    OH_Drawing_TypographyStyleAttributeId = 10;
#[doc = " Last-line indent array.<br>All values in the indent array must be greater than or equal to 0. Each element in\n the array represents the indentation value of a single line. If the actual number of text lines exceeds the\n length of the indent array, the last value of the array is applied to the extra lines.\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_DA_LINE_TAIL_INDENT:
    OH_Drawing_TypographyStyleAttributeId = 11;
#[doc = " @brief Enumerates the typography style attributes.\n <br>For the common attributes of the typography styles and text styles, you are advised to use the text style\n attributes, which can be obtained from {@link OH_Drawing_TextStyleAttributeId}.\n\n @since 21"]
#[cfg(feature = "api-21")]
pub type OH_Drawing_TypographyStyleAttributeId = u32;
#[doc = " Whether to force reuse the rasterization result.\n True means to force reuse of the rasterization result. False means to allow updates to the rasterization result.\n The default value is false.\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub const OH_Drawing_TypographyAttributeId_TYPOGRAPHY_ATTR_B_FORCE_REUSE_RASTER_RESULT:
    OH_Drawing_TypographyAttributeId = 0;
#[doc = " @brief Enumerates the typography attributes.\n\n @since 26.0.0"]
#[cfg(feature = "api-26")]
pub type OH_Drawing_TypographyAttributeId = u32;
extern "C" {
    #[doc = " @brief Obtains a bool-type typography attribute.\n\n @param typography Pointer to the typography object {@link OH_Drawing_Typography}, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param id Typography style attribute ID.\n @param value Pointer to the bool-type attribute. Used as an output parameter.\n @return Result code.\n     <br>Returns OH_DRAWING_SUCCESS, indicating that the execution is successful.\n     <br>Returns OH_DRAWING_ERROR_INCORRECT_PARAMETER, indicating that the typography or value parameter is a null\n     pointer.\n     <br>Returns OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH, indicating that the attribute ID passed in does not match\n     the called function.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_GetTypographyAttributeBool(
        typography: *const OH_Drawing_Typography,
        id: OH_Drawing_TypographyAttributeId,
        value: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets a bool-type typography attribute.\n\n @param typography Pointer to the typography object {@link OH_Drawing_Typography}, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param id Typography attribute ID, which specifies the bool-type attribute to set.\n @param value Bool value to set.\n @return Result code.\n     <br>Returns OH_DRAWING_SUCCESS, indicating that the execution is successful.\n     <br>Returns OH_DRAWING_ERROR_INCORRECT_PARAMETER, indicating that the typography parameter is a null pointer.\n     <br>Returns OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH, indicating that the attribute ID passed in does not match\n     the called function.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_SetTypographyAttributeBool(
        typography: *mut OH_Drawing_Typography,
        id: OH_Drawing_TypographyAttributeId,
        value: bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sets the text style attribute of the **double** type.\n\n @param style Pointer to an {@link OH_Drawing_TextStyle} object.\n @param id Text style attribute ID.\n @param value Text style attribute value.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INVALID_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n     <br>**OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** if the value corresponding to the attribute id exceeds the\n     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 Obtains the text style attribute of the **double** type.\n\n @param style Pointer to an {@link OH_Drawing_TextStyle} object.\n @param id Text style attribute ID.\n @param value Pointer to the attribute of the **double** type. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INVALID_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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 the text style attribute of the **int** type.\n\n @param style Pointer to an {@link OH_Drawing_TextStyle} object.\n @param id Text style attribute ID.\n @param value Attribute value to set.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INVALID_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n     <br>**OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** if the input value exceeds the value range of the attribute to\n     be set.\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 Obtains the text style attribute of the **int** type.\n\n @param style Pointer to an {@link OH_Drawing_TextStyle} object.\n @param id Text style attribute ID.\n @param value Pointer to the attribute of the **int** type. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INVALID_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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 the typography style attribute of the **double** type.\n\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object.\n @param id Attribute ID of the text style.\n @param value Attribute value to set.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INVALID_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n     <br>**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 Obtains the typography style attribute of the **double** type.\n\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object.\n @param id Attribute ID of the text style.\n @param value Pointer to the attribute of the **double** type. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INVALID_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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 the typography style attribute of the **int** type.\n\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object.\n @param id Attribute ID of the text style.\n @param value Attribute value to set.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INVALID_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n     <br>**OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** if the input value exceeds the value range of the attribute to\n     be set.\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 Obtains the typography style attribute of the **int** type.\n\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object.\n @param id Attribute ID of the text style.\n @param value Pointer to the attribute of the **int** type. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INVALID_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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 the typography style attribute of the **bool** type.\n\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object.\n @param id Attribute ID of the text style.\n @param value Attribute value to set.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **style** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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 Obtains the typography style attribute of the **bool** type.\n\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object.\n @param id Attribute ID of the text style.\n @param value Pointer to the bool attribute. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **style** or **value** is NULL.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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;
}
extern "C" {
    #[doc = " @brief Sets the typography style attribute of the floating-point array type.\n\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object.\n @param id Attribute ID of the text style.\n @param arrayValue Pointer to the floating-point array.\n @param arrayLength Length of the floating-point array.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the parameter **style** or **arrayValue** is a null pointer or\n     **arrayLength** is 0.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_SetTypographyStyleAttributeDoubleArray(
        style: *mut OH_Drawing_TypographyStyle,
        id: OH_Drawing_TypographyStyleAttributeId,
        arrayValue: *mut f64,
        arrayLength: usize,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the typography style attribute of the floating-point array type.\n\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object.\n @param id Attribute ID of the text style.\n @param arrayValue Pointer to the floating-point array. It is used as an output parameter.\n @param arrayLength Length of the floating-point array. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the parameter **style** or **arrayValue** is a null pointer or **\n     arrayLength** is 0.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_GetTypographyStyleAttributeDoubleArray(
        style: *const OH_Drawing_TypographyStyle,
        id: OH_Drawing_TypographyStyleAttributeId,
        arrayValue: *mut *mut f64,
        arrayLength: *mut usize,
    ) -> OH_Drawing_ErrorCode;
}
#[doc = " Disable superscript or subscript."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextBadgeType_TEXT_BADGE_NONE: OH_Drawing_TextBadgeType = 0;
#[doc = " Enable superscript."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextBadgeType_TEXT_SUPERSCRIPT: OH_Drawing_TextBadgeType = 1;
#[doc = " Enable subscript."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextBadgeType_TEXT_SUBSCRIPT: OH_Drawing_TextBadgeType = 2;
#[doc = " @brief Enumerates the text badge styles.\n\n @since 20\n @version 1.0"]
#[cfg(feature = "api-20")]
pub type OH_Drawing_TextBadgeType = u32;
#[doc = " Aligned to the baseline."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_BASELINE:
    OH_Drawing_TextVerticalAlignment = 0;
#[doc = " Bottom aligned."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_BOTTOM:
    OH_Drawing_TextVerticalAlignment = 1;
#[doc = " Center-aligned."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_CENTER:
    OH_Drawing_TextVerticalAlignment = 2;
#[doc = " Top aligned."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_TOP:
    OH_Drawing_TextVerticalAlignment = 3;
#[doc = " @brief Enumerates the vertical alignment modes.\n\n @since 20\n @version 1.0"]
#[cfg(feature = "api-20")]
pub type OH_Drawing_TextVerticalAlignment = u32;
#[doc = " @brief This struct describes a font style.\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 This struct describes a font feature.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontFeature {
    #[doc = " Tag of the font feature."]
    pub tag: *mut ::std::os::raw::c_char,
    #[doc = " Value of the font feature."]
    pub value: ::std::os::raw::c_int,
}
#[doc = " @brief This struct describes a strut style. The strut style determines the line spacing, baseline alignment mode,\n and other properties related to the line height when drawing text.\n\n @since 12\n @version 1.0"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_StrutStyle {
    #[doc = " Font weight used for calculating the strut."]
    pub weight: OH_Drawing_FontWeight,
    #[doc = " Font style used when calculating the strut."]
    pub style: OH_Drawing_FontStyle,
    #[doc = " Size of the ascent plus descent in the logical pixels."]
    pub size: f64,
    #[doc = " Scale factor of the line height."]
    pub heightScale: f64,
    #[doc = " Whether to enable height override. **true**: enabled; **false**: disabled."]
    pub heightOverride: bool,
    #[doc = " Whether to enable half leading. **true**: enabled; **false**: disabled."]
    pub halfLeading: bool,
    #[doc = " Custom leading to be applied to the strut."]
    pub leading: f64,
    #[doc = " Whether to forcibly use the strut height for all rows. **true** means yes; **false** otherwise."]
    pub forceStrutHeight: bool,
    #[doc = " Number of font families."]
    pub familiesSize: usize,
    #[doc = " Double pointer to the font families used for calculating the strut."]
    pub families: *mut *mut ::std::os::raw::c_char,
}
#[doc = " @brief Defines a text rectangle structure.\n\n @since 24"]
#[cfg(feature = "api-24")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_RectSize {
    #[doc = " Rectangle width."]
    pub width: f64,
    #[doc = " Rectangle height."]
    pub height: f64,
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_TypographyStyle** object. Release this pointer by calling\n {@link OH_Drawing_DestroyTypographyStyle} when this object is no longer needed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the created {@link OH_Drawing_TypographyStyle} object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CreateTypographyStyle() -> *mut OH_Drawing_TypographyStyle;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_TypographyStyle** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\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 in a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param direction Text direction. For details about the available options, see {@link OH_Drawing_TextDirection}.\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 Text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param align Text alignment mode. For details about the available options, see {@link OH_Drawing_TextAlign}.\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 the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param lineNumber Max lines, which is an integer. If 0 or a negative number is passed, no text is displayed.\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 a pointer to an **OH_Drawing_TextStyle** object. When the {@link OH_Drawing_TextStyle} is no longer\n needed, use {@link OH_Drawing_DestroyTextStyle} to release the pointer to the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the created {@link OH_Drawing_TextStyle} object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_CreateTextStyle() -> *mut OH_Drawing_TextStyle;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_TextStyle** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyTextStyle(style: *mut OH_Drawing_TextStyle);
}
extern "C" {
    #[doc = " @brief Sets the color for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param color Text color in ARGB format. For example, an input parameter of 0xFFFF0000 indicates opaque red.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param fontSize Font size, in physical pixels (px).\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. Before <!--RP1-->OpenHarmony 6.1<!--RP1End-->, only variable fonts in system fonts\n support font weight adjustment. Starting from <!--RP1-->OpenHarmony 6.1<!--RP1End-->, both system fonts and variable\n fonts in third-party registered fonts support font weight adjustment. For non-variable fonts, the font weight does\n not change when the weight value is set to less than semi-bold, and a pseudo-bold effect may be triggered when the\n weight value is set to semi-bold or greater.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param fontWeight Font weight.\n     <br>For details about the available options, see {@link OH_Drawing_FontWeight}.\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 baseline for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param baseline Text baseline. For details about the available options, see {@link OH_Drawing_TextBaseline}.\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 decoration for a text style. Only one decoration can be set. To add multiple decorations, use\n {@link OH_Drawing_AddTextStyleDecoration}.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param decoration Text decoration. For details about the available options, see {@link OH_Drawing_TextDecoration}.\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 Adds the decoration for a text style. Multiple decoration lines can be displayed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param decoration Decoration to add. The value **1** means to add an underline, **2** means to add an overline, and *\n     *4** means to add a strikethrough. You can add various decoration lines at a time via bitwise OR operations.\n     <br>If a decoration style that is not in the {@link OH_Drawing_TextDecoration} enumeration is set, the original\n     decoration is retained.\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 Removes the decoration for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param decoration Decoration to remove. The value **1** means to remove an underline, **2** means to remove an\n     overline, and **4** means to remove a strikethrough. You can remove various text decorations at a time via\n     bitwise OR operations.\n     <br>If a decoration style that is not in the {@link OH_Drawing_TextDecoration} enumeration is set, the original\n     decoration is retained.\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 decoration color for a text style. If this API is not called or **color** is set to **0**, the\n decoration color follows the text color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param color Color of the decoration line, in ARGB format. For example, 0xFFFF0000 indicates opaque red. If this API\n     is not called or color is set to 0, the decoration line color follows the text color.\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 line height based on the multiple of the font size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param fontHeight Multiple of the font size.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param fontFamiliesNumber Number of font families. A negative number is not allowed.\n @param fontFamilies Pointer to the font families.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param fontStyle Font style. The value **1** indicates italic, **2** indicates oblique, and **0** or other values\n     indicate non-italic. For details, see the {@link OH_Drawing_FontStyle} enum.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param locale Language type. The data type is a pointer to char. The format follows the BCP 47 language tag standard.\n     For example, 'en' represents English, 'zh-Hans' represents Simplified Chinese, and 'zh-Hant' represents\n     Traditional Chinese. If not specified, the default locale is 'zh-Hans'.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param foregroundBrush Pointer to the {@link OH_Drawing_Brush} object, which is obtained from\n     {@link OH_Drawing_BrushCreate}.\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 Obtains the foreground brush of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param foregroundBrush Pointer to the {@link OH_Drawing_Brush} object, which is obtained from\n     {@link OH_Drawing_BrushCreate}.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param foregroundPen Pointer to the {@link OH_Drawing_Pen} object, which is obtained from\n     {@link OH_Drawing_PenCreate}.\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 Obtains the foreground pen of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param foregroundPen Pointer to the {@link OH_Drawing_Pen} object, which is obtained from\n     {@link OH_Drawing_PenCreate}.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param backgroundBrush Pointer to the {@link OH_Drawing_Brush} object, which is obtained from\n     {@link OH_Drawing_BrushCreate}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleBackgroundBrush(
        style: *mut OH_Drawing_TextStyle,
        backgroundBrush: *mut OH_Drawing_Brush,
    );
}
extern "C" {
    #[doc = " @brief Obtains the background brush of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param backgroundBrush Pointer to the {@link OH_Drawing_Brush} object, which is obtained from\n     {@link OH_Drawing_BrushCreate}.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param backgroundPen Pointer to the {@link OH_Drawing_Pen} object, which is obtained from\n     {@link OH_Drawing_PenCreate}.\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 Obtains the background pen of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param backgroundPen Pointer to the {@link OH_Drawing_Pen} object, which is obtained from\n     {@link OH_Drawing_PenCreate}.\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 an **OH_Drawing_TypographyCreate** object. Release this pointer by calling\n {@link OH_Drawing_DestroyTypographyHandler} when this object is no longer needed. You are advised to use the\n {@link OH_Drawing_CreateSharedFontCollection} function to create an {@link OH_Drawing_FontCollection} object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param fontCollection Pointer to the {@link OH_Drawing_FontCollection} object, which is obtained from\n     {@link OH_Drawing_CreateFontCollection}.\n @return Pointer to the **OH_Drawing_TypographyCreate** 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 Destroys an **OH_Drawing_TypographyCreate** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyTypographyHandler(handler: *mut OH_Drawing_TypographyCreate);
}
extern "C" {
    #[doc = " @brief Pushes a text style into the text style stack. Any text added afterward will use the style currently on top\n of the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\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 Adds text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @param text Pointer to the text content.\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 Pops the top text style out of the text style stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_TypographyHandlerPopTextStyle(handler: *mut OH_Drawing_TypographyCreate);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Typography** object. Release this pointer by calling\n {@link OH_Drawing_DestroyTypography} when this object is no longer needed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @return Pointer to the **OH_Drawing_Typography** 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 Destroys an **OH_Drawing_Typography** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_DestroyTypography(typography: *mut OH_Drawing_Typography);
}
extern "C" {
    #[doc = " @brief Performs layout calculation on the typography object and wraps text based on the specified maximum width.\n After this API is called, the properties of the typography object can be correctly obtained.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param maxWidth Maximum width of a single line in text typography, in physical pixels (px). The value must be\n     greater than 0.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_TypographyLayout(typography: *mut OH_Drawing_Typography, maxWidth: f64);
}
extern "C" {
    #[doc = " @brief Draws text from the upper left corner at a specified position. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called and applied.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param canvas Pointer to the **OH_Drawing_Canvas** object, which is obtained from {@link OH_Drawing_CanvasCreate}.\n @param positionX Horizontal coordinate of the starting position for text drawing (that is, the x-coordinate of the\n     upper left corner of the text area), in physical pixels (px). The upper left corner of the canvas serves as the\n     coordinate origin, with the positive direction to the right.\n @param positionY Vertical coordinate of the starting position for text drawing (that is, the y-coordinate of the\n     upper left corner of the text area), in physical pixels (px). The upper left corner of the canvas serves as the\n     coordinate origin, with the positive direction downward.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_TypographyPaint(
        typography: *mut OH_Drawing_Typography,
        canvas: *mut OH_Drawing_Canvas,
        positionX: f64,
        positionY: f64,
    );
}
extern "C" {
    #[doc = " @brief Draws text along a specified path. This API must be called after {@link OH_Drawing_TypographyLayout} is\n called and takes effect. It is recommended to use {@link OH_Drawing_SetTypographyTextMaxLines} to set the maximum\n number of lines to 1 to avoid overlapping issues caused by text width exceeding the typography width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param canvas Pointer to the **OH_Drawing_Canvas** object, which is obtained from {@link OH_Drawing_CanvasCreate}.\n @param path Pointer to the **OH_Drawing_Path** object, which is obtained from {@link OH_Drawing_PathCreate}.\n @param hOffset Horizontal offset, in physical pixels (px). The horizontal offset of the text along the path (X-axis),\n     positive to the right and negative to the left.\n @param vOffset Vertical offset, in physical pixels (px). The vertical offset of the text along the path (Y-axis),\n     positive downward and negative upward.\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 Arranges the text in the constraint rectangle.\n\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param constraintsRect Height and width of the constrained layout.\n @param fitStrRangeArr As an output parameter, it contains the character range of the paragraph text that is actually\n     contained. Pointer to array object {@link OH_Drawing_Array}.\n     <br>Releases the memory through {@link OH_Drawing_ReleaseArrayBuffer}.\n @param fitStrRangeArrayLen As an output parameter, it indicates the size of the contained string array.\n @return Actual text size after layout, including width and height information.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_TypographyLayoutWithConstraintsWithBuffer(
        typography: *mut OH_Drawing_Typography,
        constraintsRect: OH_Drawing_RectSize,
        fitStrRangeArr: *mut *mut OH_Drawing_Array,
        fitStrRangeArrayLen: *mut usize,
    ) -> OH_Drawing_RectSize;
}
extern "C" {
    #[doc = " @brief Obtains the pointer to the OH_Drawing_Range object based on the array index.\n\n @param array Pointer to array object {@link OH_Drawing_Array}.\n @param index Index of the target {@link OH_Drawing_Range} object in the array.\n @return Returns the pointer to the OH_Drawing_Range object.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetRangeByArrayIndex(
        array: *mut OH_Drawing_Array,
        index: usize,
    ) -> *mut OH_Drawing_Range;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the {@link OH_Drawing_Array} object.\n\n @param array Pointer to array object {@link OH_Drawing_Array}.\n     <br>Supported array types:\n     <br>Array of full font names, which is obtained through {@link OH_Drawing_GetSystemFontFullNamesByType}.\n     <br>Array of text lines, which is obtained through {@link OH_Drawing_TypographyGetTextLines}.\n     <br>Array of string indexes, which is obtained through {@link OH_Drawing_GetRunStringIndices}.\n     <br>Array of rectangles, which is obtained through {@link OH_Drawing_RectCreateArray}.\n     <br>Array of font descriptors, which is obtained through {@link OH_Drawing_GetFontFullDescriptorsFromStream} or\n     {@link OH_Drawing_GetFontFullDescriptorsFromPath}.\n     <br>Array of text ranges, which is obtained through {@link OH_Drawing_TypographyLayoutWithConstraintsWithBuffer}.\n @link OH_Drawing_GetFontFullDescriptorsFromPath}.\n     <br>Array of text ranges, which is obtained through {@link OH_Drawing_TypographyLayoutWithConstraintsWithBuffer}.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if array is a null pointer or the type is not supported.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_ReleaseArrayBuffer(array: *mut OH_Drawing_Array) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the typography width set by the user. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Maximum width, in physical pixels (px).\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetMaxWidth(typography: *mut OH_Drawing_Typography) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the overall height of a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Returns the height, in physical pixels (px).\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 in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called. You are advised to round up the return value. If the text content is\n empty, **0.0** is returned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Longest line width, in physical pixels (px).\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 of a typography object, including its indentation. This function must\n be called after {@link OH_Drawing_TypographyLayout} is called. You are advised to round up the return value. If the\n text content is empty, **0.0** is returned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Returns the width of the longest line (including the current line indent), in physical pixels (px).\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 Obtains the minimum intrinsic width in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Minimum intrinsic width, in physical pixels (px).\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetMinIntrinsicWidth(typography: *mut OH_Drawing_Typography)
        -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the maximum intrinsic width in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Maximum intrinsic width, in physical pixels (px).\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetMaxIntrinsicWidth(typography: *mut OH_Drawing_Typography)
        -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the alphabetic baseline position of the typography object. This API must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Alphabetic baseline, in physical pixels (px).\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetAlphabeticBaseline(
        typography: *mut OH_Drawing_Typography,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the ideographic baseline position of the typography object. This API must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Returns the ideographic baseline, in physical pixel px.\n @since 9\n @version 1.1"]
    pub fn OH_Drawing_TypographyGetIdeographicBaseline(
        typography: *mut OH_Drawing_Typography,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Adds a placeholder.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @param span Pointer to the {@link OH_Drawing_PlaceholderSpan} 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 Checks whether the text in the typography object exceeds the line limit. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called. It returns **false** if the line limit is not set using\n {@link OH_Drawing_SetTypographyTextMaxLines}.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Returns **true** if the maximum number of lines is exceeded; returns **false** otherwise.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypographyDidExceedMaxLines(typography: *mut OH_Drawing_Typography) -> bool;
}
extern "C" {
    #[doc = " @brief Obtains text boxes in a given range of a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called. Release this pointer by calling\n {@link OH_Drawing_TypographyDestroyTextBox} when this object is no longer needed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param start Start position. The value ranges from 0 to the text length, counted in UTF-16 code units. Must be less\n     than end; otherwise, an empty result is returned.\n @param end End position. The value ranges from 0 to the text length, counted in UTF-16 code units. If the value\n     exceeds the text length, the text length is used. If the value is 0, an empty result is returned.\n @param heightStyle Height style. For details about the available options, see {@link OH_Drawing_RectHeightStyle}.\n @param widthStyle Width style. For details about the available options, see {@link OH_Drawing_RectWidthStyle}.\n @return Text box in the specified range. For details, see {@link OH_Drawing_TextBox}.\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 Obtains text boxes for placeholders in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called. Release this pointer by calling\n {@link OH_Drawing_TypographyDestroyTextBox} when this object is no longer needed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Placeholder text box. The return type is {@link OH_Drawing_TextBox}.\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 Obtains the left position of a text box.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Pointer to the **OH_Drawing_TextBox** object, which is obtained from\n     {@link OH_Drawing_TypographyGetRectsForRange} or {@link OH_Drawing_TypographyGetRectsForPlaceholders}.\n @param index Index of the text box. The value ranges from 0 to the number of text boxes minus 1. The number of text\n     boxes can be obtained through {@link OH_Drawing_GetSizeOfTextBox}. 0.0 is returned when the index is out of\n     range.\n @return Left position.\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 Obtains the right position of a text box.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Pointer to the **OH_Drawing_TextBox** object, which is obtained from\n     {@link OH_Drawing_TypographyGetRectsForRange} or {@link OH_Drawing_TypographyGetRectsForPlaceholders}.\n @param index Index of the text box. The value ranges from 0 to the number of text boxes minus 1. The number of text\n     boxes can be obtained through {@link OH_Drawing_GetSizeOfTextBox}. 0.0 is returned when the value is out of\n     range.\n @return Right position.\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 Obtains the top position of a text box.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Pointer to the **OH_Drawing_TextBox** object, which is obtained from\n     {@link OH_Drawing_TypographyGetRectsForRange} or {@link OH_Drawing_TypographyGetRectsForPlaceholders}.\n @param index Index of the text box. The value ranges from 0 to the number of text boxes minus 1. The number of text\n     boxes can be obtained through {@link OH_Drawing_GetSizeOfTextBox}. 0.0 is returned when the value is out of\n     range.\n @return Top position.\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 Obtains the bottom position of a text box.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Pointer to the **OH_Drawing_TextBox** object, which is obtained from\n     {@link OH_Drawing_TypographyGetRectsForRange} or {@link OH_Drawing_TypographyGetRectsForPlaceholders}.\n @param index Index of the text box. The value ranges from 0 to the number of text boxes minus 1. The number of text\n     boxes can be obtained through {@link OH_Drawing_GetSizeOfTextBox}. 0.0 is returned when the value is out of\n     range.\n @return Bottom position.\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 Obtains the text direction of a text box.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Pointer to the {@link OH_Drawing_TextBox} object, which is obtained from\n     {@link OH_Drawing_TypographyGetRectsForRange} or {@link OH_Drawing_TypographyGetRectsForPlaceholders}.\n @param index Index of the text box. The value ranges from 0 to the number of text boxes minus 1. The number of text\n     boxes can be obtained through {@link OH_Drawing_GetSizeOfTextBox}. If the index is out of range, 0 is returned.\n @return Text direction.\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 Obtains the number of text boxes.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBox Pointer to the **OH_Drawing_TextBox** object, which is obtained from\n     {@link OH_Drawing_TypographyGetRectsForRange} or {@link OH_Drawing_TypographyGetRectsForPlaceholders}.\n @return Number of text boxes.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetSizeOfTextBox(textBox: *mut OH_Drawing_TextBox) -> usize;
}
extern "C" {
    #[doc = " @brief Obtains the position and affinity of the glyph at the given coordinates.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param dx X coordinate.\n @param dy Y coordinate.\n @return {@link OH_Drawing_PositionAndAffinity} struct that holds the position and affinity of the glyph cluster.\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 Obtains the index position and affinity of the character cluster to which the text at the coordinate belongs.\n A character cluster refers to a group of one or more characters. When the {@link OH_Drawing_PositionAndAffinity} is\n no longer needed, use {@link OH_Drawing_DestroyPositionAndAffinity} to release the pointer to the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param dx X coordinate of the cursor, in px.\n @param dy Y coordinate of the cursor, in px.\n @return {@link OH_Drawing_PositionAndAffinity} struct that holds the position and affinity of the glyph 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 Obtains the position attribute of an **OH_Drawing_PositionAndAffinity** object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positionAndAffinity Pointer to the OH_Drawing_PositionAndAffinity object, obtained by\n     {@link OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster}.\n @return Position attribute.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetPositionFromPositionAndAffinity(
        positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
    ) -> usize;
}
extern "C" {
    #[doc = " @brief Obtains the affinity attribute of an **OH_Drawing_PositionAndAffinity** object. The affinity determines\n whether the font is close to the front text or rear text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positionAndAffinity Pointer to the OH_Drawing_PositionAndAffinity object, obtained by\n     {@link OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster}.\n @return Affinity attribute.\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 Obtains the word boundary in the typography object. When the {@link OH_Drawing_Range} is no longer needed,\n use {@link OH_Drawing_ReleaseRangeBuffer} to release the pointer to the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param offset Word index. The value ranges from 0 to n-1, where n is the text length. If the value is out of range,\n     the default value is returned or an exception is thrown.\n @return {@link OH_Drawing_Range} struct that holds 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 Obtains the start position of an **OH_Drawing_Range** object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param range Pointer to the **OH_Drawing_Range** object, which is obtained from\n     {@link OH_Drawing_TypographyGetWordBoundary}.\n @return Start position.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetStartFromRange(range: *mut OH_Drawing_Range) -> usize;
}
extern "C" {
    #[doc = " @brief Obtains the end position of an **OH_Drawing_Range** object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param range Pointer to the **OH_Drawing_Range** object, which is obtained from\n     {@link OH_Drawing_TypographyGetWordBoundary}.\n @return End position.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_GetEndFromRange(range: *mut OH_Drawing_Range) -> usize;
}
extern "C" {
    #[doc = " @brief Obtains the number of lines in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Number of rows obtained.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param decorationStyle Text decoration style. For details about the available options, see\n     {@link OH_Drawing_TextDecorationStyle}.\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 thickness scale factor for the decoration style of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param decorationThicknessScale Thickness scaling ratio. The default value is **1**. If the value is less than or\n     equal to 0, no decoration line is drawn.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param letterSpacing Letter spacing value. A positive value increases the spacing, a negative value decreases it.\n     The default value is **0**, in px.\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 for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param wordSpacing Spacing size. A positive value increases the spacing, and a negative value decreases the spacing.\n     The default value is **0**, in px.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_SetTextStyleWordSpacing(style: *mut OH_Drawing_TextStyle, wordSpacing: f64);
}
extern "C" {
    #[doc = " @brief Sets whether to enable half leading for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param halfLeading Whether the half leading takes effect. **true** means yes; **false** otherwise.\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 content for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param ellipsis Pointer to the ellipsis content. The data type is a pointer pointing to char.\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 style for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param ellipsisModal Ellipsis style. For details about the available options, see {@link OH_Drawing_EllipsisModal}.\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 text break strategy.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param breakStrategy Break strategy. For details about the available options, see {@link OH_Drawing_BreakStrategy}.\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 Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param wordBreakType Word break type. For details about the available options, see {@link OH_Drawing_WordBreakType}.\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 style for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TypographyStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param ellipsisModal Ellipsis style. For details about the available options, see {@link OH_Drawing_EllipsisModal}.\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 Obtains the line height in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param lineNumber Index of the line number to obtain, starting from 0, with a maximum value of\n     {@link OH_Drawing_TypographyGetLineCount} - 1. 0.0 is returned when the index is out of range.\n @return Line height of the specified line, in physical pixels (px).\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 Obtains the line width of a specified line. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param lineNumber Index of the line to obtain, starting from 0. The maximum value is\n     {@link OH_Drawing_TypographyGetLineCount} - 1. Returns 0.0 when the index is out of range.\n @return Width of the specified line, in physical pixels (px).\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 Obtains the line bounds in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called. This function can only be used to obtain the bounds of existing lines.\n  That is, the line index must start from 0, and the maximum index is {@link OH_Drawing_TypographyGetLineCount} – 1.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param lineNumber Row index.\n @param includeSpaces Whether the returned bounds contain spaces. The value **true** means that the bounds contain\n     spaces, and **false** means the opposite.\n @return Pointer to the {@link OH_Drawing_Range} object. If the line index is invalid, **start** and **end** in the\n     result value are both **0**.\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 Constructs a font descriptor object for describing detailed information about a system font. When the\n {@link OH_Drawing_FontDescriptor} is no longer needed, use {@link OH_Drawing_DestroyFontDescriptor} to release the\n pointer to the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the created {@link OH_Drawing_FontDescriptor} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CreateFontDescriptor() -> *mut OH_Drawing_FontDescriptor;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_FontDescriptor** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param descriptor Pointer to the {@link OH_Drawing_FontDescriptor} object, which is obtained from\n     {@link OH_Drawing_CreateFontDescriptor}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyFontDescriptor(descriptor: *mut OH_Drawing_FontDescriptor);
}
extern "C" {
    #[doc = " @brief Constructs a font parser object for parsing system fonts. When the {@link OH_Drawing_FontParser} is no longer\n needed, use {@link OH_Drawing_DestroyFontParser} to release the pointer to the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the created {@link OH_Drawing_FontParser} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_CreateFontParser() -> *mut OH_Drawing_FontParser;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_FontParser** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param parser Pointer to the {@link OH_Drawing_FontParser} object, which is obtained from\n     {@link OH_Drawing_CreateFontParser}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyFontParser(parser: *mut OH_Drawing_FontParser);
}
extern "C" {
    #[doc = " @brief Obtains the list of system font names. When the list is no longer needed, use\n {@link OH_Drawing_DestroySystemFontList} to release the memory. This API is supported only on phones and PC/2-in-1\n devices.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontParser Pointer to the {@link OH_Drawing_FontParser} object, which is obtained from\n     {@link OH_Drawing_CreateFontParser}.\n @param num Pointer to the number of system font names.\n @return System font list.\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 Reclaims the memory occupied by the system font list.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontList Double pointer to the list of system font names.\n @param num Number of 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 Obtains the information about a system font based on the given system font name. This API is supported only\n on phones and PC/2-in-1 devices.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontParser Pointer to the {@link OH_Drawing_FontParser} object, which is obtained from\n     {@link OH_Drawing_CreateFontParser}.\n @param name Name of the system font. For details about valid system font names, see\n     {@link OH_Drawing_FontParserGetSystemFontList}.\n @return Pointer to the system font descriptor object. When no longer needed, use\n     {@link OH_Drawing_DestroyFontDescriptor} to release the pointer.\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 Obtains the line metrics in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called. Release this pointer by calling {@link OH_Drawing_DestroyLineMetrics}\n when this object is no longer needed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Pointer to the {@link OH_Drawing_LineMetrics} object.\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 Obtains the number of lines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineMetrics Pointer to the {@link OH_Drawing_LineMetrics} object, which is obtained from\n     {@link OH_Drawing_LineMetrics}.\n @return 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 Destroys an **OH_Drawing_LineMetrics** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineMetrics Pointer to the {@link OH_Drawing_LineMetrics} object, which is obtained from\n     {@link OH_Drawing_LineMetrics}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyLineMetrics(lineMetrics: *mut OH_Drawing_LineMetrics);
}
extern "C" {
    #[doc = " @brief Obtains the position information of a specified line in the typography object. For details, see the\n {@link OH_Drawing_LineMetrics} struct. This API must be called after {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param lineNumber Index of the line to obtain, starting from 0 and up to {@link OH_Drawing_TypographyGetLineCount} -\n     1. Returns false when the index is out of range.\n @param lineMetric Pointer to the line metrics object {@link OH_Drawing_LineMetrics}, used as an output parameter.\n @return Whether the metrics of the given line is obtained. **true** means yes; **false** otherwise.\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 text for a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param ellipsis Ellipsis text.\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 for a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param locale Locale. The data type is a pointer to char. The format follows the BCP 47 language tag standard, for\n     example, 'en' for English, 'zh-Hans' for Simplified Chinese, and 'zh-Hant' for Traditional Chinese. If not\n     specified, the default locale is 'zh-Hans'.\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 text division ratio, which is used to determine the cursor position within a glyph when tapping to\n locate a character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param textSplitRatio Text split ratio. The value range is [0, 1], and the default value is 0.5. When mapping click\n     coordinates to character positions, this is the threshold within a glyph for determining whether the position\n     belongs to the current character or the next character. A larger value favors the current character, and a\n     smaller value favors the next character.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextSplitRatio(
        style: *mut OH_Drawing_TypographyStyle,
        textSplitRatio: f32,
    );
}
extern "C" {
    #[doc = " @brief Obtains the default text style of a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Pointer to the {@link OH_Drawing_TextStyle} object. Release this pointer by calling\n     {@link OH_Drawing_DestroyTextStyle} when this object is no longer needed.\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 Obtains the text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Text alignment mode.\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 Checks whether the maximum number of lines is limited for text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Whether the text has a maximum line limit. The value **true** means there is no maximum line limit, and **\n     false** means there is a 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 Checks whether an ellipsis is configured for a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Whether ellipsis is configured for the specified typography style. **true** means yes; **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyIsEllipsized(style: *mut OH_Drawing_TypographyStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Sets a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\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 Obtains the font metrics of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param fontmetrics Pointer to the {@link OH_Drawing_Font_Metrics} object, which is obtained from\n     {@link OH_Drawing_Font_Metrics}.\n @return Whether the font attributes are obtained. **true** means yes; **false** otherwise.\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 Obtains the metrics of a given line or the metrics of the first character in a given line in a typography\n object. This function must be called after {@link OH_Drawing_TypographyLayout} is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param lineNumber Index of the line number to obtain, starting from 0 and up to\n     {@link OH_Drawing_TypographyGetLineCount} - 1. Returns false when out of range.\n @param oneLine Whether to obtain the metrics of the entire line. The value **true** means to obtain the metrics of\n     the entire line, and **false** means to obtain the metrics of the first character in the line.\n @param includeWhitespace Whether the text width includes whitespace. The value true means whitespace is included,\n     and false means whitespace is not included.\n @param drawingLineMetrics Pointer to the {@link OH_Drawing_LineMetrics} object, which is obtained from\n     {@link OH_Drawing_LineMetrics}.\n @return Returns **true** if the metrics of the given line or the metrics of the first character in the given line is\n     obtained; returns **false** otherwise.\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 default font weight of the typography style. Before <!--RP1-->OpenHarmony 6.1<!--RP1End-->, only\n variable fonts in system fonts support font weight adjustment. Starting from <!--RP1-->OpenHarmony 6.1<!--RP1End-->,\n both system fonts and variable fonts in third-party registered fonts support font weight adjustment. For non-\n variable fonts, the font weight does not change when the weight value is set to less than semi-bold, and a pseudo-\n bold effect may be triggered when the weight value is set to semi-bold or greater.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param weight Font weight.\n     <br>For details about the available options, see {@link OH_Drawing_FontWeight}.\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 default font style for a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param fontStyle Font style. The value **1** indicates italic, and **0** or other values indicate non-italic. For\n     details about the available options, see {@link OH_Drawing_FontStyle}.\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 name for text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param fontFamily Pointer to the name of the font family.\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 for text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style {@link OH_Drawing_TypographyStyle}, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param fontSize Font size (greater than 0), in px.\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 for text typography as a multiple of the current font size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param fontHeight Font height, which is a multiple of the current font size. If the value is less than 0, it is\n     treated as 0.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextFontHeight(
        style: *mut OH_Drawing_TypographyStyle,
        fontHeight: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets whether to enable half leading for text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param halfLeading Whether to enable half leading. The value **true** means to enable half leading, and **false**\n     means the opposite.\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 the text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param useLineStyle Whether to enable the line style. The value **true** means to enable the line style, and **false*\n     * means the opposite.\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 the text style in the strut style of the typography style. Before <!--RP1-->\n OpenHarmony 6.1<!--RP1End-->, only variable fonts in system fonts support font weight adjustment. Starting from <!--\n RP1-->OpenHarmony 6.1<!--RP1End-->, both system fonts and variable fonts in third-party registered fonts support\n font weight adjustment. For non-variable fonts, the font weight does not change when the weight value is set to less\n than semi-bold, and a pseudo-bold effect may be triggered when the weight value is set to semi-bold or greater.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param weight Font weight. For details about the available options, see {@link OH_Drawing_FontWeight}.\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 the strut style in a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param fontStyle Font style. For details about the available options, see {@link OH_Drawing_FontStyle}.\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 family of the line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to a typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param fontFamiliesNumber Number of font family names. Negative values are not allowed.\n @param fontFamilies Pointer to an array of font family types.\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 for a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param lineStyleFontSize Font size (greater than 0), in physical pixels (px).\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 the line style for text typography as a multiple of the current font size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param lineStyleFontHeight Font height. The value must be greater than 0.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleFontHeight(
        style: *mut OH_Drawing_TypographyStyle,
        lineStyleFontHeight: f64,
    );
}
extern "C" {
    #[doc = " @brief Sets whether to enable half leading for a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param lineStyleHalfLeading Whether the half leading takes effect. **true** means yes; **false** otherwise.\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 factor for a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param spacingScale Line style spacing scale for scaling line spacing. A value greater than 1.0 increases the line\n     spacing, a value less than 1.0 decreases it, and 1.0 indicates the original spacing.\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 to enable the text line style only.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param lineStyleOnly Whether to enable the line style only. **true** means yes; **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SetTypographyTextLineStyleOnly(
        style: *mut OH_Drawing_TypographyStyle,
        lineStyleOnly: bool,
    );
}
extern "C" {
    #[doc = " @brief Creates a pointer to a text shadow object. When the {@link OH_Drawing_TextShadow} is no longer needed, use\n {@link OH_Drawing_DestroyTextShadow} to release the pointer to the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the created text shadow object.\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.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Pointer to the text shadow object {@link OH_Drawing_TextShadow}, obtained by\n     {@link OH_Drawing_CreateTextShadow}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyTextShadow(shadow: *mut OH_Drawing_TextShadow);
}
extern "C" {
    #[doc = " @brief Obtains the text shadow container. When the {@link OH_Drawing_TextShadow} is no longer needed, use\n {@link OH_Drawing_DestroyTextShadows} to release the pointer to the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Pointer to the text shadow container {@link OH_Drawing_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 Obtains the size of the text shadow container.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Size of the text shadow container.\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 a text shadow element to the text shadow container.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param shadow Pointer to the text shadow object {@link OH_Drawing_TextShadow}, created by\n     {@link OH_Drawing_CreateTextShadow}.\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 Clears all elements in the text shadow container.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleClearShadows(style: *mut OH_Drawing_TextStyle);
}
extern "C" {
    #[doc = " @brief Obtains the element at the specified index in the text shadow container.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param index Subscript index, ranging from 0 to the number of shadows minus 1. The number of shadows can be obtained\n     via {@link OH_Drawing_TextStyleGetShadowCount}.\n @return Pointer to the text shadow object {@link OH_Drawing_TextShadow}.\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 Sets indents for typography. If this function is not called, texts will have no indentation applied.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param indentsNumber Number of indents. The value must be less than or equal to the length of the indents array to\n     avoid display exceptions caused by access to the out-of-bounds array.\n @param indents Pointer to a floating-point array, in which each element indicates an indentation width, in px.\n     Before calling {@link OH_Drawing_Typography} API, you need to declare and initialize the floating-point array.\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 Obtains indents with a given index in a typography object. The line index starts from 0.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param index Subscript index of the indentation value. Returns 0.0 if index is less than 0. Returns the last\n     indentation value if index is greater than or equal to the number of indentation values.\n @return Value of the element corresponding to the index.\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 the vector composed of **OH_Drawing_TextShadow** objects.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Pointer to the text shadow object {@link OH_Drawing_TextShadow}, obtained by\n     {@link OH_Drawing_CreateTextShadow}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_DestroyTextShadows(shadow: *mut OH_Drawing_TextShadow);
}
extern "C" {
    #[doc = " @brief Sets a text height modifier pattern.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param heightMode Text height modifier mode. The value is an enumerated value of the\n     {@link OH_Drawing_TextHeightBehavior} type.\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 Obtains the text height modifier pattern.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Text height modifier mode, which is an enumerated value of the {@link OH_Drawing_TextHeightBehavior} type.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextGetHeightBehavior(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_TextHeightBehavior;
}
extern "C" {
    #[doc = " @brief Sets a background rectangle and style ID for a text style. The style ID is valid only when the background box\n is a rounded rectangle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param rectStyleInfo Pointer to the {@link OH_Drawing_RectStyle_Info} object.\n @param styleId Style ID. The style ID is valid only when the background box is a rounded rectangle. Text processing\n     is divided into multiple segments. Each segment has its own text style. **id** indicates the sequence number of\n     the background box in which the segment is drawn.\n     <br>If the ID of each segment in a row is **0**, all segments are drawn in the same background box. If a row\n     contains segments with IDs **0** and **1**, the segment with ID **0** is drawn in a background box, and the\n     segment with ID **1** is drawn in another background box. Other cases can be deduced in the same way.\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 Adds the symbol to use in the typography creation process.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @param symbol Symbol value. For details, see the Unicode value in the {@link HarmonyOS Symbol library}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyHandlerAddSymbol(
        handler: *mut OH_Drawing_TypographyCreate,
        symbol: u32,
    );
}
extern "C" {
    #[doc = " @brief Adds a font feature for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param tag Pointer to the string identified by the keyword in the font feature key-value pair.\n @param value Value of the font feature key-value pair.\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 Adds a font variation. This function takes effect only when the corresponding font file (.ttf file) supports\n variable adjustment. Otherwise, calling this function does not take effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param axis Pointer to the key in the font variation key-value pair. Currently, only **'wght'** is supported,\n     indicating the font weight.\n @param value Value of the font variation key-value pair. Currently, the value range of **'wght'** for the default\n     font is \\[0,900\\].\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 Adds the normalized variable font attributes. This function takes effect only when the corresponding font\n file (.ttf file) supports variable adjustment.\n\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param axis Pointer to the key in the font variation key-value pair.\n @param normalizedValue Value of the font variation key-value pair. The normalized value range is [-1,1], mapping the\n     range from the minimum value to the maximum value configured in the font file. **0** indicates the default value\n     configured in the font file.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_TextStyleAddFontVariationWithNormalization(
        style: *mut OH_Drawing_TextStyle,
        axis: *const ::std::os::raw::c_char,
        normalizedValue: f32,
    );
}
extern "C" {
    #[doc = " @brief Obtains all the contents in a font feature map container of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Pointer to the font feature struct, which stores all the contents obtained.\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 Reclaims the memory occupied by the struct array that holds all the font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFeature Pointer to the struct array that holds all the font features, which is obtained from\n     {@link OH_Drawing_TextStyleGetFontFeatures}.\n @param fontFeatureSize Size of the struct array that holds all the font features.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleDestroyFontFeatures(
        fontFeature: *mut OH_Drawing_FontFeature,
        fontFeatureSize: usize,
    );
}
extern "C" {
    #[doc = " @brief Obtains the size of a font feature map container in a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Size of a font feature map container.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontFeatureSize(style: *mut OH_Drawing_TextStyle) -> usize;
}
extern "C" {
    #[doc = " @brief Clears all the contents in a font feature map container of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleClearFontFeature(style: *mut OH_Drawing_TextStyle);
}
extern "C" {
    #[doc = " @brief Sets a baseline drift for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param lineShift Baseline offset of the text. A positive value shifts upward, and a negative value shifts downward,\n     in px.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleSetBaselineShift(style: *mut OH_Drawing_TextStyle, lineShift: f64);
}
extern "C" {
    #[doc = " @brief Obtains the baseline drift of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the **OH_Drawing_TextStyle** object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Baseline shift.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetBaselineShift(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the color of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Text color.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetColor(style: *mut OH_Drawing_TextStyle) -> u32;
}
extern "C" {
    #[doc = " @brief Obtains the decoration style of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Text decoration style. For details, see {@link OH_Drawing_TextDecorationStyle}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetDecorationStyle(
        style: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_TextDecorationStyle;
}
extern "C" {
    #[doc = " @brief Obtains the font weight of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Font weight. For details, see {@link OH_Drawing_FontWeight}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontWeight(
        style: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_FontWeight;
}
extern "C" {
    #[doc = " @brief Obtains the font style of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Font style. For details, see {@link OH_Drawing_FontStyle}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontStyle(
        style: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_FontStyle;
}
extern "C" {
    #[doc = " @brief Obtains the baseline of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Font baseline position. For details, see {@link OH_Drawing_TextBaseline}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetBaseline(
        style: *mut OH_Drawing_TextStyle,
    ) -> OH_Drawing_TextBaseline;
}
extern "C" {
    #[doc = " @brief Obtains the font family name list.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param num Pointer to the number of font families.\n @return Pointer to the obtained font family name list.\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 Reclaims the memory occupied by the font families, where **num** specifies the number of font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFamilies Double pointer to the font families.\n @param num Number of 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 Obtains the font size of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Font size.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontSize(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the letter spacing of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Letter spacing.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetLetterSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the word spacing of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Word spacing.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetWordSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the font height of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Font height of a text style.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetFontHeight(style: *mut OH_Drawing_TextStyle) -> f64;
}
extern "C" {
    #[doc = " @brief Checks whether half leading is enabled for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Whether half leading is enabled for a text style. **true** means enabled; **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleGetHalfLeading(style: *mut OH_Drawing_TextStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Vertical alignment mode of the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param align Vertical alignment mode of the text. The default mode is baseline alignment. For details about other\n     options, see {@link OH_Drawing_TextVerticalAlignment}.\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 Obtains the locale of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Pointer to the locale in the format of language-country. For example, zh-CN indicates Chinese (China), and\n     en-US indicates English (United States). For details, see BCP 47.\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 enable superscript or subscript for text typography. If this API is not called, superscript\n and subscript are disabled by default.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param textBadgeType Whether to enable superscript or subscript in text typography. TEXT_SUPERSCRIPT enables\n     superscript, TEXT_SUBSCRIPT enables subscript, and the default value TEXT_BADGE_NONE disables both.\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 font style, including the font weight, width, and slant, for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingTextStyle Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @param fontStyle Font style, including the font weight, width, and slant.\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 Obtains the font style, including the font weight, width, and slant, of a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingTextStyle Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Returns the obtained font style object.\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 font style, including the font weight, width, and slant, for the default text style of a typography\n style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingStyle Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param fontStyle Font style, including the font weight, width, and slant.\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 Obtains the font style, including the font weight, width, and slant, of the default text style of a\n typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingStyle Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Font style, including the font weight, width, and slant.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleGetFontStyleStruct(
        drawingStyle: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_FontStyleStruct;
}
extern "C" {
    #[doc = " @brief Checks whether two text styles are equal. The word width property is not involved in the comparison.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the first text style.\n @param comparedStyle Pointer to the first text style.\n @return Whether two text style objects are equal. **true** if the source rectangle is equal to the destination\n     rectangle; **false** otherwise.\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 Checks whether the font style properties of two text styles are equal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the first text style.\n @param comparedStyle Pointer to the first text style.\n @return true if the font style attributes of the two text style objects are equal; false otherwise.\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 Checks whether two text styles have the same font style type.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the first text style.\n @param comparedStyle Pointer to the first text style.\n @param textStyleType Text style types as in {@link OH_Drawing_TextStyleType}.\n @return Whether two text styles have the same font style type. **true** means yes; **false** otherwise.\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 Adds a placeholder.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleSetPlaceholder(style: *mut OH_Drawing_TextStyle);
}
extern "C" {
    #[doc = " @brief Checks whether a placeholder is set for a text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTextStyle}.\n @return Checks whether a placeholder is set for a text style. **true** means yes; **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextStyleIsPlaceholder(style: *mut OH_Drawing_TextStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Obtains the text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Text alignment modes as in {@link OH_Drawing_TextAlign}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleGetEffectiveAlignment(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_TextAlign;
}
extern "C" {
    #[doc = " @brief Checks whether font hinting is enabled for a typography style. Font hinting is used to improve the\n readability and appearance of small-sized text when rendering it.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Whether to enable font hinting for a typography style. **true**: enabled; **false**: disabled.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleIsHintEnabled(style: *mut OH_Drawing_TypographyStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Obtains the system font configuration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param errorCode Error code. For details, see {@link OH_Drawing_FontConfigInfoErrorCode}.\n @return Pointer to the system font configuration. When it is no longer required, call\n     {@link OH_Drawing_DestroySystemFontConfigInfo} to release the pointer to the 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 Reclaims the memory occupied by the system font configuration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawFontCfgInfo Pointer to the {@link OH_Drawing_FontConfigInfo} object, which is obtained from\n     {@link OH_Drawing_GetSystemFontConfigInfo}.\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 a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param strutstyle Pointer to the {@link OH_Drawing_StrutStyle} object, which is obtained from\n     {@link OH_Drawing_TypographyStyleGetStrutStyle}.\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 Reclaims the memory occupied by a strut style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param strutstyle Pointer to the {@link OH_Drawing_StrutStyle} object, which is obtained from\n     {@link OH_Drawing_TypographyStyleGetStrutStyle}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleDestroyStrutStyle(strutstyle: *mut OH_Drawing_StrutStyle);
}
extern "C" {
    #[doc = " @brief Obtains the strut style of a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Pointer to the {@link OH_Drawing_StrutStyle} 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 Checks whether two strut styles are equal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param from Pointer to the first strut style.\n @param to Pointer to the second strut style.\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 whether to enable font hinting for a typography style. Font hinting is used to improve the readability\n and appearance of small-sized text when rendering it.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param hintsEnabled Whether to enable font hinting. **true**: enabled; **false**: disabled.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyStyleSetHintsEnabled(
        style: *mut OH_Drawing_TypographyStyle,
        hintsEnabled: bool,
    );
}
extern "C" {
    #[doc = " @brief Obtains all font metrics from a given line in a typography object. This function must be called after\n {@link OH_Drawing_TypographyLayout} is called. Otherwise, a null pointer is returned. Release this pointer by\n calling {@link OH_Drawing_TypographyDestroyLineFontMetrics} when this object is no longer needed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param lineNumber Line number, which is an integer. The minimum value is 1, and the maximum value depends on the\n     number of lines parsed by the font engine after text input. If a value greater than the maximum number is passed\n     in, an error value is returned and an error message is printed.\n @param fontMetricsSize Pointer to the size of the struct.\n @return Returns all the font metrics.\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 Reclaims the memory occupied by the struct array that holds all the font metrics of a given line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineFontMetric Pointer to the first address of the struct array.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyDestroyLineFontMetrics(
        lineFontMetric: *mut OH_Drawing_Font_Metrics,
    );
}
extern "C" {
    #[doc = " @brief Marks a typography object as dirty data. This function is used to initialize the typography state.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyMarkDirty(typography: *mut OH_Drawing_Typography);
}
extern "C" {
    #[doc = " @brief Obtains the number of unresolved glyphs in a typography object. This function can be called only after\n {@link OH_Drawing_TypographyLayout} is called and applied.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @return Number of unresolved glyphs.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetUnresolvedGlyphsCount(
        typography: *mut OH_Drawing_Typography,
    ) -> i32;
}
extern "C" {
    #[doc = " @brief Updates the font size in a typography object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param from Reserved field, which is not used.\n @param to Reserved field, which is not used.\n @param fontSize Updated font size. The value must be greater than 0, in px.\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 Updates the font color in a typography object. This API call also updates the decoration color if it hasn't\n been set yet. The updated font color takes effect after you call {@link OH_Drawing_TypographyPaint} to draw the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param color New font color.\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 Updates the decoration type of a typography object. The updated decoration type takes effect after you call\n {@link OH_Drawing_TypographyPaint} to draw the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param decoration Updated decoration type. For details, see {@link OH_Drawing_TextDecoration}. You can set multiple\n     text decoration types at a time via bitwise OR operations. If a decoration type that is not in the\n     {@link OH_Drawing_TextDecoration} enumeration is set, the original decoration is retained.\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 Updates the decoration thickness scale of a typography object. The updated decoration thickness scale takes\n effect after you call {@link OH_Drawing_TypographyPaint} to draw the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param decorationThicknessScale Thickness scaling ratio of the updated text decoration line. The thickness of the\n     decoration line increases as the ratio increases. If the value is less than or equal to 0, the decoration line\n     will not be drawn.\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 Updates the decoration style of a typography object. The updated decoration style takes effect after you call\n {@link OH_Drawing_TypographyPaint} to draw the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param decorationStyle Updated text decoration style. For details about the available options, see\n     {@link OH_Drawing_TextDecorationStyle}.\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 a typography object.\n <br> The updated decoration color takes effect after you call {@link OH_Drawing_TypographyPaint} to draw the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param color Updated text decoration color.\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 Checks whether the text line style is enabled for a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Whether the line style is enabled. **true**: enabled; **false**: disabled.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextGetLineStyle(style: *mut OH_Drawing_TypographyStyle) -> bool;
}
extern "C" {
    #[doc = " @brief Obtains the font weight of a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Font weight.\n     <br> For details about the available options, see {@link OH_Drawing_FontWeight}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetFontWeight(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_FontWeight;
}
extern "C" {
    #[doc = " @brief Obtains the font style of the strut style in a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Font style of the strut style in a typography style. **1** indicates italic, and **0** or others indicate\n     non-italic. For details, see the {@link OH_Drawing_FontStyle} enumeration.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetFontStyle(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_FontStyle;
}
extern "C" {
    #[doc = " @brief Obtains the font families of a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param num Pointer to the number of font families.\n @return Font families.\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 the font family name list.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFamilies Pointer to the font families.\n @param fontFamiliesNum Number of font families.\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 Obtains the font size of a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Font size.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetFontSize(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Obtains the height scale factor of a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Height scale factor.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetHeightScale(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Checks whether only the font height is used for a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Method for calculating the height of a font block. **true** means that the height is calculated based on the\n     font size; **false** means that the height is calculated based on the line spacing.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetHeightOnly(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Checks whether half leading is enabled for a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return **true** if half leading is enabled; returns **false** otherwise.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetHalfLeading(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Obtains the spacing scale factor of a text line style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Spacing scale factor.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineStyleGetSpacingScale(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> f64;
}
extern "C" {
    #[doc = " @brief Checks whether only the text line style is enabled for a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Whether only the text line style is enabled for a typography style. **true**: enabled; **false**: disabled.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyTextlineGetStyleOnly(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> bool;
}
extern "C" {
    #[doc = " @brief Obtains the text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Alignment mode. For details about the available options, see {@link OH_Drawing_TextAlign}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetTextAlign(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_TextAlign;
}
extern "C" {
    #[doc = " @brief Obtains the text direction of a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Text direction. **0** means right-to-left; **1** means left-to-right. For details, see\n     {@link OH_Drawing_TextDirection}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetTextDirection(
        style: *mut OH_Drawing_TypographyStyle,
    ) -> OH_Drawing_TextDirection;
}
extern "C" {
    #[doc = " @brief Obtains the maximum number of lines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Maximum number of lines.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyGetTextMaxLines(style: *mut OH_Drawing_TypographyStyle) -> usize;
}
extern "C" {
    #[doc = " @brief Obtains the text ellipsis content of a typography style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyStyle}.\n @return Ellipsis 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 the ellipsis text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param ellipsis Pointer to the ellipsis text.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyDestroyEllipsis(ellipsis: *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " @brief Checks whether two typography styles are the same. The text height modifier mode\n {@link OH_Drawing_TextHeightBehavior} is not involved in the comparison.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param from Pointer to the first typography style.\n @param to Pointer to the second typography style.\n @return Returns **true** if the two are the same; returns **false** otherwise.\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 a text box.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBox Pointer to the {@link OH_Drawing_TextBox} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TypographyDestroyTextBox(textBox: *mut OH_Drawing_TextBox);
}
extern "C" {
    #[doc = " @brief Sets the parameters of the text shadow object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Pointer to the text shadow object {@link OH_Drawing_TextShadow}, obtained by\n     {@link OH_Drawing_CreateTextShadow}.\n @param color Color of the text shadow. For example, if the input parameter is 0xAABBCCDD, AA represents the alpha\n     value, BB represents the red component, CC represents the green component, and DD represents the blue component.\n @param offset Pointer to the coordinate point object {@link OH_Drawing_Point}, which indicates the offset of the\n     text shadow relative to the current text.\n @param blurRadius Blur radius. The value is a floating point number and has no unit. The value **0.0** means that\n     there is no blur effect.\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 a text tab object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param alignment Alignment mode of the text following the tab character. The value **1** means right alignment, **2**\n     means center alignment, and **0** or other values mean left alignment.\n @param location Alignment position of the text following the tab character. The unit is px. The minimum value is **1.\n     0**.\n @return Pointer to the **OH_Drawing_TextTab** object created. If a null pointer is returned, the creation fails. A\n     possible cause is that no memory is available.\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 a text tab object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Pointer to an **OH_Drawing_TextTab** 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 Obtains the alignment mode of a text tab.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Pointer to an **OH_Drawing_TextTab** object.\n @return Alignment mode. The value **1** means right alignment, **2** means center alignment, and **0** or other\n     values mean left alignment.\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 Obtains the location of a text tab.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Pointer to an **OH_Drawing_TextTab** object.\n @return Position of the text tab.\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 alignment mode and location of a text tab. When the text alignment mode or ellipsis style is set,\n the tab does not take effect. When the tab location is less than 1.0, the tab is replaced with a space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}.\n @param tab Pointer to an **OH_Drawing_TextTab** 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 Obtains the number of objects in the input object array {@link OH_Drawing_Array}.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingArray Pointer to the {@link OH_Drawing_Array} object array.\n @return Number of objects in the 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 include the trailing spaces in alignment calculations during text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the typography style object {@link OH_Drawing_TypographyStyle}.\n @param trailingSpaceOptimized Whether trailing spaces participate in alignment calculation during text typography.\n     The value true means trailing spaces do not participate in calculation, and false means they do. The default\n     value is false. It is recommended to set this parameter to true for center-aligned text.\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 Adds text encoded in a specified format.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @param text Pointer to the text content.\n @param byteLength Length of the text, in bytes.\n @param textEncodingType Text encoding type, which is an enumerated value of {@link OH_Drawing_TextEncoding}. Only **\n     TEXT_ENCODING_UTF8**, **TEXT_ENCODING_UTF16**, and **TEXT_ENCODING_UTF32** are supported.\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 Sets whether to enable auto spacing for text typography.\n <br>Auto spacing is disabled by default. Once enabled, the spacing between CJK (Chinese, Japanese, and Korean\n characters) and Western characters (Latin, Cyrillic, and Greek letters), CJK and digits, CJK and copyright symbols,\n copyright symbols and digits, and copyright symbols and Western characters is automatically adjusted.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to an {@link OH_Drawing_TypographyStyle} object, obtained by\n     {@link OH_Drawing_CreateTypographyStyle}.\n @param enableAutoSpace Whether to enable automatic spacing in text typography. The value `true` means to enable\n     automatic spacing, and `false` means the opposite. The default value is `false`.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTypographyTextAutoSpace(
        style: *mut OH_Drawing_TypographyStyle,
        enableAutoSpace: bool,
    );
}
extern "C" {
    #[doc = " @brief Creates a copy of an existing paragraph style object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TypographyStyle} object to be copied.\n @return Pointer to the copied {@link OH_Drawing_TypographyStyle} object. If a null pointer is returned, the creation\n     fails. The possible cause is that no memory is available or **style** is a null pointer. Release this pointer by\n     calling {@link OH_Drawing_DestroyTypographyStyle} when this object is no longer needed.\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 Creates a copy of an existing text style object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to the {@link OH_Drawing_TextStyle} object to be copied.\n @return Pointer to the copied {@link OH_Drawing_TextStyle} object. If a null pointer is returned, the creation fails.\n      The possible cause is that no memory is available or **style** is a null pointer. Release this pointer by\n     calling {@link OH_Drawing_DestroyTextStyle} when this object is no longer needed.\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 Creates a copy of an existing text shadow object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Pointer to the {@link OH_Drawing_TextShadow} object to be copied.\n @return Pointer to the copied {@link OH_Drawing_TextShadow} object. If a null pointer is returned, the creation\n     fails. The possible cause is that no memory is available or **shadow** is a null pointer. Release this pointer\n     by calling {@link OH_Drawing_DestroyTextShadow} when this object is no longer needed.\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 Destroys an {@link OH_Drawing_PositionAndAffinity} object and reclaims the memory occupied by the object.\n\n @param positionAndAffinity Pointer to the {@link OH_Drawing_PositionAndAffinity} object.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_DestroyPositionAndAffinity(
        positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
    );
}
extern "C" {
    #[doc = " @brief Obtains the character range corresponding to the specified glyph range.\n\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param glyphRangeStart Start position of the glyph range.\n @param glyphRangeEnd End position of the glyph range.\n @param actualGlyphRange Returns the actual font range, indicating the level-2 pointer to {@link OH_Drawing_Range}.\n     It is used as an output parameter.\n     <br>When the requested glyph range contains only a part of a complex glyph sequence, this parameter returns the\n     corresponding complete glyph range.\n     <br>For example, ligatures and combined emojis may consist of multiple atomic glyphs and must be processed as a\n     whole.\n     <br>If this parameter is NULL, the actual glyph range is not returned, indicating that the caller does not care\n     about the actual glyph range information.\n     <br>After use, release the object through the {@link OH_Drawing_ReleaseRangeBuffer} API.\n @param textEncodingType Text encoding type {@link OH_Drawing_TextEncoding}.\n     <br>Currently, only UTF-8 and UTF-16 encoding types are supported.\n     <br>For UTF-8 encoding, the returned character range indicates the byte range.\n     <br>For UTF-16 encoding, the returned character range indicates the UTF-16 code unit range.\n @return Returns the {@link OH_Drawing_Range} object pointer that indicates the character range. When the object is\n     no longer needed, use the {@link OH_Drawing_ReleaseRangeBuffer} API to release it.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_TypographyGetCharacterRangeForGlyphRangeWithBuffer(
        typography: *mut OH_Drawing_Typography,
        glyphRangeStart: usize,
        glyphRangeEnd: usize,
        actualGlyphRange: *mut *mut OH_Drawing_Range,
        textEncodingType: OH_Drawing_TextEncoding,
    ) -> *mut OH_Drawing_Range;
}
extern "C" {
    #[doc = " @brief Obtains the character position information closest to the specified coordinates.\n\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param dx Horizontal coordinate in the text layout area, in physical pixels (px).\n     <br>X offset relative to the top-left corner of the text layout area, with the right direction as positive.\n     <br>Supports floating-point values and accepts negative values, which indicate positions to the left of the text\n     layout area.\n     <br>If the coordinates are beyond the text layout area, the nearest character position is returned. It can be\n     obtained through a touch event or click event.\n @param dy Vertical coordinate in the text layout area, in physical pixels (px).\n     <br>Y offset relative to the top-left corner of the text layout area, with the downward direction as positive.\n     <br>Supports floating-point values and accepts negative values, which indicate positions above the text layout\n     area.\n     <br>If the coordinates are beyond the text layout area, the nearest character position is returned. It can be\n     obtained through a touch event or click event.\n @param textEncodingType Text encoding type {@link OH_Drawing_TextEncoding}.\n     <br>Currently, only UTF-8 and UTF-16 encoding types are supported.\n     <br>For UTF-8 encoding, the returned position indicates the byte offset. For UTF-16 encoding, the returned\n     position indicates the UTF-16 code unit offset.\n @return Returns the character index position and affinity at the coordinate. The return type is the\n     {@link OH_Drawing_PositionAndAffinity} structure.\n     <br>When the object is no longer needed, call {@link OH_Drawing_DestroyPositionAndAffinity} to release it.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_TypographyGetCharacterPositionAtCoordinateWithBuffer(
        typography: *mut OH_Drawing_Typography,
        dx: f64,
        dy: f64,
        textEncodingType: OH_Drawing_TextEncoding,
    ) -> *mut OH_Drawing_PositionAndAffinity;
}
extern "C" {
    #[doc = " @brief Obtains the glyph range corresponding to the specified character range.\n\n @param typography Pointer to the **OH_Drawing_Typography** object, which is obtained from\n     {@link OH_Drawing_CreateTypography}.\n @param characterRangeStart Start position of the character range.\n @param characterRangeEnd End position of the character range.\n @param actualCharacterRange Returns the actual character range, indicating the level-2 pointer to\n     {@link OH_Drawing_Range}. It is used as an output parameter.\n     <br>When the requested character range contains only a part of the combined character sequence, this parameter\n     returns the corresponding complete character range.\n     <br>For example, a combined character consisting of a base character and a diacritical mark must be processed as\n     a whole.\n     <br>If this parameter is NULL, the actual character range is not returned, indicating that the caller does not\n     care about the actual character range information.\n     <br>After use, release the object through the {@link OH_Drawing_ReleaseRangeBuffer} API.\n @param textEncodingType Text encoding type {@link OH_Drawing_TextEncoding}.\n     <br>Currently, only UTF-8 and UTF-16 encoding types are supported.\n     <br>For UTF-8 encoding, the input character range should be interpreted as a byte range. For UTF-16 encoding,\n     the input character range should be interpreted as a UTF-16 code unit range.\n @return Returns the {@link OH_Drawing_Range} object pointer that indicates the font range. If the object is no\n     longer needed, use the {@link OH_Drawing_ReleaseRangeBuffer} API to release it.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_TypographyGetGlyphRangeForCharacterRangeWithBuffer(
        typography: *mut OH_Drawing_Typography,
        characterRangeStart: usize,
        characterRangeEnd: usize,
        actualCharacterRange: *mut *mut OH_Drawing_Range,
        textEncodingType: OH_Drawing_TextEncoding,
    ) -> *mut OH_Drawing_Range;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the {@link OH_Drawing_Range} object.\n\n @param range Pointer to the {@link OH_Drawing_Range} object.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_ReleaseRangeBuffer(range: *mut OH_Drawing_Range);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_FontMgr** object, which can be used only to manage system fonts.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Pointer to the {@link OH_Drawing_FontMgr} object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrCreate() -> *mut OH_Drawing_FontMgr;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_FontMgr** object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Pointer to an {@link OH_Drawing_FontMgr} object, which is obtained from\n     {@link OH_Drawing_FontMgrCreate}.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrDestroy(drawingFontMgr: *mut OH_Drawing_FontMgr);
}
extern "C" {
    #[doc = " @brief Obtains the number of font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Pointer to an {@link OH_Drawing_FontMgr} object, which is obtained from\n     {@link OH_Drawing_FontMgrCreate}.\n @return Returns the number 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 Obtains the font family name based on an index. When the returned name is no longer needed, use\n {@link OH_Drawing_FontMgrDestroyFamilyName} to release the memory occupied by the name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Pointer to an {@link OH_Drawing_FontMgr} object, which is obtained from\n     {@link OH_Drawing_FontMgrCreate}.\n @param index Index used to obtain the corresponding font family name. The value range is [0,\n     OH_Drawing_FontMgrGetFamilyCount() - 1].\n @return Font family name corresponding to the index. When no longer needed, use\n     {@link OH_Drawing_FontMgrDestroyFamilyName} to release the memory occupied by the name.\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 Reclaims the memory occupied by a font family name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param familyName Pointer to a 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 a font style set object from a font manager object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Pointer to an {@link OH_Drawing_FontMgr} object, which is obtained from\n     {@link OH_Drawing_FontMgrCreate}.\n @param index Index value used to obtain the font style set object from the font manager object. Value range: [0,\n     OH_Drawing_FontMgrGetFamilyCount() - 1].\n @return Returns a pointer to the {@link OH_Drawing_FontStyleSet} 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 Reclaims the memory occupied by a font style set.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontStyleSet Pointer to an {@link OH_Drawing_FontStyleSet} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontMgrDestroyFontStyleSet(drawingFontStyleSet: *mut OH_Drawing_FontStyleSet);
}
extern "C" {
    #[doc = " @brief Obtains a font style set object based on a specified font family name. When the object is no longer needed,\n use {@link OH_Drawing_FontMgrDestroyFontStyleSet} to release it.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Pointer to an {@link OH_Drawing_FontMgr} object, which is obtained from\n     {@link OH_Drawing_FontMgrCreate}.\n @param familyName Pointer to a font family name.\n @return Pointer to the corresponding font style set object {@link OH_Drawing_FontStyleSet}. When no longer needed,\n     use {@link OH_Drawing_FontMgrDestroyFontStyleSet} to release the object pointer. <br>NULL is returned if\n     matching fails.\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 Obtains a typeface object based on the specified font style information and font family name. When the object\n is no longer needed, use {@link OH_Drawing_TypefaceDestroy} to release it.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Pointer to an {@link OH_Drawing_FontMgr} object, which is obtained from\n     {@link OH_Drawing_FontMgrCreate}.\n @param familyName Pointer to a font family name.\n @param fontStyle Font style, including the font weight, width, and slant.\n @return Pointer to the {@link OH_Drawing_Typeface} object corresponding to the font style. Use\n     {@link OH_Drawing_TypefaceDestroy} to release the pointer when it is no longer needed. <br>NULL is returned if\n     the match fails.\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 Obtains a typeface for the specified character. A null pointer is returned only when no typeface\n corresponding to the input UTF-8 character is found in the font management object. When the object is no longer\n needed, use {@link OH_Drawing_TypefaceDestroy} to release it.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Pointer to an {@link OH_Drawing_FontMgr} object, which is obtained from\n     {@link OH_Drawing_FontMgrCreate}.\n @param familyName Pointer to a font family name.\n @param fontStyle Font style, including the font weight, width, and slant.\n @param bcp47 Array of BCP47 language codes, which is a combination of ISO 639, 15924, and 3166-1 language codes.\n @param bcp47Count Size of the bcp47 array, which must match the actual number of elements in the bcp47 array.\n @param character UTF-8 character used for matching.\n @return Pointer to the corresponding {@link OH_Drawing_Typeface} typeface object, or NULL if no typeface is 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 Gets a typeface for the specified index. When the object is no longer needed, use\n {@link OH_Drawing_TypefaceDestroy} to release it.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Pointer to an {@link OH_Drawing_FontStyleSet} object.\n @param index Index of the specified typeface object. The value range is [0, OH_Drawing_FontStyleSetCount() - 1].\n @return Typeface object if successful; NULL otherwise.\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 Obtains the font style. Call {@link OH_Drawing_FontStyleSetFreeStyleName} to release **styleName** when it is\n no longer needed, freeing up the allocated memory.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Pointer to an {@link OH_Drawing_FontStyleSet} object.\n @param index Index of the specified font style. The value range is [0, OH_Drawing_FontStyleSetCount() - 1].\n @param styleName String specifying the font style name. Call {@link OH_Drawing_FontStyleSetFreeStyleName} to release\n     it when it is no longer needed, freeing up the allocated memory.\n @return Returns the font style.\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 Frees the memory occupied by a font style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param styleName Double pointer to the string that specifies the font style name.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontStyleSetFreeStyleName(styleName: *mut *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " @brief Obtains the typeface closest to the font style (font weight, font width, and slant). When the object is no\n longer needed, use {@link OH_Drawing_TypefaceDestroy} to release it.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Pointer to an {@link OH_Drawing_FontStyleSet} object.\n @param fontStyleStruct Font style, including the font weight, width, and slant.\n @return Pointer to the corresponding typeface object {@link OH_Drawing_Typeface}, or NULL if matching fails.\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 Obtains the number of fonts in the font style set.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Pointer to an {@link OH_Drawing_FontStyleSet} object.\n @return Returns the number of fonts.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_FontStyleSetCount(
        fontStyleSet: *mut OH_Drawing_FontStyleSet,
    ) -> ::std::os::raw::c_int;
}
#[doc = " @brief This struct describes the options about the 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 = " Whether to allow path mask textures to be cached. The value **true** means to allow the path mask textures to be\n cached, and **false** means the opposite."]
    pub allowPathMaskCaching: bool,
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_GpuContext** object that uses OpenGL as the backend interface.\n\n @param gpuContextOptions GPU context options, which is {@link OH_Drawing_GpuContextOptions}.\n @return Returns the pointer to the {@link OH_Drawing_GpuContext} 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 **OH_Drawing_GpuContext** object, for which the backend type depends on the device.\n\n @return Returns the pointer to the {@link OH_Drawing_GpuContext} 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 **OH_Drawing_GpuContext** object and reclaims the memory occupied by the object.\n\n @param gpuContext Pointer to an {@link OH_Drawing_GpuContext} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_GpuContextDestroy(gpuContext: *mut OH_Drawing_GpuContext);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Image** object that describes an array of two-dimensional pixels to draw.\n\n @return Returns a pointer to the {@link OH_Drawing_Image} object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageCreate() -> *mut OH_Drawing_Image;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_Image** object and reclaims the memory occupied by the object.\n\n @param image Pointer to the {@link OH_Drawing_Image} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageDestroy(image: *mut OH_Drawing_Image);
}
extern "C" {
    #[doc = " @brief Builds an image from a bitmap by sharing or copying bitmap pixels. If the bitmap is marked as immutable, the\n pixel memory is shared, not copied.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **image** or **bitmap** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param image Pointer to the {@link OH_Drawing_Image} object.\n @param bitmap Pointer to the {@link OH_Drawing_Bitmap} object.\n @return Returns **true** if the image is built; returns **false** otherwise.\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 Obtains the image width, that is, the number of pixels in each line.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **image** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param image Pointer to the {@link OH_Drawing_Image} 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 Obtains the image height, that is, the number of pixel lines.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **image** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param image Pointer to the {@link OH_Drawing_Image} 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 Obtains the image information. After this function is called, the passed-in image information object is\n filled.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **image** or **imageInfo** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param image Pointer to the {@link OH_Drawing_Image} object.\n @param imageInfo Pointer to an  {@link OH_Drawing_Image_Info}  object, which can be created by calling\n {@link OH_Drawing_Image_Info}\n .\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageGetImageInfo(
        image: *mut OH_Drawing_Image,
        imageInfo: *mut OH_Drawing_Image_Info,
    );
}
#[doc = " Replicates the edge color if the shader effect draws outside of its original boundary."]
pub const OH_Drawing_TileMode_CLAMP: OH_Drawing_TileMode = 0;
#[doc = " Repeats the shader effect's image in both horizontal and vertical directions."]
pub const OH_Drawing_TileMode_REPEAT: OH_Drawing_TileMode = 1;
#[doc = " Repeats the shader effect's image in both horizontal and vertical directions, alternating mirror images."]
pub const OH_Drawing_TileMode_MIRROR: OH_Drawing_TileMode = 2;
#[doc = " Renders the shader effect's image only within the original boundary, and returns transparent black elsewhere."]
pub const OH_Drawing_TileMode_DECAL: OH_Drawing_TileMode = 3;
#[doc = " @brief Defines an enum for the tile modes of the shader effect.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_TileMode = u32;
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_ShaderEffect** object with a single color.\n\n @param color Color in the ARGB format. The value is a 32-bit unsigned integer.\n @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created. If NULL is returned, the creation\n fails. The possible failure cause is that no memory is available.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectCreateColorShader(color: u32) -> *mut OH_Drawing_ShaderEffect;
}
extern "C" {
    #[doc = " @brief Creates a **ShaderEffect** object that generates a linear gradient between two points.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **startPt**, **endPt**, and **colors** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **tileMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param startPt Start point.\n @param endPt End point.\n @param colors Colors to distribute between the two points.\n @param pos Relative position of each color in the color array. The array length must be the same as that of **colors*\n *. If **pos** is NULL, colors are evenly distributed between the start point and end point.\n @param size Number of colors and positions (if **pos** is not NULL).\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @return Returns the pointer to the **OH_Drawing_ShaderEffect** 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 a **ShaderEffect** object that generates a linear gradient between two points.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **startPt**, **endPt**, and **colors** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **tileMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param startPt Start point.\n @param endPt End point.\n @param colors Colors to distribute between the two points.\n @param pos Relative position of each color in the color array. The array length must be the same as that of **colors*\n *. If **pos** is NULL, colors are evenly distributed between the start point and end point.\n @param size Number of colors and positions (if **pos** is not NULL).\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @param matrix Matrix applied on the shader effect. If **matrix** is NULL, an identity matrix is applied by default.\n @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created. If NULL is returned, the creation\n fails. The possible failure cause is that no memory is available or at least one of the parameters **startPt**, **\n endPt**, and **colors** is NULL.\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 **OH_Drawing_ShaderEffect** object that generates a radial gradient based on the center and radius\n of a circle.\n The radial gradient transitions colors from the center to the ending shape in a radial manner.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **centerPt** or **colors** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **tileMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param centerPt Center of the circle.\n @param radius Radius of the gradient. The value should be a non-negative number.\n @param colors Colors to distribute in the radial direction.\n @param pos Relative position of each color in the color array. The array length must be the same as that of **colors*\n *. If **pos** is NULL, colors are evenly distributed in the radial direction.\n @param size Number of colors and positions (if **pos** is not NULL).\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @return Returns the pointer to the **OH_Drawing_ShaderEffect** 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 **OH_Drawing_ShaderEffect** object that generates a radial gradient based on the center and radius\n of a circle.\n The radial gradient transitions colors from the center to the ending shape in a radial manner.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **centerPt** or **colors** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **tileMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param centerPt Center of the circle.\n @param radius Radius of the gradient.\n @param colors Colors to distribute in the radial direction.\n @param pos Relative position of each color in the color array. The array length must be the same as that of **colors*\n *. If **pos** is NULL, colors are evenly distributed in the radial direction.\n @param size Number of colors and positions (if **pos** is not NULL).\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @param matrix Matrix applied on the shader effect. If **matrix** is NULL, an identity matrix is applied by default.\n @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created. If NULL is returned, the creation\n fails. The possible failure cause is that no memory is available or at least one of the parameters **centerPt** and *\n *colors** is NULL.\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 **OH_Drawing_ShaderEffect** object that generates a sweep gradient based on the matrix\n transformation at the given center.\n A sweep gradient paints a gradient in a sweeping arc ranging from 0° to 360°.\n\n @param centerPt Center of the circle.\n @param colors Colors to distribute between the two points.\n @param pos Relative position of each color in the color array. The array length must be the same as that of **colors*\n *. If **pos** is NULL, colors are evenly distributed between the start angle (0°) and end angle (360°).\n @param size Number of colors and positions (if **pos** is not NULL).\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @param matrix Matrix applied on the shader effect. If **matrix** is NULL, an identity matrix is applied by default.\n @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created.\n A null pointer is returned if any of the following conditions is met:\n - The available memory is empty.\n - **centerPt** or **colors** is NULL.\n - The value of **tileMode** is out of the enumerated value range.\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 **OH_Drawing_ShaderEffect** object that generates a sweep gradient based on the center.\n A sweep gradient paints a gradient in a sweeping arc ranging from 0° to 360°.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **centerPt** or **colors** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **tileMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param centerPt Center of the circle.\n @param colors Colors to distribute between the two points.\n @param pos Relative position of each color in the color array. The array length must be the same as that of **colors*\n *. If **pos** is NULL, colors are evenly distributed between the start angle (0°) and end angle (360°).\n @param size Number of colors and positions (if **pos** is not NULL).\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created.\n A null pointer is returned if any of the following conditions is met:\n - The available memory is empty.\n - **centerPt** or **colors** is NULL.\n - The value of **tileMode** is out of the enumerated value range.\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 **OH_Drawing_ShaderEffect** object for an image shader. You are advised not to use the function\n for the canvas of the capture type because it affects the performance.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **image** or **samplingOptions** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If either **tileX** or **tileY** is not set to one of the enumerated values, **\n OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param image Pointer to the {@link OH_Drawing_Image} object.\n @param tileX Tile mode of the shader effect in the horizontal direction. For details about the available options,\n see {@link OH_Drawing_TileMode}.\n @param tileY Tile mode of the shader effect in the vertical direction. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object. If the pointer array is empty, the identity matrix is\n passed in.\n @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created.\n A null pointer is returned if any of the following conditions is met:\n - The available memory is empty.\n - **image** or **samplingOptions** is NULL.\n - The value of **tileX** or **tileY** is out of the enumerated value range.\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 a PixelMap shader object.\n\n @param pixelMap Pointer to the {@link OH_Drawing_PixelMap} object.\n @param tileX Tile mode of the shader effect in the horizontal direction. For details about the available options,\n see {@link OH_Drawing_TileMode}.\n @param tileY Tile mode of the shader effect in the vertical direction. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @param samplingOptions Pointer to the {@link OH_Drawing_SamplingOptions} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object. If the pointer array is empty, the identity matrix is\n passed in.\n @return Returns the pointer to the **OH_Drawing_ShaderEffect** 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 **OH_Drawing_ShaderEffect** object that generates a gradient between two given circles.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **startPt**, **endPt**, and **colors** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **tileMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param startPt Pointer to the center of the start circle.\n @param startRadius Start radius of the gradient. The value should be a non-negative number.\n @param endPt Pointer to the center of the end circle.\n @param endRadius End radius of the gradient. The value should be a non-negative number.\n @param colors Colors to distribute between the two circles.\n @param pos Relative position of each color in the color array. The array length must be the same as that of **colors*\n *. If **pos** is NULL, colors are evenly distributed between the two circles.\n @param size Number of colors and positions (if **pos** is not NULL).\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @param matrix Matrix applied on the shader effect. If **matrix** is NULL, an identity matrix is applied by default.\n @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created. If the returned pointer is NULL,\n the creation fails. The possible causes are as follows:\n - The available memory is empty.\n - **startPt**, **endPt**, or **colors** is NULL.\n - The value of **tileMode** is out of the enumerated value range.\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 a shader by blending two existing shaders in a certain way.\n\n @param dst Shader that serves as the destination color in blend mode.\n @param src Shader that serves as the source color in blend mode.\n @param mode Blend mode.\n @return Returns the pointer to the {@link OH_Drawing_ShaderEffect} object created.\n If the returned pointer is NULL, the creation fails. The possible causes are as follows:\n - The available memory is empty.\n - **dst** or **src** is NULL.\n - The value of **mode** is out of the enumerated value range.\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 **OH_Drawing_ShaderEffect** object and reclaims the memory occupied by the object.\n\n @param shaderEffect Pointer to an **OH_Drawing_ShaderEffect** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_ShaderEffectDestroy(shaderEffect: *mut OH_Drawing_ShaderEffect);
}
extern "C" {
    #[doc = " @brief Creates an image filter with a given blur effect.\n\n @param sigmaX Standard deviation of the Gaussian blur to apply along the X axis. The value must be greater than 0.\n @param sigmaY Standard deviation of the Gaussian blur to apply along the Y axis. The value must be greater than 0.\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @param imageFilter Pointer to the filter to which the image filter will be applied. If NULL is passed in, the image\n filter is directly applied to the original 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.\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 image filter with a given blur effect.\n\n @param sigmaX Standard deviation of the Gaussian blur to apply along the X axis. The value must be greater than 0.0.\n @param sigmaY Standard deviation of the Gaussian blur to apply along the Y axis. The value must be greater than 0.0.\n @param tileMode Tile mode of the shader effect. For details about the available options, see\n {@link OH_Drawing_TileMode}\n .\n @param input Pointer to the filter to which the image filter will be applied. If NULL is passed in, the image filter\n is directly applied to the original image.\n @param rect Pointer to the rectangular region to be cropped. If NULL is passed in, the blur effect is directly\n applied to the entire 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 **OH_Drawing_ImageFilter** object with a color filter effect. This API may return an error code.\n For details, call {@link OH_Drawing_ErrorCodeGet}. If **colorFilter** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER**\n is returned.\n\n @param colorFilter Pointer to an {@link OH_Drawing_ColorFilter} object.\n @param imageFilter Pointer to the filter to which the image filter will be applied. If NULL is passed in, the image\n filter is directly applied to the original 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_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 offset filter to translate the input filter based on the specified vector.\n\n @param x Distance to translate on the X axis.\n @param y Distance to translate on the Y axis.\n @param imageFilter Filter to be translated. If NULL is passed in, the drawing result without the filtering effect is\n translated.\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 **ImageFilter** object based on a shader.\n\n @param shaderEffect 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 **OH_Drawing_ImageFilter** object and reclaims the memory occupied by the object.\n\n @param imageFilter Pointer to an {@link OH_Drawing_ImageFilter} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ImageFilterDestroy(imageFilter: *mut OH_Drawing_ImageFilter);
}
#[doc = " Blurs both inside and outside the original border."]
pub const OH_Drawing_BlurType_NORMAL: OH_Drawing_BlurType = 0;
#[doc = " Draws solid inside the border, and blurs outside."]
pub const OH_Drawing_BlurType_SOLID: OH_Drawing_BlurType = 1;
#[doc = " Draws nothing inside the border, and blurs outside."]
pub const OH_Drawing_BlurType_OUTER: OH_Drawing_BlurType = 2;
#[doc = " Blurs inside the border, and draws nothing outside."]
pub const OH_Drawing_BlurType_INNER: OH_Drawing_BlurType = 3;
#[doc = " @brief Defines an enum for the blur types.\n\n @since 11\n @version 1.0"]
pub type OH_Drawing_BlurType = u32;
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_MaskFilter** object with a blur type.\n\n @param blurType Blur type.\n @param sigma Standard deviation of the Gaussian blur to apply. The value must be greater than 0.\n @param respectCTM Whether the blur standard deviation is modified by the current transformation matrix (CTM). The\n default value is **true**. **true**: The blur standard deviation is affected by the CTM. **false**: The blur\n standard deviation is fixed and not affected by the CTM.\n @return Returns the pointer to the **OH_Drawing_MaskFilter** 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 **OH_Drawing_MaskFilter** object and reclaims the memory occupied by the object.\n\n @param maskFilter Pointer to an **OH_Drawing_MaskFilter** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_MaskFilterDestroy(maskFilter: *mut OH_Drawing_MaskFilter);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Matrix** object.\n\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 a copy of a matrix object.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object to be copied.\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 **OH_Drawing_Matrix** with the rotation attribute.\n The matrix is obtained by rotating an identity matrix by a given degree around the rotation point (x, y).\n\n @param deg Angle to rotate, in degrees. A positive value indicates a clockwise rotation, and a negative value\n indicates a counterclockwise rotation.\n @param x Coordinate point on the X axis.\n @param y Coordinate point on the 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_MatrixCreateRotation(deg: f32, x: f32, y: f32) -> *mut OH_Drawing_Matrix;
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Matrix** with the scale attribute.\n The matrix is obtained by scaling an identity matrix with the factor (sx, sy) at the rotation point (px, py).\n\n @param sx Scale factor on the X axis. If a negative number is passed in, the matrix is mirrored around y = px before\n being scaled. The value is a floating point number.\n @param sy Scale factor on the Y axis. If a negative number is passed in, the matrix is mirrored around x = py before\n being scaled. The value is a floating point number.\n @param px Coordinate point on the X axis.\n @param py Coordinate point on the 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 **OH_Drawing_Matrix** with the translation attribute.\n The matrix is obtained by translating the identity matrix by the distance (dx, dy).\n\n @param dx Distance to translate on the X axis. A positive number indicates a translation towards the positive\n direction of the X axis, and a negative number indicates a translation towards the negative direction of the X axis.\n The value is a floating point number.\n @param dy Distance to translate on the Y axis. A positive number indicates a translation towards the positive\n direction of the Y axis, and a negative number indicates a translation towards the negative direction of the Y axis.\n The value is a floating point number.\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 matrix parameters for an **OH_Drawing_Matrix** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **OH_Drawing_Matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to an **OH_Drawing_Matrix** object.\n @param scaleX Scale factor on the X axis.\n @param skewX Skew factor on the X axis.\n @param transX Translation coefficient on the X axis.\n @param skewY Skew factor on the Y axis.\n @param scaleY Scale factor on the Y axis.\n @param transY Translation coefficient on the Y axis.\n @param persp0 Perspective coefficient of the X axis.\n @param persp1 Perspective coefficient of the Y axis.\n @param persp2 Perspective scale coefficient.\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 the source rectangle both horizontally and vertically to exactly match the destination rectangle."]
pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_FILL: OH_Drawing_ScaleToFit = 0;
#[doc = " Scales the source rectangle and aligns it to the left and top edges of the destination rectangle."]
pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_START: OH_Drawing_ScaleToFit = 1;
#[doc = " Scales the source rectangle and aligns it to the center of the destination rectangle."]
pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_CENTER: OH_Drawing_ScaleToFit = 2;
#[doc = " Scales the source rectangle and aligns it to the right and bottom edges of the destination rectangle."]
pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_END: OH_Drawing_ScaleToFit = 3;
#[doc = " @brief Defines an enum for the matrix scaling modes.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_ScaleToFit = u32;
extern "C" {
    #[doc = " @brief Scales a matrix to map a source rectangle to a destination rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **matrix**, **src**, and **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param src Pointer to the {@link OH_Drawing_Rect} object of the mapping source.\n @param dst Pointer to the {@link OH_Drawing_Rect} object of the mapping destination.\n @param stf Scaling mode. For details about the available options, see {@link OH_Drawing_ScaleToFit}.\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 Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by a\n given degree around the rotation point (px, py).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param degree Angle to rotate, in degrees. A positive value indicates a clockwise rotation, and a negative value\n indicates a counterclockwise rotation.\n @param px X coordinate of the rotation point.\n @param py Y coordinate of the rotation point.\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 Premultiplies a matrix by an identity matrix that scales with the factor (sx, sy) at the scale point (px, py).\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param sx Scale factor on the X axis. If a negative number is passed in, the matrix is mirrored around y = px before\n being scaled. The value is a floating point number.\n @param sy Scale factor on the Y axis. If a negative number is passed in, the matrix is mirrored around x = py before\n being scaled. The value is a floating point number.\n @param px X coordinate of the scale point.\n @param py Y coordinate of the scale point.\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 Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by\n a given distance (dx, dy).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param dx Horizontal distance to translate. A positive number indicates a translation towards the positive direction\n of the X axis, and a negative number indicates a translation towards the negative direction of the X axis. The value\n is a floating point number.\n @param dy Vertical distance to translate. A positive number indicates a translation towards the positive direction\n of the Y axis, and a negative number indicates a translation towards the negative direction of the Y axis. The value\n is a floating point number.\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 Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by\n a given degree around the rotation point (px, py).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param degree Angle to rotate, in degrees. A positive value indicates a clockwise rotation, and a negative value\n indicates a counterclockwise rotation.\n @param px X coordinate of the rotation point.\n @param py Y coordinate of the rotation point.\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 Post multiplies a matrix by an identity matrix that scales with the factor (sx, sy) at the scale point (px,\n py).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param sx Scale factor on the X axis. If a negative number is passed in, the matrix is mirrored around y = px before\n being scaled. The value is a floating point number.\n @param sy Scale factor on the Y axis. If a negative number is passed in, the matrix is mirrored around x = py before\n being scaled. The value is a floating point number.\n @param px X coordinate of the scale point.\n @param py Y coordinate of the scale point.\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 Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been translated\n by a given distance (dx, dy).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param dx Horizontal distance to translate. A positive number indicates a translation towards the positive direction\n of the X axis, and a negative number indicates a translation towards the negative direction of the X axis. The value\n is a floating point number.\n @param dy Vertical distance to translate. A positive number indicates a translation towards the positive direction\n of the Y axis, and a negative number indicates a translation towards the negative direction of the Y axis. The value\n is a floating point number.\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 Resets a matrix to an identity matrix.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MatrixReset(matrix: *mut OH_Drawing_Matrix);
}
extern "C" {
    #[doc = " @brief Multiplies two matrices to produce a new matrix.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **total**, **a**, and **b** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param total Pointer to the {@link OH_Drawing_Matrix} object.\n @param a Pointer to {@link OH_Drawing_Matrix} object a.\n @param b Pointer to {@link OH_Drawing_Matrix} object b.\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 Obtains all element values of a matrix.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param value Array used to store the obtained element 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 Left-multiplies matrix a by matrix b.\n\n @param a Pointer to the {@link OH_Drawing_Matrix} object.\n @param b Pointer to the {@link OH_Drawing_Matrix} 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 Obtains a matrix value of a given index, which ranges from 0 to 8.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **index** is less than 0 or greater than 8, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param index Index, which ranges from 0 to 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 this matrix as an identity matrix and rotates it by a given degree around the rotation point (px, py).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param degree Angle to rotate, in degrees. A positive value indicates a clockwise rotation, and a negative value\n indicates a counterclockwise rotation.\n @param px Coordinate point on the X axis.\n @param py Coordinate point on the 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 a matrix as an identity matrix and translates it by a given distance (dx, dy).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param dx Distance to translate on the X axis. A positive number indicates a translation towards the positive\n direction of the X axis, and a negative number indicates a translation towards the negative direction of the X axis.\n The value is a floating point number.\n @param dy Distance to translate on the Y axis. A positive number indicates a translation towards the positive\n direction of the Y axis, and a negative number indicates a translation towards the negative direction of the Y axis.\n The value is a floating point number.\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 a matrix as an identity matrix and scales it with the factor (sx, sy) at the rotation point (px, py).\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param sx Scale factor on the X axis. If a negative number is passed in, the matrix is mirrored around y = px before\n being scaled. The value is a floating point number.\n @param sy Scale factor on the Y axis. If a negative number is passed in, the matrix is mirrored around x = py before\n being scaled. The value is a floating point number.\n @param px Coordinate point on the X axis.\n @param py Coordinate point on the 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 Inverts a matrix and returns the result.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **matrix** or **inverse** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param inverse Pointer to the inverse {@link OH_Drawing_Matrix} object. You can call {@link OH_Drawing_MatrixCreate}\n to create an inverse matrix 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 Generates a transformation matrix by setting source points and destination points.\n Both the number of source points and that of destination points must be in the range [0, 4]. This API may return an\n error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **count** is less than 0 or greater than 4, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param src Array of source points. If NULL is passed in, **count** must be 0.\n @param dst Array of destination points. The number of destination points must be the same as that of source points.\n If NULL is passed in, **count** must be 0.\n @param count Number of source points or destination points. If 0 is passed in, the matrix is set to an identity\n matrix.\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 a source point array to a destination point array by means of matrix transformation.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **matrix**, **src**, and **dst** is NULL or **count** is less than or equal to 0, **\n OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param src Array of source points.\n @param dst Array of destination points. The number of destination points must be the same as that of source points.\n @param count Number of source points or destination points.\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 Maps a rectangle to the smallest rectangle that can enclose the vertices to which the four source vertices\n are mapped by means of matrix transformation.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **matrix**, **src**, and **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param src Source rectangle.\n @param dst Destination rectangle.\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 Checks whether two **OH_Drawing_Matrix** objects are equal.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **matrix** or **other** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to one {@link OH_Drawing_Matrix} object.\n @param other Pointer to the other {@link OH_Drawing_Matrix} 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 Checks whether an **OH_Drawing_Matrix** object is an identity matrix.\n An identity matrix is as follows: | 1 0 0 || 0 1 0 || 0 0 1 |. This API may return an error code. For details, see\n {@link OH_Drawing_ErrorCodeGet}\n .\n If **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} 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 whether the existing matrix is an affine matrix, which includes transformations such as translation,\n rotation, and scaling.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param isAffine Whether the existing matrix is an affine matrix. It is used as an output parameter. **true** means\n yes; **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_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 Left multiplies the current matrix by a matrix constructed based on (px, py) and (kx, ky).\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param kx Tilt on the X axis.\n @param ky Tilt on the Y axis.\n @param px X-coordinate of the tilt center.\n @param py Y-coordinate of the tilt center.\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 whether the rectangle remains rectangular after being mapped by the current matrix. This condition is\n met when the matrix is an identity matrix or contains only affine transformations such as translation, scaling, and\n rotation by 90 degrees.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param isRectStaysRect Whether a rectangle stays a rectangle after being mapped by a matrix. It is used as an output\n parameter.\n **true** means yes; **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_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 matrix to rotate around the rotation center (px, py) with the specified sine and cosine values.\n\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param sinValue Sine value of the rotation angle.\n @param cosValue Cosine value of the rotation angle.\n @param px X-axis coordinate of the rotation center.\n @param py Y-axis coordinate of the rotation center.\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 **OH_Drawing_Matrix** object and reclaims the memory occupied by the object.\n\n @param matrix Pointer to an **OH_Drawing_Matrix** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_MatrixDestroy(matrix: *mut OH_Drawing_Matrix);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_MemoryStream** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **data** is NULL or **length** is **0**, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @return Returns the pointer to the {@link OH_Drawing_MemoryStream} object created.\n @param data Pointer to the data.\n @param length Length of the data.\n @param copyData Whether to copy data. The value **true** means that the **OH_Drawing_MemoryStream** object copies\n the data, and **false** means that the **OH_Drawing_MemoryStream** object directly uses the data without copying.\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 **OH_Drawing_MemoryStream** object and reclaims the memory occupied by the object.\n\n @param memoryStream Pointer to an {@link OH_Drawing_MemoryStream} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_MemoryStreamDestroy(memoryStream: *mut OH_Drawing_MemoryStream);
}
#[doc = " Sets the start point of the path."]
#[cfg(feature = "api-23")]
pub const OH_Drawing_PathIteratorVerb_MOVE: OH_Drawing_PathIteratorVerb = 0;
#[doc = " Adds a line segment."]
#[cfg(feature = "api-23")]
pub const OH_Drawing_PathIteratorVerb_LINE: OH_Drawing_PathIteratorVerb = 1;
#[doc = " Adds a quadratic Bezier curve for smooth transitions."]
#[cfg(feature = "api-23")]
pub const OH_Drawing_PathIteratorVerb_QUAD: OH_Drawing_PathIteratorVerb = 2;
#[doc = " Adds a conic curve."]
#[cfg(feature = "api-23")]
pub const OH_Drawing_PathIteratorVerb_CONIC: OH_Drawing_PathIteratorVerb = 3;
#[doc = " Adds a cubic Bezier curve for smooth transitions."]
#[cfg(feature = "api-23")]
pub const OH_Drawing_PathIteratorVerb_CUBIC: OH_Drawing_PathIteratorVerb = 4;
#[doc = " Closes the path."]
#[cfg(feature = "api-23")]
pub const OH_Drawing_PathIteratorVerb_CLOSE: OH_Drawing_PathIteratorVerb = 5;
#[doc = " Completes the path configuration."]
#[cfg(feature = "api-23")]
pub const OH_Drawing_PathIteratorVerb_DONE: OH_Drawing_PathIteratorVerb = 6;
#[doc = " @brief Enumerates the path operation types contained in an iterator. It is used to read path operation instructions.\n\n @since 23"]
#[cfg(feature = "api-23")]
pub type OH_Drawing_PathIteratorVerb = u32;
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_PathIterator** object.\n\n @param path Pointer to an {@link OH_Drawing_Path} object.\n @param pathIterator Double pointer to an {@link OH_Drawing_PathIterator} object, which serves as an output parameter.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **path** or **pathIterator** is a null pointer.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_PathIteratorCreate(
        path: *const OH_Drawing_Path,
        pathIterator: *mut *mut OH_Drawing_PathIterator,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_PathIterator** object and reclaims the memory occupied by the object.\n\n @param pathIterator Pointer to an {@link OH_Drawing_PathIterator} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **pathIterator** is a null pointer.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_PathIteratorDestroy(
        pathIterator: *mut OH_Drawing_PathIterator,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks whether there is any next operation in the path operation iterator.\n\n @param pathIterator Pointer to an {@link OH_Drawing_PathIterator} object.\n @param hasNext Whether there is a next operation in the path operation iterator, which serves as an output parameter.\n A value of **true** means there is a next operation; **false** means the opposite.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **pathIterator** or **hasNext** is a null pointer.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_PathIteratorHasNext(
        pathIterator: *const OH_Drawing_PathIterator,
        hasNext: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Retrieves the next operation in this path and moves the iterator to that operation.\n\n @param pathIterator Pointer to an {@link OH_Drawing_PathIterator} object.\n @param points Array of coordinate points.\n @param count Size of the coordinate point array.\n @param offset Offset of the write position relative to the start point in the array. The value range is [0, count –\n 4].\n @param verb Next operation of the current path, which serves as an output parameter.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **pathIterator**, **points**, or **verb** is a null pointer.\n **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** if **count** is less than offset + 4.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_PathIteratorNext(
        pathIterator: *mut OH_Drawing_PathIterator,
        points: *mut OH_Drawing_Point2D,
        count: u32,
        offset: u32,
        verb: *mut OH_Drawing_PathIteratorVerb,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Retrieves the next operation in this path, without moving the iterator.\n\n @param pathIterator Pointer to an {@link OH_Drawing_PathIterator} object.\n @param verb Next operation of the current path, which serves as an output parameter.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **pathIterator** or **verb** is a null pointer.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_PathIteratorPeek(
        pathIterator: *const OH_Drawing_PathIterator,
        verb: *mut OH_Drawing_PathIteratorVerb,
    ) -> OH_Drawing_ErrorCode;
}
#[doc = " Adds a closed contour clockwise."]
pub const OH_Drawing_PathDirection_PATH_DIRECTION_CW: OH_Drawing_PathDirection = 0;
#[doc = " Adds a closed contour counterclockwise."]
pub const OH_Drawing_PathDirection_PATH_DIRECTION_CCW: OH_Drawing_PathDirection = 1;
#[doc = " @brief Enumerates the directions of a closed contour.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathDirection = u32;
#[doc = " For any point within the drawing area, a ray is cast in an arbitrary direction. The count starts at 0 for all\n intersections between this ray and the path.<br>Each clockwise intersection—where the path crosses the ray from\n left to right—results in the count being incremented by 1, while each counterclockwise intersection—where the\n path crosses the ray from right to left—causes the count to be decremented by 1. A point is deemed inside the\n path and needs to be colored if the final count is non-zero; if the count is 0, the point remains uncolored."]
pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_WINDING: OH_Drawing_PathFillType = 0;
#[doc = " For any point in the drawing area, a ray is cast in an arbitrary direction. If the number of intersections\n between this ray and the path is odd, the point is deemed inside the path and needs to be colored; if the number\n is even, it remains uncolored."]
pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_EVEN_ODD: OH_Drawing_PathFillType = 1;
#[doc = " Same as **PATH_FILL_TYPE_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 **PATH_FILL_TYPE_EVEN_ODD**, 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 Enumerates the fill types of a path.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathFillType = u32;
#[doc = " Adds a path in append mode."]
pub const OH_Drawing_PathAddMode_PATH_ADD_MODE_APPEND: OH_Drawing_PathAddMode = 0;
#[doc = " Adds a line segment to close the path if the previous path is not closed."]
pub const OH_Drawing_PathAddMode_PATH_ADD_MODE_EXTEND: OH_Drawing_PathAddMode = 1;
#[doc = " @brief Enumerates the path adding modes.\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 = " Intersection 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 Enumerates the operation modes available for a path.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathOpMode = u32;
#[doc = " Matrix corresponding to the position information."]
pub const OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
    0;
#[doc = " Matrix corresponding to the tangent information."]
pub const OH_Drawing_PathMeasureMatrixFlags_GET_TANGENT_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
    1;
#[doc = " Matrix corresponding to the position and tangent information."]
pub const OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_AND_TANGENT_MATRIX:
    OH_Drawing_PathMeasureMatrixFlags = 2;
#[doc = " @brief Enumerates the types of matrix information obtained during path measurement.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_PathMeasureMatrixFlags = u32;
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Path** object.\n\n @return Returns the pointer to the **OH_Drawing_Path** object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathCreate() -> *mut OH_Drawing_Path;
}
extern "C" {
    #[doc = " @brief Creates a copy of the {@link OH_Drawing_Path} object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @return Pointer to the copy of the {@link OH_Drawing_Path} object.\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 **OH_Drawing_Path** object and reclaims the memory occupied by the object.\n\n @param path Pointer to an **OH_Drawing_Path** object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathDestroy(path: *mut OH_Drawing_Path);
}
extern "C" {
    #[doc = " @brief Sets a path object as the current path object.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param other Pointer to the {@link OH_Drawing_Path} object to be set.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **path** or **other** is NULL.\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 whether a path object is empty.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param isEmpty Whether the path object is empty. **true** means empty; **false** otherwise. It as an output\n parameter.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **path** or **isEmpty** is NULL.\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 whether a path object forms a rectangle.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object, which is used as an output parameter and can be null.\n @param isRect Whether a path forms a rectangle. **true** means yes; **false** otherwise. It as an output parameter.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **path** or **isRect** is NULL.\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 this path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to an **OH_Drawing_Path** object.\n @param x X coordinate of the start point.\n @param y 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 this path to the target point. If the path is empty, the start\n point (0, 0) is used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to an **OH_Drawing_Path** object.\n @param x X coordinate of the target point.\n @param y 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. This is done by using angle arc mode. In this mode, a rectangle is specified first,\n and then a start angle and scanning degree are specified. The inscribed ellipse of the rectangle will be used to\n intercept the arc.\n The arc is a portion of the ellipse defined by the start angle and the sweep angle. If the path is empty, a line\n segment from the last point of the path to the start point of the arc is also added.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to an **OH_Drawing_Path** object.\n @param x1 X coordinate of the upper left corner of the rectangle.\n @param y1 Y coordinate of the upper left corner of the rectangle.\n @param x2 X coordinate of the lower right corner of the rectangle.\n @param y2 Y coordinate of the lower right corner of the rectangle.\n @param startDeg Start angle. The start direction (0°) of the angle is the positive direction of the X axis.\n @param sweepDeg Angle to sweep, in degrees. A positive number indicates a clockwise sweep, and a negative value\n indicates a counterclockwise swipe. The actual swipe degree is the modulo operation result of the input parameter by\n 360.\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. If the path is empty, the\n start point (0, 0) is used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to an **OH_Drawing_Path** object.\n @param ctrlX X coordinate of the control point.\n @param ctrlY Y coordinate of the control point.\n @param endX X coordinate of the target point.\n @param endY 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 curve from the last point of a path to the target point. If the path is empty, the start point (\n 0, 0) is used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param ctrlX X coordinate of the control point.\n @param ctrlY Y coordinate of the control point.\n @param endX X coordinate of the target point.\n @param endY Y coordinate of the target point.\n @param weight Weight of the curve, which determines its shape. The larger the value, the closer of the curve to the\n control point.\n If the value is less than or equal to **0**, the result is equivalent to a line segment from the start point to the\n end point, which is added by calling {@link OH_Drawing_PathLineTo}.\n If the value is **1**, the result is equivalent to {@link OH_Drawing_PathQuadTo}.\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 this path to the target point. If the path is empty, the\n start point (0, 0) is used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to an **OH_Drawing_Path** object.\n @param ctrlX1 X coordinate of the first control point.\n @param ctrlY1 Y coordinate of the first control point.\n @param ctrlX2 X coordinate of the second control point.\n @param ctrlY2 Y coordinate of the second control point.\n @param endX X coordinate of the target point.\n @param endY 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 start position relative to the last point of a path. If the path is empty, the start point (0, 0) is\n used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param x X-axis offset relative to the end point of a path. A positive number indicates an offset in the positive\n direction of the X axis, and a negative number indicates an offset in the negative direction of the X axis.\n @param y Y-axis offset relative to the end point of a path. A positive number indicates an offset in the positive\n direction of the Y axis, and a negative number indicates an offset in the negative direction of the Y axis.\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 this path to a point relative to the last point. If the path is\n empty, the start point (0, 0) is used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param x X offset relative to the last point, which is used to specify the X coordinate of the target point.\n @param y Y offset relative to the last point, which is used to specify the X coordinate of the 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 this path to a point relative to the last point. If the\n path is empty, the start point (0, 0) is used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param ctrlX X offset relative to the last point, which is used to specify the X coordinate of the control point.\n @param ctrlY Y offset relative to the last point, which is used to specify the Y coordinate of the control point.\n @param endX X offset relative to the last point, which is used to specify the X coordinate of the target point.\n @param endY Y offset relative to the last point, which is used to specify the Y coordinate of the 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 curve from the last point of a path to a point relative to the last point. If the path is empty,\n the start point (0, 0) is used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param ctrlX X offset relative to the last point, which is used to specify the X coordinate of the control point.\n @param ctrlY Y offset relative to the last point, which is used to specify the Y coordinate of the control point.\n @param endX X offset relative to the last point, which is used to specify the X coordinate of the target point.\n @param endY Y offset relative to the last point, which is used to specify the Y coordinate of the target point.\n @param weight Weight of the curve, which determines its shape. The larger the value, the closer of the curve to the\n control point.\n If the value is less than or equal to **0**, the result is equivalent to a line segment from the start point to the\n end point, which is added by calling {@link OH_Drawing_PathRLineTo}.\n If the value is **1**, the result is equivalent to {@link OH_Drawing_PathRQuadTo}.\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 a point relative to the last point. If the path\n is empty, the start point (0, 0) is used.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param ctrlX1 X offset relative to the last point, which is used to specify the X coordinate of the first control\n point.\n @param ctrlY1 Y offset relative to the last point, which is used to specify the Y coordinate of the first control\n point.\n @param ctrlX2 X offset relative to the last point, which is used to specify the X coordinate of the second control\n point.\n @param ctrlY2 Y offset relative to the last point, which is used to specify the Y coordinate of the second control\n point.\n @param endX X offset relative to the last point, which is used to specify the X coordinate of the target point.\n @param endY Y offset relative to the last point, which is used to specify the Y coordinate of the 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 rectangle to a path in the specified direction. The start point is the upper left corner of the\n rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathDirection** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param left X coordinate of the upper left corner of the rectangle.\n @param top Y coordinate of the upper left corner of the rectangle.\n @param right X coordinate of the lower right corner of the rectangle.\n @param bottom Y coordinate of the lower right corner of the rectangle.\n @param pathDirection {@link OH_Drawing_PathDirection} object.\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 rectangle contour to a path in the specified direction.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathDirection** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param pathDirection Indicates the path direction.\n @param start Start point, indicating the corner of the rectangle from which the path is drawn. The value **0** means\n the upper left corner, **1** means the upper right corner, **2** means the lower right corner, and **3** means the\n lower left corner.\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 rounded rectangle to a path in the specified direction. When the path direction is clockwise, the\n start point is at the intersection of the rounded rectangle's left boundary and its lower left corner. When the path\n direction is counterclockwise, the start point is at the intersection point between the left boundary and the upper\n left corner.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **roundRect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathDirection** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param roundRect Pointer to the {@link OH_Drawing_RoundRect} object.\n @param pathDirection {@link OH_Drawing_PathDirection} object.\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 an oval to a path. **OH_Drawing_Rect** specifies the outer tangent rectangle of the oval, and **\n OH_Drawing_PathDirection** specifies whether the drawing is clockwise or counterclockwise.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathDirection** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param start Start point of the oval.\n @param pathDirection {@link OH_Drawing_PathDirection} object.\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 an oval to a path in the specified direction.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathDirection** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param pathDirection {@link OH_Drawing_PathDirection} object.\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 Adds an arc to a path as the start of a new contour. The arc added is part of the inscribed ellipse of the\n rectangle, from the start angle through the sweep angle. If the sweep angle is less than or equal to -360°, or if\n the sweep angle is greater than or equal to 360°, and start angle modulo 90 is nearly zero, an oval instead of an\n ellipse is added.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param startAngle Start angle of the arc, in degrees.\n @param sweepAngle Angle to sweep, in degrees. A positive number indicates a clockwise sweep, and a negative value\n indicates a counterclockwise swipe. The actual swipe degree is the modulo operation result of the input parameter by\n 360.\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 Transforms the points in a **src** path by a matrix and adds the new one to the current path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **src** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the existing {@link OH_Drawing_Path} object.\n @param src Pointer to the source {@link OH_Drawing_Path} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object. A null pointer means an identity matrix.\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 Transforms the points in a **src** path by a matrix and adds the new one to the current path with the\n specified adding mode.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **src** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathAddMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the existing {@link OH_Drawing_Path} object.\n @param src Pointer to the source {@link OH_Drawing_Path} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object. A null pointer means an identity matrix.\n @param pathAddMode {@link OH_Drawing_PathAddMode} object.\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 Adds a **src** path to the current path with the specified adding mode.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **src** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathAddMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the existing {@link OH_Drawing_Path} object.\n @param src Pointer to the source {@link OH_Drawing_Path} object.\n @param pathAddMode {@link OH_Drawing_PathAddMode} object.\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 Translates a **src** path by an offset and adds the new one to the current path with the specified adding\n mode.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **src** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathAddMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the existing {@link OH_Drawing_Path} object.\n @param src Pointer to the source {@link OH_Drawing_Path} object.\n @param dx X offset.\n @param dy Y offset.\n @param pathAddMode {@link OH_Drawing_PathAddMode} object.\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 a polygon to a path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **points** is NULL or **count** is **0**, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the existing {@link OH_Drawing_Path} object.\n @param points Pointer to an array that holds the vertex coordinates of the polygon.\n @param count Size of the array.\n @param isClosed Whether the path is closed. The value **true** means that the path is closed, and **false** means\n the opposite.\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 a path in the specified direction.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **radius** is less than or equal to 0, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n If **pathDirection** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param x X coordinate of the circle center.\n @param y Y coordinate of the circle center.\n @param radius Radius of the circle.\n @param pathDirection {@link OH_Drawing_PathDirection} object.\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 path represented by an SVG string.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **str** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param str Pointer to the SVG string.\n @return Returns whether the SVG string is successfully parsed. **true** means successful; **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 Convert path to an SVG string.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param str Indicates the SVG string. API users are responsible for allocating and freeing memory.\n @param strSize Indicates the SVG string memory size in bytes.\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 strSize is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_PathConvertToSvgString(
        path: *const OH_Drawing_Path,
        str_: *mut ::std::os::raw::c_char,
        strSize: *mut usize,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get path point data.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param points Indicates the path point array.\n @param count Indicates the size of point array.\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 count is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_PathGetPointData(
        path: *const OH_Drawing_Path,
        points: *mut OH_Drawing_Point2D,
        count: *mut u32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get path verb data.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param verbs Indicates the path verb array.\n @param count Indicates the size of verb array.\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 count is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_PathGetVerbData(
        path: *const OH_Drawing_Path,
        verbs: *mut OH_Drawing_PathIteratorVerb,
        count: *mut u32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Get path conic weight data.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param conicWeights Indicates the path conic weight array.\n @param count Indicates the size of conic weight array.\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 count is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_PathGetConicWeightData(
        path: *const OH_Drawing_Path,
        conicWeights: *mut f32,
        count: *mut u32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks whether a coordinate point is included in this path. For details, see {@link OH_Drawing_PathFillType}.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param x Coordinate point on the X axis.\n @param y Coordinate point on the Y axis.\n @return Returns **true** if the coordinate point is included in the path; returns **false** otherwise.\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 the points in a path by matrix.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} 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 the points in a path by matrix, and uses the new one to replace the **dst** path. If **dst** is\n NULL, the **src** path is replaced.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **src** or **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param src Pointer to the {@link OH_Drawing_Path} object.\n @param matrix Pointer to the {@link OH_Drawing_Matrix} object.\n @param dst Pointer to the target {@link OH_Drawing_Path} object.\n @param applyPerspectiveClip Whether to apply perspective cropping to the new path. The value **true** means to apply\n perspective cropping, and **false** means the opposite.\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 the fill type of a path. The fill type determines how \"inside\" of the path is drawn.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **pathFillType** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param pathFillType {@link OH_Drawing_PathFillType} object.\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 Obtains the fill type of a path.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param pathFillType Pointer to the {@link OH_Drawing_PathFillType} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **path** or **pathFillType** is NULL.\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 Obtains the length of a path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param forceClosed Whether the path is measured as a closed path. **true** means that the path is forcibly\n considered as a closed path; **false** means that the path is measured depending on whether it is a closed path.\n @return Returns the length of the path.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathGetLength(path: *mut OH_Drawing_Path, forceClosed: bool) -> f32;
}
extern "C" {
    #[doc = " @brief Obtains the minimum bounds that enclose a path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} 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 Draws a line segment from the current point to the start point of this path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathClose(path: *mut OH_Drawing_Path);
}
extern "C" {
    #[doc = " @brief Translates a path by an offset along the X axis and Y axis and adds the new one to the **dst** path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the existing {@link OH_Drawing_Path} object.\n @param dst Pointer to a destination path, which is an {@link OH_Drawing_Path} object. If NULL is passed in, the\n result is stored in the current path.\n @param dx X offset.\n @param dy Y offset.\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 the path data.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to an **OH_Drawing_Path** object.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PathReset(path: *mut OH_Drawing_Path);
}
extern "C" {
    #[doc = " @brief Checks whether a path is closed.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param forceClosed Whether the path is measured as a closed path. The value **true** means that the path is\n considered closed during measurement, and **false** means that the path is measured based on the actual closed\n status.\n @return Returns **true** if the path is closed; returns **false** 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 Obtains the coordinates and tangent at a distance from the start point of this path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **path**, **position**, or **tangent** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param forceClosed Whether the path is measured as a closed path. The value **true** means that the path is\n considered closed during measurement, and **false** means that the path is measured based on the actual closed\n status.\n @param distance Distance from the start point. If the distance is less than 0, it is considered as 0. If the\n distance is greater than the path length, it is considered as the path length.\n @param position Pointer to the coordinates.\n @param tangent Pointer to the tangent, where **tangent.x** and **tangent.y** represent the cosine and sine of the\n tangent of the point, respectively.\n @return Returns whether the measurement is successful. **true** means successful; **false** 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 Extracts a segment of a path and appends it to a destination path.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param forceClosed Whether the path is measured as a closed path. The value **true** means that the path is\n considered closed during measurement, and **false** means that the path is measured based on the actual closed\n status.\n @param start Distance from the start point of the path to the start point of the segment. If it is less than 0, it\n defaults to 0. If it is greater than or equal to **stop**, the extraction fails.\n @param stop Distance from the start point of the path to the end point of the segment. If it is less than or equal\n to **start**, the extraction fails. If it is greater than the path length, it defaults to the path length.\n @param startWithMoveTo Whether to execute {@link OH_Drawing_PathMoveTo} in the destination path to move to its start\n point. The value **true** means to move to the start point, and **false** means the opposite.\n @param dst Pointer to a destination path, which is an {@link OH_Drawing_Path} object. If the extraction succeeds,\n the segment is appended to the path. If the extraction fails, nothing changes.\n @param result Pointer to the extraction result. The value **true** means that the extraction is successful, and **\n false** means the opposite. It as an output parameter.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if at least one of the **path**, **dst**, and **result** parameters is a null\n pointer.\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 based on the specified operation mode.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **srcPath** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **op** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param path Pointer to an {@link OH_Drawing_Path} object, in which the resulting path is saved.\n @param other Pointer to the {@link OH_Drawing_Path} object.\n @param op Operation mode of the path. For details about the available options, see {@link OH_Drawing_PathOpMode}.\n @return Returns **true** if the resulting path is not empty; returns **false** 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 Obtains a transformation matrix at a distance from the start point of this path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **path** or **matrix** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **flag** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param forceClosed Whether the path is measured as a closed path. The value **true** means that the path is\n considered closed during measurement, and **false** means that the path is measured based on the actual closed\n status.\n @param distance Distance from the start point. If the distance is less than 0, it is considered as 0. If the\n distance is greater than the path length, it is considered as the path length.\n @param matrix Pointer to the transformation matrix.\n @param flag Type of the matrix information. For details about the available options, see\n {@link OH_Drawing_PathMeasureMatrixFlags}\n .\n @return Returns **true** if the transformation matrix is obtained successfully; returns **false** otherwise. The\n possible failure cause is that **path** is NULL or the path length is 0.\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 Converts the existing path into an approximate path consisting of consecutive line segments.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param acceptableError Acceptable error of each line segment on the path. The value cannot be less than 0.\n 1. Avoid setting **acceptableError** to **0** as it heavily divides the curve path, significantly impacting\n performance and memory usage.\n 2. Setting a high **acceptableError** simplifies the path greatly by keeping only essential points, potentially\n distorting the original shape.\n 3. When you set a high **acceptableError** for curves such as ellipses, the fitting process often simplifies them to\n polygons by keeping just the start and end points of their Bezier curve segments.\n @param vals An array of approximate points of the path.\n Each point consists of three values, indicating:\n 1. Length ratio of the point to the start point of the path.\n 2. X coordinate of the point.\n 3. Y coordinate of the point.\n @param count Size of the returned array, which is at least 6. The size of the point array after fitting is returned\n if **vals** is a null pointer.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **path** or **count** is a null pointer.\n **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 Interpolates between the existing path and another path based on the given weight and stores the result in\n the target path object.\n Interpolation is achievable if the two paths have the same number of points. The target path is created based on the\n structure of the existing path.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param other Pointer to the {@link OH_Drawing_Path} object of the other path used for interpolation.\n @param weight Interpolation weight. The value range is [0, 1].\n @param success Whether the interpolation is successful. **true** means yes; **false** otherwise. It as an output\n parameter.\n @param interpolatedPath Pointer to the {@link OH_Drawing_Path} object used to store the interpolation result.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **path**, **other**, **success**, or **interpolatedPath** is a null\n pointer.\n **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** if **weight** is not in the range of [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 existing path and another path (**other**) are compatible for interpolation in terms of\n structure and operation sequence.\n If the paths contain conic operations, the weight values of the operations must be the same.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param other Pointer to the {@link OH_Drawing_Path} object.\n @param result Checks whether a path is compatible with another path. It is used as an output parameter.\n **true** if the paths are compatible, **false** otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **path**, **other**, or **result** is a null pointer.\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 Gets the last point of the path.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param point Indicates the pointer to an <b>OH_Drawing_Point2D</b> object to store the last point.\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 point is nullptr, or the path is empty.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_PathGetLastPoint(
        path: *mut OH_Drawing_Path,
        point: *mut OH_Drawing_Point2D,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks whether the fill type of the path is the inverse type.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param isInverse Whether the fill type is the inverse type. It is used as an output parameter. **true** if the fill\n type is the inverse type; **false** otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **path** or **isInverse** is a null pointer.\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 fill type of the path to the inverse type.\n\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **path** is a null pointer.\n @since 23\n @version 1.0"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_PathToggleInverseFillType(path: *mut OH_Drawing_Path)
        -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Checks if two paths are equal.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to another <b>OH_Drawing_Path</b> object to compare.\n @param equal Indicates whether the two paths are equal.\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 other is nullptr, or equal is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_PathIsEqual(
        path: *mut OH_Drawing_Path,
        other: *mut OH_Drawing_Path,
        equal: *mut bool,
    ) -> OH_Drawing_ErrorCode;
}
#[doc = " Translation effect."]
#[cfg(feature = "api-18")]
pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_TRANSLATE: OH_Drawing_PathDashStyle = 0;
#[doc = " Rotation effect."]
#[cfg(feature = "api-18")]
pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_ROTATE: OH_Drawing_PathDashStyle = 1;
#[doc = " Morphing effect."]
#[cfg(feature = "api-18")]
pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_MORPH: OH_Drawing_PathDashStyle = 2;
#[doc = " @brief Enumerates the drawing styles for path effects.\n\n @since 18\n @version 1.0"]
#[cfg(feature = "api-18")]
pub type OH_Drawing_PathDashStyle = u32;
extern "C" {
    #[doc = " @brief Creates a path effect by sequentially applying the inner effect and then the outer effect.\n\n @param outer Pointer to an outer effect, which is an {@link OH_Drawing_PathEffect} object.\n @param inner Pointer to an inner effect, which is an {@link OH_Drawing_PathEffect} object.\n @return Returns a pointer to the created {@link OH_Drawing_PathEffect} object.\n If a null pointer is returned, the creation fails. The possible failure cause is that **inner** or **inner** is a\n null pointer.\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 a path effect that transforms the sharp angle between line segments into a rounded corner with the\n specified radius.\n\n @param radius Radius of the rounded corner. The value is valid only when it is greater than 0.\n @return Returns a pointer to the created {@link OH_Drawing_PathEffect} object.\n If a null pointer is returned, the creation fails. The possible failure cause is that **radius** is less than or\n equal to **0**.\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 a dashed path effect. The dashed line effect is determined by a group of \"on\" and \"off\" intervals.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **intervals** is NULL or **count** is less than or equal to 0, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param intervals Pointer to the start address of the dashed line interval array. In the array, an even entry\n indicates an \"on\" interval and an odd entry indicates an \"off\" interval. The unit is px.\n @param count Number of entries in the dashed line interval array. The value must be an even number greater than 0.\n @param phase Offset in the dashed line interval array.\n @return Returns a pointer to the created {@link OH_Drawing_PathEffect} object.\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 a path effect that segments the path and scatters the segments in an irregular pattern along the path.\n\n @param segLength Distance along the path at which each segment is fragmented. An effect is created when it is\n greater than 0.\n @param deviation Maximum amount by which the end points of the segments can be randomly displaced during rendering.\n @return Returns a pointer to the created {@link OH_Drawing_PathEffect} object.\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 a dashed path effect.\n\n @param path Pointer to an {@link OH_Drawing_Path} object.\n @param advance Length of each dashed line segment.\n @param phase Offset of the pattern within the dash segment length.\n @param type Style of the dashed path effect.\n @return Returns a pointer to the created {@link OH_Drawing_PathEffect} object.\n If a null pointer is returned, the creation fails. The possible failure cause is that **path** is a null pointer or *\n *advance** is less than or equal to **0**.\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 overlay path effect based on two distinct path effects that take effect separately.\n\n @param firstPathEffect Pointer to an {@link OH_Drawing_PathEffect} object.\n @param secondPathEffect Pointer to an {@link OH_Drawing_PathEffect} object.\n @return Returns a pointer to the created {@link OH_Drawing_PathEffect} object.\n If a null pointer is returned, the creation fails. The possible failure cause is that **firstPathEffect** or **\n secondPathEffect** is a null pointer.\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 **OH_Drawing_PathEffect** object and reclaims the memory occupied by the object.\n\n @param pathEffect Pointer to an {@link OH_Drawing_PathEffect} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PathEffectDestroy(pathEffect: *mut OH_Drawing_PathEffect);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Pen** object.\n\n @return Returns the pointer to the **OH_Drawing_Pen** object created.\n @since 8\n @version 1.0"]
    pub fn OH_Drawing_PenCreate() -> *mut OH_Drawing_Pen;
}
extern "C" {
    #[doc = " @brief Creates a copy of the {@link OH_Drawing_Pen} object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @return Returns the pointer to the {@link OH_Drawing_Pen} object created. If NULL is returned, the creation fails.\n The possible failure cause is that no memory is available or **pen** is NULL.\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 **OH_Drawing_Pen** object and reclaims the memory occupied by the object.\n\n @param pen Pointer to an **OH_Drawing_Pen** 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. Anti-aliasing makes the pixels around the shape edges semi-\n transparent.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @return Returns **true** if anti-aliasing is enabled; returns **false** 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. Anti-aliasing makes the pixels around the shape edges semi-\n transparent.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @param antiAlias Whether to enable anti-aliasing. The value **true** means to enable anti-aliasing, and **false**\n 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @param color Color, 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 value of a pen. This value is used by the alpha channel when the pen outlines a shape.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @return Returns an 8-bit variable that describes the alpha value.\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 value for a pen. This value is used by the alpha channel when the pen outlines a shape.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @param alpha Alpha value, which is an 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, which is used to outline a shape.\n The color is in ARGB format represented by floating-point numbers. The color space is specified by\n {@link OH_NativeColorSpaceManager}\n .\n If **colorSpaceManager** is a null pointer, the SRGB (standard red, green, and blue color space based on IEC 61966-2.\n 1:1999) color space is used as the default value.\n\n @param pen Pointer to an {@link OH_Drawing_Pen} object.\n @param a Alpha value of the color, which is a floating-point number ranging from 0.0 to 1.0. Values above 1.0\n default to 1.0, while values below 0.0 default to 0.0.\n @param r Red component of the color, which is a floating-point number ranging from 0.0 to 1.0. Values above 1.0\n default to 1.0, while values below 0.0 default to 0.0.\n @param g Green component of the color, which is a floating-point number ranging from 0.0 to 1.0. Values above 1.0\n default to 1.0, while values below 0.0 default to 0.0.\n @param b Blue component of the color, which is a floating-point number ranging from 0.0 to 1.0. Values above 1.0\n default to 1.0, while values below 0.0 default to 0.0.\n @param colorSpaceManager Pointer to an {@link OH_NativeColorSpaceManager} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **pen** is NULL.\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 value of the pen color.\n\n @param pen Pointer to an {@link OH_Drawing_Pen} object.\n @param a Alpha value of the pen color. The value is a floating-point number ranging from 0.0 to 1.0.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **pen** or **a** is NULL.\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 the pen color.\n\n @param pen Pointer to an {@link OH_Drawing_Pen} object.\n @param r Red component of the pen color. The value is a floating-point number ranging from 0.0 to 1.0.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **pen** or **r** is NULL.\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 the pen color.\n\n @param pen Pointer to an {@link OH_Drawing_Pen} object.\n @param g Green component of the pen color. The value is a floating-point number ranging from 0.0 to 1.0.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **pen** or **g** is NULL.\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 the pen color.\n\n @param pen Pointer to an {@link OH_Drawing_Pen} object.\n @param b Blue component of the pen color. The value is a floating-point number ranging from 0.0 to 1.0.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **pen** or **b** is NULL.\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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @param width Thickness, 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. When the corner type is bevel, a beveled corner\n is displayed if the miter limit is exceeded, and a mitered corner is displayed if the miter limit is not exceeded.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** 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. When the corner type is bevel, a beveled corner is\n displayed if the miter limit is exceeded, and a mitered corner is displayed if the miter limit is not exceeded.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @param miter Stroke miter limit, which is a variable.\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 is half of the width of the line segment, with\n 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 is the same as the width of the\n line segment."]
pub const OH_Drawing_PenLineCapStyle_LINE_ROUND_CAP: OH_Drawing_PenLineCapStyle = 2;
#[doc = " @brief Enumerates the line cap styles of a pen. The line cap style defines the style of both ends of a line segment\n 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **capStyle** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @param capStyle Line cap style, which is a variable.\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. In this case, you\n 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 the line join styles of a pen. The line join style defines the shape of the joints of a polyline\n 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 This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** 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 join style for this pen.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **joinStyle** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param pen Pointer to an **OH_Drawing_Pen** object.\n @param joinStyle 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 shader effect for this pen.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param shaderEffect Pointer to an {@link OH_Drawing_ShaderEffect} object. If NULL is passed in, the shader effect\n will be cleared.\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 shadow layer for a pen. The shadow layer effect takes effect only when text is drawn.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param shadowLayer Pointer to an {@link OH_Drawing_ShadowLayer} object. If NULL is passed in, the shadow layer\n effect will be cleared.\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 path effect for this pen.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param pathEffect Pointer to an {@link OH_Drawing_PathEffect} object. If NULL is passed in, the path effect will be\n cleared.\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 a filter for a pen.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param filter Pointer to an {@link OH_Drawing_Filter} object. If NULL is passed in, the filter will be cleared.\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 Obtains the {@link OH_Drawing_Filter} object from the pen. The filter is a container that holds a mask filter\n and color filter.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **pen** or **filter** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param filter Pointer to an {@link OH_Drawing_Filter} 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 for a pen. The blender implements the specified blend mode.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **blendMode** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param blendMode Enumeration of blend modes.\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 Obtains the source path outline drawn using this pen and represents it using a destination path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **pen**, **src**, and **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @param src Pointer to the source {@link OH_Drawing_Path} object.\n @param dst Pointer to the target {@link OH_Drawing_Path} object.\n @param rect Pointer to an {@link OH_Drawing_Rect} object. NULL is recommended.\n @param matrix Pointer to an {@link OH_Drawing_Matrix} object. NULL is recommended. The default value is an identity\n matrix.\n @return Returns **true** if the destination path is obtained; returns **false** otherwise.\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 a pen to the initial state.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **pen** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param pen Pointer to the {@link OH_Drawing_Pen} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PenReset(pen: *mut OH_Drawing_Pen);
}
extern "C" {
    #[doc = " @brief Obtains the pixel map defined by this module from a pixel map defined by the image framework.\n\n @param nativePixelMap Pointer to a {@link NativePixelMap_} object, which is the pixel map defined by the image\n framework.\n @return Returns the pointer to an {@link OH_Drawing_PixelMap} object, which is the pixel map defined by this module.\n If NULL is returned, the creation fails. The possible failure cause is that **NativePixelMap_** is NULL.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PixelMapGetFromNativePixelMap(
        nativePixelMap: *mut NativePixelMap_,
    ) -> *mut OH_Drawing_PixelMap;
}
extern "C" {
    #[doc = " @brief Obtains the pixel map defined by this module from a pixel map defined by the image framework.\n\n @param pixelmapNative Pointer to a {@link OH_PixelmapNative} object, which is the pixel map defined by the image\n framework.\n @return Returns the pointer to an {@link OH_Drawing_PixelMap} object, which is the pixel map defined by this module.\n If NULL is returned, the creation fails. The possible failure cause is that **OH_PixelmapNative** is NULL.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PixelMapGetFromOhPixelMapNative(
        pixelmapNative: *mut OH_PixelmapNative,
    ) -> *mut OH_Drawing_PixelMap;
}
extern "C" {
    #[doc = " @brief Removes the relationship between a pixel map defined by this module and a pixel map defined by the image\n framework. The relationship is established by calling  {@link OH_Drawing_PixelMapGetFromNativePixelMap}  or\n {@link OH_Drawing_PixelMapGetFromOhPixelMapNative}\n .\n\n @param pixelMap Pointer to an {@link OH_Drawing_PixelMap} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_PixelMapDissolve(pixelMap: *mut OH_Drawing_PixelMap);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Point** object.\n\n @param x X coordinate of the point.\n @param y Y coordinate of the point.\n @return Returns the pointer to the **OH_Drawing_Point** 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 Obtains the X coordinate of a point.\n\n @param point Pointer to an {@link OH_Drawing_Point} object.\n @param x Pointer to the X coordinate.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **point** or **x** is NULL.\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 Obtains the Y coordinate of a point.\n\n @param point Pointer to an {@link OH_Drawing_Point} object.\n @param y Pointer to the Y coordinate.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **point** or **y** is NULL.\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 and Y coordinates of a point.\n\n @param point Pointer to an {@link OH_Drawing_Point} object.\n @param x Pointer to the X coordinate.\n @param y Pointer to the Y coordinate.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **point** is NULL.\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 Negates the point's coordinates.\n\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_INCORRECT_PARAMETER} if point is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_PointNegate(point: *mut OH_Drawing_Point) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Offsets the point's coordinates by dx, dy.\n\n @param point Indicates the pointer to an <b>OH_Drawing_Point</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 point is nullptr.\n @since 26.0.0"]
    #[cfg(feature = "api-26")]
    pub fn OH_Drawing_PointOffset(
        point: *mut OH_Drawing_Point,
        dx: f32,
        dy: f32,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_Point** object and reclaims the memory occupied by the object.\n\n @param point Pointer to an **OH_Drawing_Point** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_PointDestroy(point: *mut OH_Drawing_Point);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_RecordCmdUtils** object.\n\n @return Returns the pointer to the **OH_Drawing_RecordCmdUtils** 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 **OH_Drawing_RecordCmdUtils** object and reclaims the memory occupied by the object.\n\n @param recordCmdUtils Pointer to an {@link OH_Drawing_RecordCmdUtils} object.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **recordCmdUtils** is NULL.\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 Starts recording. This API must be used together with {@link OH_Drawing_RecordCmdUtilsFinishRecording}.\n The **OH_Drawing_RecordCmdUtils** object generates a canvas object of the recording type and calls the interface of\n the drawing object to record all drawing commands.\n\n @param recordCmdUtils Pointer to an {@link OH_Drawing_RecordCmdUtils} object.\n @param width Width of the canvas.\n @param height Height of the canvas.\n @param canvas Double pointer to the {@link OH_Drawing_Canvas} object. You do not need to release this pointer.\n This object does not support nested calling of {@link OH_Drawing_CanvasDrawRecordCmd}.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **recordCmdUtils** or **canvas** is NULL.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **width** or **height** is less than 0.\n **OH_DRAWING_ERROR_ALLOCATION_FAILED** if the system memory is insufficient.\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 Stops video recording. This function must be called after {@link OH_Drawing_RecordCmdUtilsBeginRecording}.\n The **OH_Drawing_RecordCmdUtils** object ends recording and stores the drawing commands recorded by the canvas\n object of the recording type into the generated {@link OH_Drawing_RecordCmdUtilsBeginRecording} object.\n\n @param recordCmdUtils Pointer to an {@link OH_Drawing_RecordCmdUtils} object.\n @param recordCmd Double pointer to the  {@link OH_Drawing_RecordCmd}  object. You need to call\n {@link OH_Drawing_CanvasDrawRecordCmd}\n to draw the object, and call {@link OH_Drawing_RecordCmdDestroy} to release it.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **recordCmdUtils** or **recordCmd** is NULL.\n **OH_DRAWING_ERROR_ALLOCATION_FAILED** if the system memory is insufficient.\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 **OH_Drawing_RecordCmd** object and reclaims the memory occupied by the object.\n\n @param recordCmd Pointer to an {@link OH_Drawing_RecordCmd} object.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **recordCmd** is NULL.\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 **OH_Drawing_Rect** object, without sorting the coordinates passed in. This means that the\n coordinates of the upper left corner of the rectangle can be greater than those of the lower right corner.\n\n @param left X coordinate of the upper left corner of the rectangle.\n @param top Y coordinate of the upper left corner of the rectangle.\n @param right X coordinate of the lower right corner of the rectangle.\n @param bottom Y coordinate of the lower right corner of the rectangle.\n @return Returns the pointer to the **OH_Drawing_Rect** 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 Checks whether two rectangles intersect and if yes, sets **rect** to the area of intersection.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **rect** or **other** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param other Pointer to an **OH_Drawing_Rect** object.\n @return Returns **true** if they intersect (**rect** is set to the intersection area); returns **false** otherwise (*\n *rect** remains unchanged).\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 Obtains the union of two rectangles.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **rect** or **other** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param other Pointer to an **OH_Drawing_Rect** object.\n @return Returns **true** if the union is obtained; returns **false** otherwise. The possible failure cause is that\n at least one of the parameters **rect** and **other** is NULL or the size of the rectangle specified by **other** is\n 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 Sets the horizontal coordinate of the upper left corner of a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param left X coordinate of the upper left corner of the rectangle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectSetLeft(rect: *mut OH_Drawing_Rect, left: f32);
}
extern "C" {
    #[doc = " @brief Sets the vertical coordinate of the upper left corner of a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param top Y coordinate of the upper left corner of the rectangle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectSetTop(rect: *mut OH_Drawing_Rect, top: f32);
}
extern "C" {
    #[doc = " @brief Sets the horizontal coordinate of the lower right corner of a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param right X coordinate of the lower right corner of the rectangle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectSetRight(rect: *mut OH_Drawing_Rect, right: f32);
}
extern "C" {
    #[doc = " @brief Sets the vertical coordinate of the lower right corner of a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param bottom Y coordinate of the lower right corner of the rectangle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectSetBottom(rect: *mut OH_Drawing_Rect, bottom: f32);
}
extern "C" {
    #[doc = " @brief Obtains the X coordinate of the upper left corner of a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @return X coordinate of the upper left corner of the rectangle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetLeft(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Obtains the Y coordinate of the upper left corner of a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @return Y coordinate of the upper left corner of the rectangle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetTop(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Obtains the X coordinate of the lower right corner of a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @return X coordinate of the lower right corner of the rectangle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetRight(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Obtains the Y coordinate of the lower right corner of a rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @return Y coordinate of the lower right corner of the rectangle.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetBottom(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Obtains the height of a rectangle. The height is calculated by using the Y coordinate of the lower right\n corner of the rectangle minus the Y coordinate of the upper left corner.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n @return Returns the height of the rectangle, in pixels.\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetHeight(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Obtains the width of a rectangle. The width is calculated by using the X coordinate of the lower right corner\n of the rectangle minus the X coordinate of the upper left corner.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @return Returns the weight of the rectangle, in pixels.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RectGetWidth(rect: *mut OH_Drawing_Rect) -> f32;
}
extern "C" {
    #[doc = " @brief Copies a source rectangle to create a new one.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **src** or **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param src Pointer to a source rectangle, which is an **OH_Drawing_Rect** object.\n @param dst Pointer to a destination rectangle, which is an **OH_Drawing_Rect** 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 **OH_Drawing_Rect** object and reclaims the memory occupied by the object.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RectDestroy(rect: *mut OH_Drawing_Rect);
}
extern "C" {
    #[doc = " @brief Creates a rectangle array object to store multiple rectangle objects. Release this pointer by calling\n {@link OH_Drawing_RectDestroyArray}\n when this object is no longer needed.\n\n @param size Size of the rectangle array. The value cannot exceed 65536, which is the maximum number of glyph indices.\n @return Returns the pointer to the {@link OH_Drawing_Array} object created. If the returned object pointer is null,\n the creation fails.\n Possible causes are that no memory is available or an input parameter is incorrect.\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 Obtains the size of an {@link OH_Drawing_Array} object.\n\n @param rectArray Pointer to an {@link OH_Drawing_Array} object.\n @param pSize Pointer to the size_t type, which is used as an output parameter to store the size of the rectangle\n array.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **rectArray** or **pSize** is NULL.\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 Obtains the rectangle with the specified index in a rectangle array.\n\n @param rectArray Pointer to an {@link OH_Drawing_Array} object.\n @param index Index of the rectangle array.\n @param rect Double pointer to {@link OH_Drawing_Rect}, which is returned to the caller as an output parameter.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **rectArray** or **rect** is null or **index** is out of range.\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 **OH_Drawing_Array** object and reclaims the memory occupied by the object.\n\n @param rectArray Pointer to an {@link OH_Drawing_Array} object.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **rectArray** is NULL.\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 Checks whether a rectangle completely contains another rectangle.\n\n @param rect Pointer to the {@link OH_Drawing_Rect} object. This rectangle is used to check whether another rectangle\n (**other**) is contained.\n @param other Pointer to the {@link OH_Drawing_Rect} object. This rectangle is used to check whether it is contained\n by another rectangle (**rect**).\n @param isContains Result of whether a rectangle completely contains another rectangle. It is used as an output\n parameter. **true** indicates that **rect** completely contains **other**. **false** indicates that **rect** does\n not completely contain **other**.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the **rect**, **other**, or **isContains** parameter is empty.\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 Adds a specified value to the bounds of a rectangle.\n\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param left Value to be added to the left bound of the rectangle (X coordinate of the upper left corner of the\n rectangle).\n @param top Value to be added to the top bound of the rectangle (Y coordinate of the upper left corner of the\n rectangle).\n @param right Value to be added to the right bound of the rectangle (X coordinate of the lower right corner of the\n rectangle).\n @param bottom Value to be added to the bottom bound of the rectangle (Y coordinate of the lower right corner of the\n rectangle).\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the **rect** parameter is empty.\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 whether a rectangle is empty.\n\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param isEmpty Whether a rectangle is empty. It is used as an output parameter. **true** means yes; **false**\n otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **rect** or **isEmpty** is a null pointer.\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 a rectangle along the X axis and Y axis.\n\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param dx Offset on the X axis. A positive number indicates an offset towards the positive direction of the X axis,\n and a negative number indicates an offset towards the negative direction of the X axis.\n @param dy Offset on the Y axis. A positive number indicates an offset towards the positive direction of the Y axis,\n and a negative number indicates an offset towards the negative direction of the Y axis.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **rect** is a null pointer.\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 a rectangle to a specific position while keeping the width and height unchanged.\n\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @param newLeft X coordinate of the upper left corner of the rectangle after the offset.\n @param newTop Y coordinate of the upper left corner of the rectangle after the offset.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **rect** is a null pointer.\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 Clears a rectangle (by setting the X and Y coordinates of the upper left corner and lower right corner to **0*\n *).\n\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **rect** is a null pointer.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_RectSetEmpty(rect: *mut OH_Drawing_Rect) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Sorts the coordinates of a rectangle based on the actual position.\n\n @param rect Pointer to the {@link OH_Drawing_Rect} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **rect** is a null pointer.\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 the current rectangle to the union of this rectangle and another rectangle.\n\n @param rect Pointer to this {@link OH_Drawing_Rect} object.\n @param other Pointer to another {@link OH_Drawing_Rect} object.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **rect** or **other** is a null pointer.\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 = " Intersection 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 = " Replacement operation."]
pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_REPLACE: OH_Drawing_RegionOpMode = 5;
#[doc = " @brief Enumerates the operation modes available for a region.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_RegionOpMode = u32;
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Region** object for more accurate graphical control.\n\n @return Returns the pointer to the {@link OH_Drawing_Region} object created.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RegionCreate() -> *mut OH_Drawing_Region;
}
extern "C" {
    #[doc = " @brief Creates a copy of a region object.\n\n @param region Pointer to the {@link OH_Drawing_Region} object to be copied.\n @return Returns the pointer to the **OH_Drawing_Region** 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 Checks whether a region contains the specified point.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **region** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param x X coordinate of the point.\n @param y Y coordinate of the point.\n @return Returns **true** if the region contains the specified point; returns **false** 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 based on the specified operation mode.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **region** or **dst** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **op** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param region Pointer to an {@link OH_Drawing_Region} object, in which the resulting region is saved.\n @param other Pointer to the {@link OH_Drawing_Region} object.\n @param op Operation mode of the region. For details about the available options, see {@link OH_Drawing_RegionOpMode}.\n @return Returns **true** if the resulting region is not empty; returns false 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 boundary for an **OH_Drawing_Region** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **region** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @return Returns **true** if the setting is successful; returns **false** otherwise.\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 Sets a region to the area described by the path.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **region**, **path**, or **clip** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param path Pointer to the {@link OH_Drawing_Path} object.\n @param clip Pointer to the {@link OH_Drawing_Region} object.\n @return Returns **true** if the resulting region is not empty; returns false 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 **OH_Drawing_Region** object and reclaims the memory occupied by the object.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_RegionDestroy(region: *mut OH_Drawing_Region);
}
extern "C" {
    #[doc = " @brief Sets the existing region to empty.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the **region** parameter is empty.\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 Sets the path as the boundary of the region. If the region is empty, the path is also empty.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param path Pointer to the {@link OH_Drawing_Path} object. It is used as an output parameter.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **region** or **path** is a null pointer.\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 smallest bounding rectangle that contains the region.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object. It is used as an output parameter.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **region** or **rect** is a null pointer.\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 whether the region contains two or more rectangles.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param isComplex Whether this region contains multiple rectangles. It is used as an output parameter. **true** means\n yes; **false** otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **region** or **isComplex** is a null pointer.\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 whether the region is empty.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param isEmpty Whether the region is empty. It is used as an output parameter. **true** means yes; **false**\n otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **region** or **isEmpty** is a null pointer.\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 whether the region the same as a rectangle.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param isRect Whether the region the same as a rectangle. It is used as an output parameter. **true** means yes; **\n false** otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **region** or **isRect** is a null pointer.\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 whether the region is the same as a single rectangle and contains the specified rectangle.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param left X coordinate of the upper left corner of the specified rectangle.\n @param top Y coordinate of the upper left corner of the specified rectangle.\n @param right X coordinate of the lower right corner of the specified rectangle.\n @param bottom Y coordinate of the lower right corner of the specified rectangle.\n @param isContained Whether the region is the same as a single rectangle and contains the specified rectangle. It is\n used as an output parameter.\n **true** if the current region is the same as a single rectangle and contains the specified rectangle; **false**\n otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **region** or **isContained** is a null pointer.\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 whether the region is empty or does not intersect the specified rectangle.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param left X coordinate of the upper left corner of the specified rectangle.\n @param top Y coordinate of the upper left corner of the specified rectangle.\n @param right X coordinate of the lower right corner of the specified rectangle.\n @param bottom Y coordinate of the lower right corner of the specified rectangle.\n @param isReject Whether the region is empty or whether the specified rectangle does not intersect with the region.\n It is used as an output parameter.\n **true** means yes; **false** otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **region** or **isReject** is a null pointer.\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 a specified distance on the X and Y axes. If the region is empty, no operation is\n performed.\n\n @param region Pointer to the {@link OH_Drawing_Region} object.\n @param dx Distance to be translated on the X axis, in pixels.\n @param dy Distance to be translated on the Y axis, in pixels.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **region** is a null pointer.\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 Registers a custom font with the font manager. The supported font file formats are .ttf and .otf.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Name of the font to register.\n @param familySrc Path to the font file to register.\n @return Result code.\n     <br>Returns 0 if the operation is successful.\n     <br>Returns 1 if the file does not exist.\n     <br>Returns 2 if opening the file fails.\n     <br>Returns 3 if reading the file fails.\n     <br>Returns 4 if seeking the file fails.\n     <br>Returns 5 if obtaining the file size fails.\n     <br>Returns 8 if fontCollection is NULL.\n     <br>Returns 9 if the file is corrupted.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RegisterFont(
        fontCollection: *mut OH_Drawing_FontCollection,
        fontFamily: *const ::std::os::raw::c_char,
        familySrc: *const ::std::os::raw::c_char,
    ) -> u32;
}
extern "C" {
    #[doc = " @brief Registers a font buffer in the font manager, supporting data read from ttf and otf files.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Font name of the font to register.\n @param fontBuffer Buffer of the font file to register.\n @param length Length of the font file to register. Must match the actual length of fontBuffer.\n @return Result code.\n     <br>Returns 0 if the operation is successful.\n     <br>Returns 6 if fontBuffer is NULL.\n     <br>Returns 7 if the buffer size is zero.\n     <br>Returns 8 if fontCollection is NULL.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RegisterFontBuffer(
        fontCollection: *mut OH_Drawing_FontCollection,
        fontFamily: *const ::std::os::raw::c_char,
        fontBuffer: *mut u8,
        length: usize,
    ) -> u32;
}
extern "C" {
    #[doc = " @brief Registers a custom font using a ttc/otc file, with the index parameter specifying the font index to register.\n\n @param fontCollection Pointer to an {@link OH_Drawing_FontCollection} object.\n @param fontFamily Family name of the font to register.\n @param familySrc Path of the font file to register.\n @param index Index of the font in the ttc/otc file. The value ranges from 0 to the total number of fonts minus 1.\n     For non-ttc/otc files, set this parameter to 0.\n @return Result code. 0 indicates function execution is successful, 1 indicates file does not exist, 2 indicates file\n     opening failure, 3 indicates file reading failure, 4 indicates file seeking failure, 5 indicates size obtaining\n     failure, 8 indicates fontCollection is NULL, and 9 indicates file corruption.\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 Registers a font using the font buffer of a TTC/OTC file.\n\n @param fontCollection Pointer to an {@link OH_Drawing_FontCollection} object.\n @param fontFamily Family name of the font to register.\n @param fontBuffer Font buffer of the font file to register.\n @param length Length of the byte stream data, which must match the actual length of fontBuffer.\n @param index Index of the font in the ttc/otc file. The value ranges from 0 to the number of fonts minus 1. For\n     files in non-ttc/otc formats, set this parameter to 0.\n @return Result code.\n     <br>Returns 0 the function is executed successfully.\n     <br>Returns 6 if fontBuffer is NULL.\n     <br>Returns 7 if the buffer size is zero.\n     <br>Returns 8 if fontCollection is NULL.\n     <br>Returns 9 if the file is corrupted.\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 Unregisters a custom font by font name.\n <br>Unregistering a font that is currently in use may lead to text rendering exceptions (such as garbled characters\n or missing glyphs).\n <br>All typesetting objects that use the unregistered font name should be destroyed and recreated.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Pointer to an {@link OH_Drawing_FontCollection} object.\n @param fontFamily Font name to unregister.\n @return Result code. Returns 0 if the function is executed successfully, 8 if the input parameter is invalid, and 1\n     if the unregistration fails.\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 system supports the font format of the specified path.\n\n @param path Absolute path of the font file.\n @return Returns **true** if the font is supported; returns **false** otherwise.\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 system supports the font format specified in the buffer.\n\n @param data Pointer to the buffer that contains the font data.\n @param dataLength Size of the font data, in bytes. Must match the actual length of data.\n @return Returns **true** if the font is supported; returns **false** otherwise.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_IsFontSupportedFromBuffer(data: *mut u8, dataLength: usize) -> bool;
}
#[doc = " Top left corner of the rounded rectangle."]
pub const OH_Drawing_CornerPos_CORNER_POS_TOP_LEFT: OH_Drawing_CornerPos = 0;
#[doc = " Top right corner of the rounded rectangle."]
pub const OH_Drawing_CornerPos_CORNER_POS_TOP_RIGHT: OH_Drawing_CornerPos = 1;
#[doc = " Bottom right corner of the rounded rectangle."]
pub const OH_Drawing_CornerPos_CORNER_POS_BOTTOM_RIGHT: OH_Drawing_CornerPos = 2;
#[doc = " Bottom left corner of the rounded rectangle."]
pub const OH_Drawing_CornerPos_CORNER_POS_BOTTOM_LEFT: OH_Drawing_CornerPos = 3;
#[doc = " @brief Defines an enum for the corner positions of a rounded rectangle.\n\n @since 12\n @version 1.0"]
pub type OH_Drawing_CornerPos = u32;
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_RoundRect** object. This API may return an error code. For details, call\n {@link OH_Drawing_ErrorCodeGet}\n .\n If **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param rect Pointer to an **OH_Drawing_Rect** object.\n @param xRad Radius of the rounded corner on the X axis. A negative number is invalid.\n @param yRad Radius of the rounded corner on the Y axis. A negative number is invalid.\n @return Returns the pointer to the **OH_Drawing_RoundRect** 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 a copy of a rounded rectangle.\n\n @param roundRect Pointer to an {@link OH_Drawing_RoundRect} object.\n @return Returns the pointer to the new **OH_Drawing_RoundRect** 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 radii of the specified rounded corner in this rounded rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **roundRect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param roundRect Pointer to an **OH_Drawing_RoundRect** object.\n @param pos Position of the rounded corner. For details about the available options, see {@link OH_Drawing_CornerPos}.\n @param radii OH_Drawing_Corner_Radii struct, including the radii on the X axis and Y axis. A radius less than or\n equal to 0 is invalid.\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 Obtains the radii of the specified rounded corner in a rounded rectangle.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **roundRect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param roundRect Pointer to an **OH_Drawing_RoundRect** object.\n @param pos Position of the rounded corner. For details about the available options, see {@link OH_Drawing_CornerPos}.\n @return Returns an OH_Drawing_Corner_Radii struct, including the radii on the X axis and Y axis.\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 **OH_Drawing_RoundRect** object and reclaims the memory occupied by the object.\n\n @param roundRect Pointer to an **OH_Drawing_RoundRect** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_RoundRectDestroy(roundRect: *mut OH_Drawing_RoundRect);
}
extern "C" {
    #[doc = " @brief Translates a rounded rectangle by an offset along the X axis and Y axis.\n\n @param roundRect Pointer to an {@link OH_Drawing_Point2D} object.\n @param dx X offset.\n @param dy Y offset.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **roundRect** is NULL.\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 **OH_Drawing_ShadowLayer** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **blurRadius** is less than or equal to 0, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is returned.\n\n @param blurRadius Radius of the shadow layer. The value must be greater than 0.\n @param x Offset on the X axis.\n @param y Offset on the Y axis.\n @param color Color of the shadow.\n @return Returns the pointer to the **OH_Drawing_ShadowLayer** 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 **OH_Drawing_ShadowLayer** object and reclaims the memory occupied by the object.\n\n @param shadowLayer Pointer to the shadow layer.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_ShadowLayerDestroy(shadowLayer: *mut OH_Drawing_ShadowLayer);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Surface** object using the GPU context to manage the content drawn on the canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **gpuContext** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param gpuContext Pointer to an {@link OH_Drawing_GpuContext} object.\n @param flag Whether the memory allocation is counted in the cache budget. **true** means yes; **false** otherwise.\n @param imageInfo Image information struct.\n @return Returns a pointer to the created {@link OH_Drawing_Surface} object.\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 **OH_Drawing_Surface** object bound to the window using the GPU context to manage the content\n drawn on the canvas.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **gpuContext** or **window** is NULL.\n\n @param gpuContext Pointer to an {@link OH_Drawing_GpuContext} object.\n This object must be created by {@link OH_Drawing_GpuContextCreate}. Otherwise, the **OH_Drawing_Surface** object\n fails to be created.\n @param imageInfo Image information struct.\n @param window Pointer to the window object.\n @return Returns a pointer to the created {@link OH_Drawing_Surface} object.\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 Obtains a canvas from an **OH_Drawing_Surface** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **surface** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param surface Pointer to an **OH_Drawing_Surface** object.\n @return Returns a pointer to the created {@link OH_Drawing_Canvas} object. The pointer returned does not need to be\n managed 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 Pushes the drawing content from an **OH_Drawing_Surface** object to the GPU for rendering.\n\n @param surface Pointer to the created  {@link OH_Drawing_Surface}  object. This object must be created by calling\n {@link OH_Drawing_SurfaceCreateOnScreen}\n . Otherwise, calling the current API has no effect.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **surface** is NULL.\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 **OH_Drawing_Surface** object and reclaims the memory occupied.\n\n @param surface Pointer to an **OH_Drawing_Surface** object.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_SurfaceDestroy(surface: *mut OH_Drawing_Surface);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_TextBlobBuilder** object.\n\n @return Returns the pointer to the **OH_Drawing_TextBlobBuilder** object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TextBlobBuilderCreate() -> *mut OH_Drawing_TextBlobBuilder;
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_TextBlob** object from the text.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **text** or **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **textEncoding** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param text Pointer to the text.\n @param byteLength Length of the text, in bytes.\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param textEncoding Text encoding type {@link OH_Drawing_TextEncoding}.\n @return Returns a pointer to the created {@link OH_Drawing_TextBlob} object.\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 **OH_Drawing_TextBlob** object from the text. The coordinates of each character in the **\n OH_Drawing_TextBlob** object are determined by the coordinate information in the **OH_Drawing_Point2D** array.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If any of **text**, **point2D**, and **font** is NULL or **byteLength** is **0**, **\n OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **textEncoding** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param text Pointer to the text.\n @param byteLength Length of the text, in bytes.\n @param point2D Pointer to the start address of the  {@link OH_Drawing_Point2D}\n  array. The number of entries in the array is determined by  {@link OH_Drawing_FontCountText}\n .\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param textEncoding Text encoding type {@link OH_Drawing_TextEncoding}.\n @return Returns a pointer to the created {@link OH_Drawing_TextBlob} object.\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 **OH_Drawing_TextBlob** object from a string.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **str** or **font** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n If **textEncoding** is not set to one of the enumerated values, **OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE** is\n returned.\n\n @param str Pointer to a string.\n @param font Pointer to the {@link OH_Drawing_Font} object.\n @param textEncoding Text encoding type {@link OH_Drawing_TextEncoding}.\n @return Returns a pointer to the created {@link OH_Drawing_TextBlob} object.\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 Obtains the bounds of an **OH_Drawing_TextBlob** object.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **textBlob** or **rect** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param textBlob Pointer to the {@link OH_Drawing_TextBlob} object.\n @param rect Pointer to the {@link OH_Drawing_Rect} object. You can call {@link OH_Drawing_Rect} to create a\n rectangle 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 Obtains the unique identifier of a text blob. The identifier is a non-zero value.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **textBlob** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param textBlob Pointer to the {@link OH_Drawing_TextBlob} object.\n @return Returns the unique identifier of the text blob.\n @since 12\n @version 1.0"]
    pub fn OH_Drawing_TextBlobUniqueID(textBlob: *const OH_Drawing_TextBlob) -> u32;
}
#[doc = " @brief This struct describes a run, which provides 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 the run."]
    pub glyphs: *mut u16,
    #[doc = " Storage for glyph positions in the run."]
    pub pos: *mut f32,
    #[doc = " Storage for UTF-8 encoded text units in the run."]
    pub utf8text: *mut ::std::os::raw::c_char,
    #[doc = " Storage for glyph clusters (index of the UTF-8 encoded text unit) in the run."]
    pub clusters: *mut u32,
}
extern "C" {
    #[doc = " @brief Allocates a run to store glyphs and positions. The pointer returned does not need to be managed by the caller.\n It can no longer be used after {@link OH_Drawing_TextBlobBuilderMake} is called.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If either **textBlobBuilder** or **font** is NULL or **count** is less than or equal to 0, **\n OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param textBlobBuilder Pointer to an **OH_Drawing_TextBlobBuilder** object.\n @param font Pointer to an **OH_Drawing_Font** object.\n @param count Number of text blobs.\n @param rect Rectangle of the text blob. The value NULL means that no rectangle is set.\n @return Returns the pointer to the **OH_Drawing_RunBuffer** object created.\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 Makes an **OH_Drawing_TextBlob** object from an **OH_Drawing_TextBlobBuilder**.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **textBlobBuilder** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param textBlobBuilder Pointer to an **OH_Drawing_TextBlobBuilder** object.\n @return Returns the pointer to the **OH_Drawing_TextBlob** object created.\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 **OH_Drawing_TextBlob** object and reclaims the memory occupied by the object.\n\n @param textBlob Pointer to an **OH_Drawing_TextBlob** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TextBlobDestroy(textBlob: *mut OH_Drawing_TextBlob);
}
extern "C" {
    #[doc = " @brief Destroys an **OH_Drawing_TextBlobBuilder** object and reclaims the memory occupied by the object.\n\n @param textBlobBuilder Pointer to an **OH_Drawing_TextBlobBuilder** 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 font type."]
#[cfg(feature = "api-14")]
pub const OH_Drawing_SystemFontType_GENERIC: OH_Drawing_SystemFontType = 2;
#[doc = " Style font type."]
#[cfg(feature = "api-14")]
pub const OH_Drawing_SystemFontType_STYLISH: OH_Drawing_SystemFontType = 4;
#[doc = " User-installed font type."]
#[cfg(feature = "api-14")]
pub const OH_Drawing_SystemFontType_INSTALLED: OH_Drawing_SystemFontType = 8;
#[doc = " Custom font type.\n @since 18"]
#[cfg(feature = "api-18")]
pub const OH_Drawing_SystemFontType_CUSTOMIZED: OH_Drawing_SystemFontType = 16;
#[doc = " @brief Defines an enum for the system font types.\n\n @since 14"]
#[cfg(feature = "api-14")]
pub type OH_Drawing_SystemFontType = u32;
#[doc = " Font file path, of the {@link OH_Drawing_String} type."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_PATH:
    OH_Drawing_FontFullDescriptorAttributeId = 0;
#[doc = " Postscript font name, of the {@link OH_Drawing_String} type."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_POSTSCRIPT_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 1;
#[doc = " Font name, of the {@link OH_Drawing_String} type."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_FULL_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 2;
#[doc = " Font family name, of the {@link OH_Drawing_String} type."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_FAMILY_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 3;
#[doc = " Font subfamily name, of the {@link OH_Drawing_String} type."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_SUB_FAMILY_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 4;
#[doc = " Font weight, of the int type."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_WEIGHT:
    OH_Drawing_FontFullDescriptorAttributeId = 5;
#[doc = " Font width style, of the int type."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_WIDTH:
    OH_Drawing_FontFullDescriptorAttributeId = 6;
#[doc = " Whether the font is italic, of the int type. **1** means that the font is italic; **0** otherwise."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_ITALIC:
    OH_Drawing_FontFullDescriptorAttributeId = 7;
#[doc = " Whether the font is monospaced. The value is of the bool type. The value true means the font is monospaced, and\n false means the opposite."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_B_MONO:
    OH_Drawing_FontFullDescriptorAttributeId = 8;
#[doc = " Whether the font supports the symbol font, of the bool type. **true** means yes; **false** otherwise."]
#[cfg(feature = "api-22")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_B_SYMBOLIC:
    OH_Drawing_FontFullDescriptorAttributeId = 9;
#[doc = " Extracts the postscript name of the font based on the system language configuration.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_POSTSCRIPT_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 10;
#[doc = " Extracts the full name of the font based on the system language configuration.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_FULL_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 11;
#[doc = " Extracts the font family name based on the system language configuration.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_FAMILY_NAME:
    OH_Drawing_FontFullDescriptorAttributeId = 12;
#[doc = " Extracts the font subfamily name based on the system language configuration.\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 = " Font version.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_VERSION:
    OH_Drawing_FontFullDescriptorAttributeId = 14;
#[doc = " Font manufacturer information.\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 = " Font trademark information.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_TRADEMARK:
    OH_Drawing_FontFullDescriptorAttributeId = 17;
#[doc = " Font license information.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LICENSE:
    OH_Drawing_FontFullDescriptorAttributeId = 18;
#[doc = " Font variable axis array.\n @since 24"]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_O_VARIATION_AXIS:
    OH_Drawing_FontFullDescriptorAttributeId = 19;
#[doc = " Font variable instance array.\n @since 24"]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_O_VARIATION_INSTANCE:
    OH_Drawing_FontFullDescriptorAttributeId = 20;
#[doc = " Font index.\n @since 23"]
#[cfg(feature = "api-23")]
pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_INDEX:
    OH_Drawing_FontFullDescriptorAttributeId = 21;
#[doc = " @brief Enumerates font descriptor attributes. You can use the corresponding APIs to obtain the attributes of\n different font descriptor types. For example, if **FULL_DESCRIPTOR_ATTR_I_WEIGHT** is of the int type, use the\n {@link OH_Drawing_GetFontFullDescriptorAttributeInt} API to obtain its attribute value.\n\n @since 22"]
#[cfg(feature = "api-22")]
pub type OH_Drawing_FontFullDescriptorAttributeId = u32;
#[doc = " Keyword identifier of the font variable axis."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_S_KEY:
    OH_Drawing_FontVariationAxisAttributeId = 0;
#[doc = " Minimum value of the font variable axis."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_D_MIN_VALUE:
    OH_Drawing_FontVariationAxisAttributeId = 1;
#[doc = " Maximum value of the font variable axis."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_D_MAX_VALUE:
    OH_Drawing_FontVariationAxisAttributeId = 2;
#[doc = " Default value of the font variable axis."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_D_DEFAULT_VALUE:
    OH_Drawing_FontVariationAxisAttributeId = 3;
#[doc = " Flag of the font variable axis. The value **0** indicates that the axis is visible to users, and the value **1**\n indicates that the axis should be hidden."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_I_FLAGS:
    OH_Drawing_FontVariationAxisAttributeId = 4;
#[doc = " English name of the font variable axis."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_S_NAME:
    OH_Drawing_FontVariationAxisAttributeId = 5;
#[doc = " Localized name of the font variable axis."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_S_LOCAL_NAME:
    OH_Drawing_FontVariationAxisAttributeId = 6;
#[doc = " @brief Enumerates font variable axis attributes.\n\n @since 24"]
#[cfg(feature = "api-24")]
pub type OH_Drawing_FontVariationAxisAttributeId = u32;
#[doc = " English name of the font variable instance."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationInstanceAttributeId_FONT_VARIATION_INSTANCE_ATTR_S_NAME:
    OH_Drawing_FontVariationInstanceAttributeId = 0;
#[doc = " Localized name of the font variable instance."]
#[cfg(feature = "api-24")]
pub const OH_Drawing_FontVariationInstanceAttributeId_FONT_VARIATION_INSTANCE_ATTR_S_LOCAL_NAME:
    OH_Drawing_FontVariationInstanceAttributeId = 1;
#[doc = " @brief Enumerates font variable instance attributes.\n\n @since 24"]
#[cfg(feature = "api-24")]
pub type OH_Drawing_FontVariationInstanceAttributeId = u32;
#[doc = " @brief Variable font attribute key-value pair.\n\n @since 24"]
#[cfg(feature = "api-24")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_Drawing_FontVariationInstanceCoordinate {
    #[doc = " String identified by the keyword in the variable font attribute key-value pair."]
    pub axisKey: *mut ::std::os::raw::c_char,
    #[doc = " Value of the variable font attribute key-value pair."]
    pub value: f64,
}
extern "C" {
    #[doc = " @brief Obtains all system font descriptors that match a font descriptor. In the {@link OH_Drawing_FontDescriptor}\n struct, the **path** field is not used for matching, and other fields are valid only when they are not set to their\n default values.\n <br>If all fields in **desc** are set to their default values, all system font descriptors are returned.\n <br>If no matching is found, NULL is returned. Call {@link OH_Drawing_DestroyFontDescriptors} to release this\n pointer when the object is no longer needed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param desc Pointer to the {@link OH_Drawing_FontDescriptor} object.\n     <br>It is recommended to use {@link OH_Drawing_CreateFontDescriptor} to obtain a valid\n     {@link OH_Drawing_FontDescriptor} instance.\n     <br>If you create a {@link OH_Drawing_FontDescriptor} instance yourself, ensure that the fields not used for\n     matching are set to default values.\n @param num Output parameter. Used to receive the number of members in the returned array.\n @return An array of {@link OH_Drawing_FontDescriptor} objects. Use {@link OH_Drawing_DestroyFontDescriptors} to\n     release the array.\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 an array of {@link OH_Drawing_FontDescriptor} objects.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param descriptors Pointer to the array of {@link OH_Drawing_FontDescriptor} objects to be released.\n @param num Number of members in an array of {@link OH_Drawing_FontDescriptor} objects.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyFontDescriptors(
        descriptors: *mut OH_Drawing_FontDescriptor,
        num: usize,
    );
}
extern "C" {
    #[doc = " @brief Obtains the specified font descriptor based on the font name and font type. This API supports system fonts,\n style fonts, and user-installed fonts. If the acquisition fails, NULL is returned.\n <br>A font descriptor is a data structure that describes font characteristics. It contains detailed information that\n defines the appearance and properties of a font.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullName Pointer to the font name, which is {@link OH_Drawing_String}.\n @param fontType Enum for the system font types, which is {@link OH_Drawing_SystemFontType}.\n @return Pointer to an {@link OH_Drawing_FontDescriptor} object. Call {@link OH_Drawing_DestroyFontDescriptor} to\n     release this pointer when the object is no longer needed.\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 Obtains an array of font names by font type.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontType Enum for the system font types, which is {@link OH_Drawing_SystemFontType}.\n @return Returns the pointer to the {@link OH_Drawing_Array} object of the corresponding font type. Call\n     {@link OH_Drawing_DestroySystemFontFullNames} to release this pointer when the object is no longer needed.\n @since 14"]
    #[cfg(feature = "api-14")]
    pub fn OH_Drawing_GetSystemFontFullNamesByType(
        fontType: OH_Drawing_SystemFontType,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Obtains the font name at the corresponding position in the font name array by index. If the index is out of\n range or the array is invalid, NULL is returned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullNameArray Pointer to an {@link OH_Drawing_Array} object.\n @param index Index of the font in the array.\n @return Returns the pointer to the font name, which is an {@link OH_Drawing_String} object.\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 the font name array obtained by font type.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullNameArray Pointer to an {@link OH_Drawing_Array} object.\n @since 14"]
    #[cfg(feature = "api-14")]
    pub fn OH_Drawing_DestroySystemFontFullNames(fullNameArray: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Obtains the font descriptor array based on the original 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 the pointer to the {@link OH_Drawing_Array} array of the font descriptor corresponding to the font\n     file. Call {@link OH_Drawing_DestroyFontFullDescriptors} to release the pointer when the **OH_Drawing_Array**\n     object is no longer needed.\n     <br>Returns NULL if the operation fails due to an invalid data format or parsing error.\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 descriptors based on the font file path.\n\n @param path Path of the font file to be queried.\n @return Returns the pointer to the {@link OH_Drawing_Array} array of the font descriptor corresponding to the font\n     file. Call {@link OH_Drawing_DestroyFontFullDescriptors} to release the pointer when the **OH_Drawing_Array**\n     object is no longer needed.\n     <br>Returns NULL if the font file is not found, the font file path is invalid, the font file does not have the\n     required permission, or the file is not in the font format.\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 Obtains the font descriptor from the font descriptor array based on the index.\n\n @param descriptorArray Pointer to the font descriptor array {@link OH_Drawing_Array}.\n @param index Index of the array, starting from 0.\n @return Returns the pointer to the font descriptor object {@link OH_Drawing_FontFullDescriptor} at the specified\n     index.\n     <br>Returns NULL if the index is out of range 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 the font descriptor array.\n\n @param descriptorArray Pointer to the font descriptor array {@link OH_Drawing_Array}.\n @since 22"]
    #[cfg(feature = "api-22")]
    pub fn OH_Drawing_DestroyFontFullDescriptors(descriptorArray: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the font descriptor pointer. This function can be used to release the font\n descriptor pointer obtained by the {@link OH_Drawing_GetFontFullDescriptorByFullName} API.\n\n @param descriptor Pointer to the font descriptor object {@link OH_Drawing_FontFullDescriptor}.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_DestroyFontFullDescriptor(descriptor: *const OH_Drawing_FontFullDescriptor);
}
extern "C" {
    #[doc = " @brief Obtains the Unicode code array from a font file.\n\n @param fontSrc Font file path.\n @param index Index of the font in the ttc/otc file. The value ranges from 0 to Font Count minus 1. Set this\n     parameter to 0 for non-ttc/otc files.\n @param unicodeArray Output parameter, which is used to receive the Unicode array. Use **free()** to release the\n     Unicode array when the array is no longer needed.\n @param arrayLength Output parameter, which is used to receive the length of the Unicode array.\n @return Result code.\n     <br>Returns OH_DRAWING_SUCCESS if the operation is successful.\n     <br>Returns OH_DRAWING_ERROR_INCORRECT_PARAMETER if the font path is invalid, a non-font file is passed in, or\n     the unicodeArray or arrayLength parameter is NULL.\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 Obtains the Unicode code array from a font byte stream buffer.\n\n @param fontBuffer Font file data.\n @param length Length of the font file data.\n @param index Index of the font in the ttc/otc file. The value ranges from 0 to Font Count - 1. For non-ttc/otc files,\n     set this parameter to 0.\n @param unicodeArray Output parameter, which is used to receive the Unicode array. Use **free()** to release the\n     Unicode array when the array is no longer needed.\n @param arrayLength Output parameter, which is used to receive the length of the Unicode array.\n @return Result code.\n     <br>Returns OH_DRAWING_SUCCESS if the operation is successful.\n     <br>Returns OH_DRAWING_ERROR_INCORRECT_PARAMETER if the cached data is invalid, the cached data is not font file\n     data, or the parameters unicodeArray and arrayLength are NULL.\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 Obtains the attributes of a font descriptor of the int type.\n\n @param descriptor Pointer to the font descriptor object {@link OH_Drawing_FontFullDescriptor}.\n @param id Font descriptor attribute ID. You can obtain the font descriptor attribute from\n     {@link OH_Drawing_FontFullDescriptorAttributeId}.\n @param value Pointer to the attribute of the **int** type. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the descriptor or value parameter is null.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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 Obtains the font descriptor attribute of the bool type.\n\n @param descriptor Pointer to the font descriptor object {@link OH_Drawing_FontFullDescriptor}.\n @param id Font descriptor attribute ID. You can obtain the font descriptor attribute from\n     {@link OH_Drawing_FontFullDescriptorAttributeId}.\n @param value Pointer to the bool attribute It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the descriptor or value parameter is null.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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 Obtains the attributes of the {@link OH_Drawing_String} font 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 descriptor object {@link OH_Drawing_FontFullDescriptor}.\n @param id Font descriptor attribute ID. You can obtain the font descriptor attribute from\n     {@link OH_Drawing_FontFullDescriptorAttributeId}.\n @param str Pointer to the **OH_Drawing_String** attribute. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **descriptor** or **str** is a null pointer.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\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 Obtains the object array attributes of the font descriptor.\n\n @param descriptor Pointer to the font descriptor object {@link OH_Drawing_FontFullDescriptor}.\n @param id Font descriptor attribute ID. You can obtain the font descriptor attribute from\n     {@link OH_Drawing_FontFullDescriptorAttributeId}.\n @return Array of objects returned, or NULL if the retrieval fails. When id is FULL_DESCRIPTOR_ATTR_O_VARIATION_AXIS,\n     use the {@link OH_Drawing_DestroyFontVariationAxis} API to release it when it is no longer needed. When id is\n     FULL_DESCRIPTOR_ATTR_O_VARIATION_INSTANCE, use the {@link OH_Drawing_DestroyFontVariationInstance} API to\n     release it when it is no longer needed.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontFullDescriptorAttributeArray(
        descriptor: *const OH_Drawing_FontFullDescriptor,
        id: OH_Drawing_FontFullDescriptorAttributeId,
    ) -> *mut OH_Drawing_Array;
}
extern "C" {
    #[doc = " @brief Obtains the corresponding font variable axis from the font variable axis array by index.\n\n @param array Pointer to the font variation axis array {@link OH_Drawing_Array}, obtained through\n     {@link OH_Drawing_GetFontFullDescriptorAttributeArray}.\n @param index Index of the array, starting from 0.\n @return Returns the pointer to the font variable axis object {@link OH_Drawing_FontVariationAxis} at the specified\n     index.\n     <br>Returns NULL if the index is out of range or the array is invalid.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontVariationAxisByIndex(
        array: *mut OH_Drawing_Array,
        index: usize,
    ) -> *mut OH_Drawing_FontVariationAxis;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the font variable axis array.\n\n @param fontVariaAxisArray Pointer to the font variable axis array object {@link OH_Drawing_Array}.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_DestroyFontVariationAxis(fontVariaAxisArray: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Obtains the font variable axis attributes of the double type.\n\n @param variationAxis Pointer to the font variable axis object {@link OH_Drawing_FontVariationAxis}.\n @param id Font variable axis attribute ID. You can obtain the font variable axis attribute from\n     {@link OH_Drawing_FontVariationAxisAttributeId}.\n @param value Pointer to the attributes of the double type. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the parameter **variationAxis** or **value** is a null pointer.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontVariationAxisAttributeDouble(
        variationAxis: *mut OH_Drawing_FontVariationAxis,
        id: OH_Drawing_FontVariationAxisAttributeId,
        value: *mut f64,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the font variable axis attributes of the int type.\n\n @param variationAxis Pointer to the font variable axis object {@link OH_Drawing_FontVariationAxis}.\n @param id Font variable axis attribute ID. You can obtain the font variable axis attribute from\n     {@link OH_Drawing_FontVariationAxisAttributeId}.\n @param value Pointer to the attribute of the **int** type. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the parameter **variationAxis** or **value** is a null pointer.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontVariationAxisAttributeInt(
        variationAxis: *mut OH_Drawing_FontVariationAxis,
        id: OH_Drawing_FontVariationAxisAttributeId,
        value: *mut ::std::os::raw::c_int,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the font variable axis attributes of the {@link OH_Drawing_String} type.\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 variationAxis Pointer to the font variable axis object {@link OH_Drawing_FontVariationAxis}.\n @param id Font variable axis attribute ID. You can obtain the font variable axis attribute from\n     {@link OH_Drawing_FontVariationAxisAttributeId}.\n @param str Pointer to the **OH_Drawing_String** attribute. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the parameter **variationAxis** or **str** is a null pointer.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontVariationAxisAttributeStr(
        variationAxis: *mut OH_Drawing_FontVariationAxis,
        id: OH_Drawing_FontVariationAxisAttributeId,
        str_: *mut OH_Drawing_String,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the corresponding font variable instance from the font variable instance array by index.\n\n @param array Pointer to the font variation instance array {@link OH_Drawing_Array}. Obtained through\n     {@link OH_Drawing_GetFontFullDescriptorAttributeArray}.\n @param index Index of the array, starting from 0.\n @return Returns the pointer to the font variable instance object {@link OH_Drawing_FontVariationInstance} at the\n     specified index.\n     <br>Returns NULL if the index is out of range or the array is invalid.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontVariationInstanceByIndex(
        array: *mut OH_Drawing_Array,
        index: usize,
    ) -> *mut OH_Drawing_FontVariationInstance;
}
extern "C" {
    #[doc = " @brief Releases the memory occupied by the font variable instance array.\n\n @param fontVariaAxisInstance Pointer to the font variable instance array object {@link OH_Drawing_Array}.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_DestroyFontVariationInstance(fontVariaAxisInstance: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Obtains the font variable instance attributes of the {@link OH_Drawing_String} type.\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 variationInstance Pointer to the font variable instance object {@link OH_Drawing_FontVariationInstance}.\n @param id Font variable instance attribute ID. You can obtain the font variable instance attribute from\n     {@link OH_Drawing_FontVariationInstanceAttributeId}.\n @param str Pointer to the **OH_Drawing_String** attribute. It is used as an output parameter.\n @return Returns the execution result.\n     <br>**OH_DRAWING_SUCCESS** if the operation is successful.\n     <br>**OH_DRAWING_ERROR_INCORRECT_PARAMETER** if the parameter **variationInstance** or **str** is a null pointer.\n     <br>**OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH** if the input attribute ID does not match the called function.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontVariationInstanceAttributeStr(
        variationInstance: *mut OH_Drawing_FontVariationInstance,
        id: OH_Drawing_FontVariationInstanceAttributeId,
        str_: *mut OH_Drawing_String,
    ) -> OH_Drawing_ErrorCode;
}
extern "C" {
    #[doc = " @brief Obtains the variable font attribute object of the font variable instance.\n\n @param variationInstance Pointer to the font variable instance.\n @param arrayLength Pointer to the list length of OH_Drawing_FontVariationInstanceCoordinate.\n @return Pointer to the font variation instance coordinate list. NULL if variationInstance is invalid.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontVariationInstanceCoordinate(
        variationInstance: *mut OH_Drawing_FontVariationInstance,
        arrayLength: *mut usize,
    ) -> *mut OH_Drawing_FontVariationInstanceCoordinate;
}
extern "C" {
    #[doc = " @brief Obtains the complete font descriptor object based on the font name and type.\n\n @param fullName Pointer to the font name object {@link OH_Drawing_String}.\n @param fontType Enum for the system font type object, which is {@link OH_Drawing_SystemFontType}.\n @return Returns the pointer to the complete font descriptor object {@link OH_Drawing_FontFullDescriptor}. If\n     OH_Drawing_FontFullDescriptor is not required, use the {@link OH_Drawing_DestroyFontFullDescriptor} API to\n     release the pointer of the object.\n @since 24"]
    #[cfg(feature = "api-24")]
    pub fn OH_Drawing_GetFontFullDescriptorByFullName(
        fullName: *const OH_Drawing_String,
        fontType: OH_Drawing_SystemFontType,
    ) -> *const OH_Drawing_FontFullDescriptor;
}
extern "C" {
    #[doc = " @brief Obtains the number of fonts contained in a font file.\n\n @param fontSrc Font file path.\n @return Number of fonts.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetFontCountFromFile(fontSrc: *const ::std::os::raw::c_char) -> u32;
}
extern "C" {
    #[doc = " @brief Obtains the number of fonts contained in a font buffer.\n\n @param fontBuffer Font buffer data.\n @param length Length of the font data.\n @return Number of fonts.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetFontCountFromBuffer(fontBuffer: *mut u8, length: usize) -> u32;
}
extern "C" {
    #[doc = " @brief Obtains all font file paths of the specified font type.\n\n @param fontType Enum for the system font types, which is {@link OH_Drawing_SystemFontType}.\n @param pathCount Output parameter, used to receive the number of font paths returned.\n @return List of font paths returned. When no longer needed, use free to release the pointer to this object and the\n     pointer held internally by each OH_Drawing_String object.\n @since 23"]
    #[cfg(feature = "api-23")]
    pub fn OH_Drawing_GetFontPathsByType(
        fontType: OH_Drawing_SystemFontType,
        pathCount: *mut usize,
    ) -> *mut OH_Drawing_String;
}
#[doc = " Follows the high contrast mode for text rendering in the system settings."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextHighContrast_TEXT_FOLLOW_SYSTEM_HIGH_CONTRAST:
    OH_Drawing_TextHighContrast = 0;
#[doc = " Disables the app's text rendering high contrast configuration. The priority of this mode is higher than the high\n contrast text configuration in system settings."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextHighContrast_TEXT_APP_DISABLE_HIGH_CONTRAST: OH_Drawing_TextHighContrast =
    1;
#[doc = " Enables the app's text rendering high contrast configuration. The priority of this mode is higher than the high\n contrast text configuration in system settings."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextHighContrast_TEXT_APP_ENABLE_HIGH_CONTRAST: OH_Drawing_TextHighContrast =
    2;
#[doc = " @brief Defines an enum of the high contrast modes for text rendering.\n\n @since 20\n @version 1.0"]
#[cfg(feature = "api-20")]
pub type OH_Drawing_TextHighContrast = u32;
#[doc = " Uses the default glyph (which may be a blank box, space, or custom symbol) defined in the font file."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextUndefinedGlyphDisplay_TEXT_NO_GLYPH_USE_DEFAULT:
    OH_Drawing_TextUndefinedGlyphDisplay = 0;
#[doc = " Always uses tofu blocks to represent absent glyphs."]
#[cfg(feature = "api-20")]
pub const OH_Drawing_TextUndefinedGlyphDisplay_TEXT_NO_GLYPH_USE_TOFU:
    OH_Drawing_TextUndefinedGlyphDisplay = 1;
#[doc = " @brief Defines an enum of the modes for displaying undefined 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 the high contrast mode for text rendering.\n <br>The setting of this API takes effect for the entire process, and all pages in the process share the same mode.\n <br>The text rendering high contrast mode can be set by calling this API, or enabled/disabled through the high\n contrast text configuration switch in the system settings screen. The text rendering high contrast mode set by this\n API takes precedence over the system settings.\n <br>This API does not take effect for the text drawing scenario.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param action High contrast mode for text rendering. The value is an enumerated value of the\n     {@link OH_Drawing_TextHighContrast} type.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTextHighContrast(action: OH_Drawing_TextHighContrast);
}
extern "C" {
    #[doc = " @brief Sets the presentation mode of undefined glyphs. After this API is called, it affects all subsequently\n rendered text in the current process.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param undefinedGlyphDisplay Mode of displaying undefined glyphs. The value is an enumerated value of the\n     {@link OH_Drawing_TextUndefinedGlyphDisplay} type.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_SetTextUndefinedGlyphDisplay(
        undefinedGlyphDisplay: OH_Drawing_TextUndefinedGlyphDisplay,
    );
}
extern "C" {
    #[doc = " @brief Obtains the array of text lines in a typography object. This array contains one or more text line objects.\n Release this pointer by calling {@link OH_Drawing_DestroyTextLines} when this object is no longer needed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to the {@link OH_Drawing_Typography} object.\n @return Pointer to the text line array {@link OH_Drawing_Array}. <br>Returns NULL when typography is NULL.\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 a text line array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lines Pointer to the {@link OH_Drawing_Array} object.\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 of a single text line object. Only the memory of a text line object that is independently\n allocated can be released. The memory of a text line object obtained from a line array through\n {@link OH_Drawing_GetTextLineByIndex} cannot be released.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\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 Obtains the text line object with the specified index in a text line array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lines Pointer to the {@link OH_Drawing_Array} object.\n @param index Index of the text line array.\n @return Pointer to the {@link OH_Drawing_TextLine} text line object at the specified index. <br>Returns NULL if\n     lines is NULL or the index is out of bounds.\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 Obtains the number of glyphs in a text line object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @return Returns the number of glyphs in the text line object.\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 Obtains the range of the text in a text line object in the entire paragraph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @param start Pointer to the start of the range.\n @param end Pointer to the end of the range.\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 Obtains the array of text rendering units {@link OH_Drawing_Run} in the text line object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @return Pointer to the {@link OH_Drawing_Array} array of text rendering units {@link OH_Drawing_Run}. When the\n     {@link OH_Drawing_Array} is no longer needed, please use the {@link OH_Drawing_DestroyRuns} API to release the\n     pointer of the object.\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 a glyph run array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param runs Pointer to the {@link OH_Drawing_Array} array, which holds multiple {@link OH_Drawing_Run} objects.\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 Obtains the glyph run object with the specified index in a glyph run array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param runs Pointer to the {@link OH_Drawing_Array} array, which holds multiple {@link OH_Drawing_Run} objects.\n @param index Index of the glyph run array.\n @return Pointer to the text rendering unit object {@link OH_Drawing_Run} at the specified index. <br>NULL is\n     returned if runs is NULL or the index is out of bounds.\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 Paints a text line on the canvas with the coordinate point (x, y) as the upper left corner.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @param canvas Pointer to the target canvas for drawing, which is an {@link OH_Drawing_Canvas}.\n @param x Horizontal coordinate of the upper left corner, in px.\n @param y Vertical coordinate of the upper left corner, in px.\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. Truncates the original text line based on the specified width,\n truncation type, and truncation mark string, inserts the specified mark string at the truncation position, and\n generates and returns a new independent text line object. The original text is not affected.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @param width Width of the truncated line, in physical pixels (px).\n @param mode Truncation type. The value is an enumerated value of {@link OH_Drawing_EllipsisModal}. Currently, only **\n     ELLIPSIS_MODAL_HEAD** and **ELLIPSIS_MODAL_TAIL** are supported.\n @param ellipsis Pointer to the string used to mark a truncation.\n @return Pointer to the truncated text line object {@link OH_Drawing_TextLine}. <br>NULL is returned when line or\n     ellipsis is NULL. <br>Please use {@link OH_Drawing_DestroyTextLine} to release the object's memory when it is no\n     longer needed.\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 Obtains the typographic bounds of the text line object. The typographic bounds of a text line are related to\n the typographic font and typographic font size, and are independent of the characters themselves.\n <br>For example, for the string \" a b \", where there is one space before the 'a' character and one space after the '\n b' character, the typographic bounds include the bounds of the leading and trailing spaces. For example, for the\n string \"j\" or \"E\", the typographic bounds are the same, i.e., independent of the characters themselves.\n <br>The text height can be calculated using height = ascent + descent + leading.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the text line object {@link OH_Drawing_TextLine}.\n @param ascent Pointer to the ascent height of the text line object. The unit is physical pixel.\n @param descent Pointer to the descent height of the text line object. The unit is physical pixel.\n @param leading Pointer to the leading of the text line object. The unit is physical pixel.\n @return Total width of the typographic bounds, in physical pixels.\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 Obtains the image bounds of the text line object. The image bounds of a text line are related to the\n typographic font, typographic font size, and the characters themselves, and are equivalent to the visual bounds.\n <br>For example, for the string \" a b \", where there is one space before the 'a' character and one space after the '\n b' character, the user can only see \"a b\" on the UI, and the image bounds are the bounds excluding the leading and\n trailing spaces.\n <br>For example, for the string \"j\" or \"E\", the visual bounds are different, i.e., related to the characters\n themselves. The visual bounds width of the string \"j\" is smaller than that of the string \"E\", and the visual bounds\n height of the string \"j\" is greater than that of the string \"E\".\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @return Pointer to the image bounds {@link OH_Drawing_Rect} of the text line object. <br>Returns NULL when the\n     passed-in line is NULL. <br>When the {@link OH_Drawing_Rect} is no longer needed, please use the\n     {@link OH_Drawing_RectDestroy} API to release the pointer of the object.\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 Obtains the width of the spaces at the end of a text line object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @return Width of the trailing whitespace characters of the text line object, in physical pixels (px).\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 Obtains the string index at the specified position in the text line object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @param point Pointer to the position {@link OH_Drawing_Point} where the index is to be found.\n @return Returns the index of the character. For example, for the string \"abc\", the index of \"a\" is 0, the index of \"\n     b\" is 1, and the index of \"c\" is 2. If the specified position is at \"a\", then **0** is returned.\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 Obtains the offset of a character with the specified index in a text line object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @param index Index of the character.\n @return Offset at the specified string index, in physical pixels (px).\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineGetOffsetForStringIndex(
        line: *mut OH_Drawing_TextLine,
        index: i32,
    ) -> f64;
}
#[doc = " @brief Defines a custom callback used to receive the offset and index of each character in a text line object\n as its parameters.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param offset Offset of each character in the text line object.\n @param index Index of each character in the text line object.\n @param leadingEdge Whether the cursor is located at the leading edge of a character. **true** means that the\n     cursor is located at the front of the character, that is, the offset does not contain the character width.\n     **false** means that the cursor is located at the rear of the character, that is, the offset contains the\n     character width.\n @return Whether to stop calling the callback. **true** means to stop; **false** otherwise.\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 Enumerates the offset and index of each character in a text line object and passes them to a custom callback\n function. You can use the offset and index array for other operations.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @param callback User-defined function {@link Drawing_CaretOffsetsCallback}.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_TextLineEnumerateCaretOffsets(
        line: *mut OH_Drawing_TextLine,
        callback: Drawing_CaretOffsetsCallback,
    );
}
extern "C" {
    #[doc = " @brief Obtains the offset of a text line object after alignment based on the alignment factor and alignment width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Pointer to the {@link OH_Drawing_TextLine} object.\n @param alignmentFactor Alignment factor. A value less than or equal to 0.0 indicates left alignment, greater than 0.\n     0 and less than 0.5 indicates left-biased alignment, 0.5 indicates center alignment, greater than 0.5 and less\n     than 1.0 indicates right-biased alignment, and greater than or equal to 1.0 indicates right alignment.\n @param alignmentWidth Alignment width, i.e., the offset of the bottom-right corner of the text line object relative\n     to the starting position after final offset, in physical pixels (px). If the specified alignment width is less\n     than the actual width of the text line object, 0 is returned.\n @return Calculated offset required for alignment. The unit is physical pixel (px).\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 a pointer to a typography line object {@link OH_Drawing_LineTypography}. The typography line object\n serves as a container for storing text content and styles, and can be used to calculate single-line typography\n information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Pointer to the {@link OH_Drawing_TypographyCreate} object, which is obtained from\n     {@link OH_Drawing_CreateTypographyHandler}.\n @return Returns the pointer to the {@link OH_Drawing_LineTypography} 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 {@link OH_Drawing_LineTypography} object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Pointer to the {@link OH_Drawing_LineTypography} object, which is obtained from\n     {@link OH_Drawing_CreateLineTypography}.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyLineTypography(lineTypography: *mut OH_Drawing_LineTypography);
}
extern "C" {
    #[doc = " @brief Obtains the number of characters that can fit in the layout from the specified position within a limited\n layout width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Pointer to the {@link OH_Drawing_LineTypography} object, which is obtained from\n     {@link OH_Drawing_CreateLineTypography}.\n @param startIndex Start position (inclusive) for calculating the typography. The value is an integer in the range [0,\n     total count of text characters).\n @param width Layout width. The value is a floating point number greater than 0, in px.\n @return Returns the number of characters.\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 pointer to an {@link OH_Drawing_TextLine} object based on the text content in a specified range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Pointer to the {@link OH_Drawing_LineTypography} object, which is obtained from\n     {@link OH_Drawing_CreateLineTypography}.\n @param startIndex Start position for layout calculation. The value is an integer in the range [0, total number of\n     text characters).\n @param count Number of characters to be typeset from the specified typography start position. The value is an\n     integer in the range [0, total count of text characters), and the sum of startIndex and count cannot exceed the\n     total count of text characters.\n     <br>You can first use {@link OH_Drawing_LineTypographyGetLineBreak} to obtain a reasonable total count of\n     characters that can be typeset. If this value is set to 0, the content from startIndex to the end of the text is\n     returned.\n @return Pointer to the {@link OH_Drawing_TextLine} object.\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 Obtains an array of character indices of glyphs within a specified range of a run, where the indices are\n offsets relative to the entire paragraph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @param start Start position specified within the rendering unit. The value range is [0, glyphCount-1], where\n     glyphCount is the glyph count of the rendering unit. The method returns a null pointer when passing a negative\n     number or a value that exceeds the glyph count of the rendering unit.\n @param length Length specified within the rendering unit. When length is 0, the method obtains the character index\n     array of all characters in the rendering unit. When length is less than 0, the method returns a null pointer.\n     When start+length exceeds the actual range of the rendering unit, the method obtains valid data up to the end of\n     the rendering unit.\n @return Returns the character index array of the glyph. Call {@link OH_Drawing_DestroyRunStringIndices} to release\n     this pointer when the object is no longer needed.\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 Obtains character indices of glyphs in a run by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param stringIndices Pointer to a character index array.\n @param index Subscript of the character index array for the rendering unit glyphs. The value range is [0,\n     arrayLength-1], where arrayLength is the number of elements in the stringIndices array. 0 is returned when the\n     value exceeds this range.\n @return Returns the character indices.\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 pointer to a character index array object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param stringIndices Pointer to a character index array.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRunStringIndices(stringIndices: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Obtains the range of glyphs generated by a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @param location Start position of the character range of the rendering unit glyph, which is an offset relative to\n     the whole paragraph. This is an output parameter. The caller must provide a valid pointer to receive the return\n     value.\n @param length Length of the character range of the rendering unit. This is an output parameter. The caller must\n     provide a valid pointer to receive the return value.\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 Obtains the typographic boundary of a run. The typographic boundary is related to the font and font size used\n for typography, but not the characters within the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @param ascent Pointer to the distance from the highest character in the rendering unit to the baseline, in px.\n @param descent Pointer to the distance from the lowest character in the rendering unit to the baseline, in px.\n @param leading Pointer to the line spacing of the rendering unit, in px.\n @return Typographic width of the rendering unit, in px.\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 the text contained in a run on the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Pointer to an {@link OH_Drawing_Canvas} object.\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @param x X coordinate of the rendering unit, in px.\n @param y Y coordinate of the rendering unit, in px.\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 Obtains the image boundary of a run. The image boundary is related to characters and is equivalent to the\n visual boundary.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @return Returns the pointer to an {@link OH_Drawing_Rect} object. Call {@link OH_Drawing_DestroyRunImageBounds} to\n     release this pointer when the object is no longer needed.\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 pointer to an image boundary object of a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Pointer to the image boundary, which is an {@link OH_Drawing_Rect} object.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRunImageBounds(rect: *mut OH_Drawing_Rect);
}
extern "C" {
    #[doc = " @brief Obtains an array of glyphs within the specified range of a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @param start Start position specified within the rendering unit. The value range is [0, glyphCount-1], where\n     glyphCount is the number of glyphs in the rendering unit. When a negative number is passed or the value exceeds\n     the number of glyphs in the rendering unit, the method returns a null pointer.\n @param length Length specified within the rendering unit. When length is 0, all glyphs of the rendering unit are\n     obtained. When length is less than 0, the method returns a null pointer. When start+length exceeds the actual\n     range of the rendering unit, valid data up to the end of the rendering unit is obtained.\n @return Returns the pointer to an {@link OH_Drawing_Array} object of a glyph array in a run. Call\n     {@link OH_Drawing_DestroyRunGlyphs} to release this pointer when the object is no longer needed.\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 Obtains individual glyphs in a run by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param glyphs Pointer to the glyph array, which is an {@link OH_Drawing_Array} object.\n @param index Subscript of the rendering unit glyph array. The value range is [0, arrayLength-1], where arrayLength\n     is the number of elements in the glyphs array. 0 is returned when the value exceeds this range.\n @return Glyph ID of a single glyph in the rendering unit.\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 pointer to a glyph array in a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param glyphs Pointer to the glyph array, which is an {@link OH_Drawing_Array} object.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRunGlyphs(glyphs: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Obtains the positions of glyphs within the specified range of a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @param start Start position specified within the rendering unit. The value range is [0, glyphCount-1], where\n     glyphCount is the glyph count of the rendering unit. The method returns a null pointer when a negative number is\n     passed or when the value exceeds the glyph count of the rendering unit.\n @param length Length specified within the rendering unit. When length is 0, all glyph positions of the rendering\n     unit are obtained. The method returns a null pointer when length is less than 0. When start+length exceeds the\n     actual range of the rendering unit, valid data up to the end of the rendering unit is obtained.\n @return Returns the pointer to an {@link OH_Drawing_Array} object of a glyph position array in a run. Call\n     {@link OH_Drawing_DestroyRunPositions} to release this pointer when the object is no longer needed.\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 Obtains the positions of individual glyphs in a run by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positions Pointer to the glyph position array, which is an {@link OH_Drawing_Array} object.\n @param index Subscript of the rendering unit glyph position array. The value range is [0, arrayLength-1], where\n     arrayLength is the number of elements in the positions array. The method returns null pointer when the value\n     exceeds the range.\n @return Returns the pointer to an {@link OH_Drawing_Point} object, which holds the positions of individual glyphs in\n     the run.\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 pointer to a glyph position array in a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positions Pointer to the glyph position array, which is an {@link OH_Drawing_Array} object.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_DestroyRunPositions(positions: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Obtains the number of glyphs in a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @return Returns the number of glyphs.\n @since 18"]
    #[cfg(feature = "api-18")]
    pub fn OH_Drawing_GetRunGlyphCount(run: *mut OH_Drawing_Run) -> u32;
}
extern "C" {
    #[doc = " @brief Obtains the font object of a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @return Returns the pointer to an {@link OH_Drawing_Font} object in a run. Call {@link OH_Drawing_FontDestroy} to\n     release this pointer when the object is no longer needed.\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 Obtains the text direction of a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @return Returns the text direction of a run. **0**: **TEXT_DIRECTION_RTL**, which means right-to-left; **1**: **\n     TEXT_DIRECTION_LTR**, which means left-to-right. For details, see {@link OH_Drawing_TextDirection}.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_GetRunTextDirection(run: *mut OH_Drawing_Run) -> OH_Drawing_TextDirection;
}
extern "C" {
    #[doc = " @brief Obtains the glyph advance array of a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Pointer to an {@link OH_Drawing_Run} object.\n @param start Start position specified within the rendering unit. The value range is [0, glyphCount-1], where\n     glyphCount is the glyph count of the rendering unit. If the passed value exceeds the glyph count of the\n     rendering unit, the method returns null pointer.\n @param length Length specified within the rendering unit. When length is 0, obtains the widths of all glyphs from\n     start to the end of the rendering unit.\n @return Returns the pointer to an {@link OH_Drawing_Array} object of a glyph advance array in a run. Call\n     {@link OH_Drawing_DestroyRunGlyphAdvances} to release this pointer when the object is no longer needed.\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 Obtains the advances of individual glyphs in a run by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param advances Pointer to the glyph advance array, which is an {@link OH_Drawing_Array} object.\n @param index Subscript of the rendering unit glyph width array. The value range is [0, arrayLength-1], where\n     arrayLength is the number of elements in the advances array. A null pointer is returned when the value exceeds\n     the range.\n @return Returns the pointer to an {@link OH_Drawing_Point} object, which holds the advance of individual glyphs in\n     the run. **x** indicates the advance, and **y** is a reserved field and defaults to **0**.\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 pointer to a glyph advance array in a run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param advances Pointer to the glyph advance array, which is an {@link OH_Drawing_Array} object.\n @since 20"]
    #[cfg(feature = "api-20")]
    pub fn OH_Drawing_DestroyRunGlyphAdvances(advances: *mut OH_Drawing_Array);
}
extern "C" {
    #[doc = " @brief Creates a default **OH_Drawing_Typeface** object.\n\n @return Returns the pointer to the **OH_Drawing_Typeface** object created.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypefaceCreateDefault() -> *mut OH_Drawing_Typeface;
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_Typeface** object through a file.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **path** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param path Pointer to the file path.\n @param index File index.\n @return Returns a pointer to the created {@link OH_Drawing_Typeface} object.\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 **OH_Drawing_Typeface** object with font arguments through a file.\n If the **OH_Drawing_Typeface** object does not support the variation described in the font arguments, this function\n creates an **OH_Drawing_Typeface** object with the default font arguments.\n In this case, this function provides the same capability as {@link OH_Drawing_TypefaceCreateFromFile}.\n\n @param path Pointer to the file path.\n @param fontArguments Pointer to an {@link OH_Drawing_FontArguments} object.\n @return Returns a pointer to the created {@link OH_Drawing_Typeface} object.\n If a null pointer is returned, the creation fails. Possible causes are that no memory is available, the passed-in **\n path** or **fontArguments** is NULL, 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 **OH_Drawing_Typeface** object with font arguments based on an existing **OH_Drawing_Typeface**\n object.\n\n @param current Pointer to the {@link OH_Drawing_Typeface} object.\n @param fontArguments Pointer to an {@link OH_Drawing_FontArguments} object.\n @return Returns a pointer to the created {@link OH_Drawing_Typeface} object.\n If a null pointer is returned, the creation fails. Possible causes are that no memory is available, the passed-in **\n path** or **fontArguments** is NULL, or the existing **OH_Drawing_FontArguments** object does not support the\n variation described in the font arguments.\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 **OH_Drawing_Typeface** object through a memory stream. If the memory stream is an invalid font\n file, a null pointer is returned. After the memory stream is passed in, the ownership is transferred and you cannot\n release it.\n This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}.\n If **memoryStream** is NULL, **OH_DRAWING_ERROR_INVALID_PARAMETER** is returned.\n\n @param memoryStream Pointer to an {@link OH_Drawing_MemoryStream} object.\n @param index Index of the memory stream.\n @return Returns a pointer to the created {@link OH_Drawing_Typeface} object.\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 **OH_Drawing_Typeface** object and reclaims the memory occupied by the object.\n\n @param typeface Pointer to an **OH_Drawing_Typeface** object.\n @since 11\n @version 1.0"]
    pub fn OH_Drawing_TypefaceDestroy(typeface: *mut OH_Drawing_Typeface);
}
extern "C" {
    #[doc = " @brief Creates an **OH_Drawing_FontArguments** object. The font arguments are used to create an **\n OH_Drawing_Typeface** object with custom attributes.\n\n @return Returns the pointer to the **OH_Drawing_FontArguments** object created.\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 variation to an **OH_Drawing_FontArguments** object.\n\n @param fontArguments Pointer to an {@link OH_Drawing_FontArguments} object.\n @param axis Pointer to the label of the variation. The value must contain four ASCII characters. The supported\n labels depend on the loaded font file. For example, **'wght'** is the font weight label.\n @param value Value of the variation label.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if either **fontArguments** or **axis** is NULL or the length of **axis** is\n 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 **OH_Drawing_FontArguments** object.\n\n @param fontArguments Pointer to an {@link OH_Drawing_FontArguments} object.\n @return Returns one of the following result codes:\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INVALID_PARAMETER** if **fontArguments** is NULL.\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 whether the typeface is bold.\n\n @param typeface Pointer to the {@link OH_Drawing_Typeface} object.\n @param isBold Whether the typeface is bold. It is used as an output parameter. **true** if the typeface is bold; **\n false** otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **typeface** or **isBold** is a null pointer.\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 whether the typeface is italic.\n\n @param typeface Pointer to the {@link OH_Drawing_Typeface} object.\n @param isItalic Whether the typeface is italic. It is used as an output parameter. **true** if the typeface is\n italic; **false** otherwise.\n @return Execution result.\n **OH_DRAWING_SUCCESS** if the operation is successful.\n **OH_DRAWING_ERROR_INCORRECT_PARAMETER** if **typeface** or **isItalic** is a null pointer.\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;
}