1#![allow(non_snake_case)]
4#![allow(non_upper_case_globals)]
5#![allow(non_camel_case_types)]
6#![allow(clippy::missing_safety_doc)]
7
8#[allow(unused_imports)]
9use ohos_image_native_sys::*;
10use ohos_image_sys::*;
11
12#[link(name = "native_drawing")]
13unsafe extern "C" {}
14
15#[repr(C)]
16#[derive(Debug, Copy, Clone)]
17pub struct OH_Drawing_Canvas {
18 _unused: [u8; 0],
19}
20#[repr(C)]
21#[derive(Debug, Copy, Clone)]
22pub struct OH_Drawing_Pen {
23 _unused: [u8; 0],
24}
25#[repr(C)]
26#[derive(Debug, Copy, Clone)]
27pub struct OH_Drawing_Region {
28 _unused: [u8; 0],
29}
30#[repr(C)]
31#[derive(Debug, Copy, Clone)]
32pub struct OH_Drawing_Brush {
33 _unused: [u8; 0],
34}
35#[repr(C)]
36#[derive(Debug, Copy, Clone)]
37pub struct OH_Drawing_Path {
38 _unused: [u8; 0],
39}
40#[repr(C)]
41#[derive(Debug, Copy, Clone)]
42pub struct OH_Drawing_PathIterator {
43 _unused: [u8; 0],
44}
45#[repr(C)]
46#[derive(Debug, Copy, Clone)]
47pub struct OH_Drawing_Lattice {
48 _unused: [u8; 0],
49}
50#[repr(C)]
51#[derive(Debug, Copy, Clone)]
52pub struct OH_Drawing_Bitmap {
53 _unused: [u8; 0],
54}
55#[repr(C)]
56#[derive(Debug, Copy, Clone)]
57pub struct OH_Drawing_Point {
58 _unused: [u8; 0],
59}
60#[repr(C)]
61#[derive(Debug, Copy, Clone)]
62pub struct OH_Drawing_PixelMap {
63 _unused: [u8; 0],
64}
65#[repr(C)]
66#[derive(Debug, Copy, Clone)]
67pub struct OH_Drawing_ColorSpace {
68 _unused: [u8; 0],
69}
70#[doc = " @brief Defines a point of 2d.\n\n @since 12\n @version 1.0"]
71#[repr(C)]
72#[derive(Debug, Copy, Clone)]
73pub struct OH_Drawing_Point2D {
74 pub x: f32,
75 pub y: f32,
76}
77#[doc = " @brief Defines corner radii, which is on x-axis and y-axis.\n\n @since 12\n @version 1.0"]
78pub type OH_Drawing_Corner_Radii = OH_Drawing_Point2D;
79#[doc = " @brief Defines a point of 3d, which is used to describe the coordinate point.\n\n @since 12\n @version 1.0"]
80#[repr(C)]
81#[derive(Debug, Copy, Clone)]
82pub struct OH_Drawing_Point3D {
83 pub x: f32,
84 pub y: f32,
85 pub z: f32,
86}
87#[repr(C)]
88#[derive(Debug, Copy, Clone)]
89pub struct OH_Drawing_PathEffect {
90 _unused: [u8; 0],
91}
92#[repr(C)]
93#[derive(Debug, Copy, Clone)]
94pub struct OH_Drawing_Rect {
95 _unused: [u8; 0],
96}
97#[repr(C)]
98#[derive(Debug, Copy, Clone)]
99pub struct OH_Drawing_RoundRect {
100 _unused: [u8; 0],
101}
102#[repr(C)]
103#[derive(Debug, Copy, Clone)]
104pub struct OH_Drawing_Matrix {
105 _unused: [u8; 0],
106}
107#[repr(C)]
108#[derive(Debug, Copy, Clone)]
109pub struct OH_Drawing_ShaderEffect {
110 _unused: [u8; 0],
111}
112#[repr(C)]
113#[derive(Debug, Copy, Clone)]
114pub struct OH_Drawing_ShadowLayer {
115 _unused: [u8; 0],
116}
117#[repr(C)]
118#[derive(Debug, Copy, Clone)]
119pub struct OH_Drawing_Filter {
120 _unused: [u8; 0],
121}
122#[repr(C)]
123#[derive(Debug, Copy, Clone)]
124pub struct OH_Drawing_MaskFilter {
125 _unused: [u8; 0],
126}
127#[repr(C)]
128#[derive(Debug, Copy, Clone)]
129pub struct OH_Drawing_ColorFilter {
130 _unused: [u8; 0],
131}
132#[repr(C)]
133#[derive(Debug, Copy, Clone)]
134pub struct OH_Drawing_Font {
135 _unused: [u8; 0],
136}
137#[repr(C)]
138#[derive(Debug, Copy, Clone)]
139pub struct OH_Drawing_FontFeatures {
140 _unused: [u8; 0],
141}
142#[repr(C)]
143#[derive(Debug, Copy, Clone)]
144pub struct OH_Drawing_MemoryStream {
145 _unused: [u8; 0],
146}
147#[repr(C)]
148#[derive(Debug, Copy, Clone)]
149pub struct OH_Drawing_FontArguments {
150 _unused: [u8; 0],
151}
152#[repr(C)]
153#[derive(Debug, Copy, Clone)]
154pub struct OH_Drawing_Typeface {
155 _unused: [u8; 0],
156}
157#[repr(C)]
158#[derive(Debug, Copy, Clone)]
159pub struct OH_Drawing_TextBlob {
160 _unused: [u8; 0],
161}
162#[repr(C)]
163#[derive(Debug, Copy, Clone)]
164pub struct OH_Drawing_Image {
165 _unused: [u8; 0],
166}
167#[repr(C)]
168#[derive(Debug, Copy, Clone)]
169pub struct OH_Drawing_ImageFilter {
170 _unused: [u8; 0],
171}
172#[repr(C)]
173#[derive(Debug, Copy, Clone)]
174pub struct OH_Drawing_SamplingOptions {
175 _unused: [u8; 0],
176}
177#[repr(C)]
178#[derive(Debug, Copy, Clone)]
179pub struct OH_Drawing_TextBlobBuilder {
180 _unused: [u8; 0],
181}
182#[repr(C)]
183#[derive(Debug, Copy, Clone)]
184pub struct OH_Drawing_GpuContext {
185 _unused: [u8; 0],
186}
187#[repr(C)]
188#[derive(Debug, Copy, Clone)]
189pub struct OH_Drawing_Surface {
190 _unused: [u8; 0],
191}
192#[doc = " Unknown format."]
193pub const OH_Drawing_ColorFormat_COLOR_FORMAT_UNKNOWN: OH_Drawing_ColorFormat = 0;
194#[doc = " Each pixel is represented by 8 bits, which together indicate alpha."]
195pub const OH_Drawing_ColorFormat_COLOR_FORMAT_ALPHA_8: OH_Drawing_ColorFormat = 1;
196#[doc = " Each pixel is represented by 16 bits. From the most significant bit to the least significant bit,\n the first 5 bits indicate red, the subsequent 6 bits indicate green, and the last 5 bits indicate blue."]
197pub const OH_Drawing_ColorFormat_COLOR_FORMAT_RGB_565: OH_Drawing_ColorFormat = 2;
198#[doc = " Each pixel is represented by 16 bits. From the most significant bit to the least significant bit,\n every 4 bits indicate alpha, red, green, and blue, respectively."]
199pub const OH_Drawing_ColorFormat_COLOR_FORMAT_ARGB_4444: OH_Drawing_ColorFormat = 3;
200#[doc = " Each pixel is represented by 32 bits. From the most significant bit to the least significant bit,\n every 8 bits indicate alpha, red, green, and blue, respectively."]
201pub const OH_Drawing_ColorFormat_COLOR_FORMAT_RGBA_8888: OH_Drawing_ColorFormat = 4;
202#[doc = " Each pixel is represented by 32 bits. From the most significant bit to the least significant bit,\n every 8 bits indicate blue, green, red, and alpha, respectively."]
203pub const OH_Drawing_ColorFormat_COLOR_FORMAT_BGRA_8888: OH_Drawing_ColorFormat = 5;
204#[doc = " @brief Enumerates storage formats of bitmap pixels.\n\n @since 8\n @version 1.0"]
205pub type OH_Drawing_ColorFormat = u32;
206#[doc = " Unknown format."]
207pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNKNOWN: OH_Drawing_AlphaFormat = 0;
208#[doc = " The bitmap does not have the alpha component."]
209pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_OPAQUE: OH_Drawing_AlphaFormat = 1;
210#[doc = " The color component of each pixel is premultiplied by the alpha component."]
211pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_PREMUL: OH_Drawing_AlphaFormat = 2;
212#[doc = " The color component of each pixel is not premultiplied by the alpha component."]
213pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNPREMUL: OH_Drawing_AlphaFormat = 3;
214#[doc = " @brief Enumerates alpha formats of bitmap pixels.\n\n @since 8\n @version 1.0"]
215pub type OH_Drawing_AlphaFormat = u32;
216#[doc = " r = 0."]
217pub const OH_Drawing_BlendMode_BLEND_MODE_CLEAR: OH_Drawing_BlendMode = 0;
218#[doc = " r = s."]
219pub const OH_Drawing_BlendMode_BLEND_MODE_SRC: OH_Drawing_BlendMode = 1;
220#[doc = " r = d."]
221pub const OH_Drawing_BlendMode_BLEND_MODE_DST: OH_Drawing_BlendMode = 2;
222#[doc = " r = s + (1-sa)*d."]
223pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_OVER: OH_Drawing_BlendMode = 3;
224#[doc = " r = d + (1-da)*s."]
225pub const OH_Drawing_BlendMode_BLEND_MODE_DST_OVER: OH_Drawing_BlendMode = 4;
226#[doc = " r = s * da."]
227pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_IN: OH_Drawing_BlendMode = 5;
228#[doc = " r = d * sa."]
229pub const OH_Drawing_BlendMode_BLEND_MODE_DST_IN: OH_Drawing_BlendMode = 6;
230#[doc = " r = s * (1-da)."]
231pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_OUT: OH_Drawing_BlendMode = 7;
232#[doc = " r = d * (1-sa)."]
233pub const OH_Drawing_BlendMode_BLEND_MODE_DST_OUT: OH_Drawing_BlendMode = 8;
234#[doc = " r = s*da + d*(1-sa)."]
235pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_ATOP: OH_Drawing_BlendMode = 9;
236#[doc = " r = d*sa + s*(1-da)."]
237pub const OH_Drawing_BlendMode_BLEND_MODE_DST_ATOP: OH_Drawing_BlendMode = 10;
238#[doc = " r = s*(1-da) + d*(1-sa)."]
239pub const OH_Drawing_BlendMode_BLEND_MODE_XOR: OH_Drawing_BlendMode = 11;
240#[doc = " r = min(s + d, 1)."]
241pub const OH_Drawing_BlendMode_BLEND_MODE_PLUS: OH_Drawing_BlendMode = 12;
242#[doc = " r = s*d."]
243pub const OH_Drawing_BlendMode_BLEND_MODE_MODULATE: OH_Drawing_BlendMode = 13;
244#[doc = " r = s + d - s*d."]
245pub const OH_Drawing_BlendMode_BLEND_MODE_SCREEN: OH_Drawing_BlendMode = 14;
246#[doc = " multiply or screen, depending on destination."]
247pub const OH_Drawing_BlendMode_BLEND_MODE_OVERLAY: OH_Drawing_BlendMode = 15;
248#[doc = " rc = s + d - max(s*da, d*sa), ra = s + (1-sa)*d."]
249pub const OH_Drawing_BlendMode_BLEND_MODE_DARKEN: OH_Drawing_BlendMode = 16;
250#[doc = " rc = s + d - min(s*da, d*sa), ra = s + (1-sa)*d."]
251pub const OH_Drawing_BlendMode_BLEND_MODE_LIGHTEN: OH_Drawing_BlendMode = 17;
252#[doc = " brighten destination to reflect source."]
253pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR_DODGE: OH_Drawing_BlendMode = 18;
254#[doc = " darken destination to reflect source."]
255pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR_BURN: OH_Drawing_BlendMode = 19;
256#[doc = " multiply or screen, depending on source."]
257pub const OH_Drawing_BlendMode_BLEND_MODE_HARD_LIGHT: OH_Drawing_BlendMode = 20;
258#[doc = " lighten or darken, depending on source."]
259pub const OH_Drawing_BlendMode_BLEND_MODE_SOFT_LIGHT: OH_Drawing_BlendMode = 21;
260#[doc = " rc = s + d - 2*(min(s*da, d*sa)), ra = s + (1-sa)*d."]
261pub const OH_Drawing_BlendMode_BLEND_MODE_DIFFERENCE: OH_Drawing_BlendMode = 22;
262#[doc = " rc = s + d - two(s*d), ra = s + (1-sa)*d."]
263pub const OH_Drawing_BlendMode_BLEND_MODE_EXCLUSION: OH_Drawing_BlendMode = 23;
264#[doc = " r = s*(1-da) + d*(1-sa) + s*d."]
265pub const OH_Drawing_BlendMode_BLEND_MODE_MULTIPLY: OH_Drawing_BlendMode = 24;
266#[doc = " hue of source with saturation and luminosity of destination."]
267pub const OH_Drawing_BlendMode_BLEND_MODE_HUE: OH_Drawing_BlendMode = 25;
268#[doc = " saturation of source with hue and luminosity of destination."]
269pub const OH_Drawing_BlendMode_BLEND_MODE_SATURATION: OH_Drawing_BlendMode = 26;
270#[doc = " hue and saturation of source with luminosity of destination."]
271pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR: OH_Drawing_BlendMode = 27;
272#[doc = " luminosity of source with hue and saturation of destination."]
273pub const OH_Drawing_BlendMode_BLEND_MODE_LUMINOSITY: OH_Drawing_BlendMode = 28;
274#[doc = " @brief The blending operation generates a new color for the two colors (source, destination).\n These operations are the same on the 4 color channels: red, green, blue, alpha.\n For these, we use alpha channel as an example, rather than naming each channel individually.\n\n For brevity, we use the following abbreviations.\n s : source\n d : destination\n sa : source alpha\n da : destination alpha\n\n Results are abbreviated\n r : if all 4 channels are computed in the same manner\n ra : result alpha channel\n rc : result \"color\": red, green, blue channels\n\n @since 11\n @version 1.0"]
275pub type OH_Drawing_BlendMode = u32;
276#[doc = " @brief Defines image info struct.\n\n @since 12\n @version 1.0"]
277#[repr(C)]
278#[derive(Debug, Copy, Clone)]
279pub struct OH_Drawing_Image_Info {
280 #[doc = " storage for width of image"]
281 pub width: i32,
282 #[doc = " storage for height of image"]
283 pub height: i32,
284 #[doc = " storage for color formats"]
285 pub colorType: OH_Drawing_ColorFormat,
286 #[doc = " storage for alpha formats"]
287 pub alphaType: OH_Drawing_AlphaFormat,
288}
289#[doc = " @brief Defines rectstyle info struct.\n\n @since 12\n @version 1.0"]
290#[repr(C)]
291#[derive(Debug, Copy, Clone)]
292pub struct OH_Drawing_RectStyle_Info {
293 #[doc = " color of rectstyle"]
294 pub color: u32,
295 #[doc = " radius in left top of rectstyle"]
296 pub leftTopRadius: f64,
297 #[doc = " radius in right top of rectstyle"]
298 pub rightTopRadius: f64,
299 #[doc = " radius in right bottom of rectstyle"]
300 pub rightBottomRadius: f64,
301 #[doc = " radius in left bottom of rectstyle"]
302 pub leftBottomRadius: f64,
303}
304#[doc = " @brief Defines the string information struct.\n\n @since 14\n @version 1.0"]
305#[cfg(feature = "api-14")]
306#[repr(C)]
307#[derive(Debug, Copy, Clone)]
308pub struct OH_Drawing_String {
309 #[doc = " A pointer to a byte string containing UTF-16 encoded entities"]
310 pub strData: *mut u8,
311 #[doc = " The length of `strData` in bytes"]
312 pub strLen: u32,
313}
314#[doc = " uses bytes to represent UTF-8 or ASCII"]
315pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF8: OH_Drawing_TextEncoding = 0;
316#[doc = " uses two byte words to represent most of Unicode"]
317pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF16: OH_Drawing_TextEncoding = 1;
318#[doc = " uses four byte words to represent all of Unicode"]
319pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF32: OH_Drawing_TextEncoding = 2;
320#[doc = " uses two byte words to represent glyph indices"]
321pub const OH_Drawing_TextEncoding_TEXT_ENCODING_GLYPH_ID: OH_Drawing_TextEncoding = 3;
322#[doc = " @brief Enumerates text encoding types.\n @since 12\n @version 1.0"]
323pub type OH_Drawing_TextEncoding = u32;
324#[repr(C)]
325#[derive(Debug, Copy, Clone)]
326pub struct OH_Drawing_FontMgr {
327 _unused: [u8; 0],
328}
329#[repr(C)]
330#[derive(Debug, Copy, Clone)]
331pub struct OH_Drawing_FontStyleSet {
332 _unused: [u8; 0],
333}
334#[repr(C)]
335#[derive(Debug, Copy, Clone)]
336pub struct OH_Drawing_RecordCmdUtils {
337 _unused: [u8; 0],
338}
339#[repr(C)]
340#[derive(Debug, Copy, Clone)]
341pub struct OH_Drawing_RecordCmd {
342 _unused: [u8; 0],
343}
344#[repr(C)]
345#[derive(Debug, Copy, Clone)]
346pub struct OH_Drawing_Array {
347 _unused: [u8; 0],
348}
349#[doc = " @brief Defines the pixel format of a bitmap, including the color type and alpha type.\n\n @since 8\n @version 1.0"]
350#[repr(C)]
351#[derive(Debug, Copy, Clone)]
352pub struct OH_Drawing_BitmapFormat {
353 #[doc = " Storage format of bitmap pixels"]
354 pub colorFormat: OH_Drawing_ColorFormat,
355 #[doc = " Alpha format of bitmap pixels"]
356 pub alphaFormat: OH_Drawing_AlphaFormat,
357}
358extern "C" {
359 #[doc = " @brief Creates an <b>OH_Drawing_Bitmap</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Bitmap</b> object created.\n @since 8\n @version 1.0"]
360 pub fn OH_Drawing_BitmapCreate() -> *mut OH_Drawing_Bitmap;
361}
362extern "C" {
363 #[doc = " @brief Destroys an <b>OH_Drawing_Bitmap</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @since 8\n @version 1.0"]
364 pub fn OH_Drawing_BitmapDestroy(bitmap: *mut OH_Drawing_Bitmap);
365}
366extern "C" {
367 #[doc = " @brief Creates an <b>OH_Drawing_Bitmap</b> object with <b>OH_Drawing_Image_Info</b> object\n and sets the mem address or pixel storage.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @param pixels the pointer to memory address or pixel storage.\n @param rowBytes size of pixel row or larger.\n @return Returns the pointer to the <b>OH_Drawing_Bitmap</b> object created.\n @since 12\n @version 1.0"]
368 pub fn OH_Drawing_BitmapCreateFromPixels(
369 imageInfo: *mut OH_Drawing_Image_Info,
370 pixels: *mut ::std::os::raw::c_void,
371 rowBytes: u32,
372 ) -> *mut OH_Drawing_Bitmap;
373}
374extern "C" {
375 #[doc = " @brief Initializes the width and height of an <b>OH_Drawing_Bitmap</b> object\n and sets the pixel format for the bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param width Indicates the width of the bitmap to be initialized.\n @param height Indicates the height of the bitmap to be initialized.\n @param bitmapFormat Indicates the pixel format of the bitmap to be initialized,\n including the pixel color type and alpha type.\n @since 8\n @version 1.0"]
376 pub fn OH_Drawing_BitmapBuild(
377 bitmap: *mut OH_Drawing_Bitmap,
378 width: u32,
379 height: u32,
380 bitmapFormat: *const OH_Drawing_BitmapFormat,
381 );
382}
383extern "C" {
384 #[doc = " @brief Obtains the width of a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the width.\n @since 8\n @version 1.0"]
385 pub fn OH_Drawing_BitmapGetWidth(bitmap: *mut OH_Drawing_Bitmap) -> u32;
386}
387extern "C" {
388 #[doc = " @brief Obtains the height of a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the height.\n @since 8\n @version 1.0"]
389 pub fn OH_Drawing_BitmapGetHeight(bitmap: *mut OH_Drawing_Bitmap) -> u32;
390}
391extern "C" {
392 #[doc = " @brief Obtains the color format of a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the bitmap color format.\n @since 12\n @version 1.0"]
393 pub fn OH_Drawing_BitmapGetColorFormat(
394 bitmap: *mut OH_Drawing_Bitmap,
395 ) -> OH_Drawing_ColorFormat;
396}
397extern "C" {
398 #[doc = " @brief Obtains the alpha format of a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the bitmap alpha format.\n @since 12\n @version 1.0"]
399 pub fn OH_Drawing_BitmapGetAlphaFormat(
400 bitmap: *mut OH_Drawing_Bitmap,
401 ) -> OH_Drawing_AlphaFormat;
402}
403extern "C" {
404 #[doc = " @brief Obtains the pixel address of a bitmap. You can use this address to obtain the pixel data of the bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns the pixel address.\n @since 8\n @version 1.0"]
405 pub fn OH_Drawing_BitmapGetPixels(
406 bitmap: *mut OH_Drawing_Bitmap,
407 ) -> *mut ::std::os::raw::c_void;
408}
409extern "C" {
410 #[doc = " @brief Gets the image info.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @since 12\n @version 1.0"]
411 pub fn OH_Drawing_BitmapGetImageInfo(
412 bitmap: *mut OH_Drawing_Bitmap,
413 imageInfo: *mut OH_Drawing_Image_Info,
414 );
415}
416extern "C" {
417 #[doc = " @brief Copies a rect of pixels from bitmap to dstPixels. Copy starts at (srcX, srcY),\n and does not exceed bitmap width and height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param dstInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @param dstPixels Destination pixel storage.\n @param dstRowBytes Destination row length.\n @param srcX Column index whose absolute value is less than width.\n @param srcY Row index whose absolute value is less than height.\n @return Returns true if pixels are copied to dstPixels.\n @since 12\n @version 1.0"]
418 pub fn OH_Drawing_BitmapReadPixels(
419 bitmap: *mut OH_Drawing_Bitmap,
420 dstInfo: *const OH_Drawing_Image_Info,
421 dstPixels: *mut ::std::os::raw::c_void,
422 dstRowBytes: usize,
423 srcX: i32,
424 srcY: i32,
425 ) -> bool;
426}
427#[doc = " @error Operation completed successfully."]
428pub const OH_Drawing_ErrorCode_OH_DRAWING_SUCCESS: OH_Drawing_ErrorCode = 0;
429#[doc = " @error Permission verification failed."]
430pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_NO_PERMISSION: OH_Drawing_ErrorCode = 201;
431#[doc = " @error Invalid input parameter. For example, the pointer in the parameter is a nullptr."]
432pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INVALID_PARAMETER: OH_Drawing_ErrorCode = 401;
433#[doc = " @error The parameter is not in the valid range."]
434pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE: OH_Drawing_ErrorCode =
435 26200001;
436#[doc = " @error mem allocate failed.\n @since 13"]
437#[cfg(feature = "api-13")]
438pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_ALLOCATION_FAILED: OH_Drawing_ErrorCode = 26200002;
439#[doc = " @error The attribute id is not recognized or supported.\n @since 21"]
440#[cfg(feature = "api-21")]
441pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH: OH_Drawing_ErrorCode =
442 26200003;
443#[doc = " @error incorrect input parameter. The possible cause is that the provided pointer is null.\n @since 22"]
444#[cfg(feature = "api-22")]
445pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INCORRECT_PARAMETER: OH_Drawing_ErrorCode =
446 26200004;
447#[doc = " @error File not found. The specified file does not exist or the path is incorrect..\n @since 23"]
448#[cfg(feature = "api-23")]
449pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_NOT_FOUND: OH_Drawing_ErrorCode = 26200005;
450#[doc = " @error Failed to open the file. The file cannot be opened due to permission or I/O issues.\n @since 23"]
451#[cfg(feature = "api-23")]
452pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_OPEN_FILE_FAILED: OH_Drawing_ErrorCode = 26200006;
453#[doc = " @error File seek failed. The system failed to reposition the file read pointer..\n @since 23"]
454#[cfg(feature = "api-23")]
455pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_SEEK_FAILED: OH_Drawing_ErrorCode = 26200007;
456#[doc = " @error Failed to get the file size. The system was unable to obtain the file size information.\n @since 23"]
457#[cfg(feature = "api-23")]
458pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_GET_FILE_SIZE_FAILED: OH_Drawing_ErrorCode =
459 26200008;
460#[doc = " @error Failed to read the file. The file could not be read completely or contains unreadable data.\n @since 23"]
461#[cfg(feature = "api-23")]
462pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_READ_FILE_FAILED: OH_Drawing_ErrorCode = 26200009;
463#[doc = " @error Empty file. The specified file is empty and contains no valid data.\n @since 23"]
464#[cfg(feature = "api-23")]
465pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_EMPTY_FILE: OH_Drawing_ErrorCode = 26200010;
466#[doc = " @error Corrupted file. The file content is invalid or damaged and cannot be parsed.\n @since 23"]
467#[cfg(feature = "api-23")]
468pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_FILE_CORRUPTED: OH_Drawing_ErrorCode = 26200011;
469#[doc = " @brief Enumerates error codes of drawing.\n @since 12"]
470pub type OH_Drawing_ErrorCode = u32;
471extern "C" {
472 #[doc = " @brief Obtains the error code of the drawing module.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the error code.\n @since 12\n @version 1.0"]
473 pub fn OH_Drawing_ErrorCodeGet() -> OH_Drawing_ErrorCode;
474}
475extern "C" {
476 #[doc = " @brief Resets the error code of the drawing module to OH_DRAWING_SUCCESS.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @since 18\n @version 1.0"]
477 #[cfg(feature = "api-18")]
478 pub fn OH_Drawing_ErrorCodeReset();
479}
480extern "C" {
481 #[doc = " @brief Creates an <b>OH_Drawing_Brush</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Brush</b> object created.\n @since 8\n @version 1.0"]
482 pub fn OH_Drawing_BrushCreate() -> *mut OH_Drawing_Brush;
483}
484extern "C" {
485 #[doc = " @brief Creates an <b>OH_Drawing_Brush</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Brush</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty or a nullptr is passed.\n @since 12\n @version 1.0"]
486 pub fn OH_Drawing_BrushCopy(brush: *mut OH_Drawing_Brush) -> *mut OH_Drawing_Brush;
487}
488extern "C" {
489 #[doc = " @brief Destroys an <b>OH_Drawing_Brush</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 8\n @version 1.0"]
490 pub fn OH_Drawing_BrushDestroy(brush: *mut OH_Drawing_Brush);
491}
492extern "C" {
493 #[doc = " @brief Checks whether anti-aliasing is enabled for a brush. If anti-aliasing is enabled,\n edges will be drawn with partial transparency.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @return Returns <b>true</b> if anti-aliasing is enabled; returns <b>false</b> otherwise.\n @since 8\n @version 1.0"]
494 pub fn OH_Drawing_BrushIsAntiAlias(brush: *const OH_Drawing_Brush) -> bool;
495}
496extern "C" {
497 #[doc = " @brief Enables or disables anti-aliasing for a brush. If anti-aliasing is enabled,\n edges will be drawn with partial transparency.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param antiAlias Specifies whether to enable anti-aliasing. The value <b>true</b> means\n to enable anti-aliasing, and <b>false</b> means the opposite.\n @since 8\n @version 1.0"]
498 pub fn OH_Drawing_BrushSetAntiAlias(brush: *mut OH_Drawing_Brush, antiAlias: bool);
499}
500extern "C" {
501 #[doc = " @brief Obtains the color of a brush. The color is used by the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @return Returns a 32-bit (ARGB) variable that describes the color.\n @since 8\n @version 1.0"]
502 pub fn OH_Drawing_BrushGetColor(brush: *const OH_Drawing_Brush) -> u32;
503}
504extern "C" {
505 #[doc = " @brief Sets the color for a brush. The color will be used by the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param color Indicates the color to set, which is a 32-bit (ARGB) variable.\n @since 8\n @version 1.0"]
506 pub fn OH_Drawing_BrushSetColor(brush: *mut OH_Drawing_Brush, color: u32);
507}
508extern "C" {
509 #[doc = " @brief Obtains the alpha of a brush. The alpha is used by the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @return Returns a 8-bit variable that describes the alpha.\n @since 11\n @version 1.0"]
510 pub fn OH_Drawing_BrushGetAlpha(brush: *const OH_Drawing_Brush) -> u8;
511}
512extern "C" {
513 #[doc = " @brief Sets the alpha for a brush. The alpha will be used by the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param alpha Indicates the alpha to set, which is a 8-bit variable.\n @since 11\n @version 1.0"]
514 pub fn OH_Drawing_BrushSetAlpha(brush: *mut OH_Drawing_Brush, alpha: u8);
515}
516extern "C" {
517 #[doc = " @brief Sets the color for a brush. The color will be used by the brush to fill in a shape.\n The color is an ARGB structure described by floating point numbers and interpreted as being in the colorSpaceManager.\n If colorSpaceManager is nullptr, then color is assumed to be in the sRGB color space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param a Indicates the alpha component of color, represented as a floating point number between 0 and 1.\n @param r Indicates the red component of color, represented as a floating point number between 0 and 1.\n @param g Indicates the green component of color, represented as a floating point number between 0 and 1.\n @param b Indicates the blue component of color, represented as a floating point number between 0 and 1.\n @param colorSpaceManager Indicates the pointer to an <b>OH_NativeColorSpaceManager</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush is nullptr.\n @since 20\n @version 1.0"]
518 #[cfg(feature = "api-20")]
519 pub fn OH_Drawing_BrushSetColor4f(
520 brush: *mut OH_Drawing_Brush,
521 a: f32,
522 r: f32,
523 g: f32,
524 b: f32,
525 colorSpaceManager: *mut OH_NativeColorSpaceManager,
526 ) -> OH_Drawing_ErrorCode;
527}
528extern "C" {
529 #[doc = " @brief Obtains the alpha component of a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param a Indicates the alpha component of color.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or a is nullptr.\n @since 20\n @version 1.0"]
530 #[cfg(feature = "api-20")]
531 pub fn OH_Drawing_BrushGetAlphaFloat(
532 brush: *const OH_Drawing_Brush,
533 a: *mut f32,
534 ) -> OH_Drawing_ErrorCode;
535}
536extern "C" {
537 #[doc = " @brief Obtains the red component of a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param r Indicates the red component of color.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or r is nullptr.\n @since 20\n @version 1.0"]
538 #[cfg(feature = "api-20")]
539 pub fn OH_Drawing_BrushGetRedFloat(
540 brush: *const OH_Drawing_Brush,
541 r: *mut f32,
542 ) -> OH_Drawing_ErrorCode;
543}
544extern "C" {
545 #[doc = " @brief Obtains the green component of a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param g Indicates the green component of color.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or g is nullptr.\n @since 20\n @version 1.0"]
546 #[cfg(feature = "api-20")]
547 pub fn OH_Drawing_BrushGetGreenFloat(
548 brush: *const OH_Drawing_Brush,
549 g: *mut f32,
550 ) -> OH_Drawing_ErrorCode;
551}
552extern "C" {
553 #[doc = " @brief Obtains the blue component of a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param b Indicates the blue component of color.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or b is nullptr.\n @since 20\n @version 1.0"]
554 #[cfg(feature = "api-20")]
555 pub fn OH_Drawing_BrushGetBlueFloat(
556 brush: *const OH_Drawing_Brush,
557 b: *mut f32,
558 ) -> OH_Drawing_ErrorCode;
559}
560extern "C" {
561 #[doc = " @brief Sets the shaderEffect for a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.\n @since 11\n @version 1.0"]
562 pub fn OH_Drawing_BrushSetShaderEffect(
563 brush: *mut OH_Drawing_Brush,
564 shaderEffect: *mut OH_Drawing_ShaderEffect,
565 );
566}
567extern "C" {
568 #[doc = " @brief Sets the shadowLayer for a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.\n @since 12\n @version 1.0"]
569 pub fn OH_Drawing_BrushSetShadowLayer(
570 brush: *mut OH_Drawing_Brush,
571 shadowLayer: *mut OH_Drawing_ShadowLayer,
572 );
573}
574extern "C" {
575 #[doc = " @brief Sets the filter for a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 11\n @version 1.0"]
576 pub fn OH_Drawing_BrushSetFilter(brush: *mut OH_Drawing_Brush, filter: *mut OH_Drawing_Filter);
577}
578extern "C" {
579 #[doc = " @brief Gets the filter from a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 12\n @version 1.0"]
580 pub fn OH_Drawing_BrushGetFilter(brush: *mut OH_Drawing_Brush, filter: *mut OH_Drawing_Filter);
581}
582extern "C" {
583 #[doc = " @brief Sets a blender that implements the specified blendmode enum for a brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param blendMode Indicates the blend mode.\n @since 12\n @version 1.0"]
584 pub fn OH_Drawing_BrushSetBlendMode(
585 brush: *mut OH_Drawing_Brush,
586 blendMode: OH_Drawing_BlendMode,
587 );
588}
589extern "C" {
590 #[doc = " @brief Resets all brush contents to their initial values.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 12\n @version 1.0"]
591 pub fn OH_Drawing_BrushReset(brush: *mut OH_Drawing_Brush);
592}
593#[doc = " single sample point (nearest neighbor)"]
594pub const OH_Drawing_FilterMode_FILTER_MODE_NEAREST: OH_Drawing_FilterMode = 0;
595#[doc = " interpolate between 2x2 sample points (bilinear interpolation)"]
596pub const OH_Drawing_FilterMode_FILTER_MODE_LINEAR: OH_Drawing_FilterMode = 1;
597#[doc = " @brief Enumerates storage filter mode.\n\n @since 12\n @version 1.0"]
598pub type OH_Drawing_FilterMode = u32;
599#[doc = " ignore mipmap levels, sample from the \"base\""]
600pub const OH_Drawing_MipmapMode_MIPMAP_MODE_NONE: OH_Drawing_MipmapMode = 0;
601#[doc = " sample from the nearest level"]
602pub const OH_Drawing_MipmapMode_MIPMAP_MODE_NEAREST: OH_Drawing_MipmapMode = 1;
603#[doc = " interpolate between the two nearest levels"]
604pub const OH_Drawing_MipmapMode_MIPMAP_MODE_LINEAR: OH_Drawing_MipmapMode = 2;
605#[doc = " @brief Enumerates storage formats mipmap mode.\n\n @since 12\n @version 1.0"]
606pub type OH_Drawing_MipmapMode = u32;
607extern "C" {
608 #[doc = " @brief Creates an <b>OH_Drawing_SamplingOptions</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filterMode sampling filter mode.\n @param mipmapMode sampling mipmap mode..\n @return Returns the pointer to the <b>OH_Drawing_SamplingOptions</b> object created.\n @since 12\n @version 1.0"]
609 pub fn OH_Drawing_SamplingOptionsCreate(
610 filterMode: OH_Drawing_FilterMode,
611 mipmapMode: OH_Drawing_MipmapMode,
612 ) -> *mut OH_Drawing_SamplingOptions;
613}
614extern "C" {
615 #[doc = " @brief Creates an <b>OH_Drawing_SamplingOptions</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @return Returns the pointer to the <b>OH_Drawing_SamplingOptions</b> object created.\n @since 20\n @version 1.0"]
616 #[cfg(feature = "api-20")]
617 pub fn OH_Drawing_SamplingOptionsCopy(
618 samplingOptions: *mut OH_Drawing_SamplingOptions,
619 ) -> *mut OH_Drawing_SamplingOptions;
620}
621extern "C" {
622 #[doc = " @brief Destroys an <b>OH_Drawing_SamplingOptions</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @since 12\n @version 1.0"]
623 pub fn OH_Drawing_SamplingOptionsDestroy(samplingOptions: *mut OH_Drawing_SamplingOptions);
624}
625#[doc = " Using sampling only inside bounds in a slower manner."]
626pub const OH_Drawing_SrcRectConstraint_STRICT_SRC_RECT_CONSTRAINT: OH_Drawing_SrcRectConstraint = 0;
627#[doc = " Using sampling outside bounds in a faster manner."]
628pub const OH_Drawing_SrcRectConstraint_FAST_SRC_RECT_CONSTRAINT: OH_Drawing_SrcRectConstraint = 1;
629#[doc = " @brief Enumeration defines the constraint type.\n\n @since 12\n @version 1.0"]
630pub type OH_Drawing_SrcRectConstraint = u32;
631extern "C" {
632 #[doc = " @brief Creates an <b>OH_Drawing_Canvas</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Canvas</b> object created.\n @since 8\n @version 1.0"]
633 pub fn OH_Drawing_CanvasCreate() -> *mut OH_Drawing_Canvas;
634}
635extern "C" {
636 #[doc = " @brief Creates an <b>OH_Drawing_Canvas</b> object from <b>OH_Drawing_PixelMap</b>.\n The OH_Drawing_PixelMap should be dissolved by OH_Drawing_PixelMapDissolve after the OH_Drawing_Canvas is destroyed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Canvas</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty or pixelMap is nullptr.\n @since 20\n @version 1.0"]
637 #[cfg(feature = "api-20")]
638 pub fn OH_Drawing_CanvasCreateWithPixelMap(
639 pixelMap: *mut OH_Drawing_PixelMap,
640 ) -> *mut OH_Drawing_Canvas;
641}
642extern "C" {
643 #[doc = " @brief Destroys an <b>OH_Drawing_Canvas</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
644 pub fn OH_Drawing_CanvasDestroy(canvas: *mut OH_Drawing_Canvas);
645}
646extern "C" {
647 #[doc = " @brief Binds a bitmap to a canvas so that the content drawn on the canvas\n is output to the bitmap (this process is called CPU rendering).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @since 8\n @version 1.0"]
648 pub fn OH_Drawing_CanvasBind(canvas: *mut OH_Drawing_Canvas, bitmap: *mut OH_Drawing_Bitmap);
649}
650extern "C" {
651 #[doc = " @brief Attaches a pen to a canvas so that the canvas will use the style and color of the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @since 8\n @version 1.0"]
652 pub fn OH_Drawing_CanvasAttachPen(canvas: *mut OH_Drawing_Canvas, pen: *const OH_Drawing_Pen);
653}
654extern "C" {
655 #[doc = " @brief Detaches the pen from a canvas so that the canvas will not use the style\n and color of the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
656 pub fn OH_Drawing_CanvasDetachPen(canvas: *mut OH_Drawing_Canvas);
657}
658extern "C" {
659 #[doc = " @brief Attaches a brush to a canvas so that the canvas will use the style and color of the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 8\n @version 1.0"]
660 pub fn OH_Drawing_CanvasAttachBrush(
661 canvas: *mut OH_Drawing_Canvas,
662 brush: *const OH_Drawing_Brush,
663 );
664}
665extern "C" {
666 #[doc = " @brief Detaches the brush from a canvas so that the canvas will not use the style\n and color of the brush to fill in a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
667 pub fn OH_Drawing_CanvasDetachBrush(canvas: *mut OH_Drawing_Canvas);
668}
669extern "C" {
670 #[doc = " @brief Saves the current canvas status (canvas matrix) to the top of the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
671 pub fn OH_Drawing_CanvasSave(canvas: *mut OH_Drawing_Canvas);
672}
673extern "C" {
674 #[doc = " @brief Saves matrix and clip, and allocates a bitmap for subsequent drawing.\n Calling restore discards changes to matrix and clip, and draws the bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 12\n @version 1.0"]
675 pub fn OH_Drawing_CanvasSaveLayer(
676 canvas: *mut OH_Drawing_Canvas,
677 rect: *const OH_Drawing_Rect,
678 brush: *const OH_Drawing_Brush,
679 );
680}
681extern "C" {
682 #[doc = " @brief Restores the canvas status (canvas matrix) saved on the top of the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 8\n @version 1.0"]
683 pub fn OH_Drawing_CanvasRestore(canvas: *mut OH_Drawing_Canvas);
684}
685extern "C" {
686 #[doc = " @brief Gets the number of the canvas status (canvas matrix) saved in the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @return Returns a 32-bit variable that describes the number of canvas status.\n @since 11\n @version 1.0"]
687 pub fn OH_Drawing_CanvasGetSaveCount(canvas: *mut OH_Drawing_Canvas) -> u32;
688}
689extern "C" {
690 #[doc = " @brief Restores the specific number of the canvas status (canvas matrix) saved in the stack.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param saveCount Indicates the specific number of canvas status.\n @since 11\n @version 1.0"]
691 pub fn OH_Drawing_CanvasRestoreToCount(canvas: *mut OH_Drawing_Canvas, saveCount: u32);
692}
693extern "C" {
694 #[doc = " @brief Draws a line segment.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param x1 Indicates the x coordinate of the start point of the line segment.\n @param y1 Indicates the y coordinate of the start point of the line segment.\n @param x2 Indicates the x coordinate of the end point of the line segment.\n @param y2 Indicates the y coordinate of the end point of the line segment.\n @since 8\n @version 1.0"]
695 pub fn OH_Drawing_CanvasDrawLine(
696 canvas: *mut OH_Drawing_Canvas,
697 x1: f32,
698 y1: f32,
699 x2: f32,
700 y2: f32,
701 );
702}
703extern "C" {
704 #[doc = " @brief Draws a path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @since 8\n @version 1.0"]
705 pub fn OH_Drawing_CanvasDrawPath(canvas: *mut OH_Drawing_Canvas, path: *const OH_Drawing_Path);
706}
707extern "C" {
708 #[doc = " @brief Draw a pixel map on the grid, with the grid evenly distributed over the pixel map.\n\n @param cCanvas Indicates the pointer to an OH_Drawing_Canvas object.\n @param pixelMap Indicates the pointer to an OH_Drawing_PixelMap.\n @param meshWidth The number of columns in the mesh.\n @param meshHeight The number of rows in the mesh.\n @param vertices Indicates the vertex array that specifies the drawing positions of the mesh.\n @param verticesSize The size of vertices.\n @param vertOffset The number of vert elements to skip before drawing.\n @param colors Indicates the color array that specifies a color at each vertex.\n @param colorsSize The size of colors.\n @param colorOffset The number of color elements to skip before drawing.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if any of canvas, pixelMap\n and dst is nullptr.\n @since 23\n @version 1.0"]
709 #[cfg(feature = "api-23")]
710 pub fn OH_Drawing_CanvasDrawPixelMapMesh(
711 cCanvas: *mut OH_Drawing_Canvas,
712 pixelMap: *mut OH_Drawing_PixelMap,
713 meshWidth: u32,
714 meshHeight: u32,
715 vertices: *const f32,
716 verticesSize: u32,
717 vertOffset: u32,
718 colors: *const u32,
719 colorsSize: u32,
720 colorOffset: u32,
721 ) -> OH_Drawing_ErrorCode;
722}
723extern "C" {
724 #[doc = " @brief Divides the pixelmap into a grid with nine sections: four sides, four corners, and the center.\n Draws the specified section of the pixelmap onto the canvas, corners are unmodified or scaled down if they exceed\n the destination rectangle, center and four sides are scaled to fit remaining space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @param center Divides the pixelmap into nine sections: four sides, four corners, and the center.\n @param dst The area of destination canvas.\n @param mode Filter mode.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, pixelMap\n and dst is nullptr.\n @since 18\n @version 1.0"]
725 #[cfg(feature = "api-18")]
726 pub fn OH_Drawing_CanvasDrawPixelMapNine(
727 canvas: *mut OH_Drawing_Canvas,
728 pixelMap: *mut OH_Drawing_PixelMap,
729 center: *const OH_Drawing_Rect,
730 dst: *const OH_Drawing_Rect,
731 mode: OH_Drawing_FilterMode,
732 ) -> OH_Drawing_ErrorCode;
733}
734extern "C" {
735 #[doc = " @brief Draw the specified area of the Media::PixelMap to the specified area of the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @param src the area of source pixelmap.\n @param dst the area of destination canvas.\n @param samplingOptions the sampling mode.\n @since 12\n @version 1.0"]
736 pub fn OH_Drawing_CanvasDrawPixelMapRect(
737 canvas: *mut OH_Drawing_Canvas,
738 pixelMap: *mut OH_Drawing_PixelMap,
739 src: *const OH_Drawing_Rect,
740 dst: *const OH_Drawing_Rect,
741 samplingOptions: *const OH_Drawing_SamplingOptions,
742 );
743}
744extern "C" {
745 #[doc = " @brief Draw the specified area of the Media::PixelMap to the specified area of the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @param src Indicates the area of source pixelmap.\n @param dst Indicates the area of destination canvas.\n @param samplingOptions Indicates the sampling mode.\n @param constraint Indicates constraint type.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, pixelMap\n and dst is nullptr.\n @since 20\n @version 1.0"]
746 #[cfg(feature = "api-20")]
747 pub fn OH_Drawing_CanvasDrawPixelMapRectConstraint(
748 canvas: *mut OH_Drawing_Canvas,
749 pixelMap: *mut OH_Drawing_PixelMap,
750 src: *const OH_Drawing_Rect,
751 dst: *const OH_Drawing_Rect,
752 samplingOptions: *const OH_Drawing_SamplingOptions,
753 constraint: OH_Drawing_SrcRectConstraint,
754 ) -> OH_Drawing_ErrorCode;
755}
756extern "C" {
757 #[doc = " @brief Fills clipped canvas area with brush.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @since 12\n @version 1.0"]
758 pub fn OH_Drawing_CanvasDrawBackground(
759 canvas: *mut OH_Drawing_Canvas,
760 brush: *const OH_Drawing_Brush,
761 );
762}
763extern "C" {
764 #[doc = " @brief Draws region using clip, matrix and paint.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @since 12\n @version 1.0"]
765 pub fn OH_Drawing_CanvasDrawRegion(
766 canvas: *mut OH_Drawing_Canvas,
767 region: *const OH_Drawing_Region,
768 );
769}
770#[doc = " Draw each point separately."]
771pub const OH_Drawing_PointMode_POINT_MODE_POINTS: OH_Drawing_PointMode = 0;
772#[doc = " Draw each pair of points as a line segment."]
773pub const OH_Drawing_PointMode_POINT_MODE_LINES: OH_Drawing_PointMode = 1;
774#[doc = " Draw the array of points as a open polygon."]
775pub const OH_Drawing_PointMode_POINT_MODE_POLYGON: OH_Drawing_PointMode = 2;
776#[doc = " @brief Enumerates of scale to fit flags, selects if an array of points are drawn as discrete points, as lines,\n or as an open polygon.\n\n @since 12\n @version 1.0"]
777pub type OH_Drawing_PointMode = u32;
778extern "C" {
779 #[doc = " @brief Draws a point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or point is nullptr.\n @since 12\n @version 1.0"]
780 pub fn OH_Drawing_CanvasDrawPoint(
781 canvas: *mut OH_Drawing_Canvas,
782 point: *const OH_Drawing_Point2D,
783 ) -> OH_Drawing_ErrorCode;
784}
785extern "C" {
786 #[doc = " @brief Draws point array as separate point, line segment or open polygon according to given point mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param mode Draw points enum.\n @param count The point count.\n @param point2D Point struct array.\n @since 12\n @version 1.0"]
787 pub fn OH_Drawing_CanvasDrawPoints(
788 canvas: *mut OH_Drawing_Canvas,
789 mode: OH_Drawing_PointMode,
790 count: u32,
791 point2D: *const OH_Drawing_Point2D,
792 );
793}
794extern "C" {
795 #[doc = " @brief Draws a bitmap.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param left Indicates the left position of the <b>OH_Drawing_Bitmap</b>.\n @param top Indicates the top position of the <b>OH_Drawing_Bitmap</b>.\n @since 11\n @version 1.0"]
796 pub fn OH_Drawing_CanvasDrawBitmap(
797 canvas: *mut OH_Drawing_Canvas,
798 bitmap: *const OH_Drawing_Bitmap,
799 left: f32,
800 top: f32,
801 );
802}
803extern "C" {
804 #[doc = " @brief Draw the specified area of the bitmap to the specified area of the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param src the area of source bitmap, can be nullptr.\n @param dst the area of destination canvas.\n @param samplingOptions the sampling mode.\n @since 12\n @version 1.0"]
805 pub fn OH_Drawing_CanvasDrawBitmapRect(
806 canvas: *mut OH_Drawing_Canvas,
807 bitmap: *const OH_Drawing_Bitmap,
808 src: *const OH_Drawing_Rect,
809 dst: *const OH_Drawing_Rect,
810 samplingOptions: *const OH_Drawing_SamplingOptions,
811 );
812}
813extern "C" {
814 #[doc = " @brief Draws a rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 11\n @version 1.0"]
815 pub fn OH_Drawing_CanvasDrawRect(canvas: *mut OH_Drawing_Canvas, rect: *const OH_Drawing_Rect);
816}
817extern "C" {
818 #[doc = " @brief Draws a circle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param radius Indicates the radius of the circle.\n @since 11\n @version 1.0"]
819 pub fn OH_Drawing_CanvasDrawCircle(
820 canvas: *mut OH_Drawing_Canvas,
821 point: *const OH_Drawing_Point,
822 radius: f32,
823 );
824}
825extern "C" {
826 #[doc = " @brief Fills the entire canvas with the specified color and blend mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param color Indicates the color, which is a 32-bit variable.\n @param blendMode Indicates the blend mode.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas is nullptr.\n @since 12\n @version 1.0"]
827 pub fn OH_Drawing_CanvasDrawColor(
828 canvas: *mut OH_Drawing_Canvas,
829 color: u32,
830 blendMode: OH_Drawing_BlendMode,
831 ) -> OH_Drawing_ErrorCode;
832}
833extern "C" {
834 #[doc = " @brief Draws an oval.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 11\n @version 1.0"]
835 pub fn OH_Drawing_CanvasDrawOval(canvas: *mut OH_Drawing_Canvas, rect: *const OH_Drawing_Rect);
836}
837extern "C" {
838 #[doc = " @brief Draws an arc.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param startAngle Indicates the startAngle of the arc.\n @param sweepAngle Indicates the sweepAngle of the arc.\n @since 11\n @version 1.0"]
839 pub fn OH_Drawing_CanvasDrawArc(
840 canvas: *mut OH_Drawing_Canvas,
841 rect: *const OH_Drawing_Rect,
842 startAngle: f32,
843 sweepAngle: f32,
844 );
845}
846extern "C" {
847 #[doc = " @brief Draws an arc with use center.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param startAngle Indicates the startAngle of the arc.\n @param sweepAngle Indicates the sweepAngle of the arc.\n @param useCenter If true, include the center of the oval in the arc, and close it if it is being stroked.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or rect is nullptr.\n @since 18\n @version 1.0"]
848 #[cfg(feature = "api-18")]
849 pub fn OH_Drawing_CanvasDrawArcWithCenter(
850 canvas: *mut OH_Drawing_Canvas,
851 rect: *const OH_Drawing_Rect,
852 startAngle: f32,
853 sweepAngle: f32,
854 useCenter: bool,
855 ) -> OH_Drawing_ErrorCode;
856}
857extern "C" {
858 #[doc = " @brief Draws a roundrect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @since 11\n @version 1.0"]
859 pub fn OH_Drawing_CanvasDrawRoundRect(
860 canvas: *mut OH_Drawing_Canvas,
861 roundRect: *const OH_Drawing_RoundRect,
862 );
863}
864extern "C" {
865 #[doc = " @brief Draw two nested rounded rectangles.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param outer Rounded rectangle object, representing the outer rounded rectangle boundary.\n @param inner Rounded rectangle object, representing the internal rounded rectangle boundary.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, outer\n and inner is nullptr.\n @since 18\n @version 1.0"]
866 #[cfg(feature = "api-18")]
867 pub fn OH_Drawing_CanvasDrawNestedRoundRect(
868 canvas: *mut OH_Drawing_Canvas,
869 outer: *const OH_Drawing_RoundRect,
870 inner: *const OH_Drawing_RoundRect,
871 ) -> OH_Drawing_ErrorCode;
872}
873extern "C" {
874 #[doc = " @brief Draws a single character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param str Indicates the single character encoded in UTF-8.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param x Indicates the horizontal offset applied to the single character.\n @param y Indicates the vertical offset applied to the single character.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, str\n and font is nullptr or strlen(str) is 0.\n @since 12\n @version 1.0"]
875 pub fn OH_Drawing_CanvasDrawSingleCharacter(
876 canvas: *mut OH_Drawing_Canvas,
877 str_: *const ::std::os::raw::c_char,
878 font: *const OH_Drawing_Font,
879 x: f32,
880 y: f32,
881 ) -> OH_Drawing_ErrorCode;
882}
883extern "C" {
884 #[doc = " @brief Draws a single character with font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param str Indicates the single character encoded in UTF-8.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param x Indicates the horizontal offset applied to the single character.\n @param y Indicates the vertical offset applied to the single character.\n @param fontFeatures Indicates the pointer to an <b>OH_Drawing_FontFeatures</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of canvas, str, font\n or fontFeatures is nullptr, or if strlen(str) is 0.\n @since 20\n @version 1.0"]
885 #[cfg(feature = "api-20")]
886 pub fn OH_Drawing_CanvasDrawSingleCharacterWithFeatures(
887 canvas: *mut OH_Drawing_Canvas,
888 str_: *const ::std::os::raw::c_char,
889 font: *const OH_Drawing_Font,
890 x: f32,
891 y: f32,
892 fontFeatures: *mut OH_Drawing_FontFeatures,
893 ) -> OH_Drawing_ErrorCode;
894}
895extern "C" {
896 #[doc = " @brief Draws a textblob.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.\n @param x Indicates the horizontal offset applied to blob.\n @param y Indicates the vertical offset applied to blob.\n @since 11\n @version 1.0"]
897 pub fn OH_Drawing_CanvasDrawTextBlob(
898 canvas: *mut OH_Drawing_Canvas,
899 textBlob: *const OH_Drawing_TextBlob,
900 x: f32,
901 y: f32,
902 );
903}
904#[doc = " Clip with difference."]
905pub const OH_Drawing_CanvasClipOp_DIFFERENCE: OH_Drawing_CanvasClipOp = 0;
906#[doc = " Clip with intersection."]
907pub const OH_Drawing_CanvasClipOp_INTERSECT: OH_Drawing_CanvasClipOp = 1;
908#[doc = " @brief Enumerates clip op.\n\n @since 11\n @version 1.0"]
909pub type OH_Drawing_CanvasClipOp = u32;
910extern "C" {
911 #[doc = " @brief Clip a rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param clipOp Indicates the operation to apply to clip.\n @param doAntiAlias Indicates whether clip operation requires anti-aliased.\n @since 11\n @version 1.0"]
912 pub fn OH_Drawing_CanvasClipRect(
913 canvas: *mut OH_Drawing_Canvas,
914 rect: *const OH_Drawing_Rect,
915 clipOp: OH_Drawing_CanvasClipOp,
916 doAntiAlias: bool,
917 );
918}
919extern "C" {
920 #[doc = " @brief Clip a round rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @param clipOp Indicates the operation to apply to clip.\n @param doAntiAlias Indicates whether clip operation requires anti-aliased.\n @since 12\n @version 1.0"]
921 pub fn OH_Drawing_CanvasClipRoundRect(
922 canvas: *mut OH_Drawing_Canvas,
923 roundRect: *const OH_Drawing_RoundRect,
924 clipOp: OH_Drawing_CanvasClipOp,
925 doAntiAlias: bool,
926 );
927}
928extern "C" {
929 #[doc = " @brief Clip a path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param clipOp Indicates the operation to apply to clip.\n @param doAntiAlias Indicates whether clip operation requires anti-aliased.\n @since 11\n @version 1.0"]
930 pub fn OH_Drawing_CanvasClipPath(
931 canvas: *mut OH_Drawing_Canvas,
932 path: *const OH_Drawing_Path,
933 clipOp: OH_Drawing_CanvasClipOp,
934 doAntiAlias: bool,
935 );
936}
937extern "C" {
938 #[doc = " @brief Clips a region.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param clipOp To apply to clip.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or region is nullptr.\n @since 12\n @version 1.0"]
939 pub fn OH_Drawing_CanvasClipRegion(
940 canvas: *mut OH_Drawing_Canvas,
941 region: *const OH_Drawing_Region,
942 clipOp: OH_Drawing_CanvasClipOp,
943 ) -> OH_Drawing_ErrorCode;
944}
945extern "C" {
946 #[doc = " @brief Rotates by degrees. Positive degrees rotates clockwise.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param degrees Indicates the amount to rotate, in degrees.\n @param px Indicates the x-axis value of the point to rotate about.\n @param py Indicates the y-axis value of the point to rotate about.\n @since 11\n @version 1.0"]
947 pub fn OH_Drawing_CanvasRotate(canvas: *mut OH_Drawing_Canvas, degrees: f32, px: f32, py: f32);
948}
949extern "C" {
950 #[doc = " @brief Translates by dx along the x-axis and dy along the y-axis.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param dx Indicates the distance to translate on x-axis.\n @param dy Indicates the distance to translate on y-axis.\n @since 11\n @version 1.0"]
951 pub fn OH_Drawing_CanvasTranslate(canvas: *mut OH_Drawing_Canvas, dx: f32, dy: f32);
952}
953extern "C" {
954 #[doc = " @brief Scales by sx on the x-axis and sy on the y-axis.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param sx Indicates the amount to scale on x-axis.\n @param sy Indicates the amount to scale on y-axis.\n @since 11\n @version 1.0"]
955 pub fn OH_Drawing_CanvasScale(canvas: *mut OH_Drawing_Canvas, sx: f32, sy: f32);
956}
957extern "C" {
958 #[doc = " @brief Skew by sx on the x-axis and sy on the y-axis.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param sx Indicates the amount to skew on x-axis.\n @param sy Indicates the amount to skew on y-axis.\n @since 12\n @version 1.0"]
959 pub fn OH_Drawing_CanvasSkew(canvas: *mut OH_Drawing_Canvas, sx: f32, sy: f32);
960}
961extern "C" {
962 #[doc = " @brief Get the width of a canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 12\n @version 1.0"]
963 pub fn OH_Drawing_CanvasGetWidth(canvas: *mut OH_Drawing_Canvas) -> i32;
964}
965extern "C" {
966 #[doc = " @brief Get the height of a canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 12\n @version 1.0"]
967 pub fn OH_Drawing_CanvasGetHeight(canvas: *mut OH_Drawing_Canvas) -> i32;
968}
969extern "C" {
970 #[doc = " @brief Get the bounds of clip of a canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
971 pub fn OH_Drawing_CanvasGetLocalClipBounds(
972 canvas: *mut OH_Drawing_Canvas,
973 rect: *mut OH_Drawing_Rect,
974 );
975}
976extern "C" {
977 #[doc = " @brief Get a 3x3 matrix of the transform from local coordinates to 'device'.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
978 pub fn OH_Drawing_CanvasGetTotalMatrix(
979 canvas: *mut OH_Drawing_Canvas,
980 matrix: *mut OH_Drawing_Matrix,
981 );
982}
983extern "C" {
984 #[doc = " @brief Use the passed matrix to transforming the geometry, then use existing matrix.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\n represents the matrix which is passed.\n @since 12\n @version 1.0"]
985 pub fn OH_Drawing_CanvasConcatMatrix(
986 canvas: *mut OH_Drawing_Canvas,
987 matrix: *mut OH_Drawing_Matrix,
988 );
989}
990#[doc = " Use no shadow flags."]
991pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_NONE: OH_Drawing_CanvasShadowFlags = 0;
992#[doc = " The occluding object is transparent."]
993pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_TRANSPARENT_OCCLUDER:
994 OH_Drawing_CanvasShadowFlags = 1;
995#[doc = " No need to analyze shadows."]
996pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_GEOMETRIC_ONLY: OH_Drawing_CanvasShadowFlags =
997 2;
998#[doc = " Use all shadow flags."]
999pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_ALL: OH_Drawing_CanvasShadowFlags = 3;
1000#[doc = " @brief Enumerates of shadow flags.\n\n @since 12\n @version 1.0"]
1001pub type OH_Drawing_CanvasShadowFlags = u32;
1002extern "C" {
1003 #[doc = " @brief Use circular light to draw an offset spot shadow and outlining ambient shadow for the given path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object, use to generate shadows.\n @param planeParams Represents the value of the function which returns Z offset of the occluder from the\n canvas based on x and y.\n @param devLightPos Represents the position of the light relative to the canvas.\n @param lightRadius The radius of the circular light.\n @param ambientColor Ambient shadow's color.\n @param spotColor Spot shadow's color.\n @param flag Indicates the flag to control opaque occluder, shadow, and light position.\n @since 12\n @version 1.0"]
1004 pub fn OH_Drawing_CanvasDrawShadow(
1005 canvas: *mut OH_Drawing_Canvas,
1006 path: *mut OH_Drawing_Path,
1007 planeParams: OH_Drawing_Point3D,
1008 devLightPos: OH_Drawing_Point3D,
1009 lightRadius: f32,
1010 ambientColor: u32,
1011 spotColor: u32,
1012 flag: OH_Drawing_CanvasShadowFlags,
1013 );
1014}
1015extern "C" {
1016 #[doc = " @brief Clears a canvas by using a specified color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param color Indicates the color, which is a 32-bit (ARGB) variable.\n @since 8\n @version 1.0"]
1017 pub fn OH_Drawing_CanvasClear(canvas: *mut OH_Drawing_Canvas, color: u32);
1018}
1019extern "C" {
1020 #[doc = " @brief Sets matrix of canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
1021 pub fn OH_Drawing_CanvasSetMatrix(
1022 canvas: *mut OH_Drawing_Canvas,
1023 matrix: *mut OH_Drawing_Matrix,
1024 );
1025}
1026extern "C" {
1027 #[doc = " @brief Reset matrix to the identity matrix, any prior matrix state is overwritten.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 12\n @version 1.0"]
1028 pub fn OH_Drawing_CanvasResetMatrix(canvas: *mut OH_Drawing_Canvas);
1029}
1030extern "C" {
1031 #[doc = " @brief Draws the specified source rectangle of the image onto the canvas,\n scaled and translated to the destination rectangle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param src The area of source image.\n @param dst The area of destination canvas.\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @param srcRectConstraint Constraint type.\n @since 12\n @version 1.0"]
1032 pub fn OH_Drawing_CanvasDrawImageRectWithSrc(
1033 canvas: *mut OH_Drawing_Canvas,
1034 image: *const OH_Drawing_Image,
1035 src: *const OH_Drawing_Rect,
1036 dst: *const OH_Drawing_Rect,
1037 samplingOptions: *const OH_Drawing_SamplingOptions,
1038 srcRectConstraint: OH_Drawing_SrcRectConstraint,
1039 );
1040}
1041extern "C" {
1042 #[doc = " @brief Draws the specified source rectangle of the image onto the canvas,\n scaled and translated to the destination rectangle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @since 12\n @version 1.0"]
1043 pub fn OH_Drawing_CanvasDrawImageRect(
1044 canvas: *mut OH_Drawing_Canvas,
1045 image: *mut OH_Drawing_Image,
1046 rect: *mut OH_Drawing_Rect,
1047 samplingOptions: *mut OH_Drawing_SamplingOptions,
1048 );
1049}
1050#[doc = " The vertices are a triangle list."]
1051pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES: OH_Drawing_VertexMode = 0;
1052#[doc = " The vertices are a triangle strip."]
1053pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES_STRIP: OH_Drawing_VertexMode = 1;
1054#[doc = " The vertices are a triangle fan."]
1055pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLE_FAN: OH_Drawing_VertexMode = 2;
1056#[doc = " @brief Enumerates of vertices flags.\n\n @since 12\n @version 1.0"]
1057pub type OH_Drawing_VertexMode = u32;
1058extern "C" {
1059 #[doc = " @brief Draw a triangular mesh with vertex descriptions.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param vertexMmode Draw a set of vertices.\n @param vertexCount Vertex count.\n @param positions Positions data pointer.\n @param texs Texture coordinate data pointer.\n @param colors Color data pointer.\n @param indexCount Index count.\n @param indices Index data pointer.\n @param mode Blend mode used for drawing.\n @since 12\n @version 1.0"]
1060 pub fn OH_Drawing_CanvasDrawVertices(
1061 canvas: *mut OH_Drawing_Canvas,
1062 vertexMmode: OH_Drawing_VertexMode,
1063 vertexCount: i32,
1064 positions: *const OH_Drawing_Point2D,
1065 texs: *const OH_Drawing_Point2D,
1066 colors: *const u32,
1067 indexCount: i32,
1068 indices: *const u16,
1069 mode: OH_Drawing_BlendMode,
1070 );
1071}
1072extern "C" {
1073 #[doc = " @brief Read pixels data from canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param imageInfo width, height, colorType, and alphaType of dstPixels.\n @param dstPixels destination pixel storage.\n @param dstRowBytes size of one row of pixels.\n @param srcX offset into canvas writable pixels on x-axis.\n @param srcY offset into canvas writable pixels on y-axis.\n @return true if pixels are copied to dstPixels.\n @since 12\n @version 1.0"]
1074 pub fn OH_Drawing_CanvasReadPixels(
1075 canvas: *mut OH_Drawing_Canvas,
1076 imageInfo: *mut OH_Drawing_Image_Info,
1077 dstPixels: *mut ::std::os::raw::c_void,
1078 dstRowBytes: u32,
1079 srcX: i32,
1080 srcY: i32,
1081 ) -> bool;
1082}
1083extern "C" {
1084 #[doc = " @brief Read pixels data to a bitmap from canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @param srcX offset into canvas writable pixels on x-axis.\n @param srcY offset into canvas writable pixels on y-axis.\n @return true if pixels are copied to dstBitmap.\n @since 12\n @version 1.0"]
1085 pub fn OH_Drawing_CanvasReadPixelsToBitmap(
1086 canvas: *mut OH_Drawing_Canvas,
1087 bitmap: *mut OH_Drawing_Bitmap,
1088 srcX: i32,
1089 srcY: i32,
1090 ) -> bool;
1091}
1092extern "C" {
1093 #[doc = " @brief Checks whether the drawable area is empty.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param isClipEmpty Indicates if drawable area is empty.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or isClipEmpty is nullptr.\n @since 12\n @version 1.0"]
1094 pub fn OH_Drawing_CanvasIsClipEmpty(
1095 canvas: *mut OH_Drawing_Canvas,
1096 isClipEmpty: *mut bool,
1097 ) -> OH_Drawing_ErrorCode;
1098}
1099extern "C" {
1100 #[doc = " @brief Gets image info of canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or imageInfo is nullptr.\n @since 12\n @version 1.0"]
1101 pub fn OH_Drawing_CanvasGetImageInfo(
1102 canvas: *mut OH_Drawing_Canvas,
1103 imageInfo: *mut OH_Drawing_Image_Info,
1104 ) -> OH_Drawing_ErrorCode;
1105}
1106extern "C" {
1107 #[doc = " @brief Replay drawing command.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param recordCmd Indicates the pointer to an <b>OH_Drawing_RecordCmd</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or recordCmd is nullptr.\n @since 13\n @version 1.0"]
1108 #[cfg(feature = "api-13")]
1109 pub fn OH_Drawing_CanvasDrawRecordCmd(
1110 canvas: *mut OH_Drawing_Canvas,
1111 recordCmd: *mut OH_Drawing_RecordCmd,
1112 ) -> OH_Drawing_ErrorCode;
1113}
1114extern "C" {
1115 #[doc = " @brief Replay drawing command.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param recordCmd Indicates the pointer to an <b>OH_Drawing_RecordCmd</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or recordCmd is nullptr.\n @since 19\n @version 1.0"]
1116 #[cfg(feature = "api-19")]
1117 pub fn OH_Drawing_CanvasDrawRecordCmdNesting(
1118 canvas: *mut OH_Drawing_Canvas,
1119 recordCmd: *mut OH_Drawing_RecordCmd,
1120 ) -> OH_Drawing_ErrorCode;
1121}
1122extern "C" {
1123 #[doc = " @brief Checks if the path has been cut off.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param quickReject Indicates if the path has been cut off.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or path is nullptr,\n or quickReject is nullptr.\n @since 18\n @version 1.0"]
1124 #[cfg(feature = "api-18")]
1125 pub fn OH_Drawing_CanvasQuickRejectPath(
1126 canvas: *mut OH_Drawing_Canvas,
1127 path: *const OH_Drawing_Path,
1128 quickReject: *mut bool,
1129 ) -> OH_Drawing_ErrorCode;
1130}
1131extern "C" {
1132 #[doc = " @brief Checks if the rect has been cut off.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param quickReject Indicates if the rect has been cut off.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or rect is nullptr,\n or quickReject is nullptr.\n @since 18\n @version 1.0"]
1133 #[cfg(feature = "api-18")]
1134 pub fn OH_Drawing_CanvasQuickRejectRect(
1135 canvas: *mut OH_Drawing_Canvas,
1136 rect: *const OH_Drawing_Rect,
1137 quickReject: *mut bool,
1138 ) -> OH_Drawing_ErrorCode;
1139}
1140extern "C" {
1141 #[doc = " @brief Converts four variables (alpha, red, green, and blue) into a 32-bit (ARGB) variable that describes a color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param alpha Indicates a variable that describes alpha. The value ranges from 0x00 to 0xFF.\n @param red Indicates a variable that describes red. The value ranges from 0x00 to 0xFF.\n @param green Indicates a variable that describes green. The value ranges from 0x00 to 0xFF.\n @param blue Indicates a variable that describes blue. The value ranges from 0x00 to 0xFF.\n @return Returns a 32-bit (ARGB) variable that describes the color.\n @since 8\n @version 1.0"]
1142 pub fn OH_Drawing_ColorSetArgb(alpha: u32, red: u32, green: u32, blue: u32) -> u32;
1143}
1144extern "C" {
1145 #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> with a blend mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param color Indicates the color, which is a 32-bit (ARGB) variable.\n @param blendMode Indicates the blend mode.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
1146 pub fn OH_Drawing_ColorFilterCreateBlendMode(
1147 color: u32,
1148 blendMode: OH_Drawing_BlendMode,
1149 ) -> *mut OH_Drawing_ColorFilter;
1150}
1151extern "C" {
1152 #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> applies the outerColorFilter and then applies innerColorFilter.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param outerColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @param innerColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
1153 pub fn OH_Drawing_ColorFilterCreateCompose(
1154 outerColorFilter: *mut OH_Drawing_ColorFilter,
1155 innerColorFilter: *mut OH_Drawing_ColorFilter,
1156 ) -> *mut OH_Drawing_ColorFilter;
1157}
1158extern "C" {
1159 #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> with a 5x4 color matrix.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the matrix, which is represented as a float array of length 20.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
1160 pub fn OH_Drawing_ColorFilterCreateMatrix(matrix: *const f32) -> *mut OH_Drawing_ColorFilter;
1161}
1162extern "C" {
1163 #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> applies the gamma curve of SRGB to the RGB color channel.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
1164 pub fn OH_Drawing_ColorFilterCreateLinearToSrgbGamma() -> *mut OH_Drawing_ColorFilter;
1165}
1166extern "C" {
1167 #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> applies the RGB color channel to the gamma curve of SRGB.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
1168 pub fn OH_Drawing_ColorFilterCreateSrgbGammaToLinear() -> *mut OH_Drawing_ColorFilter;
1169}
1170extern "C" {
1171 #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> multiplies the luma of its input into the alpha channel,\n and sets the red, green, and blue channels to zero.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 11\n @version 1.0"]
1172 pub fn OH_Drawing_ColorFilterCreateLuma() -> *mut OH_Drawing_ColorFilter;
1173}
1174extern "C" {
1175 #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> with the given mulColor used to multiply source color and addColor\n used to add to source color. The Alpha channel will not be affected.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param mulColor Indicates the color, which is a 32-bit (ARGB) variable.\n @param addColor Indicates the color, which is a 32-bit (ARGB) variable.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 20\n @version 1.0"]
1176 #[cfg(feature = "api-20")]
1177 pub fn OH_Drawing_ColorFilterCreateLighting(
1178 mulColor: u32,
1179 addColor: u32,
1180 ) -> *mut OH_Drawing_ColorFilter;
1181}
1182extern "C" {
1183 #[doc = " @brief Destroys an <b>OH_Drawing_ColorFilter</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @since 11\n @version 1.0"]
1184 pub fn OH_Drawing_ColorFilterDestroy(colorFilter: *mut OH_Drawing_ColorFilter);
1185}
1186extern "C" {
1187 #[doc = " @brief Creates an <b>OH_Drawing_ColorSpace</b> object that represents the SRGB color space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorSpace</b> object created.\n @since 12\n @version 1.0"]
1188 pub fn OH_Drawing_ColorSpaceCreateSrgb() -> *mut OH_Drawing_ColorSpace;
1189}
1190extern "C" {
1191 #[doc = " @brief Creates an <b>OH_Drawing_ColorSpace</b> object with the SRGB primaries, but a linear (1.0) gamma.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_ColorSpace</b> object created.\n @since 12\n @version 1.0"]
1192 pub fn OH_Drawing_ColorSpaceCreateSrgbLinear() -> *mut OH_Drawing_ColorSpace;
1193}
1194extern "C" {
1195 #[doc = " @brief Destroys an <b>OH_Drawing_ColorSpace</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param colorSpace Indicates the pointer to an <b>OH_Drawing_ColorSpace</b> object.\n @since 12\n @version 1.0"]
1196 pub fn OH_Drawing_ColorSpaceDestroy(colorSpace: *mut OH_Drawing_ColorSpace);
1197}
1198extern "C" {
1199 #[doc = " @brief Creates an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Filter</b> object created.\n @since 11\n @version 1.0"]
1200 pub fn OH_Drawing_FilterCreate() -> *mut OH_Drawing_Filter;
1201}
1202extern "C" {
1203 #[doc = " @brief Sets an <b>OH_Drawing_ImageFilter</b> object for an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @param imageFilter Indicates the pointer to an <b>OH_Drawing_ImageFilter</b> object.\n @since 12\n @version 1.0"]
1204 pub fn OH_Drawing_FilterSetImageFilter(
1205 filter: *mut OH_Drawing_Filter,
1206 imageFilter: *mut OH_Drawing_ImageFilter,
1207 );
1208}
1209extern "C" {
1210 #[doc = " @brief Sets an <b>OH_Drawing_MaskFilter</b> object for an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @param maskFilter Indicates the pointer to an <b>OH_Drawing_MaskFilter</b> object.\n @since 11\n @version 1.0"]
1211 pub fn OH_Drawing_FilterSetMaskFilter(
1212 filter: *mut OH_Drawing_Filter,
1213 maskFilter: *mut OH_Drawing_MaskFilter,
1214 );
1215}
1216extern "C" {
1217 #[doc = " @brief Sets an <b>OH_Drawing_ColorFilter</b> object for an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @since 11\n @version 1.0"]
1218 pub fn OH_Drawing_FilterSetColorFilter(
1219 filter: *mut OH_Drawing_Filter,
1220 colorFilter: *mut OH_Drawing_ColorFilter,
1221 );
1222}
1223extern "C" {
1224 #[doc = " @brief Gets an <b>OH_Drawing_ColorFilter</b> object from an <b>OH_Drawing_Filter</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.\n @since 12\n @version 1.0"]
1225 pub fn OH_Drawing_FilterGetColorFilter(
1226 filter: *mut OH_Drawing_Filter,
1227 colorFilter: *mut OH_Drawing_ColorFilter,
1228 );
1229}
1230extern "C" {
1231 #[doc = " @brief Destroys an <b>OH_Drawing_Filter</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 11\n @version 1.0"]
1232 pub fn OH_Drawing_FilterDestroy(filter: *mut OH_Drawing_Filter);
1233}
1234extern "C" {
1235 #[doc = " @brief Creates an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Font</b> object created.\n @since 11\n @version 1.0"]
1236 pub fn OH_Drawing_FontCreate() -> *mut OH_Drawing_Font;
1237}
1238#[doc = " glyph outlines unchanged"]
1239pub const OH_Drawing_FontHinting_FONT_HINTING_NONE: OH_Drawing_FontHinting = 0;
1240#[doc = " minimal modification to improve contrast"]
1241pub const OH_Drawing_FontHinting_FONT_HINTING_SLIGHT: OH_Drawing_FontHinting = 1;
1242#[doc = " glyph outlines modified to improve contrast"]
1243pub const OH_Drawing_FontHinting_FONT_HINTING_NORMAL: OH_Drawing_FontHinting = 2;
1244#[doc = " modifies glyph outlines for maximum contrast"]
1245pub const OH_Drawing_FontHinting_FONT_HINTING_FULL: OH_Drawing_FontHinting = 3;
1246#[doc = " @brief Enumerates font hinting pattern.\n\n @since 12\n @version 1.0"]
1247pub type OH_Drawing_FontHinting = u32;
1248#[doc = " no transparent pixels on glyph edges"]
1249pub const OH_Drawing_FontEdging_FONT_EDGING_ALIAS: OH_Drawing_FontEdging = 0;
1250#[doc = " may have transparent pixels on glyph edges"]
1251pub const OH_Drawing_FontEdging_FONT_EDGING_ANTI_ALIAS: OH_Drawing_FontEdging = 1;
1252#[doc = " glyph positioned in pixel using transparency"]
1253pub const OH_Drawing_FontEdging_FONT_EDGING_SUBPIXEL_ANTI_ALIAS: OH_Drawing_FontEdging = 2;
1254#[doc = " @brief Enumerates font edging effect.\n\n @since 12\n @version 1.0"]
1255pub type OH_Drawing_FontEdging = u32;
1256extern "C" {
1257 #[doc = " @brief Sets whether the font baselines and pixels alignment when the transformation matrix is \u{200b}\u{200b}axis aligned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param baselineSnap Indicates whether the font baselines and pixels alignment.\n @since 12\n @version 1.0"]
1258 pub fn OH_Drawing_FontSetBaselineSnap(font: *mut OH_Drawing_Font, baselineSnap: bool);
1259}
1260extern "C" {
1261 #[doc = " @brief Gets whether the font baselines and pixels alignment when the transformation matrix is \u{200b}\u{200b}axis aligned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if the font baselines and pixels alignment; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
1262 pub fn OH_Drawing_FontIsBaselineSnap(font: *const OH_Drawing_Font) -> bool;
1263}
1264extern "C" {
1265 #[doc = " @brief Sets whether the font uses sub-pixel rendering.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isSubpixel Indicates whether the font uses sub-pixel rendering.\n @since 12\n @version 1.0"]
1266 pub fn OH_Drawing_FontSetSubpixel(font: *mut OH_Drawing_Font, isSubpixel: bool);
1267}
1268extern "C" {
1269 #[doc = " @brief Gets whether the font uses sub-pixel rendering.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if the font uses sub-pixel rendering; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
1270 pub fn OH_Drawing_FontIsSubpixel(font: *const OH_Drawing_Font) -> bool;
1271}
1272extern "C" {
1273 #[doc = " @brief Sets whether the font outline is automatically adjusted.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isForceAutoHinting Indicates whether the font outline is automatically adjusted.\n @since 12\n @version 1.0"]
1274 pub fn OH_Drawing_FontSetForceAutoHinting(font: *mut OH_Drawing_Font, isForceAutoHinting: bool);
1275}
1276extern "C" {
1277 #[doc = " @brief Gets whether the font outline is automatically adjusted.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if the font outline is automatically adjusted; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
1278 pub fn OH_Drawing_FontIsForceAutoHinting(font: *const OH_Drawing_Font) -> bool;
1279}
1280extern "C" {
1281 #[doc = " @brief Sets an <b>OH_Drawing_Typeface</b> object for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @since 11\n @version 1.0"]
1282 pub fn OH_Drawing_FontSetTypeface(
1283 font: *mut OH_Drawing_Font,
1284 typeface: *mut OH_Drawing_Typeface,
1285 );
1286}
1287extern "C" {
1288 #[doc = " @brief Gets an <b>OH_Drawing_Typeface</b> object from the <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return OH_Drawing_Typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @since 12\n @version 1.0"]
1289 pub fn OH_Drawing_FontGetTypeface(font: *mut OH_Drawing_Font) -> *mut OH_Drawing_Typeface;
1290}
1291extern "C" {
1292 #[doc = " @brief Sets text size for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param textSize Indicates the text size.\n @since 11\n @version 1.0"]
1293 pub fn OH_Drawing_FontSetTextSize(font: *mut OH_Drawing_Font, textSize: f32);
1294}
1295extern "C" {
1296 #[doc = " @brief Gets text size for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns the size of text.\n @since 12\n @version 1.0"]
1297 pub fn OH_Drawing_FontGetTextSize(font: *const OH_Drawing_Font) -> f32;
1298}
1299extern "C" {
1300 #[doc = " @brief Calculate number of glyphs represented by text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates the text length in bytes.\n @param encoding Indicates the text encoding.\n @since 12\n @version 1.0"]
1301 pub fn OH_Drawing_FontCountText(
1302 font: *mut OH_Drawing_Font,
1303 text: *const ::std::os::raw::c_void,
1304 byteLength: usize,
1305 encoding: OH_Drawing_TextEncoding,
1306 ) -> ::std::os::raw::c_int;
1307}
1308extern "C" {
1309 #[doc = " @brief Converts text into glyph indices.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates the text length in bytes.\n @param encoding Indicates the text encoding.\n @param glyphs Indicates the storage for glyph indices.\n @param maxGlyphCount Indicates the storage capacity.\n @return Returns the number of glyph indices represented by text.\n @since 12\n @version 1.0"]
1310 pub fn OH_Drawing_FontTextToGlyphs(
1311 font: *const OH_Drawing_Font,
1312 text: *const ::std::os::raw::c_void,
1313 byteLength: u32,
1314 encoding: OH_Drawing_TextEncoding,
1315 glyphs: *mut u16,
1316 maxGlyphCount: ::std::os::raw::c_int,
1317 ) -> u32;
1318}
1319extern "C" {
1320 #[doc = " @brief Retrieves the advance for each glyph in glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyphs Indicates the array of glyph indices to be measured.\n @param count Indicates the number of glyphs.\n @param widths Indicates the text advances for each glyph returned to the caller.\n @since 12\n @version 1.0"]
1321 pub fn OH_Drawing_FontGetWidths(
1322 font: *const OH_Drawing_Font,
1323 glyphs: *const u16,
1324 count: ::std::os::raw::c_int,
1325 widths: *mut f32,
1326 );
1327}
1328extern "C" {
1329 #[doc = " @brief Measures the width of a single character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param str Indicates the single character encoded in UTF-8.\n @param textWidth Indicates the width of the single character.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, str\n and textWidth is nullptr or strlen(str) is 0.\n @since 12\n @version 1.0"]
1330 pub fn OH_Drawing_FontMeasureSingleCharacter(
1331 font: *const OH_Drawing_Font,
1332 str_: *const ::std::os::raw::c_char,
1333 textWidth: *mut f32,
1334 ) -> OH_Drawing_ErrorCode;
1335}
1336extern "C" {
1337 #[doc = " @brief Measures the width of a single character with font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param str Indicates the single character encoded in UTF-8.\n @param fontFeatures Indicates the pointer to an <b>OH_Drawing_FontFeatures</b> object.\n @param textWidth Indicates the width of the single character.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, str\n fontFeatures or textWidth is nullptr, or if strlen(str) is 0.\n @since 20\n @version 1.0"]
1338 #[cfg(feature = "api-20")]
1339 pub fn OH_Drawing_FontMeasureSingleCharacterWithFeatures(
1340 font: *const OH_Drawing_Font,
1341 str_: *const ::std::os::raw::c_char,
1342 fontFeatures: *const OH_Drawing_FontFeatures,
1343 textWidth: *mut f32,
1344 ) -> OH_Drawing_ErrorCode;
1345}
1346extern "C" {
1347 #[doc = " @brief Measures the width of text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates the text length in bytes.\n @param encoding Indicates the text encoding.\n @param bounds Gets the bounding box relative to (0, 0) if not nullptr.\n @param textWidth Indicates the width of text.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text\n and textWidth is nullptr or byteLength is 0.\n @since 12\n @version 1.0"]
1348 pub fn OH_Drawing_FontMeasureText(
1349 font: *const OH_Drawing_Font,
1350 text: *const ::std::os::raw::c_void,
1351 byteLength: usize,
1352 encoding: OH_Drawing_TextEncoding,
1353 bounds: *mut OH_Drawing_Rect,
1354 textWidth: *mut f32,
1355 ) -> OH_Drawing_ErrorCode;
1356}
1357extern "C" {
1358 #[doc = " @brief Measures the width of text with brush or pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates the text length in bytes.\n @param encoding Indicates the text encoding.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param bounds Gets the bounding box relative to (0, 0) if not nullptr.\n @param textWidth Indicates the width of text.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text\n and textWidth is nullptr or byteLength is 0 or brush and pen are both not empty.\n @since 19\n @version 1.0"]
1359 #[cfg(feature = "api-19")]
1360 pub fn OH_Drawing_FontMeasureTextWithBrushOrPen(
1361 font: *const OH_Drawing_Font,
1362 text: *const ::std::os::raw::c_void,
1363 byteLength: usize,
1364 encoding: OH_Drawing_TextEncoding,
1365 brush: *const OH_Drawing_Brush,
1366 pen: *const OH_Drawing_Pen,
1367 bounds: *mut OH_Drawing_Rect,
1368 textWidth: *mut f32,
1369 ) -> OH_Drawing_ErrorCode;
1370}
1371extern "C" {
1372 #[doc = " @brief Retrieves the advance and bounding box for each glyph in glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyphs Indicates the array of glyph indices to be measured.\n @param count Indicates the number of glyphs.\n @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param widths Indicates the text advances for each glyph returned to the caller.\n @param bounds Indicates the text bounding box for each glyph returned to the caller.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font and glyphs is nullptr\n or count is no larger than 0 or brush and pen are both not empty.\n @since 19\n @version 1.0"]
1373 #[cfg(feature = "api-19")]
1374 pub fn OH_Drawing_FontGetWidthsBounds(
1375 font: *const OH_Drawing_Font,
1376 glyphs: *const u16,
1377 count: ::std::os::raw::c_int,
1378 brush: *const OH_Drawing_Brush,
1379 pen: *const OH_Drawing_Pen,
1380 widths: *mut f32,
1381 bounds: *mut OH_Drawing_Array,
1382 ) -> OH_Drawing_ErrorCode;
1383}
1384extern "C" {
1385 #[doc = " @brief Retrieves the positions for each glyph, beginning at the specified origin.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyphs Indicates the array of glyph indices to be measured.\n @param count Indicates the number of glyphs.\n @param origin Indicates the location of the first glyph.\n @param points Indicates the relative position for each glyph returned to the caller.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, glyphs and points is nullptr or\n count is no larger than 0.\n @since 19\n @version 1.0"]
1386 #[cfg(feature = "api-19")]
1387 pub fn OH_Drawing_FontGetPos(
1388 font: *const OH_Drawing_Font,
1389 glyphs: *const u16,
1390 count: ::std::os::raw::c_int,
1391 origin: *const OH_Drawing_Point,
1392 points: *mut OH_Drawing_Point2D,
1393 ) -> OH_Drawing_ErrorCode;
1394}
1395extern "C" {
1396 #[doc = " @brief Returns the recommended spacing between lines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param spacing Indicates the recommended spacing between lines.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font and spacing is nullptr.\n @since 19\n @version 1.0"]
1397 #[cfg(feature = "api-19")]
1398 pub fn OH_Drawing_FontGetSpacing(
1399 font: *const OH_Drawing_Font,
1400 spacing: *mut f32,
1401 ) -> OH_Drawing_ErrorCode;
1402}
1403extern "C" {
1404 #[doc = " @brief Enables or disables linearly scalable font for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isLinearText Indicates whether to enable linearly scalable font.\n @since 11\n @version 1.0"]
1405 pub fn OH_Drawing_FontSetLinearText(font: *mut OH_Drawing_Font, isLinearText: bool);
1406}
1407extern "C" {
1408 #[doc = " @brief Gets whether the font is linearly scalable.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if the font is linearly scalable; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
1409 pub fn OH_Drawing_FontIsLinearText(font: *const OH_Drawing_Font) -> bool;
1410}
1411extern "C" {
1412 #[doc = " @brief Sets text skew on x-axis for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param skewX Indicates the additional shear on x-axis relative to y-axis.\n @since 11\n @version 1.0"]
1413 pub fn OH_Drawing_FontSetTextSkewX(font: *mut OH_Drawing_Font, skewX: f32);
1414}
1415extern "C" {
1416 #[doc = " @brief Gets text skew on x-axis for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns additional skew on x-axis relative to y-axis.\n @since 12\n @version 1.0"]
1417 pub fn OH_Drawing_FontGetTextSkewX(font: *const OH_Drawing_Font) -> f32;
1418}
1419extern "C" {
1420 #[doc = " @brief Enables or disables to increase stroke width to approximate bold fonts for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isFakeBoldText Indicates whether to enable to increase stroke width.\n @since 11\n @version 1.0"]
1421 pub fn OH_Drawing_FontSetFakeBoldText(font: *mut OH_Drawing_Font, isFakeBoldText: bool);
1422}
1423extern "C" {
1424 #[doc = " @brief Gets whether to increase the stroke width to approximate bold fonts.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> to increase the stroke width to approximate bold fonts; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
1425 pub fn OH_Drawing_FontIsFakeBoldText(font: *const OH_Drawing_Font) -> bool;
1426}
1427extern "C" {
1428 #[doc = " @brief Sets text scale on x-axis for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param scaleX Indicates the text horizontal scale.\n @since 12\n @version 1.0"]
1429 pub fn OH_Drawing_FontSetScaleX(font: *mut OH_Drawing_Font, scaleX: f32);
1430}
1431extern "C" {
1432 #[doc = " @brief Gets text scale on x-axis from an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns text horizontal scale on x-axis.\n @since 12\n @version 1.0"]
1433 pub fn OH_Drawing_FontGetScaleX(font: *const OH_Drawing_Font) -> f32;
1434}
1435extern "C" {
1436 #[doc = " @brief Sets hinting pattern for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param fontHinting Indicates the font hinting pattern.\n @since 12\n @version 1.0"]
1437 pub fn OH_Drawing_FontSetHinting(
1438 font: *mut OH_Drawing_Font,
1439 fontHinting: OH_Drawing_FontHinting,
1440 );
1441}
1442extern "C" {
1443 #[doc = " @brief Gets hinting pattern from an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns the font hinting pattern.\n @since 12\n @version 1.0"]
1444 pub fn OH_Drawing_FontGetHinting(font: *const OH_Drawing_Font) -> OH_Drawing_FontHinting;
1445}
1446extern "C" {
1447 #[doc = " @brief Sets whether to use bitmaps instead of outlines in the <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param isEmbeddedBitmaps Indicates whether to use bitmaps instead of outlines.\n @since 12\n @version 1.0"]
1448 pub fn OH_Drawing_FontSetEmbeddedBitmaps(font: *mut OH_Drawing_Font, isEmbeddedBitmaps: bool);
1449}
1450extern "C" {
1451 #[doc = " @brief Gets whether to use bitmaps instead of outlines in the <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns <b>true</b> if using bitmaps instead of outlines; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
1452 pub fn OH_Drawing_FontIsEmbeddedBitmaps(font: *const OH_Drawing_Font) -> bool;
1453}
1454extern "C" {
1455 #[doc = " @brief Sets the font edging effect for an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param fontEdging Indicates the font edging effect.\n @since 12\n @version 1.0"]
1456 pub fn OH_Drawing_FontSetEdging(font: *mut OH_Drawing_Font, fontEdging: OH_Drawing_FontEdging);
1457}
1458extern "C" {
1459 #[doc = " @brief Gets the font edging effect from an <b>OH_Drawing_Font</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return Returns the font edging effect.\n @since 12\n @version 1.0"]
1460 pub fn OH_Drawing_FontGetEdging(font: *const OH_Drawing_Font) -> OH_Drawing_FontEdging;
1461}
1462extern "C" {
1463 #[doc = " @brief Destroys an <b>OH_Drawing_Font</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @since 11\n @version 1.0"]
1464 pub fn OH_Drawing_FontDestroy(font: *mut OH_Drawing_Font);
1465}
1466#[doc = " @brief Defines a run, supplies storage for the metrics of an <b>OH_Drawing_Font</b>.\n\n @since 12\n @version 1.0"]
1467#[repr(C)]
1468#[derive(Debug, Copy, Clone)]
1469pub struct OH_Drawing_Font_Metrics {
1470 #[doc = " Indicating which metrics are valid"]
1471 pub flags: u32,
1472 #[doc = " storage for top in font metrics"]
1473 pub top: f32,
1474 #[doc = " storage for ascent in font metrics"]
1475 pub ascent: f32,
1476 #[doc = " storage for descent in font metrics"]
1477 pub descent: f32,
1478 #[doc = " storage for bottom in font metrics"]
1479 pub bottom: f32,
1480 #[doc = " storage for leading in font metrics"]
1481 pub leading: f32,
1482 #[doc = " Average character width, zero if unknown"]
1483 pub avgCharWidth: f32,
1484 #[doc = " Maximum character width, zero if unknown"]
1485 pub maxCharWidth: f32,
1486 #[doc = " Greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts"]
1487 pub xMin: f32,
1488 #[doc = " Greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts"]
1489 pub xMax: f32,
1490 #[doc = " Height of lower-case letter, zero if unknown, typically negative"]
1491 pub xHeight: f32,
1492 #[doc = " Height of an upper-case letter, zero if unknown, typically negative"]
1493 pub capHeight: f32,
1494 #[doc = " @brief Underline thickness"]
1495 pub underlineThickness: f32,
1496 #[doc = " Distance from baseline to top of stroke, typically positive"]
1497 pub underlinePosition: f32,
1498 #[doc = " Strikeout thickness"]
1499 pub strikeoutThickness: f32,
1500 #[doc = " Distance from baseline to bottom of stroke, typically negative"]
1501 pub strikeoutPosition: f32,
1502}
1503extern "C" {
1504 #[doc = " @brief Obtains the metrics of a font.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param fontMetrics Indicates the pointer to an <b>OH_Drawing_Font_Metrics</b> object.\n @return Returns a float variable that recommended spacing between lines.\n @since 12\n @version 1.0"]
1505 pub fn OH_Drawing_FontGetMetrics(
1506 font: *mut OH_Drawing_Font,
1507 fontMetrics: *mut OH_Drawing_Font_Metrics,
1508 ) -> f32;
1509}
1510extern "C" {
1511 #[doc = " @brief Retrieves the bound rect for each glyph in glyph array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyphs Indicates the array of glyph indices to be measured.\n @param count Indicates the number of glyphs.\n @param bounds The bound rect array for each glyph, returned to the caller.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, glyphs\n and bounds is nullptr or count is 0.\n @since 18\n @version 1.0"]
1512 #[cfg(feature = "api-18")]
1513 pub fn OH_Drawing_FontGetBounds(
1514 font: *const OH_Drawing_Font,
1515 glyphs: *const u16,
1516 count: u32,
1517 bounds: *mut OH_Drawing_Array,
1518 ) -> OH_Drawing_ErrorCode;
1519}
1520extern "C" {
1521 #[doc = " @brief Retrieves the path for specified Glyph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param glyph glyph index to be obtained.\n @param path The path object, returned to the caller.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, path\n is nullptr or glyph not exist.\n @since 18\n @version 1.0"]
1522 #[cfg(feature = "api-18")]
1523 pub fn OH_Drawing_FontGetPathForGlyph(
1524 font: *const OH_Drawing_Font,
1525 glyph: u16,
1526 path: *mut OH_Drawing_Path,
1527 ) -> OH_Drawing_ErrorCode;
1528}
1529extern "C" {
1530 #[doc = " @brief Get the text outline path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param text Indicates the character storage encoded with text encoding.\n @param byteLength Indicates to get the byte length of the corresponding text path. If this byte length is greater\n than the byte length of the text string, undefined behavior will occur.\n @param encoding <b>OH_Drawing_TextEncoding</b> Indicates the text encoding.\n @param x Indicates x coordinates of the text.\n @param y Indicates y coordinates of the text.\n @param path <b>OH_Drawing_Path</b> The path object, returned to the caller.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, text or path is nullptr.\n @since 18"]
1531 #[cfg(feature = "api-18")]
1532 pub fn OH_Drawing_FontGetTextPath(
1533 font: *const OH_Drawing_Font,
1534 text: *const ::std::os::raw::c_void,
1535 byteLength: usize,
1536 encoding: OH_Drawing_TextEncoding,
1537 x: f32,
1538 y: f32,
1539 path: *mut OH_Drawing_Path,
1540 ) -> OH_Drawing_ErrorCode;
1541}
1542extern "C" {
1543 #[doc = " @brief Creates an <b>OH_Drawing_FontFeatures</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontFeatures</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty.\n @since 20\n @version 1.0"]
1544 #[cfg(feature = "api-20")]
1545 pub fn OH_Drawing_FontFeaturesCreate() -> *mut OH_Drawing_FontFeatures;
1546}
1547extern "C" {
1548 #[doc = " @brief Adds a font feature for an <b>OH_Drawing_FontFeatures</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFeatures Indicates the pointer to an <b>OH_Drawing_FontFeatures</b> object.\n @param name Indicates the feature name.\n @param value Indicates the value of the feature.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if either fontFeatures or name is nullptr.\n @since 20\n @version 1.0"]
1549 #[cfg(feature = "api-20")]
1550 pub fn OH_Drawing_FontFeaturesAddFeature(
1551 fontFeatures: *mut OH_Drawing_FontFeatures,
1552 name: *const ::std::os::raw::c_char,
1553 value: f32,
1554 ) -> OH_Drawing_ErrorCode;
1555}
1556extern "C" {
1557 #[doc = " @brief Destroys an <b>OH_Drawing_FontFeatures</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFeatures Indicates the pointer to an <b>OH_Drawing_FontFeatures</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if fontFeatures is nullptr.\n @since 20\n @version 1.0"]
1558 #[cfg(feature = "api-20")]
1559 pub fn OH_Drawing_FontFeaturesDestroy(
1560 fontFeatures: *mut OH_Drawing_FontFeatures,
1561 ) -> OH_Drawing_ErrorCode;
1562}
1563extern "C" {
1564 #[doc = " @brief Sets whether to follow the theme font. If the value is true, the theme font is used when typeface is not set.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param followed Indicates whether to follow the theme font.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if font is nullptr.\n @since 15"]
1565 #[cfg(feature = "api-15")]
1566 pub fn OH_Drawing_FontSetThemeFontFollowed(
1567 font: *mut OH_Drawing_Font,
1568 followed: bool,
1569 ) -> OH_Drawing_ErrorCode;
1570}
1571extern "C" {
1572 #[doc = " @brief Gets whether to follow the theme font.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param followed Indicates whether to follow the theme font.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if font or followed is nullptr.\n @since 15"]
1573 #[cfg(feature = "api-15")]
1574 pub fn OH_Drawing_FontIsThemeFontFollowed(
1575 font: *const OH_Drawing_Font,
1576 followed: *mut bool,
1577 ) -> OH_Drawing_ErrorCode;
1578}
1579#[repr(C)]
1580#[derive(Debug, Copy, Clone)]
1581pub struct OH_Drawing_FontCollection {
1582 _unused: [u8; 0],
1583}
1584#[repr(C)]
1585#[derive(Debug, Copy, Clone)]
1586pub struct OH_Drawing_Typography {
1587 _unused: [u8; 0],
1588}
1589#[repr(C)]
1590#[derive(Debug, Copy, Clone)]
1591pub struct OH_Drawing_LineTypography {
1592 _unused: [u8; 0],
1593}
1594#[repr(C)]
1595#[derive(Debug, Copy, Clone)]
1596pub struct OH_Drawing_TextStyle {
1597 _unused: [u8; 0],
1598}
1599#[repr(C)]
1600#[derive(Debug, Copy, Clone)]
1601pub struct OH_Drawing_TypographyStyle {
1602 _unused: [u8; 0],
1603}
1604#[repr(C)]
1605#[derive(Debug, Copy, Clone)]
1606pub struct OH_Drawing_TypographyCreate {
1607 _unused: [u8; 0],
1608}
1609#[repr(C)]
1610#[derive(Debug, Copy, Clone)]
1611pub struct OH_Drawing_TextBox {
1612 _unused: [u8; 0],
1613}
1614#[repr(C)]
1615#[derive(Debug, Copy, Clone)]
1616pub struct OH_Drawing_PositionAndAffinity {
1617 _unused: [u8; 0],
1618}
1619#[repr(C)]
1620#[derive(Debug, Copy, Clone)]
1621pub struct OH_Drawing_Range {
1622 _unused: [u8; 0],
1623}
1624#[repr(C)]
1625#[derive(Debug, Copy, Clone)]
1626pub struct OH_Drawing_FontParser {
1627 _unused: [u8; 0],
1628}
1629#[repr(C)]
1630#[derive(Debug, Copy, Clone)]
1631pub struct OH_Drawing_TextShadow {
1632 _unused: [u8; 0],
1633}
1634#[repr(C)]
1635#[derive(Debug, Copy, Clone)]
1636pub struct OH_Drawing_TextTab {
1637 _unused: [u8; 0],
1638}
1639#[repr(C)]
1640#[derive(Debug, Copy, Clone)]
1641pub struct OH_Drawing_TextLine {
1642 _unused: [u8; 0],
1643}
1644#[repr(C)]
1645#[derive(Debug, Copy, Clone)]
1646pub struct OH_Drawing_Run {
1647 _unused: [u8; 0],
1648}
1649#[repr(C)]
1650#[derive(Debug, Copy, Clone)]
1651pub struct OH_Drawing_FontFullDescriptor {
1652 _unused: [u8; 0],
1653}
1654#[repr(C)]
1655#[derive(Debug, Copy, Clone)]
1656pub struct OH_Drawing_FontVariationAxis {
1657 _unused: [u8; 0],
1658}
1659#[repr(C)]
1660#[derive(Debug, Copy, Clone)]
1661pub struct OH_Drawing_FontVariationInstance {
1662 _unused: [u8; 0],
1663}
1664extern "C" {
1665 #[doc = " @brief Creates an <b>OH_Drawing_FontCollection</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontCollection</b> object created.\n @since 8\n @version 1.0"]
1666 pub fn OH_Drawing_CreateFontCollection() -> *mut OH_Drawing_FontCollection;
1667}
1668extern "C" {
1669 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontCollection</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @since 8\n @version 1.0"]
1670 pub fn OH_Drawing_DestroyFontCollection(fontCollection: *mut OH_Drawing_FontCollection);
1671}
1672extern "C" {
1673 #[doc = " @brief Disable the font collection fallback.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @since 12\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_DisableFontCollectionSystemFont"]
1674 pub fn OH_Drawing_DisableFontCollectionFallback(fontCollection: *mut OH_Drawing_FontCollection);
1675}
1676extern "C" {
1677 #[doc = " @brief Disable the font collection systemfont.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @since 12\n @version 1.0"]
1678 pub fn OH_Drawing_DisableFontCollectionSystemFont(
1679 fontCollection: *mut OH_Drawing_FontCollection,
1680 );
1681}
1682extern "C" {
1683 #[doc = " @brief Creates an <b>OH_Drawing_FontCollection</b> object with shared usage between\n <b>OH_Drawing_TypographyCreate</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontCollection</b> object created.\n @since 12\n @version 1.0"]
1684 pub fn OH_Drawing_CreateSharedFontCollection() -> *mut OH_Drawing_FontCollection;
1685}
1686extern "C" {
1687 #[doc = " @brief Clear font caches.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @since 12\n @version 1.0"]
1688 pub fn OH_Drawing_ClearFontCaches(fontCollection: *mut OH_Drawing_FontCollection);
1689}
1690extern "C" {
1691 #[doc = " @brief Get the <b>OH_Drawing_FontCollection</b> global instance.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Return the pointer to the <b>OH_Drawing_FontCollection</b> global instance.\n @since 14\n @version 1.0"]
1692 #[cfg(feature = "api-14")]
1693 pub fn OH_Drawing_GetFontCollectionGlobalInstance() -> *mut OH_Drawing_FontCollection;
1694}
1695#[doc = " Right to left (RTL)"]
1696pub const OH_Drawing_TextDirection_TEXT_DIRECTION_RTL: OH_Drawing_TextDirection = 0;
1697#[doc = " Left to right (LTR)"]
1698pub const OH_Drawing_TextDirection_TEXT_DIRECTION_LTR: OH_Drawing_TextDirection = 1;
1699#[doc = " @brief Enumerates text directions.\n\n @since 8\n @version 1.0"]
1700pub type OH_Drawing_TextDirection = u32;
1701#[doc = " Left-aligned"]
1702pub const OH_Drawing_TextAlign_TEXT_ALIGN_LEFT: OH_Drawing_TextAlign = 0;
1703#[doc = " Right-aligned"]
1704pub const OH_Drawing_TextAlign_TEXT_ALIGN_RIGHT: OH_Drawing_TextAlign = 1;
1705#[doc = " Center-aligned"]
1706pub const OH_Drawing_TextAlign_TEXT_ALIGN_CENTER: OH_Drawing_TextAlign = 2;
1707#[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."]
1708pub const OH_Drawing_TextAlign_TEXT_ALIGN_JUSTIFY: OH_Drawing_TextAlign = 3;
1709#[doc = " <b>TEXT_ALIGN_START</b> achieves the same effect as <b>TEXT_ALIGN_LEFT</b>\n when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_LTR</b>;\n it achieves the same effect as <b>TEXT_ALIGN_RIGHT</b>\n when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_RTL</b>."]
1710pub const OH_Drawing_TextAlign_TEXT_ALIGN_START: OH_Drawing_TextAlign = 4;
1711#[doc = " <b>TEXT_ALIGN_END</b> achieves the same effect as <b>TEXT_ALIGN_RIGHT</b>\n when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_LTR</b>;\n it achieves the same effect as <b>TEXT_ALIGN_LEFT</b>\n when <b>OH_Drawing_TextDirection</b> is <b>TEXT_DIRECTION_RTL</b>."]
1712pub const OH_Drawing_TextAlign_TEXT_ALIGN_END: OH_Drawing_TextAlign = 5;
1713#[doc = " @brief Enumerates text alignment modes.\n\n @since 8\n @version 1.0"]
1714pub type OH_Drawing_TextAlign = u32;
1715#[doc = " Thin"]
1716pub const OH_Drawing_FontWeight_FONT_WEIGHT_100: OH_Drawing_FontWeight = 0;
1717#[doc = " Extra-light"]
1718pub const OH_Drawing_FontWeight_FONT_WEIGHT_200: OH_Drawing_FontWeight = 1;
1719#[doc = " Light"]
1720pub const OH_Drawing_FontWeight_FONT_WEIGHT_300: OH_Drawing_FontWeight = 2;
1721#[doc = " Normal/Regular"]
1722pub const OH_Drawing_FontWeight_FONT_WEIGHT_400: OH_Drawing_FontWeight = 3;
1723#[doc = " Medium"]
1724pub const OH_Drawing_FontWeight_FONT_WEIGHT_500: OH_Drawing_FontWeight = 4;
1725#[doc = " Semi-bold"]
1726pub const OH_Drawing_FontWeight_FONT_WEIGHT_600: OH_Drawing_FontWeight = 5;
1727#[doc = " Bold"]
1728pub const OH_Drawing_FontWeight_FONT_WEIGHT_700: OH_Drawing_FontWeight = 6;
1729#[doc = " Extra-bold"]
1730pub const OH_Drawing_FontWeight_FONT_WEIGHT_800: OH_Drawing_FontWeight = 7;
1731#[doc = " Black"]
1732pub const OH_Drawing_FontWeight_FONT_WEIGHT_900: OH_Drawing_FontWeight = 8;
1733#[doc = " @brief Enumerates font weights.\n\n @since 8\n @version 1.0"]
1734pub type OH_Drawing_FontWeight = u32;
1735#[doc = " Alphabetic, where the letters in alphabets like English sit on."]
1736pub const OH_Drawing_TextBaseline_TEXT_BASELINE_ALPHABETIC: OH_Drawing_TextBaseline = 0;
1737#[doc = " Ideographic. The baseline is at the bottom of the text area."]
1738pub const OH_Drawing_TextBaseline_TEXT_BASELINE_IDEOGRAPHIC: OH_Drawing_TextBaseline = 1;
1739#[doc = " @brief Enumerates text baselines.\n\n @since 8\n @version 1.0"]
1740pub type OH_Drawing_TextBaseline = u32;
1741#[doc = " No decoration."]
1742pub const OH_Drawing_TextDecoration_TEXT_DECORATION_NONE: OH_Drawing_TextDecoration = 0;
1743#[doc = " A underline is used for decoration."]
1744pub const OH_Drawing_TextDecoration_TEXT_DECORATION_UNDERLINE: OH_Drawing_TextDecoration = 1;
1745#[doc = " An overline is used for decoration."]
1746pub const OH_Drawing_TextDecoration_TEXT_DECORATION_OVERLINE: OH_Drawing_TextDecoration = 2;
1747#[doc = " A strikethrough is used for decoration."]
1748pub const OH_Drawing_TextDecoration_TEXT_DECORATION_LINE_THROUGH: OH_Drawing_TextDecoration = 4;
1749#[doc = " @brief Enumerates text decorations.\n\n @since 8\n @version 1.0"]
1750pub type OH_Drawing_TextDecoration = u32;
1751#[doc = " Normal style"]
1752pub const OH_Drawing_FontStyle_FONT_STYLE_NORMAL: OH_Drawing_FontStyle = 0;
1753#[doc = " Italic style"]
1754pub const OH_Drawing_FontStyle_FONT_STYLE_ITALIC: OH_Drawing_FontStyle = 1;
1755#[doc = " Oblique style"]
1756pub const OH_Drawing_FontStyle_FONT_STYLE_OBLIQUE: OH_Drawing_FontStyle = 2;
1757#[doc = " @brief Enumerates font styles.\n\n @since 8\n @version 1.0"]
1758pub type OH_Drawing_FontStyle = u32;
1759#[doc = " Offset At Baseline"]
1760pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_OFFSET_AT_BASELINE:
1761 OH_Drawing_PlaceholderVerticalAlignment = 0;
1762#[doc = " Above Baseline"]
1763pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_ABOVE_BASELINE:
1764 OH_Drawing_PlaceholderVerticalAlignment = 1;
1765#[doc = " Below Baseline"]
1766pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BELOW_BASELINE:
1767 OH_Drawing_PlaceholderVerticalAlignment = 2;
1768#[doc = " Top of Row Box"]
1769pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_TOP_OF_ROW_BOX:
1770 OH_Drawing_PlaceholderVerticalAlignment = 3;
1771#[doc = " Bottom of Row Box"]
1772pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BOTTOM_OF_ROW_BOX:
1773 OH_Drawing_PlaceholderVerticalAlignment = 4;
1774#[doc = " Center of Row Box"]
1775pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_CENTER_OF_ROW_BOX:
1776 OH_Drawing_PlaceholderVerticalAlignment = 5;
1777#[doc = " Follow paragraph setting\n @since 20"]
1778#[cfg(feature = "api-20")]
1779pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_FOLLOW_PARAGRAPH:
1780 OH_Drawing_PlaceholderVerticalAlignment = 6;
1781#[doc = " @brief Enumerates placeholder vertical alignment.\n\n @since 11\n @version 1.0"]
1782pub type OH_Drawing_PlaceholderVerticalAlignment = u32;
1783#[doc = " @brief Defines the placeholder span.\n\n @since 11\n @version 1.0"]
1784#[repr(C)]
1785#[derive(Debug, Copy, Clone)]
1786pub struct OH_Drawing_PlaceholderSpan {
1787 #[doc = " width of placeholder"]
1788 pub width: f64,
1789 #[doc = " height of placeholder"]
1790 pub height: f64,
1791 #[doc = " alignment of placeholder"]
1792 pub alignment: OH_Drawing_PlaceholderVerticalAlignment,
1793 #[doc = " baseline of placeholder"]
1794 pub baseline: OH_Drawing_TextBaseline,
1795 #[doc = " baselineoffset of placeholder"]
1796 pub baselineOffset: f64,
1797}
1798#[doc = " Solid style"]
1799pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_SOLID:
1800 OH_Drawing_TextDecorationStyle = 0;
1801#[doc = " Double style"]
1802pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DOUBLE:
1803 OH_Drawing_TextDecorationStyle = 1;
1804#[doc = " Dotted style"]
1805pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DOTTED:
1806 OH_Drawing_TextDecorationStyle = 2;
1807#[doc = " Dashed style"]
1808pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DASHED:
1809 OH_Drawing_TextDecorationStyle = 3;
1810#[doc = " Wavy style"]
1811pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_WAVY:
1812 OH_Drawing_TextDecorationStyle = 4;
1813#[doc = " @brief Enumerates text decoration style.\n\n @since 11\n @version 1.0"]
1814pub type OH_Drawing_TextDecorationStyle = u32;
1815#[doc = " Head modal. It is valid only when maxLine is set to 1 in OH_Drawing_TypographyStyle."]
1816pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_HEAD: OH_Drawing_EllipsisModal = 0;
1817#[doc = " Middle modal. It is valid only when maxLine is set to 1 in OH_Drawing_TypographyStyle."]
1818pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MIDDLE: OH_Drawing_EllipsisModal = 1;
1819#[doc = " Tail modal"]
1820pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_TAIL: OH_Drawing_EllipsisModal = 2;
1821#[doc = " Head modal. It is valid for any value of maxLines in OH_Drawing_TypographyStyle.\n @since 24"]
1822#[cfg(feature = "api-24")]
1823pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MULTILINE_HEAD: OH_Drawing_EllipsisModal = 3;
1824#[doc = " Middle modal. It is valid for any value of maxLines in OH_Drawing_TypographyStyle.\n @since 24"]
1825#[cfg(feature = "api-24")]
1826pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MULTILINE_MIDDLE: OH_Drawing_EllipsisModal = 4;
1827#[doc = " @brief Enumerates ellipsis modal.\n\n @since 11\n @version 1.0"]
1828pub type OH_Drawing_EllipsisModal = u32;
1829#[doc = " Greedy strategy"]
1830pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_GREEDY: OH_Drawing_BreakStrategy = 0;
1831#[doc = " Quality strategy"]
1832pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_HIGH_QUALITY: OH_Drawing_BreakStrategy = 1;
1833#[doc = " Balanced strategy"]
1834pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_BALANCED: OH_Drawing_BreakStrategy = 2;
1835#[doc = " @brief Enumerates break strategy.\n\n @since 11\n @version 1.0"]
1836pub type OH_Drawing_BreakStrategy = u32;
1837#[doc = " Normal type"]
1838pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_NORMAL: OH_Drawing_WordBreakType = 0;
1839#[doc = " Break All type"]
1840pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_ALL: OH_Drawing_WordBreakType = 1;
1841#[doc = " Break Word type"]
1842pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_WORD: OH_Drawing_WordBreakType = 2;
1843#[doc = " Break word with hyphens\n @since 18"]
1844#[cfg(feature = "api-18")]
1845pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_HYPHEN: OH_Drawing_WordBreakType = 3;
1846#[doc = " @brief Enumerates word break type.\n\n @since 11\n @version 1.0"]
1847pub type OH_Drawing_WordBreakType = u32;
1848#[doc = " Tight style"]
1849pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_TIGHT: OH_Drawing_RectHeightStyle = 0;
1850#[doc = " Max style"]
1851pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_MAX: OH_Drawing_RectHeightStyle = 1;
1852#[doc = " Includelinespacemiddle style"]
1853pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEMIDDLE:
1854 OH_Drawing_RectHeightStyle = 2;
1855#[doc = " Includelinespacetop style"]
1856pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACETOP:
1857 OH_Drawing_RectHeightStyle = 3;
1858#[doc = " Includelinespacebottom style"]
1859pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEBOTTOM:
1860 OH_Drawing_RectHeightStyle = 4;
1861#[doc = " Struct style"]
1862pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_STRUCT: OH_Drawing_RectHeightStyle = 5;
1863#[doc = " @brief Enumerates rect height style.\n\n @since 11\n @version 1.0"]
1864pub type OH_Drawing_RectHeightStyle = u32;
1865#[doc = " Tight style"]
1866pub const OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_TIGHT: OH_Drawing_RectWidthStyle = 0;
1867#[doc = " Max style"]
1868pub const OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_MAX: OH_Drawing_RectWidthStyle = 1;
1869#[doc = " @brief Enumerates rect Width style.\n\n @since 11\n @version 1.0"]
1870pub type OH_Drawing_RectWidthStyle = u32;
1871#[doc = " The list of system font configuration information was successfully obtained"]
1872pub const OH_Drawing_FontConfigInfoErrorCode_SUCCESS_FONT_CONFIG_INFO:
1873 OH_Drawing_FontConfigInfoErrorCode = 0;
1874#[doc = " Unknown error"]
1875pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_UNKNOWN:
1876 OH_Drawing_FontConfigInfoErrorCode = 1;
1877#[doc = " Parse system config file error"]
1878pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_PARSE_FILE:
1879 OH_Drawing_FontConfigInfoErrorCode = 2;
1880#[doc = " Alloc memory error"]
1881pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_ALLOC_MEMORY:
1882 OH_Drawing_FontConfigInfoErrorCode = 3;
1883#[doc = " Copy string data error"]
1884pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_COPY_STRING_DATA:
1885 OH_Drawing_FontConfigInfoErrorCode = 4;
1886#[doc = " @brief Gets system font configuration information list result enum.\n\n @since 12\n @version 1.0"]
1887pub type OH_Drawing_FontConfigInfoErrorCode = u32;
1888#[doc = " @brief Fallback font information.\n\n @since 12\n @version 1.0"]
1889#[repr(C)]
1890#[derive(Debug, Copy, Clone)]
1891pub struct OH_Drawing_FontFallbackInfo {
1892 #[doc = " The type of language supported by the font set. The language format is bcp47"]
1893 pub language: *mut ::std::os::raw::c_char,
1894 #[doc = " Font family name"]
1895 pub familyName: *mut ::std::os::raw::c_char,
1896}
1897#[doc = " @brief Fallback font group.\n\n @since 12\n @version 1.0"]
1898#[repr(C)]
1899#[derive(Debug, Copy, Clone)]
1900pub struct OH_Drawing_FontFallbackGroup {
1901 #[doc = " The name of the font set corresponding to the fallback font set. If the value is null,\n all fonts can be set using the fallback font set list."]
1902 pub groupName: *mut ::std::os::raw::c_char,
1903 #[doc = " Fallback font Info Size"]
1904 pub fallbackInfoSize: usize,
1905 #[doc = " A list of font sets for fallback fonts"]
1906 pub fallbackInfoSet: *mut OH_Drawing_FontFallbackInfo,
1907}
1908#[doc = " @brief Font weight mapping information.\n\n @since 12\n @version 1.0"]
1909#[repr(C)]
1910#[derive(Debug, Copy, Clone)]
1911pub struct OH_Drawing_FontAdjustInfo {
1912 #[doc = " The font's original weight value"]
1913 pub weight: ::std::os::raw::c_int,
1914 #[doc = " The font weight displayed in the application"]
1915 pub to: ::std::os::raw::c_int,
1916}
1917#[doc = " @brief Alias font information.\n\n @since 12\n @version 1.0"]
1918#[repr(C)]
1919#[derive(Debug, Copy, Clone)]
1920pub struct OH_Drawing_FontAliasInfo {
1921 #[doc = " Font family name"]
1922 pub familyName: *mut ::std::os::raw::c_char,
1923 #[doc = " Font weight value. When the weight value is greater than 0,\n the font set contains only fonts with the specified weight.\n When the weight value is equal to 0, the font set contains all fonts."]
1924 pub weight: ::std::os::raw::c_int,
1925}
1926#[doc = " @brief General font set information supported by the system.\n\n @since 12\n @version 1.0"]
1927#[repr(C)]
1928#[derive(Debug, Copy, Clone)]
1929pub struct OH_Drawing_FontGenericInfo {
1930 #[doc = " Font family name"]
1931 pub familyName: *mut ::std::os::raw::c_char,
1932 #[doc = " The size of alias font lists"]
1933 pub aliasInfoSize: usize,
1934 #[doc = " The size of font weight mapping information lists"]
1935 pub adjustInfoSize: usize,
1936 #[doc = " List of alias fonts"]
1937 pub aliasInfoSet: *mut OH_Drawing_FontAliasInfo,
1938 #[doc = " Font weight mapping information lists"]
1939 pub adjustInfoSet: *mut OH_Drawing_FontAdjustInfo,
1940}
1941#[doc = " @brief System font configuration information.\n\n @since 12\n @version 1.0"]
1942#[repr(C)]
1943#[derive(Debug, Copy, Clone)]
1944pub struct OH_Drawing_FontConfigInfo {
1945 #[doc = " Count of system font file paths"]
1946 pub fontDirSize: usize,
1947 #[doc = " List size of generic font sets"]
1948 pub fontGenericInfoSize: usize,
1949 #[doc = " Count of fallback font set lists"]
1950 pub fallbackGroupSize: usize,
1951 #[doc = " List of system font file paths"]
1952 pub fontDirSet: *mut *mut ::std::os::raw::c_char,
1953 #[doc = " List of generic font sets"]
1954 pub fontGenericInfoSet: *mut OH_Drawing_FontGenericInfo,
1955 #[doc = " List of fallback font sets"]
1956 pub fallbackGroupSet: *mut OH_Drawing_FontFallbackGroup,
1957}
1958#[doc = " @brief Describes the font information.\n\n @since 12\n @version 1.0"]
1959#[repr(C)]
1960#[derive(Debug, Copy, Clone)]
1961pub struct OH_Drawing_FontDescriptor {
1962 #[doc = " The file path of System font"]
1963 pub path: *mut ::std::os::raw::c_char,
1964 #[doc = " A name that uniquely identifies the font"]
1965 pub postScriptName: *mut ::std::os::raw::c_char,
1966 #[doc = " The name of System font"]
1967 pub fullName: *mut ::std::os::raw::c_char,
1968 #[doc = " The family of System font"]
1969 pub fontFamily: *mut ::std::os::raw::c_char,
1970 #[doc = " The subfont family of the system font"]
1971 pub fontSubfamily: *mut ::std::os::raw::c_char,
1972 #[doc = " The weight of System font"]
1973 pub weight: ::std::os::raw::c_int,
1974 #[doc = " The width of System font"]
1975 pub width: ::std::os::raw::c_int,
1976 #[doc = " Whether the system font is tilted"]
1977 pub italic: ::std::os::raw::c_int,
1978 #[doc = " Whether the system font is compact"]
1979 pub monoSpace: bool,
1980 #[doc = " whether symbolic fonts are supported"]
1981 pub symbolic: bool,
1982}
1983#[doc = " @brief The metrics of line.\n\n @since 12\n @version 1.0"]
1984#[repr(C)]
1985#[derive(Debug, Copy, Clone)]
1986pub struct OH_Drawing_LineMetrics {
1987 #[doc = " Text ascender height"]
1988 pub ascender: f64,
1989 #[doc = " Tex descender height"]
1990 pub descender: f64,
1991 #[doc = " The height of a capital letter"]
1992 pub capHeight: f64,
1993 #[doc = " The height of a lowercase letter"]
1994 pub xHeight: f64,
1995 #[doc = " Text width"]
1996 pub width: f64,
1997 #[doc = " Line height"]
1998 pub height: f64,
1999 #[doc = " The distance from the left end of the text to the left end of the container,\n aligned to 0, is the width of the container minus the width of the line of text"]
2000 pub x: f64,
2001 #[doc = " The height from the top of the text to the top of the container, the first line is 0,\n and the second line is the height of the first line"]
2002 pub y: f64,
2003 #[doc = " Start Index"]
2004 pub startIndex: usize,
2005 #[doc = " End Index"]
2006 pub endIndex: usize,
2007 #[doc = " The metrics information of the first character"]
2008 pub firstCharMetrics: OH_Drawing_Font_Metrics,
2009}
2010#[doc = " both ascend of first row and last row style"]
2011pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_ALL: OH_Drawing_TextHeightBehavior = 0;
2012#[doc = " forbidding ascend of first row style"]
2013pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_FIRST_ASCENT:
2014 OH_Drawing_TextHeightBehavior = 1;
2015#[doc = " forbidding ascend of last row style"]
2016pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_LAST_ASCENT:
2017 OH_Drawing_TextHeightBehavior = 2;
2018#[doc = " neither ascend of first row nor last row style"]
2019pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_ALL: OH_Drawing_TextHeightBehavior = 3;
2020#[doc = " @brief Enumerates of heightmode of text.\n\n @since 12\n @version 1.0"]
2021pub type OH_Drawing_TextHeightBehavior = u32;
2022#[doc = " None style"]
2023pub const OH_Drawing_TextStyleType_TEXT_STYLE_NONE: OH_Drawing_TextStyleType = 0;
2024#[doc = " All attributes style"]
2025pub const OH_Drawing_TextStyleType_TEXT_STYLE_ALL_ATTRIBUTES: OH_Drawing_TextStyleType = 1;
2026#[doc = " Font style"]
2027pub const OH_Drawing_TextStyleType_TEXT_STYLE_FONT: OH_Drawing_TextStyleType = 2;
2028#[doc = " Foreground style"]
2029pub const OH_Drawing_TextStyleType_TEXT_STYLE_FOREGROUND: OH_Drawing_TextStyleType = 3;
2030#[doc = " Background style"]
2031pub const OH_Drawing_TextStyleType_TEXT_STYLE_BACKGROUND: OH_Drawing_TextStyleType = 4;
2032#[doc = " Shadow style"]
2033pub const OH_Drawing_TextStyleType_TEXT_STYLE_SHADOW: OH_Drawing_TextStyleType = 5;
2034#[doc = " Decorations style"]
2035pub const OH_Drawing_TextStyleType_TEXT_STYLE_DECORATIONS: OH_Drawing_TextStyleType = 6;
2036#[doc = " Letter spacing style"]
2037pub const OH_Drawing_TextStyleType_TEXT_STYLE_LETTER_SPACING: OH_Drawing_TextStyleType = 7;
2038#[doc = " Word spacing style"]
2039pub const OH_Drawing_TextStyleType_TEXT_STYLE_WORD_SPACING: OH_Drawing_TextStyleType = 8;
2040#[doc = " @brief Enumerates text style type.\n\n @since 12\n @version 1.0"]
2041pub type OH_Drawing_TextStyleType = u32;
2042pub const OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_CONDENSED: OH_Drawing_FontWidth = 1;
2043pub const OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_CONDENSED: OH_Drawing_FontWidth = 2;
2044pub const OH_Drawing_FontWidth_FONT_WIDTH_CONDENSED: OH_Drawing_FontWidth = 3;
2045pub const OH_Drawing_FontWidth_FONT_WIDTH_SEMI_CONDENSED: OH_Drawing_FontWidth = 4;
2046pub const OH_Drawing_FontWidth_FONT_WIDTH_NORMAL: OH_Drawing_FontWidth = 5;
2047pub const OH_Drawing_FontWidth_FONT_WIDTH_SEMI_EXPANDED: OH_Drawing_FontWidth = 6;
2048pub const OH_Drawing_FontWidth_FONT_WIDTH_EXPANDED: OH_Drawing_FontWidth = 7;
2049pub const OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_EXPANDED: OH_Drawing_FontWidth = 8;
2050pub const OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_EXPANDED: OH_Drawing_FontWidth = 9;
2051#[doc = " @brief Enumerates font width.\n\n @since 12\n @version 1.0"]
2052pub type OH_Drawing_FontWidth = u32;
2053#[doc = " Line height maximum"]
2054#[cfg(feature = "api-21")]
2055pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM:
2056 OH_Drawing_TextStyleAttributeId = 0;
2057#[doc = " Line height minimum"]
2058#[cfg(feature = "api-21")]
2059pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM:
2060 OH_Drawing_TextStyleAttributeId = 1;
2061#[doc = " Line height style"]
2062#[cfg(feature = "api-21")]
2063pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE:
2064 OH_Drawing_TextStyleAttributeId = 2;
2065#[doc = " Font width"]
2066#[cfg(feature = "api-21")]
2067pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_I_FONT_WIDTH:
2068 OH_Drawing_TextStyleAttributeId = 3;
2069#[doc = " Font edging\n @since 24"]
2070#[cfg(feature = "api-24")]
2071pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_I_FONT_EDGING:
2072 OH_Drawing_TextStyleAttributeId = 4;
2073#[doc = " @brief Enumerates text style attribute.\n\n @since 21"]
2074#[cfg(feature = "api-21")]
2075pub type OH_Drawing_TextStyleAttributeId = u32;
2076#[doc = " Use the font size as the scale factor for line height scaling"]
2077#[cfg(feature = "api-21")]
2078pub const OH_Drawing_LineHeightStyle_TEXT_LINE_HEIGHT_BY_FONT_SIZE: OH_Drawing_LineHeightStyle = 0;
2079#[doc = " Use the text height after shaping as the scale factor for line height scaling"]
2080#[cfg(feature = "api-21")]
2081pub const OH_Drawing_LineHeightStyle_TEXT_LINE_HEIGHT_BY_FONT_HEIGHT: OH_Drawing_LineHeightStyle =
2082 1;
2083#[doc = " @brief Enumerates line height's scaling type.\n\n @since 21"]
2084#[cfg(feature = "api-21")]
2085pub type OH_Drawing_LineHeightStyle = u32;
2086#[doc = " Line height maximum"]
2087#[cfg(feature = "api-21")]
2088pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM:
2089 OH_Drawing_TypographyStyleAttributeId = 0;
2090#[doc = " Line height minimum"]
2091#[cfg(feature = "api-21")]
2092pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM:
2093 OH_Drawing_TypographyStyleAttributeId = 1;
2094#[doc = " Line spacing"]
2095#[cfg(feature = "api-21")]
2096pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING:
2097 OH_Drawing_TypographyStyleAttributeId = 2;
2098#[doc = " Line height style"]
2099#[cfg(feature = "api-21")]
2100pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE:
2101 OH_Drawing_TypographyStyleAttributeId = 3;
2102#[doc = " Font width"]
2103#[cfg(feature = "api-21")]
2104pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH:
2105 OH_Drawing_TypographyStyleAttributeId = 4;
2106#[doc = " Compress head punctuation\n @since 23"]
2107#[cfg(feature = "api-23")]
2108pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_COMPRESS_HEAD_PUNCTUATION : OH_Drawing_TypographyStyleAttributeId = 5 ;
2109#[doc = " Font padding\n @since 23"]
2110#[cfg(feature = "api-23")]
2111pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_INCLUDE_FONT_PADDING:
2112 OH_Drawing_TypographyStyleAttributeId = 6;
2113#[doc = " Fallback line spacing\n @since 23"]
2114#[cfg(feature = "api-23")]
2115pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_B_FALLBACK_LINE_SPACING:
2116 OH_Drawing_TypographyStyleAttributeId = 7;
2117#[doc = " Ellipsis modal\n @since 24"]
2118#[cfg(feature = "api-24")]
2119pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_I_ELLIPSIS_MODAL:
2120 OH_Drawing_TypographyStyleAttributeId = 8;
2121#[doc = " @brief Enumerates typography style attribute.\n\n @since 21"]
2122#[cfg(feature = "api-21")]
2123pub type OH_Drawing_TypographyStyleAttributeId = u32;
2124extern "C" {
2125 #[doc = " @brief Sets double value to the text style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id\n exceeds the allowable range.\n @since 21"]
2126 #[cfg(feature = "api-21")]
2127 pub fn OH_Drawing_SetTextStyleAttributeDouble(
2128 style: *mut OH_Drawing_TextStyle,
2129 id: OH_Drawing_TextStyleAttributeId,
2130 value: f64,
2131 ) -> OH_Drawing_ErrorCode;
2132}
2133extern "C" {
2134 #[doc = " @brief Gets the double type property's value from the text style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 21"]
2135 #[cfg(feature = "api-21")]
2136 pub fn OH_Drawing_GetTextStyleAttributeDouble(
2137 style: *mut OH_Drawing_TextStyle,
2138 id: OH_Drawing_TextStyleAttributeId,
2139 value: *mut f64,
2140 ) -> OH_Drawing_ErrorCode;
2141}
2142extern "C" {
2143 #[doc = " @brief Sets int value to the text style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id\n exceeds the allowable range.\n @since 21"]
2144 #[cfg(feature = "api-21")]
2145 pub fn OH_Drawing_SetTextStyleAttributeInt(
2146 style: *mut OH_Drawing_TextStyle,
2147 id: OH_Drawing_TextStyleAttributeId,
2148 value: ::std::os::raw::c_int,
2149 ) -> OH_Drawing_ErrorCode;
2150}
2151extern "C" {
2152 #[doc = " @brief Gets the int type property's value from the text style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 21"]
2153 #[cfg(feature = "api-21")]
2154 pub fn OH_Drawing_GetTextStyleAttributeInt(
2155 style: *mut OH_Drawing_TextStyle,
2156 id: OH_Drawing_TextStyleAttributeId,
2157 value: *mut ::std::os::raw::c_int,
2158 ) -> OH_Drawing_ErrorCode;
2159}
2160extern "C" {
2161 #[doc = " @brief Sets double value to the typography style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id\n exceeds the allowable range.\n @since 21"]
2162 #[cfg(feature = "api-21")]
2163 pub fn OH_Drawing_SetTypographyStyleAttributeDouble(
2164 style: *mut OH_Drawing_TypographyStyle,
2165 id: OH_Drawing_TypographyStyleAttributeId,
2166 value: f64,
2167 ) -> OH_Drawing_ErrorCode;
2168}
2169extern "C" {
2170 #[doc = " @brief Gets the double type property's value from the typography style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 21"]
2171 #[cfg(feature = "api-21")]
2172 pub fn OH_Drawing_GetTypographyStyleAttributeDouble(
2173 style: *mut OH_Drawing_TypographyStyle,
2174 id: OH_Drawing_TypographyStyleAttributeId,
2175 value: *mut f64,
2176 ) -> OH_Drawing_ErrorCode;
2177}
2178extern "C" {
2179 #[doc = " @brief Sets int value to the typography style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if the value corresponding to the attribute id\n exceeds the allowable range.\n @since 21"]
2180 #[cfg(feature = "api-21")]
2181 pub fn OH_Drawing_SetTypographyStyleAttributeInt(
2182 style: *mut OH_Drawing_TypographyStyle,
2183 id: OH_Drawing_TypographyStyleAttributeId,
2184 value: ::std::os::raw::c_int,
2185 ) -> OH_Drawing_ErrorCode;
2186}
2187extern "C" {
2188 #[doc = " @brief Gets the int type property's value from the typography style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 21"]
2189 #[cfg(feature = "api-21")]
2190 pub fn OH_Drawing_GetTypographyStyleAttributeInt(
2191 style: *mut OH_Drawing_TypographyStyle,
2192 id: OH_Drawing_TypographyStyleAttributeId,
2193 value: *mut ::std::os::raw::c_int,
2194 ) -> OH_Drawing_ErrorCode;
2195}
2196extern "C" {
2197 #[doc = " @brief Sets bool value to the typography style attribute.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the value to set.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if the style is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 23"]
2198 #[cfg(feature = "api-23")]
2199 pub fn OH_Drawing_SetTypographyStyleAttributeBool(
2200 style: *mut OH_Drawing_TypographyStyle,
2201 id: OH_Drawing_TypographyStyleAttributeId,
2202 value: bool,
2203 ) -> OH_Drawing_ErrorCode;
2204}
2205extern "C" {
2206 #[doc = " @brief Gets the bool type property's value from the typography style.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param id Indicates the attribute id.\n @param value Indicates the return value of the interface.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if the style or value is nullptr.\n Returns {@link OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH} if the attribute id is not recognized or supported.\n @since 23"]
2207 #[cfg(feature = "api-23")]
2208 pub fn OH_Drawing_GetTypographyStyleAttributeBool(
2209 style: *mut OH_Drawing_TypographyStyle,
2210 id: OH_Drawing_TypographyStyleAttributeId,
2211 value: *mut bool,
2212 ) -> OH_Drawing_ErrorCode;
2213}
2214#[doc = " No badge"]
2215#[cfg(feature = "api-20")]
2216pub const OH_Drawing_TextBadgeType_TEXT_BADGE_NONE: OH_Drawing_TextBadgeType = 0;
2217#[doc = " Superscript"]
2218#[cfg(feature = "api-20")]
2219pub const OH_Drawing_TextBadgeType_TEXT_SUPERSCRIPT: OH_Drawing_TextBadgeType = 1;
2220#[doc = " Subscript"]
2221#[cfg(feature = "api-20")]
2222pub const OH_Drawing_TextBadgeType_TEXT_SUBSCRIPT: OH_Drawing_TextBadgeType = 2;
2223#[doc = " @brief Type of badge.\n\n @since 20\n @version 1.0"]
2224#[cfg(feature = "api-20")]
2225pub type OH_Drawing_TextBadgeType = u32;
2226#[doc = " Baseline of text line"]
2227#[cfg(feature = "api-20")]
2228pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_BASELINE:
2229 OH_Drawing_TextVerticalAlignment = 0;
2230#[doc = " Bottom of text line"]
2231#[cfg(feature = "api-20")]
2232pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_BOTTOM:
2233 OH_Drawing_TextVerticalAlignment = 1;
2234#[doc = " Center of text line"]
2235#[cfg(feature = "api-20")]
2236pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_CENTER:
2237 OH_Drawing_TextVerticalAlignment = 2;
2238#[doc = " Top of text line"]
2239#[cfg(feature = "api-20")]
2240pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_TOP:
2241 OH_Drawing_TextVerticalAlignment = 3;
2242#[doc = " @brief Type of vertical alignment.\n\n @since 20\n @version 1.0"]
2243#[cfg(feature = "api-20")]
2244pub type OH_Drawing_TextVerticalAlignment = u32;
2245#[doc = " @brief Defines the font style struct.\n\n @since 12\n @version 1.0"]
2246#[repr(C)]
2247#[derive(Debug, Copy, Clone)]
2248pub struct OH_Drawing_FontStyleStruct {
2249 #[doc = " Font weight"]
2250 pub weight: OH_Drawing_FontWeight,
2251 #[doc = " Font width"]
2252 pub width: OH_Drawing_FontWidth,
2253 #[doc = " Font slant"]
2254 pub slant: OH_Drawing_FontStyle,
2255}
2256#[doc = " @brief Defines the fontfeature.\n\n @since 12\n @version 1.0"]
2257#[repr(C)]
2258#[derive(Debug, Copy, Clone)]
2259pub struct OH_Drawing_FontFeature {
2260 #[doc = " key of fontfeature"]
2261 pub tag: *mut ::std::os::raw::c_char,
2262 #[doc = " value of fontfeature"]
2263 pub value: ::std::os::raw::c_int,
2264}
2265#[doc = " @brief Defines StrutStyle info struct.\n\n @since 12\n @version 1.0"]
2266#[repr(C)]
2267#[derive(Debug, Copy, Clone)]
2268pub struct OH_Drawing_StrutStyle {
2269 #[doc = " The font weight to use when calculating the strut"]
2270 pub weight: OH_Drawing_FontWeight,
2271 #[doc = " The font style to use when calculating the strut"]
2272 pub style: OH_Drawing_FontStyle,
2273 #[doc = " The size of the ascent plus descent in logical pixels"]
2274 pub size: f64,
2275 #[doc = " The minimum height of the strut, as a multiple of fontSize"]
2276 pub heightScale: f64,
2277 #[doc = " Whether the height is override"]
2278 pub heightOverride: bool,
2279 #[doc = " Whether the halfleading is enable"]
2280 pub halfLeading: bool,
2281 #[doc = " The additional leading to apply to the strut as a multiple of Size"]
2282 pub leading: f64,
2283 #[doc = " Whether the strut height should be forced"]
2284 pub forceStrutHeight: bool,
2285 #[doc = " The size of font families"]
2286 pub familiesSize: usize,
2287 #[doc = " The families of the font to use when calculating the strut"]
2288 pub families: *mut *mut ::std::os::raw::c_char,
2289}
2290#[doc = " @brief Defines the text rect struct.\n\n @since 24"]
2291#[cfg(feature = "api-24")]
2292#[repr(C)]
2293#[derive(Debug, Copy, Clone)]
2294pub struct OH_Drawing_RectSize {
2295 #[doc = " Rect width"]
2296 pub width: f64,
2297 #[doc = " Rect height"]
2298 pub height: f64,
2299}
2300extern "C" {
2301 #[doc = " @brief Creates an <b>OH_Drawing_TypographyStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_TypographyStyle</b> object created.\n @since 8\n @version 1.0"]
2302 pub fn OH_Drawing_CreateTypographyStyle() -> *mut OH_Drawing_TypographyStyle;
2303}
2304extern "C" {
2305 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_TypographyStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @since 8\n @version 1.0"]
2306 pub fn OH_Drawing_DestroyTypographyStyle(style: *mut OH_Drawing_TypographyStyle);
2307}
2308extern "C" {
2309 #[doc = " @brief Sets the text direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param direction Indicates the text direction to set. For details, see the enum <b>OH_Drawing_TextDirection</b>.\n @since 8\n @version 1.0"]
2310 pub fn OH_Drawing_SetTypographyTextDirection(
2311 style: *mut OH_Drawing_TypographyStyle,
2312 direction: ::std::os::raw::c_int,
2313 );
2314}
2315extern "C" {
2316 #[doc = " @brief Sets the text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param align Indicates the text alignment mode to set. For details, see the enum <b>OH_Drawing_TextAlign</b>.\n @since 8\n @version 1.0"]
2317 pub fn OH_Drawing_SetTypographyTextAlign(
2318 style: *mut OH_Drawing_TypographyStyle,
2319 align: ::std::os::raw::c_int,
2320 );
2321}
2322extern "C" {
2323 #[doc = " @brief Sets the maximum number of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param lineNumber Indicates the maximum number of lines to set.\n @since 8\n @version 1.0"]
2324 pub fn OH_Drawing_SetTypographyTextMaxLines(
2325 style: *mut OH_Drawing_TypographyStyle,
2326 lineNumber: ::std::os::raw::c_int,
2327 );
2328}
2329extern "C" {
2330 #[doc = " @brief Creates an <b>OH_Drawing_TextStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_TextStyle</b> object created.\n @since 8\n @version 1.0"]
2331 pub fn OH_Drawing_CreateTextStyle() -> *mut OH_Drawing_TextStyle;
2332}
2333extern "C" {
2334 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_TextStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @since 8\n @version 1.0"]
2335 pub fn OH_Drawing_DestroyTextStyle(style: *mut OH_Drawing_TextStyle);
2336}
2337extern "C" {
2338 #[doc = " @brief Sets the text color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param color Indicates the color to set.\n @since 8\n @version 1.0"]
2339 pub fn OH_Drawing_SetTextStyleColor(style: *mut OH_Drawing_TextStyle, color: u32);
2340}
2341extern "C" {
2342 #[doc = " @brief Sets the font size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontSize Indicates the font size to set.\n @since 8\n @version 1.0"]
2343 pub fn OH_Drawing_SetTextStyleFontSize(style: *mut OH_Drawing_TextStyle, fontSize: f64);
2344}
2345extern "C" {
2346 #[doc = " @brief Sets the font weight.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontWeight Indicates the font weight to set. For details, see the enum <b>OH_Drawing_FontWeight</b>.\n @since 8\n @version 1.0"]
2347 pub fn OH_Drawing_SetTextStyleFontWeight(
2348 style: *mut OH_Drawing_TextStyle,
2349 fontWeight: ::std::os::raw::c_int,
2350 );
2351}
2352extern "C" {
2353 #[doc = " @brief Sets the text baseline.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param baseline Indicates the text baseline to set. For details, see the enum <b>OH_Drawing_TextBaseline</b>.\n @since 8\n @version 1.0"]
2354 pub fn OH_Drawing_SetTextStyleBaseLine(
2355 style: *mut OH_Drawing_TextStyle,
2356 baseline: ::std::os::raw::c_int,
2357 );
2358}
2359extern "C" {
2360 #[doc = " @brief Sets the text decoration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decoration Indicates the text decoration to set. For details, see the enum <b>OH_Drawing_TextDecoration</b>.\n @since 8\n @version 1.0"]
2361 pub fn OH_Drawing_SetTextStyleDecoration(
2362 style: *mut OH_Drawing_TextStyle,
2363 decoration: ::std::os::raw::c_int,
2364 );
2365}
2366extern "C" {
2367 #[doc = " @brief Add the text decoration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decoration Indicates the text decoration to add. For details, see the enum <b>OH_Drawing_TextDecoration</b>.\n @since 18\n @version 1.0"]
2368 #[cfg(feature = "api-18")]
2369 pub fn OH_Drawing_AddTextStyleDecoration(
2370 style: *mut OH_Drawing_TextStyle,
2371 decoration: ::std::os::raw::c_int,
2372 );
2373}
2374extern "C" {
2375 #[doc = " @brief Remove the text decoration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decoration Indicates the text decoration to remove, shoud be match existing text decorations.\n For details, see the enum <b>OH_Drawing_TextDecoration</b>.\n @since 18\n @version 1.0"]
2376 #[cfg(feature = "api-18")]
2377 pub fn OH_Drawing_RemoveTextStyleDecoration(
2378 style: *mut OH_Drawing_TextStyle,
2379 decoration: ::std::os::raw::c_int,
2380 );
2381}
2382extern "C" {
2383 #[doc = " @brief Sets the color for the text decoration.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param color Indicates the color to set.\n @since 8\n @version 1.0"]
2384 pub fn OH_Drawing_SetTextStyleDecorationColor(style: *mut OH_Drawing_TextStyle, color: u32);
2385}
2386extern "C" {
2387 #[doc = " @brief Sets the font height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontHeight Indicates the font height to set.\n @since 8\n @version 1.0"]
2388 pub fn OH_Drawing_SetTextStyleFontHeight(style: *mut OH_Drawing_TextStyle, fontHeight: f64);
2389}
2390extern "C" {
2391 #[doc = " @brief Sets the font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontFamiliesNumber Indicates the number of font families to set.\n @param fontFamilies Indicates the pointer to the font families to set.\n @since 8\n @version 1.0"]
2392 pub fn OH_Drawing_SetTextStyleFontFamilies(
2393 style: *mut OH_Drawing_TextStyle,
2394 fontFamiliesNumber: ::std::os::raw::c_int,
2395 fontFamilies: *mut *const ::std::os::raw::c_char,
2396 );
2397}
2398extern "C" {
2399 #[doc = " @brief Sets the font style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontStyle Indicates the font style to set. For details, see the enum <b>OH_Drawing_FontStyle</b>.\n @since 8\n @version 1.0"]
2400 pub fn OH_Drawing_SetTextStyleFontStyle(
2401 style: *mut OH_Drawing_TextStyle,
2402 fontStyle: ::std::os::raw::c_int,
2403 );
2404}
2405extern "C" {
2406 #[doc = " @brief Sets the locale.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param locale Indicates the pointer to the locale to set.\n @since 8\n @version 1.0"]
2407 pub fn OH_Drawing_SetTextStyleLocale(
2408 style: *mut OH_Drawing_TextStyle,
2409 locale: *const ::std::os::raw::c_char,
2410 );
2411}
2412extern "C" {
2413 #[doc = " @brief Sets the foreground brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundBrush Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
2414 pub fn OH_Drawing_SetTextStyleForegroundBrush(
2415 style: *mut OH_Drawing_TextStyle,
2416 foregroundBrush: *mut OH_Drawing_Brush,
2417 );
2418}
2419extern "C" {
2420 #[doc = " @brief Gets the foreground brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundBrush Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
2421 pub fn OH_Drawing_TextStyleGetForegroundBrush(
2422 style: *mut OH_Drawing_TextStyle,
2423 foregroundBrush: *mut OH_Drawing_Brush,
2424 );
2425}
2426extern "C" {
2427 #[doc = " @brief Sets the foreground pen style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundPen Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.\n @since 12\n @version 1.0"]
2428 pub fn OH_Drawing_SetTextStyleForegroundPen(
2429 style: *mut OH_Drawing_TextStyle,
2430 foregroundPen: *mut OH_Drawing_Pen,
2431 );
2432}
2433extern "C" {
2434 #[doc = " @brief Gets the foreground pen style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundPen Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.\n @since 12\n @version 1.0"]
2435 pub fn OH_Drawing_TextStyleGetForegroundPen(
2436 style: *mut OH_Drawing_TextStyle,
2437 foregroundPen: *mut OH_Drawing_Pen,
2438 );
2439}
2440extern "C" {
2441 #[doc = " @brief Sets the background brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param backgroundBrush Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
2442 pub fn OH_Drawing_SetTextStyleBackgroundBrush(
2443 style: *mut OH_Drawing_TextStyle,
2444 backgroundBrush: *mut OH_Drawing_Brush,
2445 );
2446}
2447extern "C" {
2448 #[doc = " @brief Gets the background brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param backgroundBrush Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
2449 pub fn OH_Drawing_TextStyleGetBackgroundBrush(
2450 style: *mut OH_Drawing_TextStyle,
2451 backgroundBrush: *mut OH_Drawing_Brush,
2452 );
2453}
2454extern "C" {
2455 #[doc = " @brief Sets the background pen style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param backgroundPen Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.\n @since 12\n @version 1.0"]
2456 pub fn OH_Drawing_SetTextStyleBackgroundPen(
2457 style: *mut OH_Drawing_TextStyle,
2458 backgroundPen: *mut OH_Drawing_Pen,
2459 );
2460}
2461extern "C" {
2462 #[doc = " @brief Gets the background pen style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param backgroundPen Indicates the pointer to a pen object <b>OH_Drawing_Pen</b>.\n @since 12\n @version 1.0"]
2463 pub fn OH_Drawing_TextStyleGetBackgroundPen(
2464 style: *mut OH_Drawing_TextStyle,
2465 backgroundPen: *mut OH_Drawing_Pen,
2466 );
2467}
2468extern "C" {
2469 #[doc = " @brief Creates a pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TypographyCreate</b> object created.\n @since 8\n @version 1.0"]
2470 pub fn OH_Drawing_CreateTypographyHandler(
2471 style: *mut OH_Drawing_TypographyStyle,
2472 fontCollection: *mut OH_Drawing_FontCollection,
2473 ) -> *mut OH_Drawing_TypographyCreate;
2474}
2475extern "C" {
2476 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_TypographyCreate</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @since 8\n @version 1.0"]
2477 pub fn OH_Drawing_DestroyTypographyHandler(handler: *mut OH_Drawing_TypographyCreate);
2478}
2479extern "C" {
2480 #[doc = " @brief Sets the text style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @since 8\n @version 1.0"]
2481 pub fn OH_Drawing_TypographyHandlerPushTextStyle(
2482 handler: *mut OH_Drawing_TypographyCreate,
2483 style: *mut OH_Drawing_TextStyle,
2484 );
2485}
2486extern "C" {
2487 #[doc = " @brief Sets the text content.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param text Indicates the pointer to the text content to set.\n @since 8\n @version 1.0"]
2488 pub fn OH_Drawing_TypographyHandlerAddText(
2489 handler: *mut OH_Drawing_TypographyCreate,
2490 text: *const ::std::os::raw::c_char,
2491 );
2492}
2493extern "C" {
2494 #[doc = " @brief Removes the topmost style in the stack, leaving the remaining styles in effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @since 8\n @version 1.0"]
2495 pub fn OH_Drawing_TypographyHandlerPopTextStyle(handler: *mut OH_Drawing_TypographyCreate);
2496}
2497extern "C" {
2498 #[doc = " @brief Creates an <b>OH_Drawing_Typography</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Typography</b> object created.\n @since 8\n @version 1.0"]
2499 pub fn OH_Drawing_CreateTypography(
2500 handler: *mut OH_Drawing_TypographyCreate,
2501 ) -> *mut OH_Drawing_Typography;
2502}
2503extern "C" {
2504 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_Typography</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @since 8\n @version 1.0"]
2505 pub fn OH_Drawing_DestroyTypography(typography: *mut OH_Drawing_Typography);
2506}
2507extern "C" {
2508 #[doc = " @brief Lays out the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param maxWidth Indicates the maximum text width to set.\n @since 8\n @version 1.0"]
2509 pub fn OH_Drawing_TypographyLayout(typography: *mut OH_Drawing_Typography, maxWidth: f64);
2510}
2511extern "C" {
2512 #[doc = " @brief Paints text on the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param positionX Indicates the x coordinate.\n @param positionY Indicates the y coordinate.\n @since 8\n @version 1.0"]
2513 pub fn OH_Drawing_TypographyPaint(
2514 typography: *mut OH_Drawing_Typography,
2515 canvas: *mut OH_Drawing_Canvas,
2516 positionX: f64,
2517 positionY: f64,
2518 );
2519}
2520extern "C" {
2521 #[doc = " @brief Paints path text on the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates path information.\n @param hOffset Indicates the distance along the path to add to the text's starting position.\n @param vOffset Indicates the distance above(-) or below(+) the path to position the text.\n @since 12\n @version 1.0"]
2522 pub fn OH_Drawing_TypographyPaintOnPath(
2523 typography: *mut OH_Drawing_Typography,
2524 canvas: *mut OH_Drawing_Canvas,
2525 path: *mut OH_Drawing_Path,
2526 hOffset: f64,
2527 vOffset: f64,
2528 );
2529}
2530extern "C" {
2531 #[doc = " @brief Layout text within a constrained rectangle.\n\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param constraintsRect Constraints height and width for layout.\n @param fitStrRangeArr On return, contains the character range of the paragraph that actually fit.\n Indicates the pointer to the array object <b>OH_Drawing_Array</b>.\n Releases memory by <b>OH_Drawing_ReleaseArrayBuffer</b>.\n @param fitStrRangeArrayLen On return, the size of the fit string array.\n @return Returns an <b>OH_Drawing_RectSize</b> object that represents the paragraph's actual rectangle.\n @since 24"]
2532 #[cfg(feature = "api-24")]
2533 pub fn OH_Drawing_TypographyLayoutWithConstraintsWithBuffer(
2534 typography: *mut OH_Drawing_Typography,
2535 constraintsRect: OH_Drawing_RectSize,
2536 fitStrRangeArr: *mut *mut OH_Drawing_Array,
2537 fitStrRangeArrayLen: *mut usize,
2538 ) -> OH_Drawing_RectSize;
2539}
2540extern "C" {
2541 #[doc = " @brief Get range by array index.\n\n @param array Indicates the pointer to the text <b>OH_Drawing_Array</b> object.\n @param index Range's index in array.\n @return Returns Indicates the pointer to an <b>OH_Drawing_Range</b> object.\n @since 24"]
2542 #[cfg(feature = "api-24")]
2543 pub fn OH_Drawing_GetRangeByArrayIndex(
2544 array: *mut OH_Drawing_Array,
2545 index: usize,
2546 ) -> *mut OH_Drawing_Range;
2547}
2548extern "C" {
2549 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_Array</b> object.\n\n @param array Indicates the pointer to the text <b>OH_Drawing_Array</b> object.\n Supported array type: Fonts full name array, get by <b>OH_Drawing_GetSystemFontFullNamesByType</b>.\n Supported array type: Text lines array, get by <b>OH_Drawing_TypographyGetTextLines</b>.\n Supported array type: String indices array, get by <b>OH_Drawing_GetRunStringIndices</b>.\n Supported array type: Rect array, get by <b>OH_Drawing_RectCreateArray</b>.\n Supported array type: FontDescriptors array, get by <b>OH_Drawing_GetFontFullDescriptorsFromStream</b>.\n Supported array type: FontDescriptors array, get by <b>OH_Drawing_GetFontFullDescriptorsFromPath</b>.\n Supported array type: Text ranges array, get by <b>OH_Drawing_TypographyLayoutWithConstraintsWithBuffer</b>.\n @return Returns an error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if the array is nullptr or not supported.\n @since 24"]
2550 #[cfg(feature = "api-24")]
2551 pub fn OH_Drawing_ReleaseArrayBuffer(array: *mut OH_Drawing_Array) -> OH_Drawing_ErrorCode;
2552}
2553extern "C" {
2554 #[doc = " @brief Gets the max width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the max width.\n @since 9\n @version 1.1"]
2555 pub fn OH_Drawing_TypographyGetMaxWidth(typography: *mut OH_Drawing_Typography) -> f64;
2556}
2557extern "C" {
2558 #[doc = " @brief Gets the height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the height.\n @since 9\n @version 1.1"]
2559 pub fn OH_Drawing_TypographyGetHeight(typography: *mut OH_Drawing_Typography) -> f64;
2560}
2561extern "C" {
2562 #[doc = " @brief Obtains the width of the longest line. You are advised to round up the return value in actual use.\n When the text content is empty, the minimum float value,\n that is, -340282346638528859811704183484516925440.000000, is returned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to an <b>OH_Drawing_Typography</b> object, which is obtained by\n {@link OH_Drawing_CreateTypography}.\n @return Returns the width of the longest line.\n @since 9\n @version 1.1"]
2563 pub fn OH_Drawing_TypographyGetLongestLine(typography: *mut OH_Drawing_Typography) -> f64;
2564}
2565extern "C" {
2566 #[doc = " @brief Obtains the width of the longest line with indent. You are advised to\n round up the return value in actual use. When the text content is empty, the\n minimum float value, that is, 0.0, is returned.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Pointer to an <b>OH_Drawing_Typography</b> object, which is obtained by\n {@link OH_Drawing_CreateTypography}.\n @return Returns the width of the longest line with indent.\n @since 13\n @version 1.1"]
2567 #[cfg(feature = "api-13")]
2568 pub fn OH_Drawing_TypographyGetLongestLineWithIndent(
2569 typography: *mut OH_Drawing_Typography,
2570 ) -> f64;
2571}
2572extern "C" {
2573 #[doc = " @brief Gets the min intrinsic width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the min intrinsic width.\n @since 9\n @version 1.1"]
2574 pub fn OH_Drawing_TypographyGetMinIntrinsicWidth(typography: *mut OH_Drawing_Typography)
2575 -> f64;
2576}
2577extern "C" {
2578 #[doc = " @brief Gets the max intrinsic width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the max intrinsic width.\n @since 9\n @version 1.1"]
2579 pub fn OH_Drawing_TypographyGetMaxIntrinsicWidth(typography: *mut OH_Drawing_Typography)
2580 -> f64;
2581}
2582extern "C" {
2583 #[doc = " @brief Gets the alphabetic baseline.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the alphabetic baseline.\n @since 9\n @version 1.1"]
2584 pub fn OH_Drawing_TypographyGetAlphabeticBaseline(
2585 typography: *mut OH_Drawing_Typography,
2586 ) -> f64;
2587}
2588extern "C" {
2589 #[doc = " @brief Gets the ideographic baseline.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the ideographic baseline.\n @since 9\n @version 1.1"]
2590 pub fn OH_Drawing_TypographyGetIdeographicBaseline(
2591 typography: *mut OH_Drawing_Typography,
2592 ) -> f64;
2593}
2594extern "C" {
2595 #[doc = " @brief Sets the placeholder.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param span Indicates the pointer to an <b>OH_Drawing_PlaceholderSpan</b> object.\n @since 11\n @version 1.0"]
2596 pub fn OH_Drawing_TypographyHandlerAddPlaceholder(
2597 handler: *mut OH_Drawing_TypographyCreate,
2598 span: *mut OH_Drawing_PlaceholderSpan,
2599 );
2600}
2601extern "C" {
2602 #[doc = " @brief Gets the exceed maxLines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the exceed maxLines.\n @since 11\n @version 1.0"]
2603 pub fn OH_Drawing_TypographyDidExceedMaxLines(typography: *mut OH_Drawing_Typography) -> bool;
2604}
2605extern "C" {
2606 #[doc = " @brief Gets the rects for range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param start Indicates the start of range to set.\n @param end Indicates the end of range to set.\n @param heightStyle Indicates the height style to set.\n For details, see the enum <b>OH_Drawing_RectHeightStyle</b>.\n @param widthStyle Indicates the width style to set.\n For details, see the enum <b>OH_Drawing_RectWidthStyle</b>.\n @return Returns the rects for range.\n @since 11\n @version 1.0"]
2607 pub fn OH_Drawing_TypographyGetRectsForRange(
2608 typography: *mut OH_Drawing_Typography,
2609 start: usize,
2610 end: usize,
2611 heightStyle: OH_Drawing_RectHeightStyle,
2612 widthStyle: OH_Drawing_RectWidthStyle,
2613 ) -> *mut OH_Drawing_TextBox;
2614}
2615extern "C" {
2616 #[doc = " @brief Gets the rects for placeholders.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the rects for placeholders.\n @since 11\n @version 1.0"]
2617 pub fn OH_Drawing_TypographyGetRectsForPlaceholders(
2618 typography: *mut OH_Drawing_Typography,
2619 ) -> *mut OH_Drawing_TextBox;
2620}
2621extern "C" {
2622 #[doc = " @brief Gets left from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns left from textbox.\n @since 11\n @version 1.0"]
2623 pub fn OH_Drawing_GetLeftFromTextBox(
2624 textbox: *mut OH_Drawing_TextBox,
2625 index: ::std::os::raw::c_int,
2626 ) -> f32;
2627}
2628extern "C" {
2629 #[doc = " @brief Gets right from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns right from textbox.\n @since 11\n @version 1.0"]
2630 pub fn OH_Drawing_GetRightFromTextBox(
2631 textbox: *mut OH_Drawing_TextBox,
2632 index: ::std::os::raw::c_int,
2633 ) -> f32;
2634}
2635extern "C" {
2636 #[doc = " @brief Gets top from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns top from textbox.\n @since 11\n @version 1.0"]
2637 pub fn OH_Drawing_GetTopFromTextBox(
2638 textbox: *mut OH_Drawing_TextBox,
2639 index: ::std::os::raw::c_int,
2640 ) -> f32;
2641}
2642extern "C" {
2643 #[doc = " @brief Gets bottom from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns bottom from textbox.\n @since 11\n @version 1.0"]
2644 pub fn OH_Drawing_GetBottomFromTextBox(
2645 textbox: *mut OH_Drawing_TextBox,
2646 index: ::std::os::raw::c_int,
2647 ) -> f32;
2648}
2649extern "C" {
2650 #[doc = " @brief Gets direction from textbox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textbox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @param index Indicates the index of textbox.\n @return Returns direction from textbox.\n @since 11\n @version 1.0"]
2651 pub fn OH_Drawing_GetTextDirectionFromTextBox(
2652 textbox: *mut OH_Drawing_TextBox,
2653 index: ::std::os::raw::c_int,
2654 ) -> ::std::os::raw::c_int;
2655}
2656extern "C" {
2657 #[doc = " @brief Gets size of textBox.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBox Indicates the pointer to an <b>OH_Drawing_TextBox</b> object.\n @return Returns size of textBox.\n @since 11\n @version 1.0"]
2658 pub fn OH_Drawing_GetSizeOfTextBox(textBox: *mut OH_Drawing_TextBox) -> usize;
2659}
2660extern "C" {
2661 #[doc = " @brief Gets the glyphposition at coordinate.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param dx Indicates the positionX of typography to set.\n @param dy Indicates the positionY of typography to set.\n @return Returns the glyphposition at coordinate.\n @since 11\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster"]
2662 pub fn OH_Drawing_TypographyGetGlyphPositionAtCoordinate(
2663 typography: *mut OH_Drawing_Typography,
2664 dx: f64,
2665 dy: f64,
2666 ) -> *mut OH_Drawing_PositionAndAffinity;
2667}
2668extern "C" {
2669 #[doc = " @brief Gets the glyphposition at coordinate with cluster.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param dx Indicates the positionX of typography to set.\n @param dy Indicates the positionY of typography to set.\n @return Returns the glyphposition at coordinate with cluster.\n @since 11\n @version 1.0"]
2670 pub fn OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster(
2671 typography: *mut OH_Drawing_Typography,
2672 dx: f64,
2673 dy: f64,
2674 ) -> *mut OH_Drawing_PositionAndAffinity;
2675}
2676extern "C" {
2677 #[doc = " @brief Gets position from position and affinity.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positionAndAffinity Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.\n @return Returns position from position and affinity.\n @since 11\n @version 1.0"]
2678 pub fn OH_Drawing_GetPositionFromPositionAndAffinity(
2679 positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
2680 ) -> usize;
2681}
2682extern "C" {
2683 #[doc = " @brief Gets affinity from position and affinity.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positionAndAffinity Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.\n @return Returns affinity from position and affinity.\n @since 11\n @version 1.0"]
2684 pub fn OH_Drawing_GetAffinityFromPositionAndAffinity(
2685 positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
2686 ) -> ::std::os::raw::c_int;
2687}
2688extern "C" {
2689 #[doc = " @brief Gets the word boundary.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param offset Indicates the size of text to set.\n @return Returns the word boundary.\n @since 11\n @version 1.0"]
2690 pub fn OH_Drawing_TypographyGetWordBoundary(
2691 typography: *mut OH_Drawing_Typography,
2692 offset: usize,
2693 ) -> *mut OH_Drawing_Range;
2694}
2695extern "C" {
2696 #[doc = " @brief Gets start from range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param range Indicates the pointer to an <b>OH_Drawing_Range</b> object.\n @return Returns start from range.\n @since 11\n @version 1.0"]
2697 pub fn OH_Drawing_GetStartFromRange(range: *mut OH_Drawing_Range) -> usize;
2698}
2699extern "C" {
2700 #[doc = " @brief Gets end from range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param range Indicates the pointer to an <b>OH_Drawing_Range</b> object.\n @return Returns end from range.\n @since 11\n @version 1.0"]
2701 pub fn OH_Drawing_GetEndFromRange(range: *mut OH_Drawing_Range) -> usize;
2702}
2703extern "C" {
2704 #[doc = " @brief Gets the line count.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @return Returns the line count.\n @since 11\n @version 1.0"]
2705 pub fn OH_Drawing_TypographyGetLineCount(typography: *mut OH_Drawing_Typography) -> usize;
2706}
2707extern "C" {
2708 #[doc = " @brief Sets the decoration style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decorationStyle Indicates the text decoration style to set.\n For details, see the enum <b>OH_Drawing_TextDecorationStyle</b>.\n @since 11\n @version 1.0"]
2709 pub fn OH_Drawing_SetTextStyleDecorationStyle(
2710 style: *mut OH_Drawing_TextStyle,
2711 decorationStyle: ::std::os::raw::c_int,
2712 );
2713}
2714extern "C" {
2715 #[doc = " @brief Sets the decoration thickness scale.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param decorationThicknessScale Indicates the thickness scale of text decoration to set.\n @since 11\n @version 1.0"]
2716 pub fn OH_Drawing_SetTextStyleDecorationThicknessScale(
2717 style: *mut OH_Drawing_TextStyle,
2718 decorationThicknessScale: f64,
2719 );
2720}
2721extern "C" {
2722 #[doc = " @brief Sets the letter spacing.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param letterSpacing Indicates the letter space to set.\n @since 11\n @version 1.0"]
2723 pub fn OH_Drawing_SetTextStyleLetterSpacing(
2724 style: *mut OH_Drawing_TextStyle,
2725 letterSpacing: f64,
2726 );
2727}
2728extern "C" {
2729 #[doc = " @brief Sets the word spacing.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param wordSpacing Indicates the word space to set.\n @since 11\n @version 1.0"]
2730 pub fn OH_Drawing_SetTextStyleWordSpacing(style: *mut OH_Drawing_TextStyle, wordSpacing: f64);
2731}
2732extern "C" {
2733 #[doc = " @brief Sets the half leading.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param halfLeading Indicates the half leading to set.\n @since 11\n @version 1.0"]
2734 pub fn OH_Drawing_SetTextStyleHalfLeading(style: *mut OH_Drawing_TextStyle, halfLeading: bool);
2735}
2736extern "C" {
2737 #[doc = " @brief Sets the ellipsis.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param ellipsis Indicates the pointer to ellipsis style.\n @since 11\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_SetTypographyTextEllipsis"]
2738 pub fn OH_Drawing_SetTextStyleEllipsis(
2739 style: *mut OH_Drawing_TextStyle,
2740 ellipsis: *const ::std::os::raw::c_char,
2741 );
2742}
2743extern "C" {
2744 #[doc = " @brief Sets the ellipsis modal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param ellipsisModal Indicates the ellipsis model to set. For details, see the enum <b>OH_Drawing_EllipsisModal</b>.\n @since 11\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_SetTypographyTextEllipsisModal"]
2745 pub fn OH_Drawing_SetTextStyleEllipsisModal(
2746 style: *mut OH_Drawing_TextStyle,
2747 ellipsisModal: ::std::os::raw::c_int,
2748 );
2749}
2750extern "C" {
2751 #[doc = " @brief Sets the break strategy.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param breakStrategy Indicates the break strategy to set. For details, see the enum <b>OH_Drawing_BreakStrategy</b>.\n @since 11\n @version 1.0"]
2752 pub fn OH_Drawing_SetTypographyTextBreakStrategy(
2753 style: *mut OH_Drawing_TypographyStyle,
2754 breakStrategy: ::std::os::raw::c_int,
2755 );
2756}
2757extern "C" {
2758 #[doc = " @brief Sets the word break type.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param wordBreakType Indicates the word break type to set. For details, see the enum <b>OH_Drawing_WordBreakType</b>.\n @since 11\n @version 1.0"]
2759 pub fn OH_Drawing_SetTypographyTextWordBreakType(
2760 style: *mut OH_Drawing_TypographyStyle,
2761 wordBreakType: ::std::os::raw::c_int,
2762 );
2763}
2764extern "C" {
2765 #[doc = " @brief Sets the ellipsis modal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param ellipsisModal Indicates the ellipsis modal to set. For details, see the enum <b>OH_Drawing_EllipsisModal</b>.\n @since 11\n @version 1.0"]
2766 pub fn OH_Drawing_SetTypographyTextEllipsisModal(
2767 style: *mut OH_Drawing_TypographyStyle,
2768 ellipsisModal: ::std::os::raw::c_int,
2769 );
2770}
2771extern "C" {
2772 #[doc = " @brief get line height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param lineNumber Indicates the line number.\n @return Returns line height.\n @since 11\n @version 1.0"]
2773 pub fn OH_Drawing_TypographyGetLineHeight(
2774 typography: *mut OH_Drawing_Typography,
2775 lineNumber: ::std::os::raw::c_int,
2776 ) -> f64;
2777}
2778extern "C" {
2779 #[doc = " @brief get line width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param lineNumber Indicates the line number.\n @return Returns line width.\n @since 11\n @version 1.0"]
2780 pub fn OH_Drawing_TypographyGetLineWidth(
2781 typography: *mut OH_Drawing_Typography,
2782 lineNumber: ::std::os::raw::c_int,
2783 ) -> f64;
2784}
2785extern "C" {
2786 #[doc = " @brief get line text range.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param lineNumber Indicates the line number.\n @param includeSpaces Indicates whether spaces are contained.\n @return Returns line text range.\n @since 12\n @version 1.0"]
2787 pub fn OH_Drawing_TypographyGetLineTextRange(
2788 typography: *mut OH_Drawing_Typography,
2789 lineNumber: ::std::os::raw::c_int,
2790 includeSpaces: bool,
2791 ) -> *mut OH_Drawing_Range;
2792}
2793extern "C" {
2794 #[doc = " @brief Creates an <b>OH_Drawing_FontDescriptor</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the font descriptor object <b>OH_Drawing_FontDescriptor</b> created.\n @since 12\n @version 1.0"]
2795 pub fn OH_Drawing_CreateFontDescriptor() -> *mut OH_Drawing_FontDescriptor;
2796}
2797extern "C" {
2798 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontDescriptor</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param descriptor the pointer to the font descriptor object <b>OH_Drawing_FontDescriptor</b>.\n @since 12\n @version 1.0"]
2799 pub fn OH_Drawing_DestroyFontDescriptor(descriptor: *mut OH_Drawing_FontDescriptor);
2800}
2801extern "C" {
2802 #[doc = " @brief Creates an <b>OH_Drawing_FontParser</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the font parser object <b>OH_Drawing_FontParser</b>.\n @since 12\n @version 1.0"]
2803 pub fn OH_Drawing_CreateFontParser() -> *mut OH_Drawing_FontParser;
2804}
2805extern "C" {
2806 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontParser</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param parser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.\n @since 12\n @version 1.0"]
2807 pub fn OH_Drawing_DestroyFontParser(parser: *mut OH_Drawing_FontParser);
2808}
2809extern "C" {
2810 #[doc = " @brief Gets a list of system font names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontParser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.\n @param num Returns the number of obtained system font names.\n @return Returns a list of obtained system fonts.\n @since 12\n @version 1.0"]
2811 pub fn OH_Drawing_FontParserGetSystemFontList(
2812 fontParser: *mut OH_Drawing_FontParser,
2813 num: *mut usize,
2814 ) -> *mut *mut ::std::os::raw::c_char;
2815}
2816extern "C" {
2817 #[doc = " @brief Releases the memory occupied by a list of system font names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontList Indicates the pointer to a list of system font names.\n @param num The number of obtained system font names.\n @since 12\n @version 1.0"]
2818 pub fn OH_Drawing_DestroySystemFontList(fontList: *mut *mut ::std::os::raw::c_char, num: usize);
2819}
2820extern "C" {
2821 #[doc = " @brief Gets information about the system font by font name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontParser Indicates the pointer to the font parser object <b>OH_Drawing_FontParser</b>.\n @param name font name.\n @return Returns system fonts information.\n @since 12\n @version 1.0"]
2822 pub fn OH_Drawing_FontParserGetFontByName(
2823 fontParser: *mut OH_Drawing_FontParser,
2824 name: *const ::std::os::raw::c_char,
2825 ) -> *mut OH_Drawing_FontDescriptor;
2826}
2827extern "C" {
2828 #[doc = " @brief Get line metrics information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @return Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @since 12\n @version 1.0"]
2829 pub fn OH_Drawing_TypographyGetLineMetrics(
2830 typography: *mut OH_Drawing_Typography,
2831 ) -> *mut OH_Drawing_LineMetrics;
2832}
2833extern "C" {
2834 #[doc = " @brief Get the number of lines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @return Returns the number of lines.\n @since 12\n @version 1.0"]
2835 pub fn OH_Drawing_LineMetricsGetSize(lineMetrics: *mut OH_Drawing_LineMetrics) -> usize;
2836}
2837extern "C" {
2838 #[doc = " @brief Releases the memory occupied by line metrics.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @since 12\n @version 1.0"]
2839 pub fn OH_Drawing_DestroyLineMetrics(lineMetrics: *mut OH_Drawing_LineMetrics);
2840}
2841extern "C" {
2842 #[doc = " @brief Gets the specified line by line number.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param lineNumber Line number.\n @param lineMetric Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @return Whether the line metrics was obtained.\n @since 12\n @version 1.0"]
2843 pub fn OH_Drawing_TypographyGetLineMetricsAt(
2844 typography: *mut OH_Drawing_Typography,
2845 lineNumber: ::std::os::raw::c_int,
2846 lineMetric: *mut OH_Drawing_LineMetrics,
2847 ) -> bool;
2848}
2849extern "C" {
2850 #[doc = " @brief Sets the ellipsis of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param ellipsis Indicates the line textellipsis.\n @since 12\n @version 1.0"]
2851 pub fn OH_Drawing_SetTypographyTextEllipsis(
2852 style: *mut OH_Drawing_TypographyStyle,
2853 ellipsis: *const ::std::os::raw::c_char,
2854 );
2855}
2856extern "C" {
2857 #[doc = " @brief Sets the locale of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param locale Indicates the pointer to the locale to set.\n @since 12\n @version 1.0"]
2858 pub fn OH_Drawing_SetTypographyTextLocale(
2859 style: *mut OH_Drawing_TypographyStyle,
2860 locale: *const ::std::os::raw::c_char,
2861 );
2862}
2863extern "C" {
2864 #[doc = " @brief Sets the textSplitRatio of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param textSplitRatio Indicates the textSplitRatio of lines to set.\n @since 12\n @version 1.0"]
2865 pub fn OH_Drawing_SetTypographyTextSplitRatio(
2866 style: *mut OH_Drawing_TypographyStyle,
2867 textSplitRatio: f32,
2868 );
2869}
2870extern "C" {
2871 #[doc = " @brief Gets the TextStyle of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns line text textstyle.\n @since 12\n @version 1.0"]
2872 pub fn OH_Drawing_TypographyGetTextStyle(
2873 style: *mut OH_Drawing_TypographyStyle,
2874 ) -> *mut OH_Drawing_TextStyle;
2875}
2876extern "C" {
2877 #[doc = " @brief Gets the EffectiveAlign of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns line text align.\n @since 12\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_TypographyStyleGetEffectiveAlignment"]
2878 pub fn OH_Drawing_TypographyGetEffectiveAlignment(
2879 style: *mut OH_Drawing_TypographyStyle,
2880 ) -> ::std::os::raw::c_int;
2881}
2882extern "C" {
2883 #[doc = " @brief Gets the UnlimitedLines of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns whether the text has a maximum line limit,\n with true indicating a maximum line limit and false indicating no maximum line limit.\n @since 12\n @version 1.0"]
2884 pub fn OH_Drawing_TypographyIsLineUnlimited(style: *mut OH_Drawing_TypographyStyle) -> bool;
2885}
2886extern "C" {
2887 #[doc = " @brief Gets the IsEllipsized of lines in a text file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns whether the text has ellipsis,\n true meaning there is an ellipsis and false meaning there is no ellipsis.\n @since 12\n @version 1.0"]
2888 pub fn OH_Drawing_TypographyIsEllipsized(style: *mut OH_Drawing_TypographyStyle) -> bool;
2889}
2890extern "C" {
2891 #[doc = " @brief set line textstyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @since 12\n @version 1.0"]
2892 pub fn OH_Drawing_SetTypographyTextStyle(
2893 handler: *mut OH_Drawing_TypographyStyle,
2894 style: *mut OH_Drawing_TextStyle,
2895 );
2896}
2897extern "C" {
2898 #[doc = " @brief get line fontmetrics.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param fontmetrics Indicates the pointer to a font metrics object <b>OH_Drawing_Font_Metrics</b>.\n @return Whether the font metrics was obtained.\n @since 12\n @version 1.0"]
2899 pub fn OH_Drawing_TextStyleGetFontMetrics(
2900 typography: *mut OH_Drawing_Typography,
2901 style: *mut OH_Drawing_TextStyle,
2902 fontmetrics: *mut OH_Drawing_Font_Metrics,
2903 ) -> bool;
2904}
2905extern "C" {
2906 #[doc = " @brief Gets the position of the specified line or the first text of the specified line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param lineNumber Line number.\n @param oneLine True is the information for the whole line, and false is the information to get the first character\n @param includeWhitespace Whether the text width contains whitespace.\n @param drawingLineMetrics Indicates the pointer to a line metrics object <b>OH_Drawing_LineMetrics</b>.\n @return return whether the information was successfully fetched.\n @since 12\n @version 1.0"]
2907 pub fn OH_Drawing_TypographyGetLineInfo(
2908 typography: *mut OH_Drawing_Typography,
2909 lineNumber: ::std::os::raw::c_int,
2910 oneLine: bool,
2911 includeWhitespace: bool,
2912 drawingLineMetrics: *mut OH_Drawing_LineMetrics,
2913 ) -> bool;
2914}
2915extern "C" {
2916 #[doc = " @brief Sets the font weight of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param weight Indicates the font weight of text typography to set. For details,\n see the enum <b>OH_Drawing_FontWeight</b>.\n @since 12\n @version 1.0"]
2917 pub fn OH_Drawing_SetTypographyTextFontWeight(
2918 style: *mut OH_Drawing_TypographyStyle,
2919 weight: ::std::os::raw::c_int,
2920 );
2921}
2922extern "C" {
2923 #[doc = " @brief Sets the font style of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontStyle Indicates the font style of text typography to set. For details,\n see the enum <b>OH_Drawing_FontStyle</b>.\n @since 12\n @version 1.0"]
2924 pub fn OH_Drawing_SetTypographyTextFontStyle(
2925 style: *mut OH_Drawing_TypographyStyle,
2926 fontStyle: ::std::os::raw::c_int,
2927 );
2928}
2929extern "C" {
2930 #[doc = " @brief Sets the font family of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontFamily Indicates the pointer to the font family of text typography to set.\n @since 12\n @version 1.0"]
2931 pub fn OH_Drawing_SetTypographyTextFontFamily(
2932 style: *mut OH_Drawing_TypographyStyle,
2933 fontFamily: *const ::std::os::raw::c_char,
2934 );
2935}
2936extern "C" {
2937 #[doc = " @brief Sets the font size of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontSize Indicates the font size of text typography to set.\n @since 12\n @version 1.0"]
2938 pub fn OH_Drawing_SetTypographyTextFontSize(
2939 style: *mut OH_Drawing_TypographyStyle,
2940 fontSize: f64,
2941 );
2942}
2943extern "C" {
2944 #[doc = " @brief Sets the font height of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontHeight Indicates the font height of text typography to set.\n @since 12\n @version 1.0"]
2945 pub fn OH_Drawing_SetTypographyTextFontHeight(
2946 style: *mut OH_Drawing_TypographyStyle,
2947 fontHeight: f64,
2948 );
2949}
2950extern "C" {
2951 #[doc = " @brief Sets the half leading of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param halfLeading Indicates the half leading of text typography to set.\n @since 12\n @version 1.0"]
2952 pub fn OH_Drawing_SetTypographyTextHalfLeading(
2953 style: *mut OH_Drawing_TypographyStyle,
2954 halfLeading: bool,
2955 );
2956}
2957extern "C" {
2958 #[doc = " @brief Sets whether to enable line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param useLineStyle Indicates whether the line style for text typography is used.\n @since 12\n @version 1.0"]
2959 pub fn OH_Drawing_SetTypographyTextUseLineStyle(
2960 style: *mut OH_Drawing_TypographyStyle,
2961 useLineStyle: bool,
2962 );
2963}
2964extern "C" {
2965 #[doc = " @brief Sets the font weight of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param weight Indicates the font weight of line style for text typography to set.\n For details, see the enum <b>OH_Drawing_FontWeight</b>.\n @since 12\n @version 1.0"]
2966 pub fn OH_Drawing_SetTypographyTextLineStyleFontWeight(
2967 style: *mut OH_Drawing_TypographyStyle,
2968 weight: ::std::os::raw::c_int,
2969 );
2970}
2971extern "C" {
2972 #[doc = " @brief Sets the font style of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontStyle Indicates the font style of line style for text typography to set. For details,\n see the enum <b>OH_Drawing_FontStyle</b>.\n @since 12\n @version 1.0"]
2973 pub fn OH_Drawing_SetTypographyTextLineStyleFontStyle(
2974 style: *mut OH_Drawing_TypographyStyle,
2975 fontStyle: ::std::os::raw::c_int,
2976 );
2977}
2978extern "C" {
2979 #[doc = " @brief Sets the font families of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param fontFamiliesNumber Indicates the number of font families to set.\n @param fontFamilies Indicates the pointer to the font families of line style for text typography to set.\n @since 12\n @version 1.0"]
2980 pub fn OH_Drawing_SetTypographyTextLineStyleFontFamilies(
2981 style: *mut OH_Drawing_TypographyStyle,
2982 fontFamiliesNumber: ::std::os::raw::c_int,
2983 fontFamilies: *mut *const ::std::os::raw::c_char,
2984 );
2985}
2986extern "C" {
2987 #[doc = " @brief Sets the font size of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param lineStyleFontSize Indicates the font size of line style for text typography to set.\n @since 12\n @version 1.0"]
2988 pub fn OH_Drawing_SetTypographyTextLineStyleFontSize(
2989 style: *mut OH_Drawing_TypographyStyle,
2990 lineStyleFontSize: f64,
2991 );
2992}
2993extern "C" {
2994 #[doc = " @brief Sets the font height of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param lineStyleFontHeight Indicates the font height of line style for text typography to set.\n @since 12\n @version 1.0"]
2995 pub fn OH_Drawing_SetTypographyTextLineStyleFontHeight(
2996 style: *mut OH_Drawing_TypographyStyle,
2997 lineStyleFontHeight: f64,
2998 );
2999}
3000extern "C" {
3001 #[doc = " @brief Sets the half leading of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param lineStyleHalfLeading Indicates the half leading of line for text typography to set.\n @since 12\n @version 1.0"]
3002 pub fn OH_Drawing_SetTypographyTextLineStyleHalfLeading(
3003 style: *mut OH_Drawing_TypographyStyle,
3004 lineStyleHalfLeading: bool,
3005 );
3006}
3007extern "C" {
3008 #[doc = " @brief Sets the spacing scale of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param spacingScale Indicates the space scale of line for text typography to set.\n @since 12\n @version 1.0"]
3009 pub fn OH_Drawing_SetTypographyTextLineStyleSpacingScale(
3010 style: *mut OH_Drawing_TypographyStyle,
3011 spacingScale: f64,
3012 );
3013}
3014extern "C" {
3015 #[doc = " @brief Sets whether only line style is enabled for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param lineStyleOnly Indicates the line style for text typography to set only.\n @since 12\n @version 1.0"]
3016 pub fn OH_Drawing_SetTypographyTextLineStyleOnly(
3017 style: *mut OH_Drawing_TypographyStyle,
3018 lineStyleOnly: bool,
3019 );
3020}
3021extern "C" {
3022 #[doc = " @brief Creates an <b>OH_Drawing_TextShadow</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the text shadow object created <b>OH_Drawing_TextShadow</b>.\n @since 12\n @version 1.0"]
3023 pub fn OH_Drawing_CreateTextShadow() -> *mut OH_Drawing_TextShadow;
3024}
3025extern "C" {
3026 #[doc = " @brief Releases the memory occupied by the text shadow object <b>OH_Drawing_TextShadow</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.\n @since 12\n @version 1.0"]
3027 pub fn OH_Drawing_DestroyTextShadow(shadow: *mut OH_Drawing_TextShadow);
3028}
3029extern "C" {
3030 #[doc = " @brief Gets the vector of TextShadow in TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param int Indicates the number in vector to set.\n @param style Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.\n @return Returns the vector of TextShadow.\n @since 12\n @version 1.0"]
3031 pub fn OH_Drawing_TextStyleGetShadows(
3032 style: *mut OH_Drawing_TextStyle,
3033 ) -> *mut OH_Drawing_TextShadow;
3034}
3035extern "C" {
3036 #[doc = " @brief Gets the size of vector of TextShadow in TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @return Returns the size of vector.\n @since 12\n @version 1.0"]
3037 pub fn OH_Drawing_TextStyleGetShadowCount(
3038 style: *mut OH_Drawing_TextStyle,
3039 ) -> ::std::os::raw::c_int;
3040}
3041extern "C" {
3042 #[doc = " @brief Adds element in vector of TextShadow in TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param shadow Indicates the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.\n @since 12\n @version 1.0"]
3043 pub fn OH_Drawing_TextStyleAddShadow(
3044 style: *mut OH_Drawing_TextStyle,
3045 shadow: *const OH_Drawing_TextShadow,
3046 );
3047}
3048extern "C" {
3049 #[doc = " @brief clear elements in vector of TextShadow in TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @since 12\n @version 1.0"]
3050 pub fn OH_Drawing_TextStyleClearShadows(style: *mut OH_Drawing_TextStyle);
3051}
3052extern "C" {
3053 #[doc = " @brief Gets element in vector of TextShadow with index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param index Indicates the index to set.\n @return Returns the pointer to element with the index in vector of the text style object\n <b>OH_Drawing_TextStyle</b>.\n @since 12\n @version 1.0"]
3054 pub fn OH_Drawing_TextStyleGetShadowWithIndex(
3055 style: *mut OH_Drawing_TextStyle,
3056 index: ::std::os::raw::c_int,
3057 ) -> *mut OH_Drawing_TextShadow;
3058}
3059extern "C" {
3060 #[doc = " @brief Set indents of the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param indentsNumber Indicates the pointer to the indents to set.\n @param indents Indicates the pointer to the indents to set.\n @since 12\n @version 1.0"]
3061 pub fn OH_Drawing_TypographySetIndents(
3062 typography: *mut OH_Drawing_Typography,
3063 indentsNumber: ::std::os::raw::c_int,
3064 indents: *const f32,
3065 );
3066}
3067extern "C" {
3068 #[doc = " @brief Gets element with index in vector of Indents.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @param index Indicates the index to set.\n @return float Indicates the element with the index in vector of Indents.\n @since 12\n @version 1.0"]
3069 pub fn OH_Drawing_TypographyGetIndentsWithIndex(
3070 typography: *mut OH_Drawing_Typography,
3071 index: ::std::os::raw::c_int,
3072 ) -> f32;
3073}
3074extern "C" {
3075 #[doc = " @brief Releases the memory occupied by vector with the text shadow object <b>OH_Drawing_TextShadow</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow the pointer to the text shadow object <b>OH_Drawing_TextShadow</b>.\n @since 12\n @version 1.0"]
3076 pub fn OH_Drawing_DestroyTextShadows(shadow: *mut OH_Drawing_TextShadow);
3077}
3078extern "C" {
3079 #[doc = " @brief Set mode of applying the leading over and under text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param heightMode Indicates the mode to set.\n @since 12\n @version 1.0"]
3080 pub fn OH_Drawing_TypographyTextSetHeightBehavior(
3081 style: *mut OH_Drawing_TypographyStyle,
3082 heightMode: OH_Drawing_TextHeightBehavior,
3083 );
3084}
3085extern "C" {
3086 #[doc = " @brief Get mode of applying the leading over and under text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns the mode.\n @since 12\n @version 1.0"]
3087 pub fn OH_Drawing_TypographyTextGetHeightBehavior(
3088 style: *mut OH_Drawing_TypographyStyle,
3089 ) -> OH_Drawing_TextHeightBehavior;
3090}
3091extern "C" {
3092 #[doc = " @brief Set struct of background rect and styleId of text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param rectStyleInfo Indicates the pointer to an <b>OH_Drawing_RectStyle_Info</b> object.\n @param styleId Indicates the styleId of text to set.\n @since 12\n @version 1.0"]
3093 pub fn OH_Drawing_TextStyleSetBackgroundRect(
3094 style: *mut OH_Drawing_TextStyle,
3095 rectStyleInfo: *const OH_Drawing_RectStyle_Info,
3096 styleId: ::std::os::raw::c_int,
3097 );
3098}
3099extern "C" {
3100 #[doc = " @brief Add symbols in creating typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param symbol Indicates the symbol to set.\n @since 12\n @version 1.0"]
3101 pub fn OH_Drawing_TypographyHandlerAddSymbol(
3102 handler: *mut OH_Drawing_TypographyCreate,
3103 symbol: u32,
3104 );
3105}
3106extern "C" {
3107 #[doc = " @brief Add font feature.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param tag Indicates the pointer to the tag to set.\n @param value Indicates the value to set.\n @since 12\n @version 1.0"]
3108 pub fn OH_Drawing_TextStyleAddFontFeature(
3109 style: *mut OH_Drawing_TextStyle,
3110 tag: *const ::std::os::raw::c_char,
3111 value: ::std::os::raw::c_int,
3112 );
3113}
3114extern "C" {
3115 #[doc = " @brief Add font variation.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param axis Indicates the pointer to font variation axis.\n @param value Indicates the font variation value to set.\n @since 12\n @version 1.0"]
3116 pub fn OH_Drawing_TextStyleAddFontVariation(
3117 style: *mut OH_Drawing_TextStyle,
3118 axis: *const ::std::os::raw::c_char,
3119 value: f32,
3120 );
3121}
3122extern "C" {
3123 #[doc = " @brief Add font variation with normalization data.\n\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param axis Indicates the pointer to font variation axis.\n @param normalizedValue Indicates the font variation value to set.\n @since 24"]
3124 #[cfg(feature = "api-24")]
3125 pub fn OH_Drawing_TextStyleAddFontVariationWithNormalization(
3126 style: *mut OH_Drawing_TextStyle,
3127 axis: *const ::std::os::raw::c_char,
3128 normalizedValue: f32,
3129 );
3130}
3131extern "C" {
3132 #[doc = " @brief Get all font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return OH_Drawing_FontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature.\n Get size of font feature by OH_Drawing_TextStyleGetFontFeatureSize.\n @since 12\n @version 1.0"]
3133 pub fn OH_Drawing_TextStyleGetFontFeatures(
3134 style: *mut OH_Drawing_TextStyle,
3135 ) -> *mut OH_Drawing_FontFeature;
3136}
3137extern "C" {
3138 #[doc = " @brief Release the memory occupied by array of structures of font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFeature Indicates the pointer to an array of structures of OH_Drawing_FontFeature.\n @param fontFeatureSize Indicates the size of array of structures of OH_Drawing_FontFeature.\n @since 12\n @version 1.0"]
3139 pub fn OH_Drawing_TextStyleDestroyFontFeatures(
3140 fontFeature: *mut OH_Drawing_FontFeature,
3141 fontFeatureSize: usize,
3142 );
3143}
3144extern "C" {
3145 #[doc = " @brief Get size of font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the size of fontfeatures map.\n @since 12\n @version 1.0"]
3146 pub fn OH_Drawing_TextStyleGetFontFeatureSize(style: *mut OH_Drawing_TextStyle) -> usize;
3147}
3148extern "C" {
3149 #[doc = " @brief Clear font features.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @since 12\n @version 1.0"]
3150 pub fn OH_Drawing_TextStyleClearFontFeature(style: *mut OH_Drawing_TextStyle);
3151}
3152extern "C" {
3153 #[doc = " @brief Set baseline shift of text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param lineShift Indicates the baseline shift to set.\n @since 12\n @version 1.0"]
3154 pub fn OH_Drawing_TextStyleSetBaselineShift(style: *mut OH_Drawing_TextStyle, lineShift: f64);
3155}
3156extern "C" {
3157 #[doc = " @brief Get baseline shift of text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the baseline shift.\n @since 12\n @version 1.0"]
3158 pub fn OH_Drawing_TextStyleGetBaselineShift(style: *mut OH_Drawing_TextStyle) -> f64;
3159}
3160extern "C" {
3161 #[doc = " @brief Gets the text color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the text color.\n @since 12\n @version 1.0"]
3162 pub fn OH_Drawing_TextStyleGetColor(style: *mut OH_Drawing_TextStyle) -> u32;
3163}
3164extern "C" {
3165 #[doc = " @brief Gets text decoration style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns text decoration style.\n @since 12\n @version 1.0"]
3166 pub fn OH_Drawing_TextStyleGetDecorationStyle(
3167 style: *mut OH_Drawing_TextStyle,
3168 ) -> OH_Drawing_TextDecorationStyle;
3169}
3170extern "C" {
3171 #[doc = " @brief Gets font weight.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns font Weight.\n @since 12\n @version 1.0"]
3172 pub fn OH_Drawing_TextStyleGetFontWeight(
3173 style: *mut OH_Drawing_TextStyle,
3174 ) -> OH_Drawing_FontWeight;
3175}
3176extern "C" {
3177 #[doc = " @brief Gets font style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns font style.\n @since 12\n @version 1.0"]
3178 pub fn OH_Drawing_TextStyleGetFontStyle(
3179 style: *mut OH_Drawing_TextStyle,
3180 ) -> OH_Drawing_FontStyle;
3181}
3182extern "C" {
3183 #[doc = " @brief Gets the font baseline.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the font baseline.\n @since 12\n @version 1.0"]
3184 pub fn OH_Drawing_TextStyleGetBaseline(
3185 style: *mut OH_Drawing_TextStyle,
3186 ) -> OH_Drawing_TextBaseline;
3187}
3188extern "C" {
3189 #[doc = " @brief Gets a list of font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param num Indicates count of font families result.\n @return Returns a list of font families.\n @since 12\n @version 1.0"]
3190 pub fn OH_Drawing_TextStyleGetFontFamilies(
3191 style: *mut OH_Drawing_TextStyle,
3192 num: *mut usize,
3193 ) -> *mut *mut ::std::os::raw::c_char;
3194}
3195extern "C" {
3196 #[doc = " @brief Releases the memory occupied by a list of font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFamilies Indicates the pointer to a list of font families.\n @param num Indicates the count of obtained font families.\n @since 12\n @version 1.0"]
3197 pub fn OH_Drawing_TextStyleDestroyFontFamilies(
3198 fontFamilies: *mut *mut ::std::os::raw::c_char,
3199 num: usize,
3200 );
3201}
3202extern "C" {
3203 #[doc = " @brief Gets font size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns font size.\n @since 12\n @version 1.0"]
3204 pub fn OH_Drawing_TextStyleGetFontSize(style: *mut OH_Drawing_TextStyle) -> f64;
3205}
3206extern "C" {
3207 #[doc = " @brief Gets the letter spacing of the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the size of the letter spacing.\n @since 12\n @version 1.0"]
3208 pub fn OH_Drawing_TextStyleGetLetterSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
3209}
3210extern "C" {
3211 #[doc = " @brief Gets the word spacing of the text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns word spacing size.\n @since 12\n @version 1.0"]
3212 pub fn OH_Drawing_TextStyleGetWordSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
3213}
3214extern "C" {
3215 #[doc = " @brief Gets font height.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns font height.\n @since 12\n @version 1.0"]
3216 pub fn OH_Drawing_TextStyleGetFontHeight(style: *mut OH_Drawing_TextStyle) -> f64;
3217}
3218extern "C" {
3219 #[doc = " @brief Gets whether to set the text to half line spacing.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns true indicates that the spacing takes effect,\n false indicates that the spacing does not take effect.\n @since 12\n @version 1.0"]
3220 pub fn OH_Drawing_TextStyleGetHalfLeading(style: *mut OH_Drawing_TextStyle) -> bool;
3221}
3222extern "C" {
3223 #[doc = " @brief Sets the typography vertical alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param align Indicates the typography vertical alignment mode. For details,\n see the enum <b>OH_Drawing_TextVerticalAlignment</b>.\n @since 20\n @version 1.0"]
3224 #[cfg(feature = "api-20")]
3225 pub fn OH_Drawing_SetTypographyVerticalAlignment(
3226 style: *mut OH_Drawing_TypographyStyle,
3227 align: OH_Drawing_TextVerticalAlignment,
3228 );
3229}
3230extern "C" {
3231 #[doc = " @brief Gets the locale.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns a locale of data type as a pointer to a char. As with the TextStyle lifecycle.\n No release is required and the return value is invalidated after the set method is called.\n @since 12\n @version 1.0"]
3232 pub fn OH_Drawing_TextStyleGetLocale(
3233 style: *mut OH_Drawing_TextStyle,
3234 ) -> *const ::std::os::raw::c_char;
3235}
3236extern "C" {
3237 #[doc = " @brief Sets whether to use superscript or subscript in text layout.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Pointer to an OH_Drawing_TextStyle object.\n @param textBadgeType Superscript or subscript to use.\n @since 20"]
3238 #[cfg(feature = "api-20")]
3239 pub fn OH_Drawing_SetTextStyleBadgeType(
3240 style: *mut OH_Drawing_TextStyle,
3241 textBadgeType: OH_Drawing_TextBadgeType,
3242 );
3243}
3244extern "C" {
3245 #[doc = " @brief Sets the text style, including font weight, font width and font slant.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingTextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @param fontStyle Indicates an <b>OH_Drawing_FontStyleStruct</b> object.\n @since 12\n @version 1.0"]
3246 pub fn OH_Drawing_SetTextStyleFontStyleStruct(
3247 drawingTextStyle: *mut OH_Drawing_TextStyle,
3248 fontStyle: OH_Drawing_FontStyleStruct,
3249 );
3250}
3251extern "C" {
3252 #[doc = " @brief Gets the text style, including font weight, font width and font slant.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingTextStyle Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the <b>OH_Drawing_FontStyleStruct</b> object getted.\n @since 12\n @version 1.0"]
3253 pub fn OH_Drawing_TextStyleGetFontStyleStruct(
3254 drawingTextStyle: *mut OH_Drawing_TextStyle,
3255 ) -> OH_Drawing_FontStyleStruct;
3256}
3257extern "C" {
3258 #[doc = " @brief Sets the typography style, including font weight, font width and font slant.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param fontStyle Indicates an <b>OH_Drawing_FontStyleStruct</b> object.\n @since 12\n @version 1.0"]
3259 pub fn OH_Drawing_SetTypographyStyleFontStyleStruct(
3260 drawingStyle: *mut OH_Drawing_TypographyStyle,
3261 fontStyle: OH_Drawing_FontStyleStruct,
3262 );
3263}
3264extern "C" {
3265 #[doc = " @brief Gets the typography style, including font weight, font width and font slant.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingStyle Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns the <b>OH_Drawing_FontStyleStruct</b> object getted.\n @since 12\n @version 1.0"]
3266 pub fn OH_Drawing_TypographyStyleGetFontStyleStruct(
3267 drawingStyle: *mut OH_Drawing_TypographyStyle,
3268 ) -> OH_Drawing_FontStyleStruct;
3269}
3270extern "C" {
3271 #[doc = " @brief Gets whether the two TextStyle objects are equal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates source of comparison <b>OH_Drawing_TextStyle</b> object.\n @param comparedStyle Indicates comparison <b>OH_Drawing_TextStyle</b> object.\n @return Compare result.\n @since 12\n @version 1.0"]
3272 pub fn OH_Drawing_TextStyleIsEqual(
3273 style: *const OH_Drawing_TextStyle,
3274 comparedStyle: *const OH_Drawing_TextStyle,
3275 ) -> bool;
3276}
3277extern "C" {
3278 #[doc = " @brief Gets whether the font properties of two TextStyle objects are equal.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates source of <b>comparison OH_Drawing_TextStyle</b> object.\n @param comparedStyle Indicates comparison <b>OH_Drawing_TextStyle</b> object.\n @return Compare result.\n @since 12\n @version 1.0"]
3279 pub fn OH_Drawing_TextStyleIsEqualByFont(
3280 style: *const OH_Drawing_TextStyle,
3281 comparedStyle: *const OH_Drawing_TextStyle,
3282 ) -> bool;
3283}
3284extern "C" {
3285 #[doc = " @brief Gets whether two TextStyle objects match attributes\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates enumerates of text style type.\n @param comparedStyle Indicates source of comparison <b>OH_Drawing_TextStyle</b> object.\n @param textStyleType Indicates comparison <b>OH_Drawing_TextStyle</b> object.\n @return Match attributes result.\n @since 12\n @version 1.0"]
3286 pub fn OH_Drawing_TextStyleIsAttributeMatched(
3287 style: *const OH_Drawing_TextStyle,
3288 comparedStyle: *const OH_Drawing_TextStyle,
3289 textStyleType: OH_Drawing_TextStyleType,
3290 ) -> bool;
3291}
3292extern "C" {
3293 #[doc = " @brief Set placeholder of TextStyle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @since 12\n @version 1.0"]
3294 pub fn OH_Drawing_TextStyleSetPlaceholder(style: *mut OH_Drawing_TextStyle);
3295}
3296extern "C" {
3297 #[doc = " @brief Gets whether placeholder is enable.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Whether placeholder is enable.\n @since 12\n @version 1.0"]
3298 pub fn OH_Drawing_TextStyleIsPlaceholder(style: *mut OH_Drawing_TextStyle) -> bool;
3299}
3300extern "C" {
3301 #[doc = " @brief Gets text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns text alignment mode.\n @since 12\n @version 1.0"]
3302 pub fn OH_Drawing_TypographyStyleGetEffectiveAlignment(
3303 style: *mut OH_Drawing_TypographyStyle,
3304 ) -> OH_Drawing_TextAlign;
3305}
3306extern "C" {
3307 #[doc = " @brief Gets whether the hinting is enabled.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return True, if the hinting takes effect; False, if the hinting does not take effect.\n @since 12\n @version 1.0"]
3308 pub fn OH_Drawing_TypographyStyleIsHintEnabled(style: *mut OH_Drawing_TypographyStyle) -> bool;
3309}
3310extern "C" {
3311 #[doc = " @brief Gets system font configuration information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param errorCode Indicates error code returned, based on the error code to\n release the memory of system font configuration information.\n For details, see the enum <b>OH_Drawing_FontConfigInfoErrorCode</b>.\n @return Returns a pointer to system font configuration information.\n Indicates the pointer to an <b>OH_Drawing_FontConfigInfo</b> object.\n @since 12\n @version 1.0"]
3312 pub fn OH_Drawing_GetSystemFontConfigInfo(
3313 errorCode: *mut OH_Drawing_FontConfigInfoErrorCode,
3314 ) -> *mut OH_Drawing_FontConfigInfo;
3315}
3316extern "C" {
3317 #[doc = " @brief Releases the memory occupied by system font configuration information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawFontCfgInfo Indicates the pointer to an <b>OH_Drawing_FontConfigInfo</b> object.\n @since 12\n @version 1.0"]
3318 pub fn OH_Drawing_DestroySystemFontConfigInfo(drawFontCfgInfo: *mut OH_Drawing_FontConfigInfo);
3319}
3320extern "C" {
3321 #[doc = " @brief Sets the strut style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param strutstyle Indicates the pointer of <b>OH_Drawing_StrutStyle</b> object.\n @since 12\n @version 1.0"]
3322 pub fn OH_Drawing_SetTypographyStyleTextStrutStyle(
3323 style: *mut OH_Drawing_TypographyStyle,
3324 strutstyle: *mut OH_Drawing_StrutStyle,
3325 );
3326}
3327extern "C" {
3328 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_StrutStyle</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param strutstyle Indicates the pointer of <b>OH_Drawing_StrutStyle</b> object.\n @since 12\n @version 1.0"]
3329 pub fn OH_Drawing_TypographyStyleDestroyStrutStyle(strutstyle: *mut OH_Drawing_StrutStyle);
3330}
3331extern "C" {
3332 #[doc = " @brief Gets the strut style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns the pointer of <b>OH_Drawing_StrutStyle</b> object.\n @since 12\n @version 1.0"]
3333 pub fn OH_Drawing_TypographyStyleGetStrutStyle(
3334 style: *mut OH_Drawing_TypographyStyle,
3335 ) -> *mut OH_Drawing_StrutStyle;
3336}
3337extern "C" {
3338 #[doc = " @brief Overriding the struct StrutStyle equals operator.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param from Indicates source of comparison object.\n @param to Indicates comparison object.\n @since 12\n @version 1.0"]
3339 pub fn OH_Drawing_TypographyStyleStrutStyleEquals(
3340 from: *mut OH_Drawing_StrutStyle,
3341 to: *mut OH_Drawing_StrutStyle,
3342 ) -> bool;
3343}
3344extern "C" {
3345 #[doc = " @brief Sets the hinting of text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param hintsEnabled Indicates the hinting of text typography..\n @since 12\n @version 1.0"]
3346 pub fn OH_Drawing_TypographyStyleSetHintsEnabled(
3347 style: *mut OH_Drawing_TypographyStyle,
3348 hintsEnabled: bool,
3349 );
3350}
3351extern "C" {
3352 #[doc = " @brief Getting all font metrics from target row.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates a pointer to a typesetting object.\n @param lineNumber Indicates specifies the number of rows.\n @param fontMetricsSize Indicates the return size of font metrics struct from current line.\n @return Returns all character measures for the current row.\n @since 12\n @version 1.0"]
3353 pub fn OH_Drawing_TypographyGetLineFontMetrics(
3354 typography: *mut OH_Drawing_Typography,
3355 lineNumber: usize,
3356 fontMetricsSize: *mut usize,
3357 ) -> *mut OH_Drawing_Font_Metrics;
3358}
3359extern "C" {
3360 #[doc = " @brief Free up all the space taken up by the lineFontMetric.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineFontMetric Indicates the first address of the lineFontMetric gather to be destroyed.\n @since 12\n @version 1.0"]
3361 pub fn OH_Drawing_TypographyDestroyLineFontMetrics(
3362 lineFontMetric: *mut OH_Drawing_Font_Metrics,
3363 );
3364}
3365extern "C" {
3366 #[doc = " @brief Mark the Typography as dirty, and initially state the Typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @since 12\n @version 1.0"]
3367 pub fn OH_Drawing_TypographyMarkDirty(typography: *mut OH_Drawing_Typography);
3368}
3369extern "C" {
3370 #[doc = " @brief Get the unresolved Glyphs count of lines in a text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @return Returns unresolved Glyphs count.\n @since 12\n @version 1.0"]
3371 pub fn OH_Drawing_TypographyGetUnresolvedGlyphsCount(
3372 typography: *mut OH_Drawing_Typography,
3373 ) -> i32;
3374}
3375extern "C" {
3376 #[doc = " @brief Update the font size of lines in a text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param from Indicates the source of the original font size.\n @param to Indicates the destination of the updated font size.\n @param fontSize Indicates the size of the font.\n @since 12\n @version 1.0"]
3377 pub fn OH_Drawing_TypographyUpdateFontSize(
3378 typography: *mut OH_Drawing_Typography,
3379 from: usize,
3380 to: usize,
3381 fontSize: f32,
3382 );
3383}
3384extern "C" {
3385 #[doc = " @brief Update the font color of the typography\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param color Indicates the color to update.\n @since 20\n @version 1.0"]
3386 #[cfg(feature = "api-20")]
3387 pub fn OH_Drawing_TypographyUpdateFontColor(typography: *mut OH_Drawing_Typography, color: u32);
3388}
3389extern "C" {
3390 #[doc = " @brief Update the decoration of the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param decoration Indicates the text decoration to update. For details, see the enum\n <b>OH_Drawing_TextDecoration</b>.\n @since 20\n @version 1.0"]
3391 #[cfg(feature = "api-20")]
3392 pub fn OH_Drawing_TypographyUpdateDecoration(
3393 typography: *mut OH_Drawing_Typography,
3394 decoration: OH_Drawing_TextDecoration,
3395 );
3396}
3397extern "C" {
3398 #[doc = " @brief Update the decoration thickness scale of the typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param decorationThicknessScale Indicates the thickness scale of the text decoration to update.\n @since 20\n @version 1.0"]
3399 #[cfg(feature = "api-20")]
3400 pub fn OH_Drawing_TypographyUpdateDecorationThicknessScale(
3401 typography: *mut OH_Drawing_Typography,
3402 decorationThicknessScale: f64,
3403 );
3404}
3405extern "C" {
3406 #[doc = " @brief Update the decoration style of typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param decorationStyle Indicates the text decoration style to update.\n For details, see the enum <b>OH_Drawing_TextDecorationStyle</b>.\n @since 20\n @version 1.0"]
3407 #[cfg(feature = "api-20")]
3408 pub fn OH_Drawing_TypographyUpdateDecorationStyle(
3409 typography: *mut OH_Drawing_Typography,
3410 decorationStyle: OH_Drawing_TextDecorationStyle,
3411 );
3412}
3413extern "C" {
3414 #[doc = " @brief Updates the decoration color of the paragraph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to the text <b>OH_Drawing_Typography</b> object.\n @param color Indicates the text decoration color to update.\n @since 20\n @version 1.0"]
3415 #[cfg(feature = "api-20")]
3416 pub fn OH_Drawing_TypographyUpdateDecorationColor(
3417 typography: *mut OH_Drawing_Typography,
3418 color: u32,
3419 );
3420}
3421extern "C" {
3422 #[doc = " @brief Get whether the text layout enables line styles.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to the text <b>OH_Drawing_TypographyStyle</b> object.\n @return Whether or not to enable line styles in text layout only, true means enable, false means disable.\n @since 12\n @version 1.0"]
3423 pub fn OH_Drawing_TypographyTextGetLineStyle(style: *mut OH_Drawing_TypographyStyle) -> bool;
3424}
3425extern "C" {
3426 #[doc = " @brief Get the font weight of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the font weight of line style for text typography.\n For details, see the enum <b>OH_Drawing_FontWeight</b>.\n @since 12\n @version 1.0"]
3427 pub fn OH_Drawing_TypographyTextlineStyleGetFontWeight(
3428 style: *mut OH_Drawing_TypographyStyle,
3429 ) -> OH_Drawing_FontWeight;
3430}
3431extern "C" {
3432 #[doc = " @brief Get the font style of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the font style of line style for text typography.\n For details, see the enum <b>OH_Drawing_FontStyle</b>.\n @since 12\n @version 1.0"]
3433 pub fn OH_Drawing_TypographyTextlineStyleGetFontStyle(
3434 style: *mut OH_Drawing_TypographyStyle,
3435 ) -> OH_Drawing_FontStyle;
3436}
3437extern "C" {
3438 #[doc = " @brief Get the font families of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @param num The number of obtained font names.\n @return Return the font families of line style for text typography.\n @since 12\n @version 1.0"]
3439 pub fn OH_Drawing_TypographyTextlineStyleGetFontFamilies(
3440 style: *mut OH_Drawing_TypographyStyle,
3441 num: *mut usize,
3442 ) -> *mut *mut ::std::os::raw::c_char;
3443}
3444extern "C" {
3445 #[doc = " @brief Releases the memory occupied by a list of font families names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontFamilies Indicates the pointer to a list of font families names.\n @param fontFamiliesNum Indicates the number of obtained font names.\n @since 12\n @version 1.0"]
3446 pub fn OH_Drawing_TypographyTextlineStyleDestroyFontFamilies(
3447 fontFamilies: *mut *mut ::std::os::raw::c_char,
3448 fontFamiliesNum: usize,
3449 );
3450}
3451extern "C" {
3452 #[doc = " @brief Get the font size of font size for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the font size of font size for text typography.\n @since 12\n @version 1.0"]
3453 pub fn OH_Drawing_TypographyTextlineStyleGetFontSize(
3454 style: *mut OH_Drawing_TypographyStyle,
3455 ) -> f64;
3456}
3457extern "C" {
3458 #[doc = " @brief Get the font height scale in text layout.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Retrun the font height scale in text layout.\n @since 12\n @version 1.0"]
3459 pub fn OH_Drawing_TypographyTextlineStyleGetHeightScale(
3460 style: *mut OH_Drawing_TypographyStyle,
3461 ) -> f64;
3462}
3463extern "C" {
3464 #[doc = " @brief Get whether to enable font height for line styles in text layout only.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Whether or not to enable the font height for line styles in text layout only,\n true means enable, false means disable.\n @since 12\n @version 1.0"]
3465 pub fn OH_Drawing_TypographyTextlineStyleGetHeightOnly(
3466 style: *mut OH_Drawing_TypographyStyle,
3467 ) -> bool;
3468}
3469extern "C" {
3470 #[doc = " @brief Get the half leading of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Whether to enable the text line half leading style, true means enable, false means disable.\n @since 12\n @version 1.0"]
3471 pub fn OH_Drawing_TypographyTextlineStyleGetHalfLeading(
3472 style: *mut OH_Drawing_TypographyStyle,
3473 ) -> bool;
3474}
3475extern "C" {
3476 #[doc = " @brief Get the spacing scale of line style for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the spacing scale of line style for text typography.\n @since 12\n @version 1.0"]
3477 pub fn OH_Drawing_TypographyTextlineStyleGetSpacingScale(
3478 style: *mut OH_Drawing_TypographyStyle,
3479 ) -> f64;
3480}
3481extern "C" {
3482 #[doc = " @brief Get whether only line style is enabled for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Returns whether only line style is enabled for text layout, true means it is enabled,\n false means it is not.\n @since 12\n @version 1.0"]
3483 pub fn OH_Drawing_TypographyTextlineGetStyleOnly(
3484 style: *mut OH_Drawing_TypographyStyle,
3485 ) -> bool;
3486}
3487extern "C" {
3488 #[doc = " @brief Get the text alignment mode.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the text alignment mode. For details, see the enum <b>OH_Drawing_TextAlign</b>.\n @since 12\n @version 1.0"]
3489 pub fn OH_Drawing_TypographyGetTextAlign(
3490 style: *mut OH_Drawing_TypographyStyle,
3491 ) -> OH_Drawing_TextAlign;
3492}
3493extern "C" {
3494 #[doc = " @brief Get the text direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the text direction. For details, see the enum <b>OH_Drawing_TextDirection</b>.\n @since 12\n @version 1.0"]
3495 pub fn OH_Drawing_TypographyGetTextDirection(
3496 style: *mut OH_Drawing_TypographyStyle,
3497 ) -> OH_Drawing_TextDirection;
3498}
3499extern "C" {
3500 #[doc = " @brief Sets the maximum number of lines in a text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the maximum number of lines in a text.\n @since 12\n @version 1.0"]
3501 pub fn OH_Drawing_TypographyGetTextMaxLines(style: *mut OH_Drawing_TypographyStyle) -> usize;
3502}
3503extern "C" {
3504 #[doc = " @brief Get the ellipsis of lines in a text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a typography style object\n <b>OH_Drawing_TypographyStyle</b>.\n @return Return the ellipsis of lines in a text.\n @since 12\n @version 1.0"]
3505 pub fn OH_Drawing_TypographyGetTextEllipsis(
3506 style: *mut OH_Drawing_TypographyStyle,
3507 ) -> *mut ::std::os::raw::c_char;
3508}
3509extern "C" {
3510 #[doc = " @brief Releases the memory occupied by a list of Ellipsis names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param ellipsis Indicates the pointer to a list of Ellipsis names.\n @since 12\n @version 1.0"]
3511 pub fn OH_Drawing_TypographyDestroyEllipsis(ellipsis: *mut ::std::os::raw::c_char);
3512}
3513extern "C" {
3514 #[doc = " @brief Overriding the class ParagraphStyle equals operator.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param from Indicates source of comparison object.\n @param to Indicates comparison object.\n @return Compare result.\n @since 12\n @version 1.0"]
3515 pub fn OH_Drawing_TypographyStyleEquals(
3516 from: *mut OH_Drawing_TypographyStyle,
3517 to: *mut OH_Drawing_TypographyStyle,
3518 ) -> bool;
3519}
3520extern "C" {
3521 #[doc = " @brief Releases the memory occupied by text box.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBox Indicates the pointer to a text box object <b>OH_Drawing_TextBox</b>.\n @since 12\n @version 1.0"]
3522 pub fn OH_Drawing_TypographyDestroyTextBox(textBox: *mut OH_Drawing_TextBox);
3523}
3524extern "C" {
3525 #[doc = " @brief Sets the parameter of text-shadow.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.\n @param color Indicates the color setting of text-shadow.\n @param offset Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param blurRadius Indicates the radius of blur for text-shadow.\n @since 12\n @version 1.0"]
3526 pub fn OH_Drawing_SetTextShadow(
3527 shadow: *mut OH_Drawing_TextShadow,
3528 color: u32,
3529 offset: *mut OH_Drawing_Point,
3530 blurRadius: f64,
3531 );
3532}
3533extern "C" {
3534 #[doc = " @brief Creates an <b>OH_Drawing_TextTab</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param alignment Indicates enumerates text tab alignment modes. TAB alignment, Support left alignment\n right alignment center alignment, other enumeration values are left alignment effect.\n @param location Indicates location of text tab.\n @return Returns the pointer to the <b>OH_Drawing_TextTab</b> object created. If the object returns NULL,\n the creation failed. The possible cause of the failure is that the application address space is used up.\n As a result, space cannot be allocated.\n @since 18\n @version 1.0"]
3535 #[cfg(feature = "api-18")]
3536 pub fn OH_Drawing_CreateTextTab(
3537 alignment: OH_Drawing_TextAlign,
3538 location: f32,
3539 ) -> *mut OH_Drawing_TextTab;
3540}
3541extern "C" {
3542 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_TextTab</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.\n @since 18\n @version 1.0"]
3543 #[cfg(feature = "api-18")]
3544 pub fn OH_Drawing_DestroyTextTab(tab: *mut OH_Drawing_TextTab);
3545}
3546extern "C" {
3547 #[doc = " @brief Get alignment of an <b>OH_Drawing_TextTab</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.\n @return Returns align of an <b>OH_Drawing_TextTab</b> object.\n @since 18\n @version 1.0"]
3548 #[cfg(feature = "api-18")]
3549 pub fn OH_Drawing_GetTextTabAlignment(tab: *mut OH_Drawing_TextTab) -> OH_Drawing_TextAlign;
3550}
3551extern "C" {
3552 #[doc = " @brief Get location of an <b>OH_Drawing_TextTab</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param tab Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.\n @return Returns location of an <b>OH_Drawing_TextTab</b> object.\n @since 18\n @version 1.0"]
3553 #[cfg(feature = "api-18")]
3554 pub fn OH_Drawing_GetTextTabLocation(tab: *mut OH_Drawing_TextTab) -> f32;
3555}
3556extern "C" {
3557 #[doc = " @brief Sets the text tab of <b>OH_Drawing_TypographyStyle</b> object.\n Tab alignment does not take effect when text alignment is also set, Or when the ellipsis style is configured.\n When the tab is not set or the tab's location property is less than or equal to 0, it is the default space effect.\n And all tabs in the paragraph after the setting are aligned according to this tab effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param tab Indicates the pointer to an <b>OH_Drawing_TextTab</b> object.\n @since 18\n @version 1.0"]
3558 #[cfg(feature = "api-18")]
3559 pub fn OH_Drawing_SetTypographyTextTab(
3560 style: *mut OH_Drawing_TypographyStyle,
3561 tab: *mut OH_Drawing_TextTab,
3562 );
3563}
3564extern "C" {
3565 #[doc = " @brief Get DrawingArray size.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingArray Indicates the pointer to the array object <b>OH_Drawing_Array</b>.\n @return Size of array.\n @since 14\n @version 1.0"]
3566 #[cfg(feature = "api-14")]
3567 pub fn OH_Drawing_GetDrawingArraySize(drawingArray: *mut OH_Drawing_Array) -> usize;
3568}
3569extern "C" {
3570 #[doc = " @brief Sets whether to optimize whitespace at the end of each line for text typography.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param trailingSpaceOptimized Boolean value indicating whether to optimize whitespace at the end of each line\n for text typography to set.\n @since 20\n @version 1.0"]
3571 #[cfg(feature = "api-20")]
3572 pub fn OH_Drawing_SetTypographyTextTrailingSpaceOptimized(
3573 style: *mut OH_Drawing_TypographyStyle,
3574 trailingSpaceOptimized: bool,
3575 );
3576}
3577extern "C" {
3578 #[doc = " @brief Sets the text content. The content supports UTF-8, UTF-16, and UTF-32 formats.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param text Indicates the pointer to the text content to set.\n @param byteLength Set the byte length of the text content.\n @param textEncodingType Indicates the text encoding type <b>OH_Drawing_TextEncoding</b>.\n @since 20\n @version 1.0"]
3579 #[cfg(feature = "api-20")]
3580 pub fn OH_Drawing_TypographyHandlerAddEncodedText(
3581 handler: *mut OH_Drawing_TypographyCreate,
3582 text: *const ::std::os::raw::c_void,
3583 byteLength: usize,
3584 textEncodingType: OH_Drawing_TextEncoding,
3585 );
3586}
3587extern "C" {
3588 #[doc = " @brief Set whether to enable automatic spacing between Chinese and English for paragraph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @param enableAutoSpace Indicates Whether to enable automatic spacing between Chinese and English.\n @since 20"]
3589 #[cfg(feature = "api-20")]
3590 pub fn OH_Drawing_SetTypographyTextAutoSpace(
3591 style: *mut OH_Drawing_TypographyStyle,
3592 enableAutoSpace: bool,
3593 );
3594}
3595extern "C" {
3596 #[doc = " @brief Copy a typography style object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TypographyStyle</b> object.\n @return Returns the pointer to the copied <b>OH_Drawing_TypographyStyle</b> object.\n @since 20\n @version 1.0"]
3597 #[cfg(feature = "api-20")]
3598 pub fn OH_Drawing_CopyTypographyStyle(
3599 style: *mut OH_Drawing_TypographyStyle,
3600 ) -> *mut OH_Drawing_TypographyStyle;
3601}
3602extern "C" {
3603 #[doc = " @brief Copy a text style object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to an <b>OH_Drawing_TextStyle</b> object.\n @return Returns the pointer to the copied <b>OH_Drawing_TextStyle</b> object.\n @since 20\n @version 1.0"]
3604 #[cfg(feature = "api-20")]
3605 pub fn OH_Drawing_CopyTextStyle(style: *mut OH_Drawing_TextStyle) -> *mut OH_Drawing_TextStyle;
3606}
3607extern "C" {
3608 #[doc = " @brief Copy a text shadow object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadow Indicates the pointer to an <b>OH_Drawing_TextShadow</b> object.\n @return Returns the pointer to the copied <b>OH_Drawing_TextShadow</b> object.\n @since 20\n @version 1.0"]
3609 #[cfg(feature = "api-20")]
3610 pub fn OH_Drawing_CopyTextShadow(
3611 shadow: *mut OH_Drawing_TextShadow,
3612 ) -> *mut OH_Drawing_TextShadow;
3613}
3614extern "C" {
3615 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_PositionAndAffinity</b> object.\n\n @param positionAndAffinity Indicates the pointer to an <b>OH_Drawing_PositionAndAffinity</b> object.\n @since 23"]
3616 #[cfg(feature = "api-23")]
3617 pub fn OH_Drawing_DestroyPositionAndAffinity(
3618 positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
3619 );
3620}
3621extern "C" {
3622 #[doc = " @brief Gets the character range corresponding to the specified glyph range.\n\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param glyphRangeStart Indicates the start of the glyph range.\n @param glyphRangeEnd Indicates the end of the glyph range.\n @param actualGlyphRange Indicates the pointer to an <b>OH_Drawing_Range</b> pointer.\n If this parameter is <b>NULL</b>, the actual glyph range will not be provided,\n indicating that the actual glyph range information is not required.\n Releases memory by <b>OH_Drawing_ReleaseRangeBuffer</b>.\n @param textEncodingType Indicates the text encoding type <b>OH_Drawing_TextEncoding</b>.\n Currently only UTF-8 and UTF-16 encoding types are supported.\n For UTF-8 encoding, the returned character range represents byte ranges.\n For UTF-16 encoding, the returned character range represents UTF-16 code unit ranges.\n @return The pointer to the <b>OH_Drawing_Range</b> object representing the character range.\n Releases memory by <b>OH_Drawing_ReleaseRangeBuffer</b>.\n @since 24"]
3623 #[cfg(feature = "api-24")]
3624 pub fn OH_Drawing_TypographyGetCharacterRangeForGlyphRangeWithBuffer(
3625 typography: *mut OH_Drawing_Typography,
3626 glyphRangeStart: usize,
3627 glyphRangeEnd: usize,
3628 actualGlyphRange: *mut *mut OH_Drawing_Range,
3629 textEncodingType: OH_Drawing_TextEncoding,
3630 ) -> *mut OH_Drawing_Range;
3631}
3632extern "C" {
3633 #[doc = " @brief Gets the character position and affinity from the specified coordinate.\n\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param dx Indicates the positionX of typography to set.\n @param dy Indicates the positionY of typography to set.\n @param textEncodingType Indicates the text encoding type <b>OH_Drawing_TextEncoding</b>.\n Currently only UTF-8 and UTF-16 encoding types are supported.\n For UTF-8 encoding, the returned position represents a byte offset.\n For UTF-16 encoding, the returned position represents a UTF-16 code unit offset.\n @return The pointer to the <b>OH_Drawing_PositionAndAffinity</b> object.\n Releases memory by <b>OH_Drawing_DestroyPositionAndAffinity</b>.\n @since 24"]
3634 #[cfg(feature = "api-24")]
3635 pub fn OH_Drawing_TypographyGetCharacterPositionAtCoordinateWithBuffer(
3636 typography: *mut OH_Drawing_Typography,
3637 dx: f64,
3638 dy: f64,
3639 textEncodingType: OH_Drawing_TextEncoding,
3640 ) -> *mut OH_Drawing_PositionAndAffinity;
3641}
3642extern "C" {
3643 #[doc = " @brief Gets the glyph range corresponding to the specified character range.\n\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param characterRangeStart Indicates the start of the character range.\n @param characterRangeEnd Indicates the end of the character range.\n @param actualCharacterRange Indicates the pointer to an <b>OH_Drawing_Range</b> pointer.\n If this parameter is <b>NULL</b>, the actual character range will not be provided,\n indicating that the actual character range information is not required.\n Releases memory by <b>OH_Drawing_ReleaseRangeBuffer</b>.\n @param textEncodingType Indicates the text encoding type <b>OH_Drawing_TextEncoding</b>.\n Currently only UTF-8 and UTF-16 encoding types are supported.\n For UTF-8 encoding, the input character range should be interpreted as byte ranges.\n For UTF-16 encoding, the input character range should be interpreted as UTF-16 code unit ranges.\n @return The pointer to the <b>OH_Drawing_Range</b> object representing the glyph range.\n Releases memory by <b>OH_Drawing_ReleaseRangeBuffer</b>.\n @since 24"]
3644 #[cfg(feature = "api-24")]
3645 pub fn OH_Drawing_TypographyGetGlyphRangeForCharacterRangeWithBuffer(
3646 typography: *mut OH_Drawing_Typography,
3647 characterRangeStart: usize,
3648 characterRangeEnd: usize,
3649 actualCharacterRange: *mut *mut OH_Drawing_Range,
3650 textEncodingType: OH_Drawing_TextEncoding,
3651 ) -> *mut OH_Drawing_Range;
3652}
3653extern "C" {
3654 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_Range</b> object.\n\n @param range Indicates the pointer to an <b>OH_Drawing_Range</b> object.\n @since 24"]
3655 #[cfg(feature = "api-24")]
3656 pub fn OH_Drawing_ReleaseRangeBuffer(range: *mut OH_Drawing_Range);
3657}
3658extern "C" {
3659 #[doc = " @brief Creates an <b>OH_Drawing_FontMgr</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontMgr</b> object created.\n @since 12\n @version 1.0"]
3660 pub fn OH_Drawing_FontMgrCreate() -> *mut OH_Drawing_FontMgr;
3661}
3662extern "C" {
3663 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontMgr</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @since 12\n @version 1.0"]
3664 pub fn OH_Drawing_FontMgrDestroy(drawingFontMgr: *mut OH_Drawing_FontMgr);
3665}
3666extern "C" {
3667 #[doc = " @brief Gets the count of font families.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @return Returns the count of font families.\n @since 12\n @version 1.0"]
3668 pub fn OH_Drawing_FontMgrGetFamilyCount(
3669 drawingFontMgr: *mut OH_Drawing_FontMgr,
3670 ) -> ::std::os::raw::c_int;
3671}
3672extern "C" {
3673 #[doc = " @brief Gets the font family name by the index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param index Indicates the index to get the font family name.\n @return Returns the font family name corresponding to the index value.\n @since 12\n @version 1.0"]
3674 pub fn OH_Drawing_FontMgrGetFamilyName(
3675 drawingFontMgr: *mut OH_Drawing_FontMgr,
3676 index: ::std::os::raw::c_int,
3677 ) -> *mut ::std::os::raw::c_char;
3678}
3679extern "C" {
3680 #[doc = " @brief Releases the memory occupied by font family name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param familyName Indicates the font family name.\n @since 12\n @version 1.0"]
3681 pub fn OH_Drawing_FontMgrDestroyFamilyName(familyName: *mut ::std::os::raw::c_char);
3682}
3683extern "C" {
3684 #[doc = " @brief Creates an <b>OH_Drawing_FontStyleSet</b> object by <b>OH_Drawing_FontMgr</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param index Indicates the index used to get the font style set object from the font manager object.\n @return Returns the pointer to the <b>OH_Drawing_FontStyleSet</b> object created.\n @since 12\n @version 1.0"]
3685 pub fn OH_Drawing_FontMgrCreateFontStyleSet(
3686 drawingFontMgr: *mut OH_Drawing_FontMgr,
3687 index: ::std::os::raw::c_int,
3688 ) -> *mut OH_Drawing_FontStyleSet;
3689}
3690extern "C" {
3691 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_FontStyleSet</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @since 12\n @version 1.0"]
3692 pub fn OH_Drawing_FontMgrDestroyFontStyleSet(drawingFontStyleSet: *mut OH_Drawing_FontStyleSet);
3693}
3694extern "C" {
3695 #[doc = " @brief Get the pointer to an <b>OH_Drawing_FontStyleSet</b> object for the given font style set family name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param familyName Indicates the family name of a font style set to be matched.\n @return Returns the pointer to the <b>OH_Drawing_FontStyleSet</b> object matched.\n @since 12\n @version 1.0"]
3696 pub fn OH_Drawing_FontMgrMatchFamily(
3697 drawingFontMgr: *mut OH_Drawing_FontMgr,
3698 familyName: *const ::std::os::raw::c_char,
3699 ) -> *mut OH_Drawing_FontStyleSet;
3700}
3701extern "C" {
3702 #[doc = " @brief Get the pointer to an <b>OH_Drawing_Typeface</b> object based on the given font style and family name.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param familyName Indicates the family name of a font style set to be matched.\n @param fontStyle Indicates an <b>OH_Drawing_FontStyleStruct</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object matched.\n @since 12\n @version 1.0"]
3703 pub fn OH_Drawing_FontMgrMatchFamilyStyle(
3704 drawingFontMgr: *mut OH_Drawing_FontMgr,
3705 familyName: *const ::std::os::raw::c_char,
3706 fontStyle: OH_Drawing_FontStyleStruct,
3707 ) -> *mut OH_Drawing_Typeface;
3708}
3709extern "C" {
3710 #[doc = " @brief Get the pointer to an <b>OH_Drawing_Typeface</b> object for the given character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param drawingFontMgr Indicates the pointer to an <b>OH_Drawing_FontMgr</b> object.\n @param familyName Indicates the family name of a font style set to be matched.\n @param fontStyle Indicates an <b>OH_Drawing_FontStyleStruct</b> object.\n @param bcp47 Indicates an array of languages which indicate the language of character.\n @param bcp47Count Indicates the array size of bcp47.\n @param character Indicates a UTF8 value to be matched.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object matched.\n @since 12\n @version 1.0"]
3711 pub fn OH_Drawing_FontMgrMatchFamilyStyleCharacter(
3712 drawingFontMgr: *mut OH_Drawing_FontMgr,
3713 familyName: *const ::std::os::raw::c_char,
3714 fontStyle: OH_Drawing_FontStyleStruct,
3715 bcp47: *mut *const ::std::os::raw::c_char,
3716 bcp47Count: ::std::os::raw::c_int,
3717 character: i32,
3718 ) -> *mut OH_Drawing_Typeface;
3719}
3720extern "C" {
3721 #[doc = " @brief Create a typeface for the given index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @param index Indicates the index of the typeface in this fontStyleSet.\n @return If successful, return a pointer to <b>OH_Drawing_Typeface</b> object; if failed, return nullptr.\n @since 12\n @version 1.0"]
3722 pub fn OH_Drawing_FontStyleSetCreateTypeface(
3723 fontStyleSet: *mut OH_Drawing_FontStyleSet,
3724 index: ::std::os::raw::c_int,
3725 ) -> *mut OH_Drawing_Typeface;
3726}
3727extern "C" {
3728 #[doc = " @brief Get font style for the specified typeface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @param index Indicates the index of the typeface in this fontStyleSet.\n @param styleName Indicates the style name returned.\n @return Return the <b>OH_Drawing_FontStyleStruct<b> structure.\n @since 12\n @version 1.0"]
3729 pub fn OH_Drawing_FontStyleSetGetStyle(
3730 fontStyleSet: *mut OH_Drawing_FontStyleSet,
3731 index: i32,
3732 styleName: *mut *mut ::std::os::raw::c_char,
3733 ) -> OH_Drawing_FontStyleStruct;
3734}
3735extern "C" {
3736 #[doc = " @brief Releases the memory styleName string.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param styleName Indicates the pointer to a string type.\n @since 12\n @version 1.0"]
3737 pub fn OH_Drawing_FontStyleSetFreeStyleName(styleName: *mut *mut ::std::os::raw::c_char);
3738}
3739extern "C" {
3740 #[doc = " @brief Get the closest matching typeface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @param fontStyleStruct Indicates the <b>OH_Drawing_FontStyleStruct</b> structure.\n @return A pointer to matched <b>OH_Drawing_Typeface</b>.\n @since 12\n @version 1.0"]
3741 pub fn OH_Drawing_FontStyleSetMatchStyle(
3742 fontStyleSet: *mut OH_Drawing_FontStyleSet,
3743 fontStyleStruct: OH_Drawing_FontStyleStruct,
3744 ) -> *mut OH_Drawing_Typeface;
3745}
3746extern "C" {
3747 #[doc = " @brief Get the count of typeface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontStyleSet Indicates the pointer to an <b>OH_Drawing_FontStyleSet</b> object.\n @return The count of typeface in this font style set.\n @since 12\n @version 1.0"]
3748 pub fn OH_Drawing_FontStyleSetCount(
3749 fontStyleSet: *mut OH_Drawing_FontStyleSet,
3750 ) -> ::std::os::raw::c_int;
3751}
3752#[doc = " @brief Defines the options about GPU context.\n\n @since 12\n @version 1.0\n @deprecated since 18"]
3753#[repr(C)]
3754#[derive(Debug, Copy, Clone)]
3755pub struct OH_Drawing_GpuContextOptions {
3756 #[doc = " If true this allows path mask textures to be cached"]
3757 pub allowPathMaskCaching: bool,
3758}
3759extern "C" {
3760 #[doc = " @brief Creates an <b>OH_Drawing_GpuContext</b> object, whose GPU backend context is GL.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param gpuContextOptions Indicates the GPU context options.\n @return Returns the pointer to the <b>OH_Drawing_GpuContext</b> object created.\n @since 12\n @version 1.0\n @deprecated since 18\n @useinstead OH_Drawing_GpuContextCreate"]
3761 pub fn OH_Drawing_GpuContextCreateFromGL(
3762 gpuContextOptions: OH_Drawing_GpuContextOptions,
3763 ) -> *mut OH_Drawing_GpuContext;
3764}
3765extern "C" {
3766 #[doc = " @brief Creates an <b>OH_Drawing_GpuContext</b> object, whose GPU backend context depends on device.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_GpuContext</b> object created.\n @since 16\n @version 1.0"]
3767 #[cfg(feature = "api-16")]
3768 pub fn OH_Drawing_GpuContextCreate() -> *mut OH_Drawing_GpuContext;
3769}
3770extern "C" {
3771 #[doc = " @brief Destroys an <b>OH_Drawing_GpuContext</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param gpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.\n @since 12\n @version 1.0"]
3772 pub fn OH_Drawing_GpuContextDestroy(gpuContext: *mut OH_Drawing_GpuContext);
3773}
3774extern "C" {
3775 #[doc = " @brief Creates an <b>OH_Drawing_Image</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Image</b> object created.\n @since 12\n @version 1.0"]
3776 pub fn OH_Drawing_ImageCreate() -> *mut OH_Drawing_Image;
3777}
3778extern "C" {
3779 #[doc = " @brief Destroys an <b>OH_Drawing_Image</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @since 12\n @version 1.0"]
3780 pub fn OH_Drawing_ImageDestroy(image: *mut OH_Drawing_Image);
3781}
3782extern "C" {
3783 #[doc = " @brief Rebuilds an <b>OH_Drawing_Image</b> object, sharing or copying bitmap pixels.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns true if successded.\n @since 12\n @version 1.0"]
3784 pub fn OH_Drawing_ImageBuildFromBitmap(
3785 image: *mut OH_Drawing_Image,
3786 bitmap: *mut OH_Drawing_Bitmap,
3787 ) -> bool;
3788}
3789extern "C" {
3790 #[doc = " @brief Gets pixel count in each row of image.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @return Returns the width.\n @since 12\n @version 1.0"]
3791 pub fn OH_Drawing_ImageGetWidth(image: *mut OH_Drawing_Image) -> i32;
3792}
3793extern "C" {
3794 #[doc = " @brief Gets pixel row count of image.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @return Returns the height.\n @since 12\n @version 1.0"]
3795 pub fn OH_Drawing_ImageGetHeight(image: *mut OH_Drawing_Image) -> i32;
3796}
3797extern "C" {
3798 #[doc = " @brief Gets the image info.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.\n @since 12\n @version 1.0"]
3799 pub fn OH_Drawing_ImageGetImageInfo(
3800 image: *mut OH_Drawing_Image,
3801 imageInfo: *mut OH_Drawing_Image_Info,
3802 );
3803}
3804#[doc = " Replicate the edge color if the shader effect draws outside of its original bounds."]
3805pub const OH_Drawing_TileMode_CLAMP: OH_Drawing_TileMode = 0;
3806#[doc = " Repeat the shader effect image horizontally and vertically."]
3807pub const OH_Drawing_TileMode_REPEAT: OH_Drawing_TileMode = 1;
3808#[doc = " Repeat the shader effect image horizontally and vertically, alternating mirror images\n so that adjacent images always seam."]
3809pub const OH_Drawing_TileMode_MIRROR: OH_Drawing_TileMode = 2;
3810#[doc = " Only draw within the original domain, return transparent-black everywhere else."]
3811pub const OH_Drawing_TileMode_DECAL: OH_Drawing_TileMode = 3;
3812#[doc = " @brief Enumerates tile mode.\n\n @since 11\n @version 1.0"]
3813pub type OH_Drawing_TileMode = u32;
3814extern "C" {
3815 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a shader with single color.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param color Indicates the color used by the shader.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty.\n @since 12\n @version 1.0"]
3816 pub fn OH_Drawing_ShaderEffectCreateColorShader(color: u32) -> *mut OH_Drawing_ShaderEffect;
3817}
3818extern "C" {
3819 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a linear gradient between the two specified points.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param startPt Indicates the start point for the gradient.\n @param endPt Indicates the end point for the gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 11\n @version 1.0"]
3820 pub fn OH_Drawing_ShaderEffectCreateLinearGradient(
3821 startPt: *const OH_Drawing_Point,
3822 endPt: *const OH_Drawing_Point,
3823 colors: *const u32,
3824 pos: *const f32,
3825 size: u32,
3826 tileMode: OH_Drawing_TileMode,
3827 ) -> *mut OH_Drawing_ShaderEffect;
3828}
3829extern "C" {
3830 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a linear gradient between the two specified points.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param startPt Indicates the start point for the gradient.\n @param endPt Indicates the end point for the gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n If pos is nullptr, the colors are evenly distributed between the start and end point.\n @param size Indicates the number of colors and pos(if pos is not nullptr).\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is any of startPt, endPt, colors and pos is nullptr.\n @since 12\n @version 1.0"]
3831 pub fn OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMatrix(
3832 startPt: *const OH_Drawing_Point2D,
3833 endPt: *const OH_Drawing_Point2D,
3834 colors: *const u32,
3835 pos: *const f32,
3836 size: u32,
3837 tileMode: OH_Drawing_TileMode,
3838 matrix: *const OH_Drawing_Matrix,
3839 ) -> *mut OH_Drawing_ShaderEffect;
3840}
3841extern "C" {
3842 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a radial gradient given the center and radius.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param centerPt Indicates the center of the circle for the gradient.\n @param radius Indicates the radius of the circle for this gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 11\n @version 1.0"]
3843 pub fn OH_Drawing_ShaderEffectCreateRadialGradient(
3844 centerPt: *const OH_Drawing_Point,
3845 radius: f32,
3846 colors: *const u32,
3847 pos: *const f32,
3848 size: u32,
3849 tileMode: OH_Drawing_TileMode,
3850 ) -> *mut OH_Drawing_ShaderEffect;
3851}
3852extern "C" {
3853 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a radial gradient given the center and radius.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param centerPt Indicates the center of the circle for the gradient.\n @param radius Indicates the radius of the circle for this gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is any of centerPt, colors and pos is nullptr.\n @since 12\n @version 1.0"]
3854 pub fn OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix(
3855 centerPt: *const OH_Drawing_Point2D,
3856 radius: f32,
3857 colors: *const u32,
3858 pos: *const f32,
3859 size: u32,
3860 tileMode: OH_Drawing_TileMode,
3861 matrix: *const OH_Drawing_Matrix,
3862 ) -> *mut OH_Drawing_ShaderEffect;
3863}
3864extern "C" {
3865 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a sweep gradient given a center.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param centerPt Indicates the center of the circle for the gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 20\n @version 1.0"]
3866 #[cfg(feature = "api-20")]
3867 pub fn OH_Drawing_ShaderEffectCreateSweepGradientWithLocalMatrix(
3868 centerPt: *const OH_Drawing_Point,
3869 colors: *const u32,
3870 pos: *const f32,
3871 size: u32,
3872 tileMode: OH_Drawing_TileMode,
3873 matrix: *const OH_Drawing_Matrix,
3874 ) -> *mut OH_Drawing_ShaderEffect;
3875}
3876extern "C" {
3877 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a sweep gradient given a center.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param centerPt Indicates the center of the circle for the gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 11\n @version 1.0"]
3878 pub fn OH_Drawing_ShaderEffectCreateSweepGradient(
3879 centerPt: *const OH_Drawing_Point,
3880 colors: *const u32,
3881 pos: *const f32,
3882 size: u32,
3883 tileMode: OH_Drawing_TileMode,
3884 ) -> *mut OH_Drawing_ShaderEffect;
3885}
3886extern "C" {
3887 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a image shader.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param tileX Indicates the tileX.\n @param tileY Indicates the tileY.\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n If matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 12\n @version 1.0"]
3888 pub fn OH_Drawing_ShaderEffectCreateImageShader(
3889 image: *mut OH_Drawing_Image,
3890 tileX: OH_Drawing_TileMode,
3891 tileY: OH_Drawing_TileMode,
3892 samplingOptions: *const OH_Drawing_SamplingOptions,
3893 matrix: *const OH_Drawing_Matrix,
3894 ) -> *mut OH_Drawing_ShaderEffect;
3895}
3896extern "C" {
3897 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a pixel map shader.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.\n @param tileX Indicates the horizontal tile mode.\n @param tileY Indicates the vertical tile mode.\n @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object. It cannot be null.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n If matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n @since 20\n @version 1.0"]
3898 #[cfg(feature = "api-20")]
3899 pub fn OH_Drawing_ShaderEffectCreatePixelMapShader(
3900 pixelMap: *mut OH_Drawing_PixelMap,
3901 tileX: OH_Drawing_TileMode,
3902 tileY: OH_Drawing_TileMode,
3903 samplingOptions: *const OH_Drawing_SamplingOptions,
3904 matrix: *const OH_Drawing_Matrix,
3905 ) -> *mut OH_Drawing_ShaderEffect;
3906}
3907extern "C" {
3908 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a conical gradient given two circles.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param startPt Indicates the center of the start circle for the gradient.\n @param startRadius Indicates the radius of the start circle for this gradient.\n @param endPt Indicates the center of the end circle for the gradient.\n @param endRadius Indicates the radius of the end circle for this gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is any of startPt, endPt, colors and pos is nullptr.\n @since 12\n @version 1.0"]
3909 pub fn OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(
3910 startPt: *const OH_Drawing_Point2D,
3911 startRadius: f32,
3912 endPt: *const OH_Drawing_Point2D,
3913 endRadius: f32,
3914 colors: *const u32,
3915 pos: *const f32,
3916 size: u32,
3917 tileMode: OH_Drawing_TileMode,
3918 matrix: *const OH_Drawing_Matrix,
3919 ) -> *mut OH_Drawing_ShaderEffect;
3920}
3921extern "C" {
3922 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates by two shaders.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param dst Indicates the destination ShaderEffect pointer.\n @param src Indicates the source ShaderEffect pointer.\n @param mode Indicates the blend mode.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty or any of dst and src is nullptr.\n @since 20\n @version 1.0"]
3923 #[cfg(feature = "api-20")]
3924 pub fn OH_Drawing_ShaderEffectCreateCompose(
3925 dst: *mut OH_Drawing_ShaderEffect,
3926 src: *mut OH_Drawing_ShaderEffect,
3927 mode: OH_Drawing_BlendMode,
3928 ) -> *mut OH_Drawing_ShaderEffect;
3929}
3930extern "C" {
3931 #[doc = " @brief Destroys an <b>OH_Drawing_ShaderEffect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.\n @since 11\n @version 1.0"]
3932 pub fn OH_Drawing_ShaderEffectDestroy(shaderEffect: *mut OH_Drawing_ShaderEffect);
3933}
3934extern "C" {
3935 #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object that blurs its input by the separate x and y sigmas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param sigmaX Indicates the Gaussian sigma value for blurring along the x axis.\n @param sigmaY Indicates the Gaussian sigma value for blurring along the y axis.\n @param tileMode Indicates the tile mode applied at edges.\n @param imageFilter Indicates the input filter that is blurred, uses source bitmap if this is null.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty.\n @since 12\n @version 1.0"]
3936 pub fn OH_Drawing_ImageFilterCreateBlur(
3937 sigmaX: f32,
3938 sigmaY: f32,
3939 tileMode: OH_Drawing_TileMode,
3940 imageFilter: *mut OH_Drawing_ImageFilter,
3941 ) -> *mut OH_Drawing_ImageFilter;
3942}
3943extern "C" {
3944 #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object that blurs its input by the separate x and y sigmas.\n Supports an optional crop rectangle to restrict the blur effect to a specific region of the input.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param sigmaX Indicates the Gaussian sigma value for blurring along the x axis.\n @param sigmaY Indicates the Gaussian sigma value for blurring along the y axis.\n @param tileMode Indicates the tile mode applied at edges.\n @param input Indicates the input filter that is blurred, uses source bitmap if this is null.\n @param rect Indicates optional rectangle that crops the input and output.\n If rect is null, the blur effect applies to the entire input image.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n @since 20\n @version 1.0"]
3945 #[cfg(feature = "api-20")]
3946 pub fn OH_Drawing_ImageFilterCreateBlurWithCrop(
3947 sigmaX: f32,
3948 sigmaY: f32,
3949 tileMode: OH_Drawing_TileMode,
3950 input: *mut OH_Drawing_ImageFilter,
3951 rect: *const OH_Drawing_Rect,
3952 ) -> *mut OH_Drawing_ImageFilter;
3953}
3954extern "C" {
3955 #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object that applies the color filter to the input.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param colorFilter Indicates the color filter that transforms the input image.\n @param imageFilter Indicates the input filter, or uses the source bitmap if this is null.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty or\n a nullptr <b>OH_Drawing_ColorFilter</b> is passed.\n @since 12\n @version 1.0"]
3956 pub fn OH_Drawing_ImageFilterCreateFromColorFilter(
3957 colorFilter: *mut OH_Drawing_ColorFilter,
3958 imageFilter: *mut OH_Drawing_ImageFilter,
3959 ) -> *mut OH_Drawing_ImageFilter;
3960}
3961extern "C" {
3962 #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object with the provided x and y offset.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param x Indicates the x offset.\n @param y Indicates the y offset.\n @param imageFilter Indicates the input filter, or uses the source bitmap if this is null.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty.\n @since 20\n @version 1.0"]
3963 #[cfg(feature = "api-20")]
3964 pub fn OH_Drawing_ImageFilterCreateOffset(
3965 x: f32,
3966 y: f32,
3967 imageFilter: *mut OH_Drawing_ImageFilter,
3968 ) -> *mut OH_Drawing_ImageFilter;
3969}
3970extern "C" {
3971 #[doc = " @brief Creates an <b>OH_Drawing_ImageFilter</b> object that applies the shader to the input.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shaderEffect Indicates the shader effect to be applied to the image.\n @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty or\n a nullptr <b>OH_Drawing_ShaderEffect</b> is passed.\n @since 20\n @version 1.0"]
3972 #[cfg(feature = "api-20")]
3973 pub fn OH_Drawing_ImageFilterCreateFromShaderEffect(
3974 shaderEffect: *mut OH_Drawing_ShaderEffect,
3975 ) -> *mut OH_Drawing_ImageFilter;
3976}
3977extern "C" {
3978 #[doc = " @brief Destroys an <b>OH_Drawing_ImageFilter</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param imageFilter Indicates the pointer to an <b>OH_Drawing_ImageFilter</b> object.\n @since 12\n @version 1.0"]
3979 pub fn OH_Drawing_ImageFilterDestroy(imageFilter: *mut OH_Drawing_ImageFilter);
3980}
3981#[doc = " Fuzzy inside and outside."]
3982pub const OH_Drawing_BlurType_NORMAL: OH_Drawing_BlurType = 0;
3983#[doc = " Solid inside, fuzzy outside."]
3984pub const OH_Drawing_BlurType_SOLID: OH_Drawing_BlurType = 1;
3985#[doc = " Nothing inside, fuzzy outside."]
3986pub const OH_Drawing_BlurType_OUTER: OH_Drawing_BlurType = 2;
3987#[doc = " Fuzzy inside, nothing outside."]
3988pub const OH_Drawing_BlurType_INNER: OH_Drawing_BlurType = 3;
3989#[doc = " @brief Enumerates blur type.\n\n @since 11\n @version 1.0"]
3990pub type OH_Drawing_BlurType = u32;
3991extern "C" {
3992 #[doc = " @brief Creates an <b>OH_Drawing_MaskFilter</b> with a blur effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param blurType Indicates the blur type.\n @param sigma Indicates the standard deviation of the Gaussian blur to apply. Must be > 0.\n @param respectCTM Indicates the blur's sigma is modified by the CTM, default is true.\n @return Returns the pointer to the <b>OH_Drawing_MaskFilter</b> object created.\n @since 11\n @version 1.0"]
3993 pub fn OH_Drawing_MaskFilterCreateBlur(
3994 blurType: OH_Drawing_BlurType,
3995 sigma: f32,
3996 respectCTM: bool,
3997 ) -> *mut OH_Drawing_MaskFilter;
3998}
3999extern "C" {
4000 #[doc = " @brief Destroys an <b>OH_Drawing_MaskFilter</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param maskFilter Indicates the pointer to an <b>OH_Drawing_MaskFilter</b> object.\n @since 11\n @version 1.0"]
4001 pub fn OH_Drawing_MaskFilterDestroy(maskFilter: *mut OH_Drawing_MaskFilter);
4002}
4003extern "C" {
4004 #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.\n @since 11\n @version 1.0"]
4005 pub fn OH_Drawing_MatrixCreate() -> *mut OH_Drawing_Matrix;
4006}
4007extern "C" {
4008 #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.\n @since 20\n @version 1.0"]
4009 #[cfg(feature = "api-20")]
4010 pub fn OH_Drawing_MatrixCopy(matrix: *const OH_Drawing_Matrix) -> *mut OH_Drawing_Matrix;
4011}
4012extern "C" {
4013 #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> object with rotation. Sets matrix to\n rotate by degrees about a pivot point at (px, py).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param deg angle of axes relative to upright axes\n @param x pivot on x-axis.\n @param y pivot on y-axis.\n @since 12\n @version 1.0"]
4014 pub fn OH_Drawing_MatrixCreateRotation(deg: f32, x: f32, y: f32) -> *mut OH_Drawing_Matrix;
4015}
4016extern "C" {
4017 #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> object with scale. Sets matrix to scale\n by sx and sy, about a pivot point at (px, py).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param sx horizontal scale factor.\n @param sy vertical scale factor.\n @param px pivot on x-axis.\n @param py pivot on y-axis.\n @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.\n @since 12\n @version 1.0"]
4018 pub fn OH_Drawing_MatrixCreateScale(
4019 sx: f32,
4020 sy: f32,
4021 px: f32,
4022 py: f32,
4023 ) -> *mut OH_Drawing_Matrix;
4024}
4025extern "C" {
4026 #[doc = " @brief Creates an <b>OH_Drawing_Matrix</b> object with translation.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param dx horizontal translation.\n @param dy vertical translation.\n @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.\n @since 12\n @version 1.0"]
4027 pub fn OH_Drawing_MatrixCreateTranslation(dx: f32, dy: f32) -> *mut OH_Drawing_Matrix;
4028}
4029extern "C" {
4030 #[doc = " @brief Sets the params for a matrix.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param scaleX horizontal scale factor to store\n @param skewX horizontal skew factor to store\n @param transX horizontal translation to store\n @param skewY vertical skew factor to store\n @param scaleY vertical scale factor to store\n @param transY vertical translation to store\n @param persp0 input x-axis values perspective factor to store\n @param persp1 input y-axis values perspective factor to store\n @param persp2 perspective scale factor to store\n @since 11\n @version 1.0"]
4031 pub fn OH_Drawing_MatrixSetMatrix(
4032 matrix: *mut OH_Drawing_Matrix,
4033 scaleX: f32,
4034 skewX: f32,
4035 transX: f32,
4036 skewY: f32,
4037 scaleY: f32,
4038 transY: f32,
4039 persp0: f32,
4040 persp1: f32,
4041 persp2: f32,
4042 );
4043}
4044#[doc = " Scales in x and y to fill destination rect."]
4045pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_FILL: OH_Drawing_ScaleToFit = 0;
4046#[doc = " Scales and aligns to left and top."]
4047pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_START: OH_Drawing_ScaleToFit = 1;
4048#[doc = " Scales and aligns to center."]
4049pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_CENTER: OH_Drawing_ScaleToFit = 2;
4050#[doc = " Scales and aligns to right and bottom."]
4051pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_END: OH_Drawing_ScaleToFit = 3;
4052#[doc = " @brief Enumerates of scale to fit flags, how matrix is constructed to map one rect to another.\n\n @since 12\n @version 1.0"]
4053pub type OH_Drawing_ScaleToFit = u32;
4054extern "C" {
4055 #[doc = " @brief Sets matrix to scale and translate src rect to dst rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Rect</b> object rect to map from.\n @param dst Indicates the pointer to an <b>OH_Drawing_Rect</b> object rect to map to.\n @param stf Scales to fit enum method.\n @return Returns true if dst is empty, and sets matrix to:\n | 0 0 0 |\n | 0 0 0 |\n | 0 0 1 |\n\n @since 12\n @version 1.0"]
4056 pub fn OH_Drawing_MatrixSetRectToRect(
4057 matrix: *mut OH_Drawing_Matrix,
4058 src: *const OH_Drawing_Rect,
4059 dst: *const OH_Drawing_Rect,
4060 stf: OH_Drawing_ScaleToFit,
4061 ) -> bool;
4062}
4063extern "C" {
4064 #[doc = " @brief Sets matrix to matrix multiplied by matrix constructed from rotating by degrees\n about pivot point(px, py), positive degrees rotates clockwise.\n Given:\n\n | A B C | | c -s dx |\n Matrix = | D E F |, R(degrees, px, py) = | s c dy |\n | G H I | | 0 0 1 |\n\n where:\n\n c = cos(degrees)\n s = sin(degrees)\n dx = s * py + (1 - c) * px\n dy = -s * px + (1 - c) * py\n\n sets Matrix to:\n\n | A B C | | c -s dx | | Ac+Bs -As+Bc A*dx+B*dy+C |\n Matrix * R(degrees, px, py) = | D E F | | s c dy | = | Dc+Es -Ds+Ec D*dx+E*dy+F |\n | G H I | | 0 0 1 | | Gc+Hs -Gs+Hc G*dx+H*dy+I |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param degree Indicates the angle of axes relative to upright axes.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @since 12\n @version 1.0"]
4065 pub fn OH_Drawing_MatrixPreRotate(
4066 matrix: *mut OH_Drawing_Matrix,
4067 degree: f32,
4068 px: f32,
4069 py: f32,
4070 );
4071}
4072extern "C" {
4073 #[doc = " @brief Sets matrix to forward scale by sx and sy, about a pivot point at (px, py).\n Given:\n\n | A B C | | sx 0 dx |\n Matrix =| D E F |, S(sx, sy, px, py) = | 0 sy dy |\n | G H I | | 0 0 1 |\n\n where:\n\n dx = px - sx * px\n dy = py - sy * py\n\n sets Matrix to:\n\n | A B C | | sx 0 dx | | A*sx B*sy A*dx+B*dy+C |\n Matrix * S(sx, sy, px, py) = | D E F | | 0 sy dy | = | D*sx E*sy D*dx+E*dy+F |\n | G H I | | 0 0 1 | | G*sx H*sy G*dx+H*dy+I |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param sx Horizontal scale factor.\n @param sy Vertical scale factor.\n @param px Pivot on x-axis.\n @param py Pivot on y-axis.\n @since 12\n @version 1.0"]
4074 pub fn OH_Drawing_MatrixPreScale(
4075 matrix: *mut OH_Drawing_Matrix,
4076 sx: f32,
4077 sy: f32,
4078 px: f32,
4079 py: f32,
4080 );
4081}
4082extern "C" {
4083 #[doc = " @brief Sets forward matrix to translate by dx and dy.\n Given:\n | A B C | | 1 0 dx |\n Matrix = | D E F |, T(dx, dy) = | 0 1 dy |\n | G H I | | 0 0 1 |\n sets Matrix to:\n | A B C | | 1 0 dx | | A B A*dx+B*dy+C |\n Matrix * T(dx, dy) = | D E F | | 0 1 dy | = | D E D*dx+E*dy+F |\n | G H I | | 0 0 1 | | G H G*dx+H*dy+I |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param dx Indicates the horizontal translation.\n @param dy Indicates the vertical translation.\n @since 12\n @version 1.0"]
4084 pub fn OH_Drawing_MatrixPreTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
4085}
4086extern "C" {
4087 #[doc = " @brief Sets matrix to matrix constructed from rotating by degrees about pivot point(px, py),\n multiplied by matrix, positive degrees rotates clockwise.\n Given:\n\n | J K L | | c -s dx |\n Matrix = | M N O |, R(degrees, px, py) = | s c dy |\n | P Q R | | 0 0 1 |\n\n where:\n\n c = cos(degrees)\n s = sin(degrees)\n dx = s * py + (1 - c) * px\n dy = -s * px + (1 - c) * py\n\n sets Matrix to:\n\n |c -s dx| |J K L| |cJ-sM+dx*P cK-sN+dx*Q cL-sO+dx+R|\n R(degrees, px, py) * Matrix = |s c dy| |M N O| = |sJ+cM+dy*P sK+cN+dy*Q sL+cO+dy*R|\n |0 0 1| |P Q R| | P Q R|\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param degree Indicates the angle of axes relative to upright axes.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @since 12\n @version 1.0"]
4088 pub fn OH_Drawing_MatrixPostRotate(
4089 matrix: *mut OH_Drawing_Matrix,
4090 degree: f32,
4091 px: f32,
4092 py: f32,
4093 );
4094}
4095extern "C" {
4096 #[doc = " @brief Sets matrix to backward scale by sx and sy, about a pivot point at (px, py).\n Given:\n | J K L | | sx 0 dx |\n Matrix = | M N O |, S(sx, sy, px, py) = | 0 sy dy |\n | P Q R | | 0 0 1 |\n where:\n dx = px - sx * px\n dy = py - sy * py\n sets Matrix to:\n | sx 0 dx | | J K L | | sx*J+dx*P sx*K+dx*Q sx*L+dx+R |\n S(sx, sy, px, py) * Matrix = | 0 sy dy | | M N O | = | sy*M+dy*P sy*N+dy*Q sy*O+dy*R |\n | 0 0 1 | | P Q R | | P Q R |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param sx Horizontal scale factor.\n @param sy Vertical scale factor.\n @param px Pivot on x-axis.\n @param py Pivot on y-axis.\n @since 12\n @version 1.0"]
4097 pub fn OH_Drawing_MatrixPostScale(
4098 matrix: *mut OH_Drawing_Matrix,
4099 sx: f32,
4100 sy: f32,
4101 px: f32,
4102 py: f32,
4103 );
4104}
4105extern "C" {
4106 #[doc = " @brief Sets backward matrix to translate by (dx, dy).\n Given:\n\n | J K L | | 1 0 dx |\n Matrix = | M N O |, T(dx, dy) = | 0 1 dy |\n | P Q R | | 0 0 1 |\n\n sets Matrix to:\n\n | 1 0 dx | | J K L | | J+dx*P K+dx*Q L+dx*R |\n T(dx, dy) * Matrix = | 0 1 dy | | M N O | = | M+dy*P N+dy*Q O+dy*R |\n | 0 0 1 | | P Q R | | P Q R |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param dx Indicates the horizontal translation.\n @param dy Indicates the vertical translation.\n @since 12\n @version 1.0"]
4107 pub fn OH_Drawing_MatrixPostTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
4108}
4109extern "C" {
4110 #[doc = " @brief Reset matrix to identity, which has no effect on mapped point, sets matrix to:\n | 1 0 0 |\n | 0 1 0 |\n | 0 0 1 |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
4111 pub fn OH_Drawing_MatrixReset(matrix: *mut OH_Drawing_Matrix);
4112}
4113extern "C" {
4114 #[doc = " @brief Sets matrix total to matrix a multiplied by matrix b.\n Given:\n | A B C | | J K L |\n a = | D E F |, b = | M N O |\n | G H I | | P Q R |\n sets Matrix total to:\n | A B C | | J K L | | AJ+BM+CP AK+BN+CQ AL+BO+CR |\n total = a * b = | D E F | * | M N O | = | DJ+EM+FP DK+EN+FQ DL+EO+FR |\n | G H I | | P Q R | | GJ+HM+IP GK+HN+IQ GL+HO+IR |\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param total Indicates the pointer to an <b>OH_Drawing_Matrix</b> object that a * b.\n @param a Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param b Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
4115 pub fn OH_Drawing_MatrixConcat(
4116 total: *mut OH_Drawing_Matrix,
4117 a: *const OH_Drawing_Matrix,
4118 b: *const OH_Drawing_Matrix,
4119 );
4120}
4121extern "C" {
4122 #[doc = " @brief Gets nine matrix values contained by matrix into array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param value Storages for nine matrix values.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if matrix or value is nullptr.\n @since 12\n @version 1.0"]
4123 pub fn OH_Drawing_MatrixGetAll(
4124 matrix: *mut OH_Drawing_Matrix,
4125 value: *mut f32,
4126 ) -> OH_Drawing_ErrorCode;
4127}
4128extern "C" {
4129 #[doc = " @brief Matrix a left-multiplied by matrix b.\n Given:\n | A B C | | J K L |\n a = | D E F |, b = | M N O |\n | G H I | | P Q R |\n Get:\n | J K L | | A B C | | AJ+DK+GL BJ+EK+HL CJ+FK+IL |\n b * a = | M N O | * | D E F | = | AM+DN+GO BM+EN+HO CM+FN+IO |\n | P Q R | | G H I | | AP+DQ+GR BP+EQ+HR CP+FQ+IR |\n @param a Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param b Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if a or b is nullptr.\n @since 22\n @version 1.0"]
4130 #[cfg(feature = "api-22")]
4131 pub fn OH_Drawing_MatrixPreConcat(
4132 a: *mut OH_Drawing_Matrix,
4133 b: *mut OH_Drawing_Matrix,
4134 ) -> OH_Drawing_ErrorCode;
4135}
4136extern "C" {
4137 #[doc = " @brief Get one matrix value. Index is between the range of 0-8.\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param index one of 0-8.\n @return Returns value corresponding to index.Returns 0 if out of range.\n @since 12\n @version 1.0"]
4138 pub fn OH_Drawing_MatrixGetValue(
4139 matrix: *mut OH_Drawing_Matrix,
4140 index: ::std::os::raw::c_int,
4141 ) -> f32;
4142}
4143extern "C" {
4144 #[doc = " @brief Sets matrix to rotate by degrees about a pivot point at (px, py). The pivot point is unchanged\n when mapped with matrix. Positive degrees rotates clockwise.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param degree Indicates the angle of axes relative to upright axes.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @since 12\n @version 1.0"]
4145 pub fn OH_Drawing_MatrixRotate(matrix: *mut OH_Drawing_Matrix, degree: f32, px: f32, py: f32);
4146}
4147extern "C" {
4148 #[doc = " @brief Sets matrix to translate by (dx, dy)\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param dx Indicates the horizontal translation.\n @param dy Indicates the vertical translation.\n @since 12\n @version 1.0"]
4149 pub fn OH_Drawing_MatrixTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
4150}
4151extern "C" {
4152 #[doc = " @brief Sets matrix to scale by sx and sy, about a pivot point at (px, py).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param sx Indicates the horizontal scale factor.\n @param sy Indicates the vertical scale factor.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @since 12\n @version 1.0"]
4153 pub fn OH_Drawing_MatrixScale(
4154 matrix: *mut OH_Drawing_Matrix,
4155 sx: f32,
4156 sy: f32,
4157 px: f32,
4158 py: f32,
4159 );
4160}
4161extern "C" {
4162 #[doc = " @brief Sets inverse to reciprocal matrix, returning true if matrix can be inverted.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param inverse Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns true if the matrix is not nullptr and can be inverted;\n returns false if the matrix is nullptr or cannot be inverted.\n @since 12\n @version 1.0"]
4163 pub fn OH_Drawing_MatrixInvert(
4164 matrix: *mut OH_Drawing_Matrix,
4165 inverse: *mut OH_Drawing_Matrix,
4166 ) -> bool;
4167}
4168extern "C" {
4169 #[doc = " @brief Sets the params of matrix to map src to dst.\n Count must greater than or equal to zero, and less than or equal to four.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param src Points to map from.\n @param dst Points to map to.\n @param count Number of point in src and dst.\n @return Returns true if matrix is constructed successfully.\n @since 12\n @version 1.0"]
4170 pub fn OH_Drawing_MatrixSetPolyToPoly(
4171 matrix: *mut OH_Drawing_Matrix,
4172 src: *const OH_Drawing_Point2D,
4173 dst: *const OH_Drawing_Point2D,
4174 count: u32,
4175 ) -> bool;
4176}
4177extern "C" {
4178 #[doc = " @brief Maps the src point array to the dst point array by matrix transformation.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param src Points to map from.\n @param dst Points to map to.\n @param count Number of point in src and dst.\n @since 12\n @version 1.0"]
4179 pub fn OH_Drawing_MatrixMapPoints(
4180 matrix: *const OH_Drawing_Matrix,
4181 src: *const OH_Drawing_Point2D,
4182 dst: *mut OH_Drawing_Point2D,
4183 count: ::std::os::raw::c_int,
4184 );
4185}
4186extern "C" {
4187 #[doc = " @brief Sets dst to bounds of src corners mapped by matrix transformation.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param src Rect to map from.\n @param dst Rect to map to.\n @return Returns true if the mapped src is equal to the dst; returns false is not equal.\n @since 12\n @version 1.0"]
4188 pub fn OH_Drawing_MatrixMapRect(
4189 matrix: *const OH_Drawing_Matrix,
4190 src: *const OH_Drawing_Rect,
4191 dst: *mut OH_Drawing_Rect,
4192 ) -> bool;
4193}
4194extern "C" {
4195 #[doc = " @brief Returns true if the first matrix equals the second matrix.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns true if the two matrices are equal; returns false if not equal.\n @since 12\n @version 1.0"]
4196 pub fn OH_Drawing_MatrixIsEqual(
4197 matrix: *mut OH_Drawing_Matrix,
4198 other: *mut OH_Drawing_Matrix,
4199 ) -> bool;
4200}
4201extern "C" {
4202 #[doc = " @brief Returns true if matrix is identity.\n Identity matrix is : | 1 0 0 |\n | 0 1 0 |\n | 0 0 1 |\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @return Returns true if matrix is identity; returns false if not identity.\n @since 12\n @version 1.0"]
4203 pub fn OH_Drawing_MatrixIsIdentity(matrix: *mut OH_Drawing_Matrix) -> bool;
4204}
4205extern "C" {
4206 #[doc = " @brief Checks if the matrix is affine. An affine matrix preserves straight lines and has no perspective.\n\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param isAffine Indicates if the matrix is affine.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if matrix or isAffine is nullptr.\n @since 23"]
4207 #[cfg(feature = "api-23")]
4208 pub fn OH_Drawing_MatrixIsAffine(
4209 matrix: *const OH_Drawing_Matrix,
4210 isAffine: *mut bool,
4211 ) -> OH_Drawing_ErrorCode;
4212}
4213extern "C" {
4214 #[doc = " @brief Sets matrix to matrix multiplied by matrix constructed from skewing by (kx, ky) about pivot point (px, py).\n\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param kx Indicates the horizontal skew factor.\n @param ky Indicates the vertical skew factor.\n @param px Indicates the pivot on x-axis.\n @param py Indicates the pivot on y-axis.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if matrix is nullptr.\n @since 23"]
4215 #[cfg(feature = "api-23")]
4216 pub fn OH_Drawing_MatrixPreSkew(
4217 matrix: *mut OH_Drawing_Matrix,
4218 kx: f32,
4219 ky: f32,
4220 px: f32,
4221 py: f32,
4222 ) -> OH_Drawing_ErrorCode;
4223}
4224extern "C" {
4225 #[doc = " @brief Checks if a rectangle will map to another rectangle after applying this matrix.\n\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param isRectStaysRect Indicates if the transformation keeps rectangles as rectangles.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if matrix or isRectStaysRect is nullptr.\n @since 23"]
4226 #[cfg(feature = "api-23")]
4227 pub fn OH_Drawing_MatrixRectStaysRect(
4228 matrix: *const OH_Drawing_Matrix,
4229 isRectStaysRect: *mut bool,
4230 ) -> OH_Drawing_ErrorCode;
4231}
4232extern "C" {
4233 #[doc = " @brief Sets the sine and cosine values for a rotation transformation around a point.\n\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param sinValue Indicates the sine of the angle of rotation.\n @param cosValue Indicates the cosine of the angle of rotation.\n @param px Indicates the x-coordinate of the point around which to rotate.\n @param py Indicates the y-coordinate of the point around which to rotate.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if matrix is nullptr.\n @since 23"]
4234 #[cfg(feature = "api-23")]
4235 pub fn OH_Drawing_MatrixSetSinCos(
4236 matrix: *mut OH_Drawing_Matrix,
4237 sinValue: f32,
4238 cosValue: f32,
4239 px: f32,
4240 py: f32,
4241 ) -> OH_Drawing_ErrorCode;
4242}
4243extern "C" {
4244 #[doc = " @brief Destroys an <b>OH_Drawing_Matrix</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 11\n @version 1.0"]
4245 pub fn OH_Drawing_MatrixDestroy(matrix: *mut OH_Drawing_Matrix);
4246}
4247extern "C" {
4248 #[doc = " @brief Creates a <b>OH_Drawing_MemoryStream</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_MemoryStream</b> object created.\n @param data file path.\n @param length Data length.\n @param copyData Copy data or not.\n @since 12\n @version 1.0"]
4249 pub fn OH_Drawing_MemoryStreamCreate(
4250 data: *const ::std::os::raw::c_void,
4251 length: usize,
4252 copyData: bool,
4253 ) -> *mut OH_Drawing_MemoryStream;
4254}
4255extern "C" {
4256 #[doc = " @brief Destroys an <b>OH_Drawing_MemoryStream</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param memoryStream Indicates the pointer to an <b>OH_Drawing_MemoryStream</b> object.\n @since 12\n @version 1.0"]
4257 pub fn OH_Drawing_MemoryStreamDestroy(memoryStream: *mut OH_Drawing_MemoryStream);
4258}
4259#[doc = " clockwise direction for adding closed contours"]
4260pub const OH_Drawing_PathDirection_PATH_DIRECTION_CW: OH_Drawing_PathDirection = 0;
4261#[doc = " counter-clockwise direction for adding closed contours"]
4262pub const OH_Drawing_PathDirection_PATH_DIRECTION_CCW: OH_Drawing_PathDirection = 1;
4263#[doc = " @brief Direction for adding closed contours.\n\n @since 12\n @version 1.0"]
4264pub type OH_Drawing_PathDirection = u32;
4265#[doc = " Specifies that \"inside\" is computed by a non-zero sum of signed edge crossings"]
4266pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_WINDING: OH_Drawing_PathFillType = 0;
4267#[doc = " Specifies that \"inside\" is computed by an odd number of edge crossings"]
4268pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_EVEN_ODD: OH_Drawing_PathFillType = 1;
4269#[doc = " Same as Winding, but draws outside of the path, rather than inside"]
4270pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_INVERSE_WINDING: OH_Drawing_PathFillType = 2;
4271#[doc = " Same as EvenOdd, but draws outside of the path, rather than inside"]
4272pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_INVERSE_EVEN_ODD: OH_Drawing_PathFillType = 3;
4273#[doc = " @brief FillType of path.\n\n @since 12\n @version 1.0"]
4274pub type OH_Drawing_PathFillType = u32;
4275#[doc = " Appended to destination unaltered"]
4276pub const OH_Drawing_PathAddMode_PATH_ADD_MODE_APPEND: OH_Drawing_PathAddMode = 0;
4277#[doc = " Add line if prior contour is not closed"]
4278pub const OH_Drawing_PathAddMode_PATH_ADD_MODE_EXTEND: OH_Drawing_PathAddMode = 1;
4279#[doc = " @brief Add mode of path.\n\n @since 12\n @version 1.0"]
4280pub type OH_Drawing_PathAddMode = u32;
4281#[doc = " Difference operation."]
4282pub const OH_Drawing_PathOpMode_PATH_OP_MODE_DIFFERENCE: OH_Drawing_PathOpMode = 0;
4283#[doc = " Intersect operation."]
4284pub const OH_Drawing_PathOpMode_PATH_OP_MODE_INTERSECT: OH_Drawing_PathOpMode = 1;
4285#[doc = " Union operation."]
4286pub const OH_Drawing_PathOpMode_PATH_OP_MODE_UNION: OH_Drawing_PathOpMode = 2;
4287#[doc = " Xor operation."]
4288pub const OH_Drawing_PathOpMode_PATH_OP_MODE_XOR: OH_Drawing_PathOpMode = 3;
4289#[doc = " Reverse difference operation."]
4290pub const OH_Drawing_PathOpMode_PATH_OP_MODE_REVERSE_DIFFERENCE: OH_Drawing_PathOpMode = 4;
4291#[doc = " @brief Operations when two paths are combined.\n\n @since 12\n @version 1.0"]
4292pub type OH_Drawing_PathOpMode = u32;
4293#[doc = " Gets position."]
4294pub const OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
4295 0;
4296#[doc = " Gets tangent."]
4297pub const OH_Drawing_PathMeasureMatrixFlags_GET_TANGENT_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
4298 1;
4299#[doc = " Gets both position and tangent."]
4300pub const OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_AND_TANGENT_MATRIX:
4301 OH_Drawing_PathMeasureMatrixFlags = 2;
4302#[doc = " @brief Enumerates the matrix information corresponding to the path measurements.\n\n @since 12\n @version 1.0"]
4303pub type OH_Drawing_PathMeasureMatrixFlags = u32;
4304extern "C" {
4305 #[doc = " @brief Creates an <b>OH_Drawing_Path</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Path</b> object created.\n @since 8\n @version 1.0"]
4306 pub fn OH_Drawing_PathCreate() -> *mut OH_Drawing_Path;
4307}
4308extern "C" {
4309 #[doc = " @brief Creates an <b>OH_Drawing_Path</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Path</b> object created.\n @since 12\n @version 1.0"]
4310 pub fn OH_Drawing_PathCopy(path: *mut OH_Drawing_Path) -> *mut OH_Drawing_Path;
4311}
4312extern "C" {
4313 #[doc = " @brief Destroys an <b>OH_Drawing_Path</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @since 8\n @version 1.0"]
4314 pub fn OH_Drawing_PathDestroy(path: *mut OH_Drawing_Path);
4315}
4316extern "C" {
4317 #[doc = " @brief Sets <b>OH_Drawing_Path</b> object with the same content of another.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object to copy content from.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or other is nullptr.\n @since 20\n @version 1.0"]
4318 #[cfg(feature = "api-20")]
4319 pub fn OH_Drawing_PathSetPath(
4320 path: *mut OH_Drawing_Path,
4321 other: *mut OH_Drawing_Path,
4322 ) -> OH_Drawing_ErrorCode;
4323}
4324extern "C" {
4325 #[doc = " @brief Checks if <b>OH_Drawing_Path</b> object is empty.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param isEmpty Indicates the return value.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or isEmpty is nullptr.\n @since 20\n @version 1.0"]
4326 #[cfg(feature = "api-20")]
4327 pub fn OH_Drawing_PathIsEmpty(
4328 path: *mut OH_Drawing_Path,
4329 isEmpty: *mut bool,
4330 ) -> OH_Drawing_ErrorCode;
4331}
4332extern "C" {
4333 #[doc = " @brief Checks if <b>OH_Drawing_Path</b> represents a rectangle.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the Pointer to an <b>OH_Drawing_Rect</b> object.\n @param isRect Indicates the return value.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or isRect is nullptr.\n @since 20\n @version 1.0"]
4334 #[cfg(feature = "api-20")]
4335 pub fn OH_Drawing_PathIsRect(
4336 path: *mut OH_Drawing_Path,
4337 rect: *mut OH_Drawing_Rect,
4338 isRect: *mut bool,
4339 ) -> OH_Drawing_ErrorCode;
4340}
4341extern "C" {
4342 #[doc = " @brief Sets the start point of a path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the start point.\n @param y Indicates the y coordinate of the start point.\n @since 8\n @version 1.0"]
4343 pub fn OH_Drawing_PathMoveTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
4344}
4345extern "C" {
4346 #[doc = " @brief Draws a line segment from the last point of a path to the target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the target point.\n @param y Indicates the y coordinate of the target point.\n @since 8\n @version 1.0"]
4347 pub fn OH_Drawing_PathLineTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
4348}
4349extern "C" {
4350 #[doc = " @brief Draws an arc to a path.\n\n This is done by using angle arc mode. In this mode, a rectangle that encloses an ellipse is specified first,\n and then a start angle and a sweep angle are specified.\n The arc is a portion of the ellipse defined by the start angle and the sweep angle.\n By default, a line segment from the last point of the path to the start point of the arc is also added.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x1 Indicates the x coordinate of the upper left corner of the rectangle.\n @param y1 Indicates the y coordinate of the upper left corner of the rectangle.\n @param x2 Indicates the x coordinate of the lower right corner of the rectangle.\n @param y2 Indicates the y coordinate of the lower right corner of the rectangle.\n @param startDeg Indicates the start angle, in degrees.\n @param sweepDeg Indicates the angle to sweep, in degrees.\n @since 8\n @version 1.0"]
4351 pub fn OH_Drawing_PathArcTo(
4352 path: *mut OH_Drawing_Path,
4353 x1: f32,
4354 y1: f32,
4355 x2: f32,
4356 y2: f32,
4357 startDeg: f32,
4358 sweepDeg: f32,
4359 );
4360}
4361extern "C" {
4362 #[doc = " @brief Draws a quadratic Bezier curve from the last point of a path to the target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX Indicates the x coordinate of the control point.\n @param ctrlY Indicates the y coordinate of the control point.\n @param endX Indicates the x coordinate of the target point.\n @param endY Indicates the y coordinate of the target point.\n @since 8\n @version 1.0"]
4363 pub fn OH_Drawing_PathQuadTo(
4364 path: *mut OH_Drawing_Path,
4365 ctrlX: f32,
4366 ctrlY: f32,
4367 endX: f32,
4368 endY: f32,
4369 );
4370}
4371extern "C" {
4372 #[doc = " @brief Draws a conic from the last point of a path to the target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX Indicates the x coordinate of the control point.\n @param ctrlY Indicates the y coordinate of the control point.\n @param endX Indicates the x coordinate of the target point.\n @param endY Indicates the y coordinate of the target point.\n @param weight Indicates the weight of added conic.\n @since 12\n @version 1.0"]
4373 pub fn OH_Drawing_PathConicTo(
4374 path: *mut OH_Drawing_Path,
4375 ctrlX: f32,
4376 ctrlY: f32,
4377 endX: f32,
4378 endY: f32,
4379 weight: f32,
4380 );
4381}
4382extern "C" {
4383 #[doc = " @brief Draws a cubic Bezier curve from the last point of a path to the target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX1 Indicates the x coordinate of the first control point.\n @param ctrlY1 Indicates the y coordinate of the first control point.\n @param ctrlX2 Indicates the x coordinate of the second control point.\n @param ctrlY2 Indicates the y coordinate of the second control point.\n @param endX Indicates the x coordinate of the target point.\n @param endY Indicates the y coordinate of the target point.\n @since 8\n @version 1.0"]
4384 pub fn OH_Drawing_PathCubicTo(
4385 path: *mut OH_Drawing_Path,
4386 ctrlX1: f32,
4387 ctrlY1: f32,
4388 ctrlX2: f32,
4389 ctrlY2: f32,
4390 endX: f32,
4391 endY: f32,
4392 );
4393}
4394extern "C" {
4395 #[doc = " @brief Sets the relative starting point of a path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the relative starting point.\n @param y Indicates the y coordinate of the relative starting point.\n @since 12\n @version 1.0"]
4396 pub fn OH_Drawing_PathRMoveTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
4397}
4398extern "C" {
4399 #[doc = " @brief Draws a line segment from the last point of a path to the relative target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the relative target point.\n @param y Indicates the y coordinate of the relative target point.\n @since 12\n @version 1.0"]
4400 pub fn OH_Drawing_PathRLineTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
4401}
4402extern "C" {
4403 #[doc = " @brief Draws a quadratic bezier curve from the last point of a path to the relative target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX Indicates the x coordinate of the relative control point.\n @param ctrlY Indicates the y coordinate of the relative control point.\n @param endX Indicates the x coordinate of the relative target point.\n @param endY Indicates the y coordinate of the relative target point.\n @since 12\n @version 1.0"]
4404 pub fn OH_Drawing_PathRQuadTo(
4405 path: *mut OH_Drawing_Path,
4406 ctrlX: f32,
4407 ctrlY: f32,
4408 endX: f32,
4409 endY: f32,
4410 );
4411}
4412extern "C" {
4413 #[doc = " @brief Draws a conic from the last point of a path to the relative target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX Indicates the x coordinate of the relative control point.\n @param ctrlY Indicates the y coordinate of the relative control point.\n @param endX Indicates the x coordinate of the relative target point.\n @param endY Indicates the y coordinate of the relative target point.\n @param weight Indicates the weight of added conic.\n @since 12\n @version 1.0"]
4414 pub fn OH_Drawing_PathRConicTo(
4415 path: *mut OH_Drawing_Path,
4416 ctrlX: f32,
4417 ctrlY: f32,
4418 endX: f32,
4419 endY: f32,
4420 weight: f32,
4421 );
4422}
4423extern "C" {
4424 #[doc = " @brief Draws a cubic bezier curve from the last point of a path to the relative target point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param ctrlX1 Indicates the x coordinate of the first relative control point.\n @param ctrlY1 Indicates the y coordinate of the first relative control point.\n @param ctrlX2 Indicates the x coordinate of the second relative control point.\n @param ctrlY2 Indicates the y coordinate of the second relative control point.\n @param endX Indicates the x coordinate of the relative target point.\n @param endY Indicates the y coordinate of the relative target point.\n @since 12\n @version 1.0"]
4425 pub fn OH_Drawing_PathRCubicTo(
4426 path: *mut OH_Drawing_Path,
4427 ctrlX1: f32,
4428 ctrlY1: f32,
4429 ctrlX2: f32,
4430 ctrlY2: f32,
4431 endX: f32,
4432 endY: f32,
4433 );
4434}
4435extern "C" {
4436 #[doc = " @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param left Indicates the left coordinate of the upper left corner of the rectangle.\n @param top Indicates the top coordinate of the upper top corner of the rectangle.\n @param right Indicates the right coordinate of the lower right corner of the rectangle.\n @param bottom Indicates the bottom coordinate of the lower bottom corner of the rectangle.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
4437 pub fn OH_Drawing_PathAddRect(
4438 path: *mut OH_Drawing_Path,
4439 left: f32,
4440 top: f32,
4441 right: f32,
4442 bottom: f32,
4443 pathDirection: OH_Drawing_PathDirection,
4444 );
4445}
4446extern "C" {
4447 #[doc = " @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param pathDirection Indicates the path direction.\n @param start Indicates initial corner of rect to add.\n @since 12\n @version 1.0"]
4448 pub fn OH_Drawing_PathAddRectWithInitialCorner(
4449 path: *mut OH_Drawing_Path,
4450 rect: *const OH_Drawing_Rect,
4451 pathDirection: OH_Drawing_PathDirection,
4452 start: u32,
4453 );
4454}
4455extern "C" {
4456 #[doc = " @brief Adds a new contour to the path, defined by the round rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
4457 pub fn OH_Drawing_PathAddRoundRect(
4458 path: *mut OH_Drawing_Path,
4459 roundRect: *const OH_Drawing_RoundRect,
4460 pathDirection: OH_Drawing_PathDirection,
4461 );
4462}
4463extern "C" {
4464 #[doc = " @brief Adds a oval to the path, defined by the rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param start Index of initial point of ellipse.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
4465 pub fn OH_Drawing_PathAddOvalWithInitialPoint(
4466 path: *mut OH_Drawing_Path,
4467 rect: *const OH_Drawing_Rect,
4468 start: u32,
4469 pathDirection: OH_Drawing_PathDirection,
4470 );
4471}
4472extern "C" {
4473 #[doc = " @brief Adds a oval to the path, defined by the rect, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
4474 pub fn OH_Drawing_PathAddOval(
4475 path: *mut OH_Drawing_Path,
4476 rect: *const OH_Drawing_Rect,
4477 pathDirection: OH_Drawing_PathDirection,
4478 );
4479}
4480extern "C" {
4481 #[doc = " @brief Appends arc to path, as the start of new contour.Arc added is part of ellipse bounded by oval,\n from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees\n is aligned with the positive x-axis, and positive sweeps extends arc clockwise.If sweepAngle <= -360, or\n sweepAngle >= 360; and startAngle modulo 90 is nearly zero, append oval instead of arc. Otherwise, sweepAngle\n values are treated modulo 360, and arc may or may not draw depending on numeric rounding.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param startAngle Indicates the starting angle of arc in degrees.\n @param sweepAngle Indicates the sweep, in degrees. Positive is clockwise.\n @since 12\n @version 1.0"]
4482 pub fn OH_Drawing_PathAddArc(
4483 path: *mut OH_Drawing_Path,
4484 rect: *const OH_Drawing_Rect,
4485 startAngle: f32,
4486 sweepAngle: f32,
4487 );
4488}
4489extern "C" {
4490 #[doc = " @brief Appends src path to path, transformed by matrix. Transformed curves may have different verbs,\n point, and conic weights.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
4491 pub fn OH_Drawing_PathAddPath(
4492 path: *mut OH_Drawing_Path,
4493 src: *const OH_Drawing_Path,
4494 matrix: *const OH_Drawing_Matrix,
4495 );
4496}
4497extern "C" {
4498 #[doc = " @brief Appends src path to path, transformed by matrix and mode. Transformed curves may have different verbs,\n point, and conic weights.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.\n @param pathAddMode Indicates the add path's add mode.\n @since 12\n @version 1.0"]
4499 pub fn OH_Drawing_PathAddPathWithMatrixAndMode(
4500 path: *mut OH_Drawing_Path,
4501 src: *const OH_Drawing_Path,
4502 matrix: *const OH_Drawing_Matrix,
4503 pathAddMode: OH_Drawing_PathAddMode,
4504 );
4505}
4506extern "C" {
4507 #[doc = " @brief Appends src path to path, transformed by mode. Transformed curves may have different verbs,\n point, and conic weights.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object, which is Appends src path to path.\n @param pathAddMode Indicates the add path's add mode.\n @since 12\n @version 1.0"]
4508 pub fn OH_Drawing_PathAddPathWithMode(
4509 path: *mut OH_Drawing_Path,
4510 src: *const OH_Drawing_Path,
4511 pathAddMode: OH_Drawing_PathAddMode,
4512 );
4513}
4514extern "C" {
4515 #[doc = " @brief Appends src path to path, transformed by offset and mode. Transformed curves may have different verbs,\n point, and conic weights.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param dx Indicates offset added to src path x-axis coordinates.\n @param dy Indicates offset added to src path y-axis coordinates.\n @param pathAddMode Indicates the add path's add mode.\n @since 12\n @version 1.0"]
4516 pub fn OH_Drawing_PathAddPathWithOffsetAndMode(
4517 path: *mut OH_Drawing_Path,
4518 src: *const OH_Drawing_Path,
4519 dx: f32,
4520 dy: f32,
4521 pathAddMode: OH_Drawing_PathAddMode,
4522 );
4523}
4524extern "C" {
4525 #[doc = " @brief Adds contour created from point array, adding (count - 1) line segments.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param points Indicates the point array.\n @param count Indicates the size of point array.\n @param isClosed Indicates Whether to add lines that connect the end and start.\n @since 12\n @version 1.0"]
4526 pub fn OH_Drawing_PathAddPolygon(
4527 path: *mut OH_Drawing_Path,
4528 points: *const OH_Drawing_Point2D,
4529 count: u32,
4530 isClosed: bool,
4531 );
4532}
4533extern "C" {
4534 #[doc = " @brief Adds a circle to the path, and wound in the specified direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x coordinate of the center of the circle.\n @param y Indicates the y coordinate of the center of the circle.\n @param radius Indicates the radius of the circle.\n @param pathDirection Indicates the path direction.\n @since 12\n @version 1.0"]
4535 pub fn OH_Drawing_PathAddCircle(
4536 path: *mut OH_Drawing_Path,
4537 x: f32,
4538 y: f32,
4539 radius: f32,
4540 pathDirection: OH_Drawing_PathDirection,
4541 );
4542}
4543extern "C" {
4544 #[doc = " @brief Parses the svg path from the string.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param str Indicates the string of the SVG path.\n @return Returns true if build path is successful, returns false otherwise.\n @since 12\n @version 1.0"]
4545 pub fn OH_Drawing_PathBuildFromSvgString(
4546 path: *mut OH_Drawing_Path,
4547 str_: *const ::std::os::raw::c_char,
4548 ) -> bool;
4549}
4550extern "C" {
4551 #[doc = " @brief Return the status that point (x, y) is contained by path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param x Indicates the x-axis value of containment test.\n @param y Indicates the y-axis value of containment test.\n @return Returns true if the point (x, y) is contained by path.\n @since 12\n @version 1.0"]
4552 pub fn OH_Drawing_PathContains(path: *mut OH_Drawing_Path, x: f32, y: f32) -> bool;
4553}
4554extern "C" {
4555 #[doc = " @brief Transforms verb array, point array, and weight by matrix. transform may change verbs\n and increase their number. path is replaced by transformed data.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @since 12\n @version 1.0"]
4556 pub fn OH_Drawing_PathTransform(path: *mut OH_Drawing_Path, matrix: *const OH_Drawing_Matrix);
4557}
4558extern "C" {
4559 #[doc = " @brief Transforms verb array, point array, and weight by matrix.\n Transform may change verbs and increase their number.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param dst Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param applyPerspectiveClip Indicates whether to apply perspective clip.\n @since 12\n @version 1.0"]
4560 pub fn OH_Drawing_PathTransformWithPerspectiveClip(
4561 src: *mut OH_Drawing_Path,
4562 matrix: *const OH_Drawing_Matrix,
4563 dst: *mut OH_Drawing_Path,
4564 applyPerspectiveClip: bool,
4565 );
4566}
4567extern "C" {
4568 #[doc = " @brief Sets FillType, the rule used to fill path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param pathFillType Indicates the add path's fill type.\n @since 12\n @version 1.0"]
4569 pub fn OH_Drawing_PathSetFillType(
4570 path: *mut OH_Drawing_Path,
4571 pathFillType: OH_Drawing_PathFillType,
4572 );
4573}
4574extern "C" {
4575 #[doc = " @brief Gets FillType, the rule used to fill path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param pathFillType Indicates the FillType apply to path.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or pathFillType is nullptr.\n @since 20\n @version 1.0"]
4576 #[cfg(feature = "api-20")]
4577 pub fn OH_Drawing_PathGetFillType(
4578 path: *mut OH_Drawing_Path,
4579 pathFillType: *mut OH_Drawing_PathFillType,
4580 ) -> OH_Drawing_ErrorCode;
4581}
4582extern "C" {
4583 #[doc = " @brief Gets the length of the current path object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Indicates whether free to modify/delete the path after this call.\n @return Returns the length of the current path object.\n @since 12\n @version 1.0"]
4584 pub fn OH_Drawing_PathGetLength(path: *mut OH_Drawing_Path, forceClosed: bool) -> f32;
4585}
4586extern "C" {
4587 #[doc = " @brief Gets the smallest bounding box that contains the path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
4588 pub fn OH_Drawing_PathGetBounds(path: *mut OH_Drawing_Path, rect: *mut OH_Drawing_Rect);
4589}
4590extern "C" {
4591 #[doc = " @brief Closes a path. A line segment from the start point to the last point of the path is added.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @since 8\n @version 1.0"]
4592 pub fn OH_Drawing_PathClose(path: *mut OH_Drawing_Path);
4593}
4594extern "C" {
4595 #[doc = " @brief Offset path replaces dst.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param dst Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param dx Indicates offset added to dst path x-axis coordinates.\n @param dy Indicates offset added to dst path y-axis coordinates.\n @since 12\n @version 1.0"]
4596 pub fn OH_Drawing_PathOffset(
4597 path: *mut OH_Drawing_Path,
4598 dst: *mut OH_Drawing_Path,
4599 dx: f32,
4600 dy: f32,
4601 );
4602}
4603extern "C" {
4604 #[doc = " @brief Resets path data.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @since 8\n @version 1.0"]
4605 pub fn OH_Drawing_PathReset(path: *mut OH_Drawing_Path);
4606}
4607extern "C" {
4608 #[doc = " @brief Determines whether the path current contour is closed.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Whether to close the Path.\n @return Returns <b>true</b> if the path current contour is closed; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
4609 pub fn OH_Drawing_PathIsClosed(path: *mut OH_Drawing_Path, forceClosed: bool) -> bool;
4610}
4611extern "C" {
4612 #[doc = " @brief Gets the position and tangent of the distance from the starting position of the Path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Whether to close the Path.\n @param distance The distance from the start of the Path.\n @param position Sets to the position of distance from the starting position of the Path.\n @param tangent Sets to the tangent of distance from the starting position of the Path.\n @return Returns <b>true</b> if succeeded; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
4613 pub fn OH_Drawing_PathGetPositionTangent(
4614 path: *mut OH_Drawing_Path,
4615 forceClosed: bool,
4616 distance: f32,
4617 position: *mut OH_Drawing_Point2D,
4618 tangent: *mut OH_Drawing_Point2D,
4619 ) -> bool;
4620}
4621extern "C" {
4622 #[doc = " @brief Gets the path between the start and end points.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Whether to close the path.\n @param start The distance from the starting point of the segment to the starting point of the path.\n @param stop The distance from the end point of the segment to the starting point of the path.\n @param startWithMoveTo Whether the path obtained moveTo to the starting segment.\n @param dst The path obtained.\n @param result Indicates the result of getting the path segment.\n The value is false if the segment is zero-length or start >= stop, and true otherwise.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of path, dst and result is nullptr.\n @since 18\n @version 1.0"]
4623 #[cfg(feature = "api-18")]
4624 pub fn OH_Drawing_PathGetSegment(
4625 path: *mut OH_Drawing_Path,
4626 forceClosed: bool,
4627 start: f32,
4628 stop: f32,
4629 startWithMoveTo: bool,
4630 dst: *mut OH_Drawing_Path,
4631 result: *mut bool,
4632 ) -> OH_Drawing_ErrorCode;
4633}
4634extern "C" {
4635 #[doc = " @brief Combines two paths.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param op Indicates the operation to apply to combine.\n @return Returns <b>true</b> if constructed path is not empty; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
4636 pub fn OH_Drawing_PathOp(
4637 path: *mut OH_Drawing_Path,
4638 other: *const OH_Drawing_Path,
4639 op: OH_Drawing_PathOpMode,
4640 ) -> bool;
4641}
4642extern "C" {
4643 #[doc = " @brief Computes the corresponding matrix at the specified distance.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param forceClosed Whether to close the Path.\n @param distance The distance from the start of the Path.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.\n @param flag Indicates what should be returned in the matrix.\n @return Returns <b>false</b> if path is nullptr or zero-length;\nreturns <b>true</b> if path is not nullptr and not zero-length.\n @since 12\n @version 1.0"]
4644 pub fn OH_Drawing_PathGetMatrix(
4645 path: *mut OH_Drawing_Path,
4646 forceClosed: bool,
4647 distance: f32,
4648 matrix: *mut OH_Drawing_Matrix,
4649 flag: OH_Drawing_PathMeasureMatrixFlags,
4650 ) -> bool;
4651}
4652extern "C" {
4653 #[doc = " @brief Approximates the path with a series of line segments.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param acceptableError Indicates the acceptable error for a line on the path. Should be no less than 0.\n @param vals Indicates the storage for the computed array containing point components.\n There are three components for each point:\n 1.Fraction along the length of the path that the point resides.\n 2.The x coordinate of the point.\n 3.The y coordinate of the point.\n @param count Returns with the size of array.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path or count is nullptr.\n Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if acceptableError is less than 0.\n @since 20\n @version 1.0"]
4654 #[cfg(feature = "api-20")]
4655 pub fn OH_Drawing_PathApproximate(
4656 path: *mut OH_Drawing_Path,
4657 acceptableError: f32,
4658 vals: *mut f32,
4659 count: *mut u32,
4660 ) -> OH_Drawing_ErrorCode;
4661}
4662extern "C" {
4663 #[doc = " @brief Performs interpolation between the current path and another path based on a given weight, and stores the\n result in the target path object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object to be interpolated with path.\n @param weight Indicates the interpolation weight, which must be in the range [0, 1].\n @param success Indicates the interpolation is success or not.\n @param interpolatedPath Indicates the pointer to an <b>OH_Drawing_Path</b> object to store the result.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if either path, other, success or interpolatedPath is\n nullptr.\n Returns {@link OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE} if weight is outside the range [0, 1].\n @since 20\n @version 1.0"]
4664 #[cfg(feature = "api-20")]
4665 pub fn OH_Drawing_PathInterpolate(
4666 path: *mut OH_Drawing_Path,
4667 other: *mut OH_Drawing_Path,
4668 weight: f32,
4669 success: *mut bool,
4670 interpolatedPath: *mut OH_Drawing_Path,
4671 ) -> OH_Drawing_ErrorCode;
4672}
4673extern "C" {
4674 #[doc = " @brief Checks whether the current path is compatible with another path (other) for interpolation, which means\n they have exactly the same structure, both paths must have the same operations, in the same order.\n If any of the operations are of type CONIC, then the weights of those conics must also match.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object to be interpolated with path.\n @param result Indicates whether the current path and the other path are compatible for interpolation.\n The value is true if the paths are compatible, and false otherwise.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if either path, other or result is nullptr.\n @since 20\n @version 1.0"]
4675 #[cfg(feature = "api-20")]
4676 pub fn OH_Drawing_PathIsInterpolate(
4677 path: *mut OH_Drawing_Path,
4678 other: *mut OH_Drawing_Path,
4679 result: *mut bool,
4680 ) -> OH_Drawing_ErrorCode;
4681}
4682extern "C" {
4683 #[doc = " @brief Checks if the fill type is one of the INVERSE variants.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param isInverse Indicates if the filltype is one of the INVERSE variants.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if path or isInverse is nullptr.\n @since 23\n @version 1.0"]
4684 #[cfg(feature = "api-23")]
4685 pub fn OH_Drawing_PathIsInverseFillType(
4686 path: *const OH_Drawing_Path,
4687 isInverse: *mut bool,
4688 ) -> OH_Drawing_ErrorCode;
4689}
4690extern "C" {
4691 #[doc = " @brief Toggles the INVERSE state of the filltype.\n\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if path is nullptr.\n @since 23\n @version 1.0"]
4692 #[cfg(feature = "api-23")]
4693 pub fn OH_Drawing_PathToggleInverseFillType(path: *mut OH_Drawing_Path)
4694 -> OH_Drawing_ErrorCode;
4695}
4696#[doc = " Indicates translation effect."]
4697#[cfg(feature = "api-18")]
4698pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_TRANSLATE: OH_Drawing_PathDashStyle = 0;
4699#[doc = " Indicates rotation effect."]
4700#[cfg(feature = "api-18")]
4701pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_ROTATE: OH_Drawing_PathDashStyle = 1;
4702#[doc = " Indicates morph effect."]
4703#[cfg(feature = "api-18")]
4704pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_MORPH: OH_Drawing_PathDashStyle = 2;
4705#[doc = " @brief Enumerate path dash style.\n\n @since 18\n @version 1.0"]
4706#[cfg(feature = "api-18")]
4707pub type OH_Drawing_PathDashStyle = u32;
4708extern "C" {
4709 #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object that is a combination of paths,\n applying the inner path effect first and then the outer path effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param outer Indicates an <b>OH_Drawing_PathEffect</b> object\n @param inner Indicates an <b>OH_Drawing_PathEffect</b> object\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n @since 18\n @version 1.0"]
4710 #[cfg(feature = "api-18")]
4711 pub fn OH_Drawing_CreateComposePathEffect(
4712 outer: *mut OH_Drawing_PathEffect,
4713 inner: *mut OH_Drawing_PathEffect,
4714 ) -> *mut OH_Drawing_PathEffect;
4715}
4716extern "C" {
4717 #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object\n that turns the included angle of the path into a fillet of a specified radius.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param radius Indicates the degree of curvature of the arc, the radius must be greater than zero.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is radius is zero or less.\n @since 18\n @version 1.0"]
4718 #[cfg(feature = "api-18")]
4719 pub fn OH_Drawing_CreateCornerPathEffect(radius: f32) -> *mut OH_Drawing_PathEffect;
4720}
4721extern "C" {
4722 #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param intervals Indicates a array which contain an even number of entries.\n @param count Indicates the number of elements of the intervals array.\n @param phase Indicates the offset into intervals array.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n @since 12\n @version 1.0"]
4723 pub fn OH_Drawing_CreateDashPathEffect(
4724 intervals: *mut f32,
4725 count: ::std::os::raw::c_int,
4726 phase: f32,
4727 ) -> *mut OH_Drawing_PathEffect;
4728}
4729extern "C" {
4730 #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object\n that breaks the path and creates an irregular distribution on the path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param segLength Indicates the maximum segment length of the path.\n @param deviation Indicates the deviation during drawing.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n @since 18\n @version 1.0"]
4731 #[cfg(feature = "api-18")]
4732 pub fn OH_Drawing_CreateDiscretePathEffect(
4733 segLength: f32,
4734 deviation: f32,
4735 ) -> *mut OH_Drawing_PathEffect;
4736}
4737extern "C" {
4738 #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object and sets the path effect to a dash effect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param advance Indicates the distance between the dashed segments.\n @param phase Indicates the offset into intervals array.\n @param type Indicates the type of the path dash effect.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is advance and phase are zero or less.\n @since 18\n @version 1.0"]
4739 #[cfg(feature = "api-18")]
4740 pub fn OH_Drawing_CreatePathDashEffect(
4741 path: *const OH_Drawing_Path,
4742 advance: f32,
4743 phase: f32,
4744 type_: OH_Drawing_PathDashStyle,
4745 ) -> *mut OH_Drawing_PathEffect;
4746}
4747extern "C" {
4748 #[doc = " @brief Creates an <b>OH_Drawing_PathEffect</b> object by overlaying two path effects.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param firstPathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.\n @param secondPathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.\n @return Returns the pointer to the <b>OH_Drawing_PathEffect</b> object created.\n @since 18\n @version 1.0"]
4749 #[cfg(feature = "api-18")]
4750 pub fn OH_Drawing_CreateSumPathEffect(
4751 firstPathEffect: *mut OH_Drawing_PathEffect,
4752 secondPathEffect: *mut OH_Drawing_PathEffect,
4753 ) -> *mut OH_Drawing_PathEffect;
4754}
4755extern "C" {
4756 #[doc = " @brief Destroys an <b>OH_Drawing_PathEffect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.\n @since 12\n @version 1.0"]
4757 pub fn OH_Drawing_PathEffectDestroy(pathEffect: *mut OH_Drawing_PathEffect);
4758}
4759extern "C" {
4760 #[doc = " @brief Creates an <b>OH_Drawing_Pen</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Pen</b> object created.\n @since 8\n @version 1.0"]
4761 pub fn OH_Drawing_PenCreate() -> *mut OH_Drawing_Pen;
4762}
4763extern "C" {
4764 #[doc = " @brief Creates an <b>OH_Drawing_Pen</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Pen</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty or a nullptr is passed.\n @since 12\n @version 1.0"]
4765 pub fn OH_Drawing_PenCopy(pen: *mut OH_Drawing_Pen) -> *mut OH_Drawing_Pen;
4766}
4767extern "C" {
4768 #[doc = " @brief Destroys an <b>OH_Drawing_Pen</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @since 8\n @version 1.0"]
4769 pub fn OH_Drawing_PenDestroy(pen: *mut OH_Drawing_Pen);
4770}
4771extern "C" {
4772 #[doc = " @brief Checks whether anti-aliasing is enabled for a pen. If anti-aliasing is enabled,\n edges will be drawn with partial transparency.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns <b>true</b> if anti-aliasing is enabled; returns <b>false</b> otherwise.\n @since 8\n @version 1.0"]
4773 pub fn OH_Drawing_PenIsAntiAlias(pen: *const OH_Drawing_Pen) -> bool;
4774}
4775extern "C" {
4776 #[doc = " @brief Enables or disables anti-aliasing for a pen. If anti-aliasing is enabled,\n edges will be drawn with partial transparency.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param antiAlias Specifies whether to enable anti-aliasing. The value <b>true</b> means\n to enable anti-aliasing, and <b>false</b> means the opposite.\n @since 8\n @version 1.0"]
4777 pub fn OH_Drawing_PenSetAntiAlias(pen: *mut OH_Drawing_Pen, antiAlias: bool);
4778}
4779extern "C" {
4780 #[doc = " @brief Obtains the color of a pen. The color is used by the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns a 32-bit (ARGB) variable that describes the color.\n @since 8\n @version 1.0"]
4781 pub fn OH_Drawing_PenGetColor(pen: *const OH_Drawing_Pen) -> u32;
4782}
4783extern "C" {
4784 #[doc = " @brief Sets the color for a pen. The color is used by the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param color Indicates the color to set, which is a 32-bit (ARGB) variable.\n @since 8\n @version 1.0"]
4785 pub fn OH_Drawing_PenSetColor(pen: *mut OH_Drawing_Pen, color: u32);
4786}
4787extern "C" {
4788 #[doc = " @brief Obtains the alpha of a pen. The alpha is used by the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns a 8-bit variable that describes the alpha.\n @since 11\n @version 1.0"]
4789 pub fn OH_Drawing_PenGetAlpha(pen: *const OH_Drawing_Pen) -> u8;
4790}
4791extern "C" {
4792 #[doc = " @brief Sets the alpha for a pen. The alpha is used by the pen to outline a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param alpha Indicates the alpha to set, which is a 8-bit variable.\n @since 11\n @version 1.0"]
4793 pub fn OH_Drawing_PenSetAlpha(pen: *mut OH_Drawing_Pen, alpha: u8);
4794}
4795extern "C" {
4796 #[doc = " @brief Sets the color for a pen. The color will be used by the pen to fill in a shape.\n The color is an ARGB structure described by floating point numbers and interpreted as being in the colorSpaceManager.\n If colorSpaceManager is nullptr, then color is assumed to be in the sRGB color space.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param a Indicates the alpha component of color, represented as a floating point number between 0 and 1.\n @param r Indicates the red component of color, represented as a floating point number between 0 and 1.\n @param g Indicates the green component of color, represented as a floating point number between 0 and 1.\n @param b Indicates the blue component of color, represented as a floating point number between 0 and 1.\n @param colorSpaceManager Indicates the pointer to an <b>OH_NativeColorSpaceManager</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen is nullptr.\n @since 20\n @version 1.0"]
4797 #[cfg(feature = "api-20")]
4798 pub fn OH_Drawing_PenSetColor4f(
4799 pen: *mut OH_Drawing_Pen,
4800 a: f32,
4801 r: f32,
4802 g: f32,
4803 b: f32,
4804 colorSpaceManager: *mut OH_NativeColorSpaceManager,
4805 ) -> OH_Drawing_ErrorCode;
4806}
4807extern "C" {
4808 #[doc = " @brief Obtains the alpha component of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param a Indicates the alpha component of color.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or a is nullptr.\n @since 20\n @version 1.0"]
4809 #[cfg(feature = "api-20")]
4810 pub fn OH_Drawing_PenGetAlphaFloat(
4811 pen: *mut OH_Drawing_Pen,
4812 a: *mut f32,
4813 ) -> OH_Drawing_ErrorCode;
4814}
4815extern "C" {
4816 #[doc = " @brief Obtains the red component of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param r Indicates the red component of color.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or r is nullptr.\n @since 20\n @version 1.0"]
4817 #[cfg(feature = "api-20")]
4818 pub fn OH_Drawing_PenGetRedFloat(pen: *mut OH_Drawing_Pen, r: *mut f32)
4819 -> OH_Drawing_ErrorCode;
4820}
4821extern "C" {
4822 #[doc = " @brief Obtains the green component of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param g Indicates the green component of color.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or g is nullptr.\n @since 20\n @version 1.0"]
4823 #[cfg(feature = "api-20")]
4824 pub fn OH_Drawing_PenGetGreenFloat(
4825 pen: *mut OH_Drawing_Pen,
4826 g: *mut f32,
4827 ) -> OH_Drawing_ErrorCode;
4828}
4829extern "C" {
4830 #[doc = " @brief Obtains the blue component of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param b Indicates the blue component of color.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or b is nullptr.\n @since 20\n @version 1.0"]
4831 #[cfg(feature = "api-20")]
4832 pub fn OH_Drawing_PenGetBlueFloat(
4833 pen: *mut OH_Drawing_Pen,
4834 b: *mut f32,
4835 ) -> OH_Drawing_ErrorCode;
4836}
4837extern "C" {
4838 #[doc = " @brief Obtains the thickness of a pen. This thickness determines the width of the outline of a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the thickness.\n @since 8\n @version 1.0"]
4839 pub fn OH_Drawing_PenGetWidth(pen: *const OH_Drawing_Pen) -> f32;
4840}
4841extern "C" {
4842 #[doc = " @brief Sets the thickness for a pen. This thickness determines the width of the outline of a shape.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param width Indicates the thickness to set, which is a variable.\n @since 8\n @version 1.0"]
4843 pub fn OH_Drawing_PenSetWidth(pen: *mut OH_Drawing_Pen, width: f32);
4844}
4845extern "C" {
4846 #[doc = " @brief Obtains the stroke miter limit of a polyline drawn by a pen.\n\n When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded,\n and a mitered corner is displayed if the miter limit is not exceeded.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the miter limit.\n @since 8\n @version 1.0"]
4847 pub fn OH_Drawing_PenGetMiterLimit(pen: *const OH_Drawing_Pen) -> f32;
4848}
4849extern "C" {
4850 #[doc = " @brief Sets the stroke miter limit for a polyline drawn by a pen.\n\n When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded,\n and a mitered corner is displayed if the miter limit is not exceeded.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param miter Indicates a variable that describes the miter limit.\n @since 8\n @version 1.0"]
4851 pub fn OH_Drawing_PenSetMiterLimit(pen: *mut OH_Drawing_Pen, miter: f32);
4852}
4853#[doc = " There is no cap style. Both ends of the line segment are cut off square."]
4854pub const OH_Drawing_PenLineCapStyle_LINE_FLAT_CAP: OH_Drawing_PenLineCapStyle = 0;
4855#[doc = " Square cap style. Both ends have a square, the height of which\n is half of the width of the line segment, with the same width."]
4856pub const OH_Drawing_PenLineCapStyle_LINE_SQUARE_CAP: OH_Drawing_PenLineCapStyle = 1;
4857#[doc = " Round cap style. Both ends have a semicircle centered, the diameter of which\n is the same as the width of the line segment."]
4858pub const OH_Drawing_PenLineCapStyle_LINE_ROUND_CAP: OH_Drawing_PenLineCapStyle = 2;
4859#[doc = " @brief Enumerates line cap styles of a pen. The line cap style defines\n the style of both ends of a line segment drawn by the pen.\n\n @since 8\n @version 1.0"]
4860pub type OH_Drawing_PenLineCapStyle = u32;
4861extern "C" {
4862 #[doc = " @brief Obtains the line cap style of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the line cap style.\n @since 8\n @version 1.0"]
4863 pub fn OH_Drawing_PenGetCap(pen: *const OH_Drawing_Pen) -> OH_Drawing_PenLineCapStyle;
4864}
4865extern "C" {
4866 #[doc = " @brief Sets the line cap style for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param capStyle Indicates a variable that describes the line cap style.\n @since 8\n @version 1.0"]
4867 pub fn OH_Drawing_PenSetCap(pen: *mut OH_Drawing_Pen, capStyle: OH_Drawing_PenLineCapStyle);
4868}
4869#[doc = " Mitered corner. If the angle of a polyline is small, its miter length may be inappropriate.\n In this case, you need to use the miter limit to limit the miter length."]
4870pub const OH_Drawing_PenLineJoinStyle_LINE_MITER_JOIN: OH_Drawing_PenLineJoinStyle = 0;
4871#[doc = " Round corner."]
4872pub const OH_Drawing_PenLineJoinStyle_LINE_ROUND_JOIN: OH_Drawing_PenLineJoinStyle = 1;
4873#[doc = " Beveled corner."]
4874pub const OH_Drawing_PenLineJoinStyle_LINE_BEVEL_JOIN: OH_Drawing_PenLineJoinStyle = 2;
4875#[doc = " @brief Enumerates pen line join styles. The line join style defines\n the shape of the joints of a polyline segment drawn by the pen.\n\n @since 8\n @version 1.0"]
4876pub type OH_Drawing_PenLineJoinStyle = u32;
4877extern "C" {
4878 #[doc = " @brief Obtains the line join style of a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @return Returns the line join style.\n @since 8\n @version 1.0"]
4879 pub fn OH_Drawing_PenGetJoin(pen: *const OH_Drawing_Pen) -> OH_Drawing_PenLineJoinStyle;
4880}
4881extern "C" {
4882 #[doc = " @brief Sets the line join style for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param joinStyle Indicates a variable that describes the line join style.\n @since 8\n @version 1.0"]
4883 pub fn OH_Drawing_PenSetJoin(pen: *mut OH_Drawing_Pen, joinStyle: OH_Drawing_PenLineJoinStyle);
4884}
4885extern "C" {
4886 #[doc = " @brief Sets the shaderEffect for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.\n @since 11\n @version 1.0"]
4887 pub fn OH_Drawing_PenSetShaderEffect(
4888 pen: *mut OH_Drawing_Pen,
4889 shaderEffect: *mut OH_Drawing_ShaderEffect,
4890 );
4891}
4892extern "C" {
4893 #[doc = " @brief Sets the shadowLayer for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.\n @since 12\n @version 1.0"]
4894 pub fn OH_Drawing_PenSetShadowLayer(
4895 pen: *mut OH_Drawing_Pen,
4896 shadowLayer: *mut OH_Drawing_ShadowLayer,
4897 );
4898}
4899extern "C" {
4900 #[doc = " @brief Sets the pathEffect for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param pathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.\n @since 12\n @version 1.0"]
4901 pub fn OH_Drawing_PenSetPathEffect(
4902 pen: *mut OH_Drawing_Pen,
4903 pathEffect: *mut OH_Drawing_PathEffect,
4904 );
4905}
4906extern "C" {
4907 #[doc = " @brief Sets the filter for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 11\n @version 1.0"]
4908 pub fn OH_Drawing_PenSetFilter(pen: *mut OH_Drawing_Pen, filter: *mut OH_Drawing_Filter);
4909}
4910extern "C" {
4911 #[doc = " @brief Gets the filter from a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.\n @since 12\n @version 1.0"]
4912 pub fn OH_Drawing_PenGetFilter(pen: *mut OH_Drawing_Pen, filter: *mut OH_Drawing_Filter);
4913}
4914extern "C" {
4915 #[doc = " @brief Sets a blender that implements the specified blendmode enum for a pen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param blendMode Indicates the blend mode.\n @since 12\n @version 1.0"]
4916 pub fn OH_Drawing_PenSetBlendMode(pen: *mut OH_Drawing_Pen, blendMode: OH_Drawing_BlendMode);
4917}
4918extern "C" {
4919 #[doc = " @brief Gets the filled equivalent of the src path.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @param src Indicates the Path read to create a filled version.\n @param dst Indicates the resulting Path.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object that limits the PathEffect area if\nPen has PathEffect.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object that tranfomation applied to\nPathEffect if Pen has PathEffect.\n @return Returns true if get successes; false if get fails.\n @since 12\n @version 1.0"]
4920 pub fn OH_Drawing_PenGetFillPath(
4921 pen: *mut OH_Drawing_Pen,
4922 src: *const OH_Drawing_Path,
4923 dst: *mut OH_Drawing_Path,
4924 rect: *const OH_Drawing_Rect,
4925 matrix: *const OH_Drawing_Matrix,
4926 ) -> bool;
4927}
4928extern "C" {
4929 #[doc = " @brief Resets all pen contents to their initial values.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.\n @since 12\n @version 1.0"]
4930 pub fn OH_Drawing_PenReset(pen: *mut OH_Drawing_Pen);
4931}
4932extern "C" {
4933 #[doc = " @brief Gets an <b>OH_Drawing_PixelMap</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param nativePixelMap Indicates a pointer to an native pixelmap supported by image framework.\n @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.\n @since 12\n @version 1.0"]
4934 pub fn OH_Drawing_PixelMapGetFromNativePixelMap(
4935 nativePixelMap: *mut NativePixelMap_,
4936 ) -> *mut OH_Drawing_PixelMap;
4937}
4938extern "C" {
4939 #[doc = " @brief Gets an <b>OH_Drawing_PixelMap</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pixelmapNative Indicates a pointer to the <b>OH_PixelmapNative</b> object supported by image framework.\n @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.\n If nullptr is returned, the get operation fails.\n The possible cause of the failure is that a nullptr is passed.\n @since 12\n @version 1.0"]
4940 pub fn OH_Drawing_PixelMapGetFromOhPixelMapNative(
4941 pixelmapNative: *mut OH_PixelmapNative,
4942 ) -> *mut OH_Drawing_PixelMap;
4943}
4944extern "C" {
4945 #[doc = " @brief Dissolves the relationship between <b>OH_Drawing_PixelMap</b> object and <b>NativePixelMap_</b> or\n<b>OH_PixelmapNative</b> which is build by 'GetFrom' function.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param pixelMap Indicates a pointer to the <b>OH_Drawing_PixelMap</b>.\n @since 12\n @version 1.0"]
4946 pub fn OH_Drawing_PixelMapDissolve(pixelMap: *mut OH_Drawing_PixelMap);
4947}
4948extern "C" {
4949 #[doc = " @brief Creates an <b>OH_Drawing_Point</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param x Indicates the x-axis coordinates of the point.\n @param y Indicates the y-axis coordinates of the point.\n @return Returns the pointer to the <b>OH_Drawing_Point</b> object created.\n @since 11\n @version 1.0"]
4950 pub fn OH_Drawing_PointCreate(x: f32, y: f32) -> *mut OH_Drawing_Point;
4951}
4952extern "C" {
4953 #[doc = " @brief Gets the x-axis coordinate of the point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param x Indicates the x-axis coordinate of the point.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point or x is nullptr.\n @since 12\n @version 1.0"]
4954 pub fn OH_Drawing_PointGetX(
4955 point: *const OH_Drawing_Point,
4956 x: *mut f32,
4957 ) -> OH_Drawing_ErrorCode;
4958}
4959extern "C" {
4960 #[doc = " @brief Gets the y-axis coordinate of the point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param y Indicates the y-axis coordinate of the point.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point or y is nullptr.\n @since 12\n @version 1.0"]
4961 pub fn OH_Drawing_PointGetY(
4962 point: *const OH_Drawing_Point,
4963 y: *mut f32,
4964 ) -> OH_Drawing_ErrorCode;
4965}
4966extern "C" {
4967 #[doc = " @brief Sets the x-axis and y-axis coordinates of the point.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @param x Indicates the x-axis coordinate of the point.\n @param y Indicates the y-axis coordinate of the point.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if point is nullptr.\n @since 12\n @version 1.0"]
4968 pub fn OH_Drawing_PointSet(
4969 point: *mut OH_Drawing_Point,
4970 x: f32,
4971 y: f32,
4972 ) -> OH_Drawing_ErrorCode;
4973}
4974extern "C" {
4975 #[doc = " @brief Destroys an <b>OH_Drawing_Point</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @since 11\n @version 1.0"]
4976 pub fn OH_Drawing_PointDestroy(point: *mut OH_Drawing_Point);
4977}
4978extern "C" {
4979 #[doc = " @brief Creates an <b>OH_Drawing_RecordCmdUtils</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_RecordCmdUtils</b> object created.\n @since 13\n @version 1.0"]
4980 #[cfg(feature = "api-13")]
4981 pub fn OH_Drawing_RecordCmdUtilsCreate() -> *mut OH_Drawing_RecordCmdUtils;
4982}
4983extern "C" {
4984 #[doc = " @brief Destroys an <b>OH_Drawing_RecordCmdUtils</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param recordCmdUtils Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if recordCmdUtils is nullptr.\n @since 13\n @version 1.0"]
4985 #[cfg(feature = "api-13")]
4986 pub fn OH_Drawing_RecordCmdUtilsDestroy(
4987 recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
4988 ) -> OH_Drawing_ErrorCode;
4989}
4990extern "C" {
4991 #[doc = " @brief Get the canvas that records the drawing command.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param recordCmdUtils Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object.\n @param width Width of canvas object.\n @param height Height of canvas object.\n @param canvas Indicates a secondary pointer to an <b>OH_Drawing_Canvas</b>object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if recordCmdUtils or canvas is nullptr,\n width less than or equal to 0 or height less than or equal to 0.\n Returns {@link OH_DRAWING_ERROR_ALLOCATION_FAILED} if no memory.\n @since 13\n @version 1.0"]
4992 #[cfg(feature = "api-13")]
4993 pub fn OH_Drawing_RecordCmdUtilsBeginRecording(
4994 recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
4995 width: i32,
4996 height: i32,
4997 canvas: *mut *mut OH_Drawing_Canvas,
4998 ) -> OH_Drawing_ErrorCode;
4999}
5000extern "C" {
5001 #[doc = " @brief Finish the recording and get the recording command object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param recordCmdUtils Indicates the pointer to an <b>OH_Drawing_RecordCmdUtils</b> object.\n @param recordCmd Indicates a secondary pointer to an <b>OH_Drawing_RecordCmd</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if recordCmdUtils or recordCmd is nullptr.\n Returns {@link OH_DRAWING_ERROR_ALLOCATION_FAILED} if no memory.\n @since 13\n @version 1.0"]
5002 #[cfg(feature = "api-13")]
5003 pub fn OH_Drawing_RecordCmdUtilsFinishRecording(
5004 recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
5005 recordCmd: *mut *mut OH_Drawing_RecordCmd,
5006 ) -> OH_Drawing_ErrorCode;
5007}
5008extern "C" {
5009 #[doc = " @brief Destroys an <b>OH_Drawing_RecordCmd</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param recordCmd Indicates the pointer to an <b>OH_Drawing_RecordCmd</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if recordCmd is nullptr.\n @since 13\n @version 1.0"]
5010 #[cfg(feature = "api-13")]
5011 pub fn OH_Drawing_RecordCmdDestroy(
5012 recordCmd: *mut OH_Drawing_RecordCmd,
5013 ) -> OH_Drawing_ErrorCode;
5014}
5015extern "C" {
5016 #[doc = " @brief Creates an <b>OH_Drawing_Rect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param left Indicates the left position of the rect.\n @param top Indicates the top position of the rect.\n @param right Indicates the right position of the rect.\n @param bottom Indicates the bottom position of the rect.\n @return Returns the pointer to the <b>OH_Drawing_Rect</b> object created.\n @since 11\n @version 1.0"]
5017 pub fn OH_Drawing_RectCreate(
5018 left: f32,
5019 top: f32,
5020 right: f32,
5021 bottom: f32,
5022 ) -> *mut OH_Drawing_Rect;
5023}
5024extern "C" {
5025 #[doc = " @brief If rect intersects other, sets rect to intersection.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns true if have area in common.\n @since 12\n @version 1.0"]
5026 pub fn OH_Drawing_RectIntersect(
5027 rect: *mut OH_Drawing_Rect,
5028 other: *const OH_Drawing_Rect,
5029 ) -> bool;
5030}
5031extern "C" {
5032 #[doc = " @brief Sets rect to the union of rect and other.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns true if rect and other are not nullptr, and other is not empty;\n false if rect or other is nullptr, or other is empty.\n @since 12\n @version 1.0"]
5033 pub fn OH_Drawing_RectJoin(rect: *mut OH_Drawing_Rect, other: *const OH_Drawing_Rect) -> bool;
5034}
5035extern "C" {
5036 #[doc = " @brief Set the left position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param left Indicates the left position of the rect.\n @since 12\n @version 1.0"]
5037 pub fn OH_Drawing_RectSetLeft(rect: *mut OH_Drawing_Rect, left: f32);
5038}
5039extern "C" {
5040 #[doc = " @brief Set the top position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param top Indicates the top position of the rect.\n @since 12\n @version 1.0"]
5041 pub fn OH_Drawing_RectSetTop(rect: *mut OH_Drawing_Rect, top: f32);
5042}
5043extern "C" {
5044 #[doc = " @brief Set the right position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param right Indicates the right position of the rect.\n @since 12\n @version 1.0"]
5045 pub fn OH_Drawing_RectSetRight(rect: *mut OH_Drawing_Rect, right: f32);
5046}
5047extern "C" {
5048 #[doc = " @brief Set the bottom position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param bottom Indicates the bottom position of the rect.\n @since 12\n @version 1.0"]
5049 pub fn OH_Drawing_RectSetBottom(rect: *mut OH_Drawing_Rect, bottom: f32);
5050}
5051extern "C" {
5052 #[doc = " @brief Get the left position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return the left position of the rect.\n @since 12\n @version 1.0"]
5053 pub fn OH_Drawing_RectGetLeft(rect: *mut OH_Drawing_Rect) -> f32;
5054}
5055extern "C" {
5056 #[doc = " @brief Get the top position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return the top position of the rect.\n @since 12\n @version 1.0"]
5057 pub fn OH_Drawing_RectGetTop(rect: *mut OH_Drawing_Rect) -> f32;
5058}
5059extern "C" {
5060 #[doc = " @brief Get the right position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return the right position of the rect.\n @since 12\n @version 1.0"]
5061 pub fn OH_Drawing_RectGetRight(rect: *mut OH_Drawing_Rect) -> f32;
5062}
5063extern "C" {
5064 #[doc = " @brief Get the bottom position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return the bottom position of the rect.\n @since 12\n @version 1.0"]
5065 pub fn OH_Drawing_RectGetBottom(rect: *mut OH_Drawing_Rect) -> f32;
5066}
5067extern "C" {
5068 #[doc = " @brief Get the height position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
5069 pub fn OH_Drawing_RectGetHeight(rect: *mut OH_Drawing_Rect) -> f32;
5070}
5071extern "C" {
5072 #[doc = " @brief Get the width position of the rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the width.\n @since 12\n @version 1.0"]
5073 pub fn OH_Drawing_RectGetWidth(rect: *mut OH_Drawing_Rect) -> f32;
5074}
5075extern "C" {
5076 #[doc = " @brief Copy the original rectangular object to the destination rectangular object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param src Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param dst Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
5077 pub fn OH_Drawing_RectCopy(src: *mut OH_Drawing_Rect, dst: *mut OH_Drawing_Rect);
5078}
5079extern "C" {
5080 #[doc = " @brief Destroys an <b>OH_Drawing_Rect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 11\n @version 1.0"]
5081 pub fn OH_Drawing_RectDestroy(rect: *mut OH_Drawing_Rect);
5082}
5083extern "C" {
5084 #[doc = " @brief Creates an <b>OH_Drawing_Array</b> object, which is used to store multiple <b>OH_Drawing_Rect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param size Indicates the size of the array object.\n @return Returns the pointer to the <b>OH_Drawing_Array</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty,\n or size is invalid.\n @since 18\n @version 1.0"]
5085 #[cfg(feature = "api-18")]
5086 pub fn OH_Drawing_RectCreateArray(size: usize) -> *mut OH_Drawing_Array;
5087}
5088extern "C" {
5089 #[doc = " @brief Gets the size of an <b>OH_Drawing_Array</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rectArray Indicates the array object.\n @param pSize Indicates the size pointer.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or pSize is nullptr.\n @since 18\n @version 1.0"]
5090 #[cfg(feature = "api-18")]
5091 pub fn OH_Drawing_RectGetArraySize(
5092 rectArray: *mut OH_Drawing_Array,
5093 pSize: *mut usize,
5094 ) -> OH_Drawing_ErrorCode;
5095}
5096extern "C" {
5097 #[doc = " @brief Gets the specified <b>OH_Drawing_Rect</b> object from <b>OH_Drawing_Array</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rectArray Indicates the array object.\n @param index Indicates the index of array, caller must make sure the index is valid.\n @param rect Pointers to Pointer of <b>OH_Drawing_Rect</b> object, returned to the caller.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or rect is nullptr,\n or index is invalid.\n @since 18\n @version 1.0"]
5098 #[cfg(feature = "api-18")]
5099 pub fn OH_Drawing_RectGetArrayElement(
5100 rectArray: *mut OH_Drawing_Array,
5101 index: usize,
5102 rect: *mut *mut OH_Drawing_Rect,
5103 ) -> OH_Drawing_ErrorCode;
5104}
5105extern "C" {
5106 #[doc = " @brief Destroys an array <b>OH_Drawing_Rect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rectArray Indicates the pointer to an <b>OH_Drawing_Array</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray is nullptr.\n @since 18\n @version 1.0"]
5107 #[cfg(feature = "api-18")]
5108 pub fn OH_Drawing_RectDestroyArray(rectArray: *mut OH_Drawing_Array) -> OH_Drawing_ErrorCode;
5109}
5110extern "C" {
5111 #[doc = " @brief Determine whether one <b>OH_Drawing_Rect</b> object totally contains another <b>OH_Drawing_Rect</b> object.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param isContains Indicates whether rect totally contains other.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect, other or isContains is nullptr.\n @since 22\n @version 1.0"]
5112 #[cfg(feature = "api-22")]
5113 pub fn OH_Drawing_RectContains(
5114 rect: *mut OH_Drawing_Rect,
5115 other: *const OH_Drawing_Rect,
5116 isContains: *mut bool,
5117 ) -> OH_Drawing_ErrorCode;
5118}
5119extern "C" {
5120 #[doc = " @brief Add the specified values to the left and top boundaries of an <b>OH_Drawing_Rect</b> object.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param left Indicates the value added to the left boundary of an <b>OH_Drawing_Rect</b> object.\n @param top Indicates the value added to the top boundary of an <b>OH_Drawing_Rect</b> object.\n @param right Indicates the value added to the right boundary of an <b>OH_Drawing_Rect</b> object.\n @param bottom Indicates the value added to the bottom boundary of an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 22\n @version 1.0"]
5121 #[cfg(feature = "api-22")]
5122 pub fn OH_Drawing_RectInset(
5123 rect: *mut OH_Drawing_Rect,
5124 left: f32,
5125 top: f32,
5126 right: f32,
5127 bottom: f32,
5128 ) -> OH_Drawing_ErrorCode;
5129}
5130extern "C" {
5131 #[doc = " @brief Checks if rect is empty.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param isEmpty Indicates whether rect is empty.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect or isEmpty is nullptr.\n @since 23"]
5132 #[cfg(feature = "api-23")]
5133 pub fn OH_Drawing_RectIsEmpty(
5134 rect: *const OH_Drawing_Rect,
5135 isEmpty: *mut bool,
5136 ) -> OH_Drawing_ErrorCode;
5137}
5138extern "C" {
5139 #[doc = " @brief Offsets rect by adding dx to its left and right coordinates, and adding dy to its top and bottom\n coordinates.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param dx Indicates the distance to offset on the x-axis in pixels.\n @param dy Indicates the distance to offset on the y-axis in pixels.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 23"]
5140 #[cfg(feature = "api-23")]
5141 pub fn OH_Drawing_RectOffset(
5142 rect: *mut OH_Drawing_Rect,
5143 dx: f32,
5144 dy: f32,
5145 ) -> OH_Drawing_ErrorCode;
5146}
5147extern "C" {
5148 #[doc = " @brief Offsets rect to a specific position and keeps the width and height unchanged.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param newLeft Indicates the new left coordinate.\n @param newTop Indicates the new top coordinate.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 23"]
5149 #[cfg(feature = "api-23")]
5150 pub fn OH_Drawing_RectOffsetTo(
5151 rect: *mut OH_Drawing_Rect,
5152 newLeft: f32,
5153 newTop: f32,
5154 ) -> OH_Drawing_ErrorCode;
5155}
5156extern "C" {
5157 #[doc = " @brief Sets the boundary coordinates of rect to zero.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 23"]
5158 #[cfg(feature = "api-23")]
5159 pub fn OH_Drawing_RectSetEmpty(rect: *mut OH_Drawing_Rect) -> OH_Drawing_ErrorCode;
5160}
5161extern "C" {
5162 #[doc = " @brief Swaps the left and right if the left is greater than right; and swaps top and bottom if the top is greater\n than bottom. If the edges are already valid, then nothing is done.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 23"]
5163 #[cfg(feature = "api-23")]
5164 pub fn OH_Drawing_RectSort(rect: *mut OH_Drawing_Rect) -> OH_Drawing_ErrorCode;
5165}
5166extern "C" {
5167 #[doc = " @brief Sets rect to the union of itself and another.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect or other is nullptr.\n @since 23"]
5168 #[cfg(feature = "api-23")]
5169 pub fn OH_Drawing_RectUnion(
5170 rect: *mut OH_Drawing_Rect,
5171 other: *const OH_Drawing_Rect,
5172 ) -> OH_Drawing_ErrorCode;
5173}
5174#[doc = " Difference operation."]
5175pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_DIFFERENCE: OH_Drawing_RegionOpMode = 0;
5176#[doc = " Intersect operation."]
5177pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_INTERSECT: OH_Drawing_RegionOpMode = 1;
5178#[doc = " Union operation."]
5179pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_UNION: OH_Drawing_RegionOpMode = 2;
5180#[doc = " Xor operation."]
5181pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_XOR: OH_Drawing_RegionOpMode = 3;
5182#[doc = " Reverse difference operation."]
5183pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_REVERSE_DIFFERENCE: OH_Drawing_RegionOpMode = 4;
5184#[doc = " Replace operation."]
5185pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_REPLACE: OH_Drawing_RegionOpMode = 5;
5186#[doc = " @brief Operations when two regions are combined.\n\n @since 12\n @version 1.0"]
5187pub type OH_Drawing_RegionOpMode = u32;
5188extern "C" {
5189 #[doc = " @brief Creates an <b>OH_Drawing_Region</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Region</b> object created.\n @since 12\n @version 1.0"]
5190 pub fn OH_Drawing_RegionCreate() -> *mut OH_Drawing_Region;
5191}
5192extern "C" {
5193 #[doc = " @brief Creates an <b>OH_Drawing_Region</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object to copy.\n @return Returns the pointer to the <b>OH_Drawing_Region</b> object created.\n @since 20\n @version 1.0"]
5194 #[cfg(feature = "api-20")]
5195 pub fn OH_Drawing_RegionCopy(region: *const OH_Drawing_Region) -> *mut OH_Drawing_Region;
5196}
5197extern "C" {
5198 #[doc = " @brief Determines whether the region contains the specified coordinates.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param x x-coordinate.\n @param y y-coordinate.\n @return Returns <b>true</b> if (x, y) is inside region; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
5199 pub fn OH_Drawing_RegionContains(region: *mut OH_Drawing_Region, x: i32, y: i32) -> bool;
5200}
5201extern "C" {
5202 #[doc = " @brief Combines two regions.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param other Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param op Indicates the operation to apply to combine.\n @return Returns <b>true</b> if constructed Region is not empty; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
5203 pub fn OH_Drawing_RegionOp(
5204 region: *mut OH_Drawing_Region,
5205 other: *const OH_Drawing_Region,
5206 op: OH_Drawing_RegionOpMode,
5207 ) -> bool;
5208}
5209extern "C" {
5210 #[doc = " @brief Sets the region to the specified rect.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Return true if constructed Region is not empty.\n @since 12\n @version 1.0"]
5211 pub fn OH_Drawing_RegionSetRect(
5212 region: *mut OH_Drawing_Region,
5213 rect: *const OH_Drawing_Rect,
5214 ) -> bool;
5215}
5216extern "C" {
5217 #[doc = " @brief Constructs region that matchs outline of path within clip.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @param clip Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @return Returns <b>true</b> if constructed Region is not empty; returns <b>false</b> otherwise.\n @since 12\n @version 1.0"]
5218 pub fn OH_Drawing_RegionSetPath(
5219 region: *mut OH_Drawing_Region,
5220 path: *const OH_Drawing_Path,
5221 clip: *const OH_Drawing_Region,
5222 ) -> bool;
5223}
5224extern "C" {
5225 #[doc = " @brief Destroys an <b>OH_Drawing_Region</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @since 12\n @version 1.0"]
5226 pub fn OH_Drawing_RegionDestroy(region: *mut OH_Drawing_Region);
5227}
5228extern "C" {
5229 #[doc = " @brief Set an <b>OH_Drawing_Region</b> empty.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region is nullptr.\n @since 22\n @version 1.0"]
5230 #[cfg(feature = "api-22")]
5231 pub fn OH_Drawing_RegionEmpty(region: *mut OH_Drawing_Region) -> OH_Drawing_ErrorCode;
5232}
5233extern "C" {
5234 #[doc = " @brief Set the path to the boundary of the region. If the region is empty, the path will also be empty.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or path is nullptr.\n @since 23"]
5235 #[cfg(feature = "api-23")]
5236 pub fn OH_Drawing_RegionGetBoundaryPath(
5237 region: *const OH_Drawing_Region,
5238 path: *mut OH_Drawing_Path,
5239 ) -> OH_Drawing_ErrorCode;
5240}
5241extern "C" {
5242 #[doc = " @brief Obtains the minimum bounding rectangle that encloses this path.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or rect is nullptr.\n @since 23"]
5243 #[cfg(feature = "api-23")]
5244 pub fn OH_Drawing_RegionGetBounds(
5245 region: *const OH_Drawing_Region,
5246 rect: *mut OH_Drawing_Rect,
5247 ) -> OH_Drawing_ErrorCode;
5248}
5249extern "C" {
5250 #[doc = " @brief Checks if the region contains more than one rectangle.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param isComplex Indicates if the region is complex.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isComplex is nullptr.\n @since 23"]
5251 #[cfg(feature = "api-23")]
5252 pub fn OH_Drawing_RegionIsComplex(
5253 region: *const OH_Drawing_Region,
5254 isComplex: *mut bool,
5255 ) -> OH_Drawing_ErrorCode;
5256}
5257extern "C" {
5258 #[doc = " @brief Checks if the region is empty.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param isEmpty Indicates if the region is empty.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isEmpty is nullptr.\n @since 23"]
5259 #[cfg(feature = "api-23")]
5260 pub fn OH_Drawing_RegionIsEmpty(
5261 region: *const OH_Drawing_Region,
5262 isEmpty: *mut bool,
5263 ) -> OH_Drawing_ErrorCode;
5264}
5265extern "C" {
5266 #[doc = " @brief Checks if the region is equivalent to a single rectangle.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param isRect Indicates if the region contains a single rectangle.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isRect is nullptr.\n @since 23"]
5267 #[cfg(feature = "api-23")]
5268 pub fn OH_Drawing_RegionIsRect(
5269 region: *const OH_Drawing_Region,
5270 isRect: *mut bool,
5271 ) -> OH_Drawing_ErrorCode;
5272}
5273extern "C" {
5274 #[doc = " @brief Checks if the region is equivalent to a single rectangle and it contains the specified rectangle.\n A false indicates that the region is not equivalent to a single rectangle or the rectangle is not contained by\n this region. A true is a guarantee that the rectangle is contained by this region.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param left Indicates the left position of the rect.\n @param top Indicates the top position of the rect.\n @param right Indicates the right position of the rect.\n @param bottom Indicates the bottom position of the rect.\n @param isContained Indicates if the specified rectangle is contained in the region.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isContained is nullptr.\n @since 23"]
5275 #[cfg(feature = "api-23")]
5276 pub fn OH_Drawing_RegionQuickContains(
5277 region: *const OH_Drawing_Region,
5278 left: i32,
5279 top: i32,
5280 right: i32,
5281 bottom: i32,
5282 isContained: *mut bool,
5283 ) -> OH_Drawing_ErrorCode;
5284}
5285extern "C" {
5286 #[doc = " @brief Checks if the region is empty, or if the specified rectangle does not intersect the region.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param left Indicates the left position of the rect.\n @param top Indicates the top position of the rect.\n @param right Indicates the right position of the rect.\n @param bottom Indicates the bottom position of the rect.\n @param isReject Indicates if the specified rectangle does not intersect the region.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region or isReject is nullptr.\n @since 23"]
5287 #[cfg(feature = "api-23")]
5288 pub fn OH_Drawing_RegionQuickReject(
5289 region: *const OH_Drawing_Region,
5290 left: i32,
5291 top: i32,
5292 right: i32,
5293 bottom: i32,
5294 isReject: *mut bool,
5295 ) -> OH_Drawing_ErrorCode;
5296}
5297extern "C" {
5298 #[doc = " @brief Translates the region by dx, dy. If the region is empty, do nothing.\n\n @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.\n @param dx Indicates the distance to translate on x-axis in pixels.\n @param dy Indicates the distance to translate on y-axis in pixels.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if region is nullptr.\n @since 23"]
5299 #[cfg(feature = "api-23")]
5300 pub fn OH_Drawing_RegionTranslate(
5301 region: *mut OH_Drawing_Region,
5302 dx: i32,
5303 dy: i32,
5304 ) -> OH_Drawing_ErrorCode;
5305}
5306extern "C" {
5307 #[doc = " @brief Defines an <b>OH_Drawing_RegisterFont</b>, which is used to register a customized font in the FontManager.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param OH_Drawing_FontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family-name of the font which need to register.\n @param familySrc Indicates the path of the font file which need to register.\n @return error code.\n @since 11\n @version 1.0"]
5308 pub fn OH_Drawing_RegisterFont(
5309 arg1: *mut OH_Drawing_FontCollection,
5310 fontFamily: *const ::std::os::raw::c_char,
5311 familySrc: *const ::std::os::raw::c_char,
5312 ) -> u32;
5313}
5314extern "C" {
5315 #[doc = " @brief Defines an <b>OH_Drawing_RegisterFontBuffer</b>, which is used to register a customized font in the\n FontManager.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param OH_Drawing_FontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family-name of the font which need to register.\n @param fontBuffer Indicates the buffer of the font file which need to register.\n @param length Indicates the length of the font file which need to register.\n @return error code.\n @since 11\n @version 1.0"]
5316 pub fn OH_Drawing_RegisterFontBuffer(
5317 arg1: *mut OH_Drawing_FontCollection,
5318 fontFamily: *const ::std::os::raw::c_char,
5319 fontBuffer: *mut u8,
5320 length: usize,
5321 ) -> u32;
5322}
5323extern "C" {
5324 #[doc = " @brief Defines an <b>OH_Drawing_RegisterFontByIndex</b>, which is used to register font from ttc file.\n\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family name of the font which need to register.\n @param familySrc Indicates the path of the font file which need to register.\n @param index Indicates the index of the font data in the ttc file.\n @return error code.\n @since 23"]
5325 #[cfg(feature = "api-23")]
5326 pub fn OH_Drawing_RegisterFontByIndex(
5327 fontCollection: *mut OH_Drawing_FontCollection,
5328 fontFamily: *const ::std::os::raw::c_char,
5329 familySrc: *const ::std::os::raw::c_char,
5330 index: u32,
5331 ) -> u32;
5332}
5333extern "C" {
5334 #[doc = " @brief Defines an <b>OH_Drawing_RegisterFontBufferByIndex</b>, which is used to register font from ttc buffer.\n\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family name of the font which need to register.\n @param fontBuffer Indicates the font data which need to register.\n @param length Indicates the font data length.\n @param index Indicates the index of the font data in the ttc file.\n @return error code.\n @since 23"]
5335 #[cfg(feature = "api-23")]
5336 pub fn OH_Drawing_RegisterFontBufferByIndex(
5337 fontCollection: *mut OH_Drawing_FontCollection,
5338 fontFamily: *const ::std::os::raw::c_char,
5339 fontBuffer: *mut u8,
5340 length: usize,
5341 index: u32,
5342 ) -> u32;
5343}
5344extern "C" {
5345 #[doc = " @brief Unregister a customized font by the font family.\n Unregistering a font that is currently in use by UI components may lead to text rendering anomalies,\n including garbled characters or missing glyphs.\n All typography using the unregistered font family should be destroyed and re-created.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontCollection Indicates the pointer to an <b>OH_Drawing_FontCollection</b> object.\n @param fontFamily Indicates the family-name of the font which need to be unregistered.\n @return error code.\n @since 20"]
5346 #[cfg(feature = "api-20")]
5347 pub fn OH_Drawing_UnregisterFont(
5348 fontCollection: *mut OH_Drawing_FontCollection,
5349 fontFamily: *const ::std::os::raw::c_char,
5350 ) -> u32;
5351}
5352extern "C" {
5353 #[doc = " @brief Checks whether the font format specified by the path is supported.\n\n @param path The absolute path to the font file.\n @return Returns true if the font is supported; otherwise, returns false.\n @since 23"]
5354 #[cfg(feature = "api-23")]
5355 pub fn OH_Drawing_IsFontSupportedFromPath(path: *const ::std::os::raw::c_char) -> bool;
5356}
5357extern "C" {
5358 #[doc = " @brief Checks whether the font format specified by the buffer is supported.\n\n @param data A pointer to the memory buffer containing font data.\n @param dataLength The size of the font data in bytes.\n @return Returns true if the font is supported; otherwise, returns false.\n @since 23"]
5359 #[cfg(feature = "api-23")]
5360 pub fn OH_Drawing_IsFontSupportedFromBuffer(data: *mut u8, dataLength: usize) -> bool;
5361}
5362#[doc = " Index of top-left corner radii."]
5363pub const OH_Drawing_CornerPos_CORNER_POS_TOP_LEFT: OH_Drawing_CornerPos = 0;
5364#[doc = " Index of top-right corner radii."]
5365pub const OH_Drawing_CornerPos_CORNER_POS_TOP_RIGHT: OH_Drawing_CornerPos = 1;
5366#[doc = " Index of bottom-right corner radii."]
5367pub const OH_Drawing_CornerPos_CORNER_POS_BOTTOM_RIGHT: OH_Drawing_CornerPos = 2;
5368#[doc = " Index of bottom-left corner radii."]
5369pub const OH_Drawing_CornerPos_CORNER_POS_BOTTOM_LEFT: OH_Drawing_CornerPos = 3;
5370#[doc = " @brief Enumerates of corner radii position.\n\n @since 12\n @version 1.0"]
5371pub type OH_Drawing_CornerPos = u32;
5372extern "C" {
5373 #[doc = " @brief Creates an <b>OH_Drawing_RoundRect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param xRad Indicates the corner radii on x-axis.\n @param yRad Indicates the corner radii on y-axis.\n @return Returns the pointer to the <b>OH_Drawing_RoundRect</b> object created.\n @since 11\n @version 1.0"]
5374 pub fn OH_Drawing_RoundRectCreate(
5375 rect: *const OH_Drawing_Rect,
5376 xRad: f32,
5377 yRad: f32,
5378 ) -> *mut OH_Drawing_RoundRect;
5379}
5380extern "C" {
5381 #[doc = " @brief Creates an <b>OH_Drawing_RoundRect</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object to copy.\n @return Returns the pointer to the <b>OH_Drawing_RoundRect</b> object created.\n @since 20\n @version 1.0"]
5382 #[cfg(feature = "api-20")]
5383 pub fn OH_Drawing_RoundRectCopy(
5384 roundRect: *const OH_Drawing_RoundRect,
5385 ) -> *mut OH_Drawing_RoundRect;
5386}
5387extern "C" {
5388 #[doc = " @brief Sets the radiusX and radiusY for a specific corner position.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param pos Indicates the corner radii position.\n @param radii Indicates the corner radii on x-axis and y-axis.\n @since 12\n @version 1.0"]
5389 pub fn OH_Drawing_RoundRectSetCorner(
5390 roundRect: *mut OH_Drawing_RoundRect,
5391 pos: OH_Drawing_CornerPos,
5392 radii: OH_Drawing_Corner_Radii,
5393 );
5394}
5395extern "C" {
5396 #[doc = " @brief Gets an <b>OH_Drawing_Corner_Radii</b> struct, the point is round corner radiusX and radiusY.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @param pos Indicates the corner radii position.\n @return Returns the corner radii of <b>OH_Drawing_Corner_Radii</b> struct.\n @since 12\n @version 1.0"]
5397 pub fn OH_Drawing_RoundRectGetCorner(
5398 roundRect: *mut OH_Drawing_RoundRect,
5399 pos: OH_Drawing_CornerPos,
5400 ) -> OH_Drawing_Corner_Radii;
5401}
5402extern "C" {
5403 #[doc = " @brief Destroys an <b>OH_Drawing_RoundRect</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @since 11\n @version 1.0"]
5404 pub fn OH_Drawing_RoundRectDestroy(roundRect: *mut OH_Drawing_RoundRect);
5405}
5406extern "C" {
5407 #[doc = " @brief Translates round rect by (dx, dy).\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.\n @param dx Indicates the offsets added to rect left and rect right.\n @param dy Indicates the offsets added to rect top and rect bottom.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if roundRect is nullptr.\n @since 12\n @version 1.0"]
5408 pub fn OH_Drawing_RoundRectOffset(
5409 roundRect: *mut OH_Drawing_RoundRect,
5410 dx: f32,
5411 dy: f32,
5412 ) -> OH_Drawing_ErrorCode;
5413}
5414extern "C" {
5415 #[doc = " @brief Creates an <b>OH_Drawing_ShadowLayer</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param blurRadius Indicates the blur radius of the shadow.\n @param x Indicates the offset point on x-axis.\n @param y Indicates the offset point on y-axis.\n @param color Indicates the shadow color.\n @return Returns the pointer to the <b>OH_Drawing_ShadowLayer</b> object created.\n @since 12\n @version 1.0"]
5416 pub fn OH_Drawing_ShadowLayerCreate(
5417 blurRadius: f32,
5418 x: f32,
5419 y: f32,
5420 color: u32,
5421 ) -> *mut OH_Drawing_ShadowLayer;
5422}
5423extern "C" {
5424 #[doc = " @brief Destroys an <b>OH_Drawing_ShadowLayer</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.\n @since 12\n @version 1.0"]
5425 pub fn OH_Drawing_ShadowLayerDestroy(shadowLayer: *mut OH_Drawing_ShadowLayer);
5426}
5427extern "C" {
5428 #[doc = " @brief Creates an <b>OH_Drawing_Surface</b> object on GPU indicated by context.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param gpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.\n @param flag Indicates whether an allocation should count against a cache budget.\n @param imageInfo Indicates the image info.\n @return Returns the pointer to the <b>OH_Drawing_Surface</b> object created.\n @since 12\n @version 1.0"]
5429 pub fn OH_Drawing_SurfaceCreateFromGpuContext(
5430 gpuContext: *mut OH_Drawing_GpuContext,
5431 flag: bool,
5432 imageInfo: OH_Drawing_Image_Info,
5433 ) -> *mut OH_Drawing_Surface;
5434}
5435extern "C" {
5436 #[doc = " @brief Creates an <b>OH_Drawing_Surface</b> object on GPU indicated by context which is on-screen.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param gpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.\n @param imageInfo Indicates the image info.\n @param window Indicates the pointer of the screen window.\n @return Returns the pointer to the <b>OH_Drawing_Surface</b> object created.\n @since 16\n @version 1.0"]
5437 #[cfg(feature = "api-16")]
5438 pub fn OH_Drawing_SurfaceCreateOnScreen(
5439 gpuContext: *mut OH_Drawing_GpuContext,
5440 imageInfo: OH_Drawing_Image_Info,
5441 window: *mut ::std::os::raw::c_void,
5442 ) -> *mut OH_Drawing_Surface;
5443}
5444extern "C" {
5445 #[doc = " @brief Gets the canvas that draws into surface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Canvas</b> object. The returned pointer does not need to be managed\n by the caller.\n @since 12\n @version 1.0"]
5446 pub fn OH_Drawing_SurfaceGetCanvas(surface: *mut OH_Drawing_Surface) -> *mut OH_Drawing_Canvas;
5447}
5448extern "C" {
5449 #[doc = " @brief Resolves all pending GPU operations on the surface.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if surface is nullptr.\n @since 16\n @version 1.0"]
5450 #[cfg(feature = "api-16")]
5451 pub fn OH_Drawing_SurfaceFlush(surface: *mut OH_Drawing_Surface) -> OH_Drawing_ErrorCode;
5452}
5453extern "C" {
5454 #[doc = " @brief Destroys an <b>OH_Drawing_Surface</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.\n @since 12\n @version 1.0"]
5455 pub fn OH_Drawing_SurfaceDestroy(surface: *mut OH_Drawing_Surface);
5456}
5457extern "C" {
5458 #[doc = " @brief Creates an <b>OH_Drawing_TextBlobBuilder</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_TextBlobBuilder</b> object created.\n @since 11\n @version 1.0"]
5459 pub fn OH_Drawing_TextBlobBuilderCreate() -> *mut OH_Drawing_TextBlobBuilder;
5460}
5461extern "C" {
5462 #[doc = " @brief Creates an <b>OH_Drawing_TextBlob</b> object from text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param text Indicates the the pointer to text.\n @param byteLength Indicates the text length.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.\n @since 12\n @version 1.0"]
5463 pub fn OH_Drawing_TextBlobCreateFromText(
5464 text: *const ::std::os::raw::c_void,
5465 byteLength: usize,
5466 font: *const OH_Drawing_Font,
5467 textEncoding: OH_Drawing_TextEncoding,
5468 ) -> *mut OH_Drawing_TextBlob;
5469}
5470extern "C" {
5471 #[doc = " @brief Creates an <b>OH_Drawing_TextBlob</b> object from pos text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param text Indicates the the pointer to text.\n @param byteLength Indicates the text length.\n @param point2D Indicates the pointer to an <b>OH_Drawing_Point2D</b> array object.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.\n @since 12\n @version 1.0"]
5472 pub fn OH_Drawing_TextBlobCreateFromPosText(
5473 text: *const ::std::os::raw::c_void,
5474 byteLength: usize,
5475 point2D: *mut OH_Drawing_Point2D,
5476 font: *const OH_Drawing_Font,
5477 textEncoding: OH_Drawing_TextEncoding,
5478 ) -> *mut OH_Drawing_TextBlob;
5479}
5480extern "C" {
5481 #[doc = " @brief Creates an <b>OH_Drawing_TextBlob</b> object from pos text.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param str Indicates the the pointer to text.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.\n @since 12\n @version 1.0"]
5482 pub fn OH_Drawing_TextBlobCreateFromString(
5483 str_: *const ::std::os::raw::c_char,
5484 font: *const OH_Drawing_Font,
5485 textEncoding: OH_Drawing_TextEncoding,
5486 ) -> *mut OH_Drawing_TextBlob;
5487}
5488extern "C" {
5489 #[doc = " @brief Gets the bounds of textblob, assigned to the pointer to an <b>OH_Drawing_Rect</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @since 12\n @version 1.0"]
5490 pub fn OH_Drawing_TextBlobGetBounds(
5491 textBlob: *mut OH_Drawing_TextBlob,
5492 rect: *mut OH_Drawing_Rect,
5493 );
5494}
5495extern "C" {
5496 #[doc = " @brief Gets a non-zero value unique among all <b>OH_Drawing_TextBlob</b> objects.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.\n @return Returns identifier for the <b>OH_Drawing_TextBlob</b> object.\n @since 12\n @version 1.0"]
5497 pub fn OH_Drawing_TextBlobUniqueID(textBlob: *const OH_Drawing_TextBlob) -> u32;
5498}
5499#[doc = " @brief Defines a run, supplies storage for glyphs and positions.\n\n @since 11\n @version 1.0"]
5500#[repr(C)]
5501#[derive(Debug, Copy, Clone)]
5502pub struct OH_Drawing_RunBuffer {
5503 #[doc = " storage for glyph indexes in run"]
5504 pub glyphs: *mut u16,
5505 #[doc = " storage for glyph positions in run"]
5506 pub pos: *mut f32,
5507 #[doc = " storage for text UTF-8 code units in run"]
5508 pub utf8text: *mut ::std::os::raw::c_char,
5509 #[doc = " storage for glyph clusters (index of UTF-8 code unit)"]
5510 pub clusters: *mut u32,
5511}
5512extern "C" {
5513 #[doc = " @brief Alloc run with storage for glyphs and positions. The returned pointer does not need to be managed\n by the caller and is forbidden to be used after OH_Drawing_TextBlobBuilderMake is called.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @param count Indicates the number of glyphs.\n @param rect Indicates the optional run bounding box.\n @since 11\n @version 1.0"]
5514 pub fn OH_Drawing_TextBlobBuilderAllocRunPos(
5515 textBlobBuilder: *mut OH_Drawing_TextBlobBuilder,
5516 font: *const OH_Drawing_Font,
5517 count: i32,
5518 rect: *const OH_Drawing_Rect,
5519 ) -> *const OH_Drawing_RunBuffer;
5520}
5521extern "C" {
5522 #[doc = " @brief Make an <b>OH_Drawing_TextBlob</b> from <b>OH_Drawing_TextBlobBuilder</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.\n @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object.\n @since 11\n @version 1.0"]
5523 pub fn OH_Drawing_TextBlobBuilderMake(
5524 textBlobBuilder: *mut OH_Drawing_TextBlobBuilder,
5525 ) -> *mut OH_Drawing_TextBlob;
5526}
5527extern "C" {
5528 #[doc = " @brief Destroys an <b>OH_Drawing_TextBlob</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.\n @since 11\n @version 1.0"]
5529 pub fn OH_Drawing_TextBlobDestroy(textBlob: *mut OH_Drawing_TextBlob);
5530}
5531extern "C" {
5532 #[doc = " @brief Destroys an <b>OH_Drawing_TextBlobBuilder</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.\n @since 11\n @version 1.0"]
5533 pub fn OH_Drawing_TextBlobBuilderDestroy(textBlobBuilder: *mut OH_Drawing_TextBlobBuilder);
5534}
5535#[doc = " All font types"]
5536#[cfg(feature = "api-14")]
5537pub const OH_Drawing_SystemFontType_ALL: OH_Drawing_SystemFontType = 1;
5538#[doc = " System generic font type"]
5539#[cfg(feature = "api-14")]
5540pub const OH_Drawing_SystemFontType_GENERIC: OH_Drawing_SystemFontType = 2;
5541#[doc = " Stylish font type"]
5542#[cfg(feature = "api-14")]
5543pub const OH_Drawing_SystemFontType_STYLISH: OH_Drawing_SystemFontType = 4;
5544#[doc = " Installed font types"]
5545#[cfg(feature = "api-14")]
5546pub const OH_Drawing_SystemFontType_INSTALLED: OH_Drawing_SystemFontType = 8;
5547#[doc = " Customized font types\n @since 18"]
5548#[cfg(feature = "api-18")]
5549pub const OH_Drawing_SystemFontType_CUSTOMIZED: OH_Drawing_SystemFontType = 16;
5550#[doc = " @brief An enumeration of system font types.\n\n @since 14"]
5551#[cfg(feature = "api-14")]
5552pub type OH_Drawing_SystemFontType = u32;
5553#[doc = " The file path of the font"]
5554#[cfg(feature = "api-22")]
5555pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_PATH:
5556 OH_Drawing_FontFullDescriptorAttributeId = 0;
5557#[doc = " A name that uniquely identifies the font"]
5558#[cfg(feature = "api-22")]
5559pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_POSTSCRIPT_NAME:
5560 OH_Drawing_FontFullDescriptorAttributeId = 1;
5561#[doc = " The full name of the font"]
5562#[cfg(feature = "api-22")]
5563pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_FULL_NAME:
5564 OH_Drawing_FontFullDescriptorAttributeId = 2;
5565#[doc = " The family name of the font"]
5566#[cfg(feature = "api-22")]
5567pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_FAMILY_NAME:
5568 OH_Drawing_FontFullDescriptorAttributeId = 3;
5569#[doc = " The subfont family of the font"]
5570#[cfg(feature = "api-22")]
5571pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_SUB_FAMILY_NAME:
5572 OH_Drawing_FontFullDescriptorAttributeId = 4;
5573#[doc = " The weight of the font"]
5574#[cfg(feature = "api-22")]
5575pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_WEIGHT:
5576 OH_Drawing_FontFullDescriptorAttributeId = 5;
5577#[doc = " The width of the font"]
5578#[cfg(feature = "api-22")]
5579pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_WIDTH:
5580 OH_Drawing_FontFullDescriptorAttributeId = 6;
5581#[doc = " Whether the font is tilted"]
5582#[cfg(feature = "api-22")]
5583pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_ITALIC:
5584 OH_Drawing_FontFullDescriptorAttributeId = 7;
5585#[doc = " Whether the font is monospaced"]
5586#[cfg(feature = "api-22")]
5587pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_B_MONO:
5588 OH_Drawing_FontFullDescriptorAttributeId = 8;
5589#[doc = " whether symbolic fonts are supported"]
5590#[cfg(feature = "api-22")]
5591pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_B_SYMBOLIC:
5592 OH_Drawing_FontFullDescriptorAttributeId = 9;
5593#[doc = " The local postscript name of the font\n @since 23"]
5594#[cfg(feature = "api-23")]
5595pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_POSTSCRIPT_NAME:
5596 OH_Drawing_FontFullDescriptorAttributeId = 10;
5597#[doc = " The local full name of the font\n @since 23"]
5598#[cfg(feature = "api-23")]
5599pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_FULL_NAME:
5600 OH_Drawing_FontFullDescriptorAttributeId = 11;
5601#[doc = " The local family name of the font\n @since 23"]
5602#[cfg(feature = "api-23")]
5603pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_FAMILY_NAME:
5604 OH_Drawing_FontFullDescriptorAttributeId = 12;
5605#[doc = " The local sub family name of the font\n @since 23"]
5606#[cfg(feature = "api-23")]
5607pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LOCAL_SUB_FAMILY_NAME:
5608 OH_Drawing_FontFullDescriptorAttributeId = 13;
5609#[doc = " The version of the font\n @since 23"]
5610#[cfg(feature = "api-23")]
5611pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_VERSION:
5612 OH_Drawing_FontFullDescriptorAttributeId = 14;
5613#[doc = " The manufacture of the font\n @since 23"]
5614#[cfg(feature = "api-23")]
5615pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_MANUFACTURE:
5616 OH_Drawing_FontFullDescriptorAttributeId = 15;
5617#[doc = " The copyright of the font\n @since 23"]
5618#[cfg(feature = "api-23")]
5619pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_COPYRIGHT:
5620 OH_Drawing_FontFullDescriptorAttributeId = 16;
5621#[doc = " The trademark of the font\n @since 23"]
5622#[cfg(feature = "api-23")]
5623pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_TRADEMARK:
5624 OH_Drawing_FontFullDescriptorAttributeId = 17;
5625#[doc = " The license of the font\n @since 23"]
5626#[cfg(feature = "api-23")]
5627pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_LICENSE:
5628 OH_Drawing_FontFullDescriptorAttributeId = 18;
5629#[doc = " The array of the font variation axis\n @since 24"]
5630#[cfg(feature = "api-24")]
5631pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_O_VARIATION_AXIS:
5632 OH_Drawing_FontFullDescriptorAttributeId = 19;
5633#[doc = " The array of the font variation instance\n @since 24"]
5634#[cfg(feature = "api-24")]
5635pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_O_VARIATION_INSTANCE:
5636 OH_Drawing_FontFullDescriptorAttributeId = 20;
5637#[doc = " The font index in ttc file\n @since 23"]
5638#[cfg(feature = "api-23")]
5639pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_INDEX:
5640 OH_Drawing_FontFullDescriptorAttributeId = 21;
5641#[doc = " @brief An enumeration of font full descriptor attribute.\n\n @since 22"]
5642#[cfg(feature = "api-22")]
5643pub type OH_Drawing_FontFullDescriptorAttributeId = u32;
5644#[doc = " The key of the font variation axis"]
5645#[cfg(feature = "api-24")]
5646pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_S_KEY:
5647 OH_Drawing_FontVariationAxisAttributeId = 0;
5648#[doc = " The min value of the font variation axis"]
5649#[cfg(feature = "api-24")]
5650pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_D_MIN_VALUE:
5651 OH_Drawing_FontVariationAxisAttributeId = 1;
5652#[doc = " The max value of the font variation axis"]
5653#[cfg(feature = "api-24")]
5654pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_D_MAX_VALUE:
5655 OH_Drawing_FontVariationAxisAttributeId = 2;
5656#[doc = " The default value of the font variation axis"]
5657#[cfg(feature = "api-24")]
5658pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_D_DEFAULT_VALUE:
5659 OH_Drawing_FontVariationAxisAttributeId = 3;
5660#[doc = " The flags of the font variation axis"]
5661#[cfg(feature = "api-24")]
5662pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_I_FLAGS:
5663 OH_Drawing_FontVariationAxisAttributeId = 4;
5664#[doc = " The name of the font variation axis"]
5665#[cfg(feature = "api-24")]
5666pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_S_NAME:
5667 OH_Drawing_FontVariationAxisAttributeId = 5;
5668#[doc = " The local name of the font variation axis"]
5669#[cfg(feature = "api-24")]
5670pub const OH_Drawing_FontVariationAxisAttributeId_FONT_VARIATION_AXIS_ATTR_S_LOCAL_NAME:
5671 OH_Drawing_FontVariationAxisAttributeId = 6;
5672#[doc = " @brief An enumeration of font variation axis attribute.\n\n @since 24"]
5673#[cfg(feature = "api-24")]
5674pub type OH_Drawing_FontVariationAxisAttributeId = u32;
5675#[doc = " The name of the font variation instance"]
5676#[cfg(feature = "api-24")]
5677pub const OH_Drawing_FontVariationInstanceAttributeId_FONT_VARIATION_INSTANCE_ATTR_S_NAME:
5678 OH_Drawing_FontVariationInstanceAttributeId = 0;
5679#[doc = " The local name of the font variation instance"]
5680#[cfg(feature = "api-24")]
5681pub const OH_Drawing_FontVariationInstanceAttributeId_FONT_VARIATION_INSTANCE_ATTR_S_LOCAL_NAME:
5682 OH_Drawing_FontVariationInstanceAttributeId = 1;
5683#[doc = " @brief An enumeration of font variation instance attribute.\n\n @since 24"]
5684#[cfg(feature = "api-24")]
5685pub type OH_Drawing_FontVariationInstanceAttributeId = u32;
5686#[doc = " @brief Defines the font variation coordinate.\n\n @since 24"]
5687#[cfg(feature = "api-24")]
5688#[repr(C)]
5689#[derive(Debug, Copy, Clone)]
5690pub struct OH_Drawing_FontVariationInstanceCoordinate {
5691 #[doc = " key of font variation coordinate"]
5692 pub axisKey: *mut ::std::os::raw::c_char,
5693 #[doc = " value of font variation coordinate"]
5694 pub value: f64,
5695}
5696extern "C" {
5697 #[doc = " @brief Obtain all system font descriptive symbols that match the specified font descriptor. Where the 'path'\n fields are not considered as valid matching values, It takes effect when the remaining fields are not\n default values, If all the fields of the parameters <b>OH_Drawing_FontDescriptor</b> are default, obtain all system\n font descriptors. If the match fails, return nullptr.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param desc The pointer to the <b>OH_Drawing_FontDescriptor</b> object. It is recommended to\n use <b>OH_Drawing_CreateFontDescriptor</b> to obtain a valid <b>OH_Drawing_FontDescriptor</b> instance.\n If you create your own <b>OH_Drawing_FontDescriptor</b> object, ensure that fields not intended for matching are\n set to their default values.\n @param num Indicates the count of obtained <b>OH_Drawing_FontDescriptor</b>.\n @return Returns an array of <b>OH_Drawing_FontDescriptor</b>. Released through the\n <b>OH_Drawing_DestroyFontDescriptors</b> interface after use.\n @since 18"]
5698 #[cfg(feature = "api-18")]
5699 pub fn OH_Drawing_MatchFontDescriptors(
5700 desc: *mut OH_Drawing_FontDescriptor,
5701 num: *mut usize,
5702 ) -> *mut OH_Drawing_FontDescriptor;
5703}
5704extern "C" {
5705 #[doc = " @brief Releases the <b>OH_Drawing_FontDescriptor</b> array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param descriptors <b>OH_Drawing_FontDescriptor</b> object array.\n @param num Represents the number of members of the <b>OH_Drawing_FontDescriptor</b> array.\n @since 18"]
5706 #[cfg(feature = "api-18")]
5707 pub fn OH_Drawing_DestroyFontDescriptors(
5708 descriptors: *mut OH_Drawing_FontDescriptor,
5709 num: usize,
5710 );
5711}
5712extern "C" {
5713 #[doc = " @brief Get the <b>OH_Drawing_FontDescriptor</b> object by the font full name and the font type, supporting generic\n fonts, stylish fonts, and installed fonts.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullName Indicates the full name object <b>OH_Drawing_String</b>.\n @param fontType Indicates enumerates of system font type object <b>OH_Drawing_SystemFontType</b>.\n @return Returns the pointer to a font descriptor object <b>OH_Drawing_FontDescriptor</b>.\n @since 14"]
5714 #[cfg(feature = "api-14")]
5715 pub fn OH_Drawing_GetFontDescriptorByFullName(
5716 fullName: *const OH_Drawing_String,
5717 fontType: OH_Drawing_SystemFontType,
5718 ) -> *mut OH_Drawing_FontDescriptor;
5719}
5720extern "C" {
5721 #[doc = " @brief Obtain the corresponding font full name array by the font type.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontType Indicates enumerates of system font type object <b>OH_Drawing_SystemFontType</b>.\n @return Returns the pointer to full name array object <b>OH_Drawing_Array</b>.\n @since 14"]
5722 #[cfg(feature = "api-14")]
5723 pub fn OH_Drawing_GetSystemFontFullNamesByType(
5724 fontType: OH_Drawing_SystemFontType,
5725 ) -> *mut OH_Drawing_Array;
5726}
5727extern "C" {
5728 #[doc = " @brief Get the specified full name object <b>OH_Drawing_String</b> by index from the\n <b>OH_Drawing_Array</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullNameArray Indicates an array of full name object <b>OH_Drawing_Array</b>.\n @param index The index of full name.\n @return Returns a full name object <b>OH_Drawing_String</b>.\n @since 14"]
5729 #[cfg(feature = "api-14")]
5730 pub fn OH_Drawing_GetSystemFontFullNameByIndex(
5731 fullNameArray: *mut OH_Drawing_Array,
5732 index: usize,
5733 ) -> *const OH_Drawing_String;
5734}
5735extern "C" {
5736 #[doc = " @brief Releases the memory occupied by an array of font full names.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fullNameArray Indicates an array of full name object <b>OH_Drawing_Array</b>.\n @since 14"]
5737 #[cfg(feature = "api-14")]
5738 pub fn OH_Drawing_DestroySystemFontFullNames(fullNameArray: *mut OH_Drawing_Array);
5739}
5740extern "C" {
5741 #[doc = " @brief Retrieves an array of font full descriptors from raw binary data.\n\n @param data Pointer to the raw binary font data buffer.\n @param size Size of the font data buffer in bytes.\n @return Returns a pointer to <b>OH_Drawing_Array</b> containing font full descriptors.\n Returns <b>NULL</b> if the operation fails due to invalid data format or parsing errors.\n @since 22"]
5742 #[cfg(feature = "api-22")]
5743 pub fn OH_Drawing_GetFontFullDescriptorsFromStream(
5744 data: *const ::std::os::raw::c_void,
5745 size: usize,
5746 ) -> *mut OH_Drawing_Array;
5747}
5748extern "C" {
5749 #[doc = " @brief Obtains an array of font full descriptors from font file path.\n\n @param path The font file path.\n @return Returns a pointer to <b>OH_Drawing_Array</b> structure containing font full descriptors.\n Returns <b>NULL</b> if no fonts are found, invalid path, no permission, or non-font file.\n @since 22"]
5750 #[cfg(feature = "api-22")]
5751 pub fn OH_Drawing_GetFontFullDescriptorsFromPath(
5752 path: *const ::std::os::raw::c_char,
5753 ) -> *mut OH_Drawing_Array;
5754}
5755extern "C" {
5756 #[doc = " @brief Retrieves a font full descriptor from an array by index.\n\n @param descriptorArray Pointer to the array of font full descriptors <b>OH_Drawing_Array</b>.\n @param index Zero-based index position of the descriptor to retrieve.\n @return Returns a pointer to <b>OH_Drawing_FontFullDescriptor</b> at the specified index.\n Returns <b>NULL</b> if the index is out of bounds or the array is invalid.\n @since 22"]
5757 #[cfg(feature = "api-22")]
5758 pub fn OH_Drawing_GetFontFullDescriptorByIndex(
5759 descriptorArray: *mut OH_Drawing_Array,
5760 index: usize,
5761 ) -> *const OH_Drawing_FontFullDescriptor;
5762}
5763extern "C" {
5764 #[doc = " @brief Releases the memory occupied by an array of font full descriptors.\n\n @param descriptorArray Pointer to the array of font full descriptors <b>OH_Drawing_Array</b>.\n @since 22"]
5765 #[cfg(feature = "api-22")]
5766 pub fn OH_Drawing_DestroyFontFullDescriptors(descriptorArray: *mut OH_Drawing_Array);
5767}
5768extern "C" {
5769 #[doc = " @brief Releases the memory occupied by the font full descriptor. This function is used to free the pointer\n allocated by <b>OH_Drawing_GetFontFullDescriptorByFullName<b> function.\n\n @param descriptor Pointer to the font full descriptor <b>OH_Drawing_FontFullDescriptor</b>.\n @since 24"]
5770 #[cfg(feature = "api-24")]
5771 pub fn OH_Drawing_DestroyFontFullDescriptor(descriptor: *const OH_Drawing_FontFullDescriptor);
5772}
5773extern "C" {
5774 #[doc = " @brief Defines an <b>OH_Drawing_GetFontUnicodeArrayFromFile</b>, which is used to get unicode from font file.\n\n @param fontSrc Indicates the path of the font file.\n @param index Indicates the index of the font data in the ttc file.\n @param unicodeArray Output parameter to receive unicode, When no longer needed, use 'free()' to release.\n @param arrayLength Output parameter to receive the length of the unicode array.\n @return error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the fontSrc is invalid or non-font file.\n @since 23"]
5775 #[cfg(feature = "api-23")]
5776 pub fn OH_Drawing_GetFontUnicodeArrayFromFile(
5777 fontSrc: *const ::std::os::raw::c_char,
5778 index: u32,
5779 unicodeArray: *mut *mut i32,
5780 arrayLength: *mut i32,
5781 ) -> OH_Drawing_ErrorCode;
5782}
5783extern "C" {
5784 #[doc = " @brief Defines an <b>OH_Drawing_GetFontUnicodeArrayFromBuffer</b>, which is used to get unicode from font buffer.\n\n @param fontBuffer Indicates the font data.\n @param length Indicates the font data length.\n @param index Indicates the index of the font data in the ttc file.\n @param unicodeArray Output parameter to receive unicode, When no longer needed, use 'free()' to release.\n @param arrayLength Output parameter to receive the length of the unicode array.\n @return error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the fontBuffer is invalid or non-font buffer.\n @since 23"]
5785 #[cfg(feature = "api-23")]
5786 pub fn OH_Drawing_GetFontUnicodeArrayFromBuffer(
5787 fontBuffer: *mut u8,
5788 length: usize,
5789 index: u32,
5790 unicodeArray: *mut *mut i32,
5791 arrayLength: *mut i32,
5792 ) -> OH_Drawing_ErrorCode;
5793}
5794extern "C" {
5795 #[doc = " @brief Retrieves an integer attribute value from a font full descriptor.\n\n @param descriptor Pointer to the font full descriptor <b>OH_Drawing_FontFullDescriptor</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontFullDescriptorAttributeId</b> enumeration.\n @param value Output parameter to receive the requested integer attribute value.\n @return Returns the error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the descriptor or value is NULL.\n Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 22"]
5796 #[cfg(feature = "api-22")]
5797 pub fn OH_Drawing_GetFontFullDescriptorAttributeInt(
5798 descriptor: *const OH_Drawing_FontFullDescriptor,
5799 id: OH_Drawing_FontFullDescriptorAttributeId,
5800 value: *mut ::std::os::raw::c_int,
5801 ) -> OH_Drawing_ErrorCode;
5802}
5803extern "C" {
5804 #[doc = " @brief Retrieves a boolean attribute value from a font full descriptor.\n\n @param descriptor Pointer to the font full descriptor <b>OH_Drawing_FontFullDescriptor</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontFullDescriptorAttributeId</b> enumeration.\n @param value Output parameter to receive the requested boolean attribute value.\n @return Returns the error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the descriptor or value is NULL.\n Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 22"]
5805 #[cfg(feature = "api-22")]
5806 pub fn OH_Drawing_GetFontFullDescriptorAttributeBool(
5807 descriptor: *const OH_Drawing_FontFullDescriptor,
5808 id: OH_Drawing_FontFullDescriptorAttributeId,
5809 value: *mut bool,
5810 ) -> OH_Drawing_ErrorCode;
5811}
5812extern "C" {
5813 #[doc = " @brief Retrieves a string attribute value from a font full descriptor.\n\n @note The caller is responsible for manually releasing the internal <b>strData</b> member of the\n <b>OH_Drawing_String</b> structure when it is no longer needed.\n\n @param descriptor Pointer to the font full descriptor <b>OH_Drawing_FontFullDescriptor</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontFullDescriptorAttributeId</b> enumeration.\n @param str Output parameter to receive pointer to the requested string attribute value.\n @return Returns the error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the descriptor or str is NULL.\n Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 22"]
5814 #[cfg(feature = "api-22")]
5815 pub fn OH_Drawing_GetFontFullDescriptorAttributeString(
5816 descriptor: *const OH_Drawing_FontFullDescriptor,
5817 id: OH_Drawing_FontFullDescriptorAttributeId,
5818 str_: *mut OH_Drawing_String,
5819 ) -> OH_Drawing_ErrorCode;
5820}
5821extern "C" {
5822 #[doc = " @brief Retrieves a object array attribute value from a font full descriptor.\n\n @param descriptor Pointer to the font full descriptor <b>OH_Drawing_FontFullDescriptor</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontFullDescriptorAttributeId</b> enumeration.\n @return Return the object array\n @since 24"]
5823 #[cfg(feature = "api-24")]
5824 pub fn OH_Drawing_GetFontFullDescriptorAttributeArray(
5825 descriptor: *const OH_Drawing_FontFullDescriptor,
5826 id: OH_Drawing_FontFullDescriptorAttributeId,
5827 ) -> *mut OH_Drawing_Array;
5828}
5829extern "C" {
5830 #[doc = " @brief Retrieves a font variation axis from an array by index.\n\n @param array Pointer to the array of font variation axis <b>OH_Drawing_Array</b>.\n @param index Zero-based index position of the variation axis to retrieve.\n @return Returns a pointer to <b>OH_Drawing_FontVariationAxis</b> at the specified index.\n Returns <b>NULL</b> if the index is out of bounds or the array is invalid.\n @since 24"]
5831 #[cfg(feature = "api-24")]
5832 pub fn OH_Drawing_GetFontVariationAxisByIndex(
5833 array: *mut OH_Drawing_Array,
5834 index: usize,
5835 ) -> *mut OH_Drawing_FontVariationAxis;
5836}
5837extern "C" {
5838 #[doc = " @brief Releases the memory occupied by an array of font variation axis.\n\n @param fontVariaAxisArray Indicates an array of font variation axis object <b>OH_Drawing_Array</b>.\n @since 24"]
5839 #[cfg(feature = "api-24")]
5840 pub fn OH_Drawing_DestroyFontVariationAxis(fontVariaAxisArray: *mut OH_Drawing_Array);
5841}
5842extern "C" {
5843 #[doc = " @brief Retrieves a double attribute value from a font variation axis.\n\n @param variationAxis Pointer to the font variation axis <b>OH_Drawing_FontVariationAxis</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontVariationAxisAttributeId</b> enumeration.\n @param value Output parameter to receive the requested double attribute value.\n @return Returns the error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the variationAxis or value is NULL.\n Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 24"]
5844 #[cfg(feature = "api-24")]
5845 pub fn OH_Drawing_GetFontVariationAxisAttributeDouble(
5846 variationAxis: *mut OH_Drawing_FontVariationAxis,
5847 id: OH_Drawing_FontVariationAxisAttributeId,
5848 value: *mut f64,
5849 ) -> OH_Drawing_ErrorCode;
5850}
5851extern "C" {
5852 #[doc = " @brief Retrieves a int attribute value from a font variation axis.\n\n @param variationAxis Pointer to the font variation axis <b>OH_Drawing_FontVariationAxis</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontVariationAxisAttributeId</b> enumeration.\n @param value Output parameter to receive the requested int attribute value.\n @return Returns the error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the variationAxis or value is NULL.\n Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 24"]
5853 #[cfg(feature = "api-24")]
5854 pub fn OH_Drawing_GetFontVariationAxisAttributeInt(
5855 variationAxis: *mut OH_Drawing_FontVariationAxis,
5856 id: OH_Drawing_FontVariationAxisAttributeId,
5857 value: *mut ::std::os::raw::c_int,
5858 ) -> OH_Drawing_ErrorCode;
5859}
5860extern "C" {
5861 #[doc = " @brief Retrieves a string attribute value from a font variation axis.\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 variation axis <b>OH_Drawing_FontVariationAxis</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontVariationAxisAttributeId</b> enumeration.\n @param str Output parameter to receive pointer to the requested string attribute value.\n @return Returns the error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the variationAxis or str is NULL.\n Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 24"]
5862 #[cfg(feature = "api-24")]
5863 pub fn OH_Drawing_GetFontVariationAxisAttributeStr(
5864 variationAxis: *mut OH_Drawing_FontVariationAxis,
5865 id: OH_Drawing_FontVariationAxisAttributeId,
5866 str_: *mut OH_Drawing_String,
5867 ) -> OH_Drawing_ErrorCode;
5868}
5869extern "C" {
5870 #[doc = " @brief Retrieves a font variation instance from an array by index.\n\n @param array Pointer to the array of font variation instance <b>OH_Drawing_Array</b>.\n @param index Zero-based index position of the variation instance to retrieve.\n @return Returns a pointer to <b>OH_Drawing_FontVariationInstance</b> at the specified index.\n Returns <b>NULL</b> if the index is out of bounds or the array is invalid.\n @since 24"]
5871 #[cfg(feature = "api-24")]
5872 pub fn OH_Drawing_GetFontVariationInstanceByIndex(
5873 array: *mut OH_Drawing_Array,
5874 index: usize,
5875 ) -> *mut OH_Drawing_FontVariationInstance;
5876}
5877extern "C" {
5878 #[doc = " @brief Releases the memory occupied by an array of font variation instance.\n\n @param fontVariaAxisInstance Indicates an array of font variation instance object <b>OH_Drawing_Array</b>.\n @since 24"]
5879 #[cfg(feature = "api-24")]
5880 pub fn OH_Drawing_DestroyFontVariationInstance(fontVariaAxisInstance: *mut OH_Drawing_Array);
5881}
5882extern "C" {
5883 #[doc = " @brief Retrieves a string attribute value from a font variation instance.\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 variation instance <b>OH_Drawing_FontVariationInstance</b>.\n @param id Attribute identifier from <b>OH_Drawing_FontVariationInstanceAttributeId</b> enumeration.\n @param str Output parameter to receive pointer to the requested string attribute value.\n @return Returns the error code.\n Returns <b>OH_DRAWING_SUCCESS</b> if the operation is successful.\n Returns <b>OH_DRAWING_ERROR_INCORRECT_PARAMETER</b> if the variationInstance or str is NULL.\n Returns <b>OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH</b> if the attribute id is not recognized or supported.\n @since 24"]
5884 #[cfg(feature = "api-24")]
5885 pub fn OH_Drawing_GetFontVariationInstanceAttributeStr(
5886 variationInstance: *mut OH_Drawing_FontVariationInstance,
5887 id: OH_Drawing_FontVariationInstanceAttributeId,
5888 str_: *mut OH_Drawing_String,
5889 ) -> OH_Drawing_ErrorCode;
5890}
5891extern "C" {
5892 #[doc = " @brief Get the <b>OH_Drawing_FontVariationInstanceCoordinate</b> object.\n\n @param variationInstance Indicates the variation instance.\n @param arrayLength Indicates the length of OH_Drawing_FontVariationInstanceCoordinate list.\n @return Returns the pointer to a font variation coordinate list.\n @since 24"]
5893 #[cfg(feature = "api-24")]
5894 pub fn OH_Drawing_GetFontVariationInstanceCoordinate(
5895 variationInstance: *mut OH_Drawing_FontVariationInstance,
5896 arrayLength: *mut usize,
5897 ) -> *mut OH_Drawing_FontVariationInstanceCoordinate;
5898}
5899extern "C" {
5900 #[doc = " @brief Get the <b>OH_Drawing_FontFullDescriptor</b> object by the font full name and the font type.\n\n @param fullName Indicates the full name object <b>OH_Drawing_String</b>.\n @param fontType Indicates enumerates of system font type object <b>OH_Drawing_SystemFontType</b>.\n @return Returns the pointer to a font full descriptor object <b>OH_Drawing_FontFullDescriptor</b>.\n Release it through the {@link OH_Drawing_DestroyFontFullDescriptor} function after use.\n @since 24"]
5901 #[cfg(feature = "api-24")]
5902 pub fn OH_Drawing_GetFontFullDescriptorByFullName(
5903 fullName: *const OH_Drawing_String,
5904 fontType: OH_Drawing_SystemFontType,
5905 ) -> *const OH_Drawing_FontFullDescriptor;
5906}
5907extern "C" {
5908 #[doc = " @brief Defines an <b>OH_Drawing_GetFontCountFromFile</b>, which is used to get font count from font file.\n\n @param fontSrc Indicates the path of the font file.\n @return font count.\n @since 23"]
5909 #[cfg(feature = "api-23")]
5910 pub fn OH_Drawing_GetFontCountFromFile(fontSrc: *const ::std::os::raw::c_char) -> u32;
5911}
5912extern "C" {
5913 #[doc = " @brief Defines an <b>OH_Drawing_GetFontCountFromBuffer</b>, which is used to get font count from font buffer.\n\n @param fontBuffer Indicates the font data.\n @param length Indicates the font data length.\n @return font count.\n @since 23"]
5914 #[cfg(feature = "api-23")]
5915 pub fn OH_Drawing_GetFontCountFromBuffer(fontBuffer: *mut u8, length: usize) -> u32;
5916}
5917extern "C" {
5918 #[doc = " @brief Get the font path list.\n @param fontType Indicates enumerates of system font type object <b>OH_Drawing_SystemFontType</b>.\n @param pathCount The count of return path list.\n @return Returns a font path object <b>OH_Drawing_String</b> list.\n @since 23"]
5919 #[cfg(feature = "api-23")]
5920 pub fn OH_Drawing_GetFontPathsByType(
5921 fontType: OH_Drawing_SystemFontType,
5922 pathCount: *mut usize,
5923 ) -> *mut OH_Drawing_String;
5924}
5925#[doc = " Follow system's high contrast settings for text rendering"]
5926#[cfg(feature = "api-20")]
5927pub const OH_Drawing_TextHighContrast_TEXT_FOLLOW_SYSTEM_HIGH_CONTRAST:
5928 OH_Drawing_TextHighContrast = 0;
5929#[doc = " Disable high contrast rendering regardless of system settings"]
5930#[cfg(feature = "api-20")]
5931pub const OH_Drawing_TextHighContrast_TEXT_APP_DISABLE_HIGH_CONTRAST: OH_Drawing_TextHighContrast =
5932 1;
5933#[doc = " Enable high contrast rendering regardless of system settings"]
5934#[cfg(feature = "api-20")]
5935pub const OH_Drawing_TextHighContrast_TEXT_APP_ENABLE_HIGH_CONTRAST: OH_Drawing_TextHighContrast =
5936 2;
5937#[doc = " @brief Defines text rendering high contrast mode to enhance readability.\n @since 20\n @version 1.0"]
5938#[cfg(feature = "api-20")]
5939pub type OH_Drawing_TextHighContrast = u32;
5940#[doc = " Uses the glyph defined in the font file, which could be an empty box, blank space, or custom symbol etc."]
5941#[cfg(feature = "api-20")]
5942pub const OH_Drawing_TextUndefinedGlyphDisplay_TEXT_NO_GLYPH_USE_DEFAULT:
5943 OH_Drawing_TextUndefinedGlyphDisplay = 0;
5944#[doc = " Always render tofu blocks for missing glyphs."]
5945#[cfg(feature = "api-20")]
5946pub const OH_Drawing_TextUndefinedGlyphDisplay_TEXT_NO_GLYPH_USE_TOFU:
5947 OH_Drawing_TextUndefinedGlyphDisplay = 1;
5948#[doc = " @brief Visual representations for undefined (.notdef) glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @since 20"]
5949#[cfg(feature = "api-20")]
5950pub type OH_Drawing_TextUndefinedGlyphDisplay = u32;
5951extern "C" {
5952 #[doc = " @brief Sets high contrast mode of text rendering.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param action <b>OH_Drawing_TextHighContrast</b> object.\n @since 20"]
5953 #[cfg(feature = "api-20")]
5954 pub fn OH_Drawing_SetTextHighContrast(action: OH_Drawing_TextHighContrast);
5955}
5956extern "C" {
5957 #[doc = " @brief Controls how undefined glyphs are visually presented, affects all text rendered after this call.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param undefinedGlyphDisplay Indicates a <b>OH_Drawing_TextUndefinedGlyphDisplay</b> to be set.\n @since 20"]
5958 #[cfg(feature = "api-20")]
5959 pub fn OH_Drawing_SetTextUndefinedGlyphDisplay(
5960 undefinedGlyphDisplay: OH_Drawing_TextUndefinedGlyphDisplay,
5961 );
5962}
5963extern "C" {
5964 #[doc = " @brief Get text line information.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to a typography object <b>OH_Drawing_Typography</b>.\n @return Indicates the pointer to a text line array object <b>OH_Drawing_Array</b>.\n @since 18"]
5965 #[cfg(feature = "api-18")]
5966 pub fn OH_Drawing_TypographyGetTextLines(
5967 typography: *mut OH_Drawing_Typography,
5968 ) -> *mut OH_Drawing_Array;
5969}
5970extern "C" {
5971 #[doc = " @brief Releases the memory occupied by the text line array object <b>OH_Drawing_Array</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lines Indicates the pointer to the text line array object <b>OH_Drawing_Array</b>.\n @since 18\n @version 1.0"]
5972 #[cfg(feature = "api-18")]
5973 pub fn OH_Drawing_DestroyTextLines(lines: *mut OH_Drawing_Array);
5974}
5975extern "C" {
5976 #[doc = " @brief Releases the memory occupied by the text line object <b>OH_Drawing_TextLine</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to the text line object <b>OH_Drawing_TextLine</b>.\n @since 18\n @version 1.0"]
5977 #[cfg(feature = "api-18")]
5978 pub fn OH_Drawing_DestroyTextLine(line: *mut OH_Drawing_TextLine);
5979}
5980extern "C" {
5981 #[doc = " @brief Get the text line object by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lines Indicates the pointer to the text line array object <b>OH_Drawing_Array</b>.\n @param index The text line object index.\n @return Indicates the pointer to a text line object <b>OH_Drawing_TextLine</b>.\n @since 18"]
5982 #[cfg(feature = "api-18")]
5983 pub fn OH_Drawing_GetTextLineByIndex(
5984 lines: *mut OH_Drawing_Array,
5985 index: usize,
5986 ) -> *mut OH_Drawing_TextLine;
5987}
5988extern "C" {
5989 #[doc = " @brief Get the count of glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @return Returns the count of glyphs.\n @since 18\n @version 1.0"]
5990 #[cfg(feature = "api-18")]
5991 pub fn OH_Drawing_TextLineGetGlyphCount(line: *mut OH_Drawing_TextLine) -> f64;
5992}
5993extern "C" {
5994 #[doc = " @brief Get the range of text line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param start Indicates the pointer to text line start position.\n @param end Indicates the pointer to text line end position.\n @since 18\n @version 1.0"]
5995 #[cfg(feature = "api-18")]
5996 pub fn OH_Drawing_TextLineGetTextRange(
5997 line: *mut OH_Drawing_TextLine,
5998 start: *mut usize,
5999 end: *mut usize,
6000 );
6001}
6002extern "C" {
6003 #[doc = " @brief Get the glyph runs array of text line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @return Indicates the pointer to a glyph runs array object of text line <b>OH_Drawing_Array</b>.\n @since 18\n @version 1.0"]
6004 #[cfg(feature = "api-18")]
6005 pub fn OH_Drawing_TextLineGetGlyphRuns(line: *mut OH_Drawing_TextLine)
6006 -> *mut OH_Drawing_Array;
6007}
6008extern "C" {
6009 #[doc = " @brief Releases the memory occupied by the run array object <b>OH_Drawing_Array</b>.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param runs Indicates the pointer to the run array object <b>OH_Drawing_Array</b>.\n @since 18\n @version 1.0"]
6010 #[cfg(feature = "api-18")]
6011 pub fn OH_Drawing_DestroyRuns(runs: *mut OH_Drawing_Array);
6012}
6013extern "C" {
6014 #[doc = " @brief Get the run object by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param runs Indicates the pointer to the run array object <b>OH_Drawing_Array</b>.\n @param index The run object index.\n @return Indicates the pointer to a run object <b>OH_Drawing_Run</b>.\n @since 18"]
6015 #[cfg(feature = "api-18")]
6016 pub fn OH_Drawing_GetRunByIndex(
6017 runs: *mut OH_Drawing_Array,
6018 index: usize,
6019 ) -> *mut OH_Drawing_Run;
6020}
6021extern "C" {
6022 #[doc = " @brief Paint the range of text line.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param x Represents the X-axis position on the canvas.\n @param y Represents the Y-axis position on the canvas.\n @since 18\n @version 1.0"]
6023 #[cfg(feature = "api-18")]
6024 pub fn OH_Drawing_TextLinePaint(
6025 line: *mut OH_Drawing_TextLine,
6026 canvas: *mut OH_Drawing_Canvas,
6027 x: f64,
6028 y: f64,
6029 );
6030}
6031extern "C" {
6032 #[doc = " @brief Creates a truncated text line object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param width Indicates the text line width to set.\n @param mode Indicates the ellipsis model to set, EllipsisMode:MIDDLE is not supported.\n For details, see the enum <b>OH_Drawing_EllipsisModal</b>.\n @param ellipsis Indicates the ellipsis string to set.\n @return Returns the pointer to the <b>OH_Drawing_TextLine</b> object created.\n @since 18\n @version 1.0"]
6033 #[cfg(feature = "api-18")]
6034 pub fn OH_Drawing_TextLineCreateTruncatedLine(
6035 line: *mut OH_Drawing_TextLine,
6036 width: f64,
6037 mode: ::std::os::raw::c_int,
6038 ellipsis: *const ::std::os::raw::c_char,
6039 ) -> *mut OH_Drawing_TextLine;
6040}
6041extern "C" {
6042 #[doc = " @brief Gets the text line typographic bounds.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param ascent Indicates the distance that the pointer points to remain above the baseline.\n @param descent Indicates the pointer to the distance that remains below the baseline.\n @param leading Indicates the pointer to the line Spacing.\n @return Returns The total width of the typesetting border.\n @since 18\n @version 1.0"]
6043 #[cfg(feature = "api-18")]
6044 pub fn OH_Drawing_TextLineGetTypographicBounds(
6045 line: *mut OH_Drawing_TextLine,
6046 ascent: *mut f64,
6047 descent: *mut f64,
6048 leading: *mut f64,
6049 ) -> f64;
6050}
6051extern "C" {
6052 #[doc = " @brief Gets the text line image bounds.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Rect</b> struct created.\n @since 18\n @version 1.0"]
6053 #[cfg(feature = "api-18")]
6054 pub fn OH_Drawing_TextLineGetImageBounds(
6055 line: *mut OH_Drawing_TextLine,
6056 ) -> *mut OH_Drawing_Rect;
6057}
6058extern "C" {
6059 #[doc = " @brief Gets the tail space width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @return Returns the tail space width.\n @since 18\n @version 1.0"]
6060 #[cfg(feature = "api-18")]
6061 pub fn OH_Drawing_TextLineGetTrailingSpaceWidth(line: *mut OH_Drawing_TextLine) -> f64;
6062}
6063extern "C" {
6064 #[doc = " @brief Gets the string index of the given position.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.\n @return Returns the string index for a given position.\n @since 18"]
6065 #[cfg(feature = "api-18")]
6066 pub fn OH_Drawing_TextLineGetStringIndexForPosition(
6067 line: *mut OH_Drawing_TextLine,
6068 point: *mut OH_Drawing_Point,
6069 ) -> i32;
6070}
6071extern "C" {
6072 #[doc = " @brief Gets the offset of the given string index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param index The given string index.\n @return Returns the offset for a given string index.\n @since 18"]
6073 #[cfg(feature = "api-18")]
6074 pub fn OH_Drawing_TextLineGetOffsetForStringIndex(
6075 line: *mut OH_Drawing_TextLine,
6076 index: i32,
6077 ) -> f64;
6078}
6079#[doc = " @brief User-defined callback functions for using offsets and indexes.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param offset Character offset is traversed as an argument to the callback function.\n @param index Character index is traversed as an argument to the callback function.\n @param leadingEdge Whether the current offset is at the character front, as an argument to the callback function.\n @return The return value of the user-defined callback function.\n If false is returned, the traversal continues.\n If true is returned, the traversal stops.\n @since 18\n @version 1.0"]
6080#[cfg(feature = "api-18")]
6081pub type Drawing_CaretOffsetsCallback =
6082 ::std::option::Option<unsafe extern "C" fn(offset: f64, index: i32, leadingEdge: bool) -> bool>;
6083extern "C" {
6084 #[doc = " @brief Enumerate caret offset and index in text lines.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param callback User-defined callback functions, see <b>Drawing_CaretOffsetsCallback</b>.\n @since 18"]
6085 #[cfg(feature = "api-18")]
6086 pub fn OH_Drawing_TextLineEnumerateCaretOffsets(
6087 line: *mut OH_Drawing_TextLine,
6088 callback: Drawing_CaretOffsetsCallback,
6089 );
6090}
6091extern "C" {
6092 #[doc = " @brief Gets the text offset based on the given alignment factor and alignment width.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param line Indicates the pointer to an <b>OH_Drawing_TextLine</b> object.\n @param alignmentFactor The coefficients that text needs to be aligned.\n Less than or equal to 0 is left justified, 0.5 is center justified,\n and greater than or equal to 1 is right justified.\n @param alignmentWidth The width of the text to be aligned.\n Returns 0 if it is less than the actual width of the text.\n @return Returns the offset of the aligned text.\n @since 18\n @version 1.0"]
6093 #[cfg(feature = "api-18")]
6094 pub fn OH_Drawing_TextLineGetAlignmentOffset(
6095 line: *mut OH_Drawing_TextLine,
6096 alignmentFactor: f64,
6097 alignmentWidth: f64,
6098 ) -> f64;
6099}
6100extern "C" {
6101 #[doc = " @brief Creates an <b>OH_Drawing_LineTypography</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param handler Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @return Returns the pointer to the <b>OH_Drawing_LineTypography</b> object created.\n @since 18"]
6102 #[cfg(feature = "api-18")]
6103 pub fn OH_Drawing_CreateLineTypography(
6104 handler: *mut OH_Drawing_TypographyCreate,
6105 ) -> *mut OH_Drawing_LineTypography;
6106}
6107extern "C" {
6108 #[doc = " @brief Releases the memory occupied by an <b>OH_Drawing_LineTypography</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Indicates the pointer to an <b>OH_Drawing_LineTypography</b> object.\n @since 18"]
6109 #[cfg(feature = "api-18")]
6110 pub fn OH_Drawing_DestroyLineTypography(lineTypography: *mut OH_Drawing_LineTypography);
6111}
6112extern "C" {
6113 #[doc = " @brief Calculate the line breakpoint based on the width provided.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param startIndex Indicates the starting point for the line-break calculations.\n @param width Indicates the requested line-break width.\n @return Returns the count of the characters from startIndex that would cause the line break.\n @since 18"]
6114 #[cfg(feature = "api-18")]
6115 pub fn OH_Drawing_LineTypographyGetLineBreak(
6116 lineTypography: *mut OH_Drawing_LineTypography,
6117 startIndex: usize,
6118 width: f64,
6119 ) -> usize;
6120}
6121extern "C" {
6122 #[doc = " @brief Creates a text line object based on the text range provided.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param lineTypography Indicates the pointer to an <b>OH_Drawing_TypographyCreate</b> object.\n @param startIndex Indicates the starting index of the text range.\n @param count Indicates the characters count of the text range.\n @return Returns the pointer to the <b>OH_Drawing_TextLine</b> object created.\n @since 18"]
6123 #[cfg(feature = "api-18")]
6124 pub fn OH_Drawing_LineTypographyCreateLine(
6125 lineTypography: *mut OH_Drawing_LineTypography,
6126 startIndex: usize,
6127 count: usize,
6128 ) -> *mut OH_Drawing_TextLine;
6129}
6130extern "C" {
6131 #[doc = " @brief Gets the run glyph indices ,the offset of the index relative to the entire paragraph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param start The run of start index.\n @param length The run of length, if start and length are set to 0, then get all of the current run.\n @return Run of glyph indices array object <b>OH_Drawing_Array</b>.\n @since 18"]
6132 #[cfg(feature = "api-18")]
6133 pub fn OH_Drawing_GetRunStringIndices(
6134 run: *mut OH_Drawing_Run,
6135 start: i64,
6136 length: i64,
6137 ) -> *mut OH_Drawing_Array;
6138}
6139extern "C" {
6140 #[doc = " @brief Gets the run glyph indices by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param stringIndices the run glyph indices array object <b>OH_Drawing_Array</b>.\n @param index The run of glyph index.\n @return Run of glyph indices element.\n @since 18"]
6141 #[cfg(feature = "api-18")]
6142 pub fn OH_Drawing_GetRunStringIndicesByIndex(
6143 stringIndices: *mut OH_Drawing_Array,
6144 index: usize,
6145 ) -> u64;
6146}
6147extern "C" {
6148 #[doc = " @brief Releases the memory run glyph indices array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param stringIndices glyph indices array object <b>OH_Drawing_Array</b>.\n @since 18"]
6149 #[cfg(feature = "api-18")]
6150 pub fn OH_Drawing_DestroyRunStringIndices(stringIndices: *mut OH_Drawing_Array);
6151}
6152extern "C" {
6153 #[doc = " @brief Gets the range run glyph location and length.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param location The run of glyph location.\n @param length The run of glyph length.\n @since 18"]
6154 #[cfg(feature = "api-18")]
6155 pub fn OH_Drawing_GetRunStringRange(
6156 run: *mut OH_Drawing_Run,
6157 location: *mut u64,
6158 length: *mut u64,
6159 );
6160}
6161extern "C" {
6162 #[doc = " @brief Gets the run typographic bound.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param ascent The run of ascent.\n @param descent The run of descent.\n @param leading The run of leading.\n @return run typographic width.\n @since 18"]
6163 #[cfg(feature = "api-18")]
6164 pub fn OH_Drawing_GetRunTypographicBounds(
6165 run: *mut OH_Drawing_Run,
6166 ascent: *mut f32,
6167 descent: *mut f32,
6168 leading: *mut f32,
6169 ) -> f32;
6170}
6171extern "C" {
6172 #[doc = " @brief Paints text on the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param x Indicates the x coordinate.\n @param y Indicates the y coordinate.\n @since 18"]
6173 #[cfg(feature = "api-18")]
6174 pub fn OH_Drawing_RunPaint(
6175 canvas: *mut OH_Drawing_Canvas,
6176 run: *mut OH_Drawing_Run,
6177 x: f64,
6178 y: f64,
6179 );
6180}
6181extern "C" {
6182 #[doc = " @brief Gets the run image bound.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @return The run image bounds to an <b>OH_Drawing_Rect</b> object.\n @since 18"]
6183 #[cfg(feature = "api-18")]
6184 pub fn OH_Drawing_GetRunImageBounds(run: *mut OH_Drawing_Run) -> *mut OH_Drawing_Rect;
6185}
6186extern "C" {
6187 #[doc = " @brief Releases the memory run image bounds pointer.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rect Run image bounds to an <b>OH_Drawing_Rect</b> object.\n @since 18"]
6188 #[cfg(feature = "api-18")]
6189 pub fn OH_Drawing_DestroyRunImageBounds(rect: *mut OH_Drawing_Rect);
6190}
6191extern "C" {
6192 #[doc = " @brief Gets the range glyph identifier for each character.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param start The run of start index.\n @param length The run of length, if start and length are set to 0, then get all of the current run.\n @return Run of glyph array object <b>OH_Drawing_Array</b.\n @since 18"]
6193 #[cfg(feature = "api-18")]
6194 pub fn OH_Drawing_GetRunGlyphs(
6195 run: *mut OH_Drawing_Run,
6196 start: i64,
6197 length: i64,
6198 ) -> *mut OH_Drawing_Array;
6199}
6200extern "C" {
6201 #[doc = " @brief Gets the glyph identifier by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param glyphs The run of glyph array object <b>OH_Drawing_Array</b>.\n @param index The run of glyph index.\n @return Run of glyph element.\n @since 18\n @version 1.0"]
6202 #[cfg(feature = "api-18")]
6203 pub fn OH_Drawing_GetRunGlyphsByIndex(glyphs: *mut OH_Drawing_Array, index: usize) -> u16;
6204}
6205extern "C" {
6206 #[doc = " @brief Releases the memory run glyph array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param glyphs The run of glyph array object <b>OH_Drawing_Array</b>.\n @since 18"]
6207 #[cfg(feature = "api-18")]
6208 pub fn OH_Drawing_DestroyRunGlyphs(glyphs: *mut OH_Drawing_Array);
6209}
6210extern "C" {
6211 #[doc = " @brief Gets the range glyph position array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param start The run of start index.\n @param length The run of length, if start and length are set to 0, then get all of the current run.\n @return Run of position array object <b>OH_Drawing_Array</b>.\n @since 18"]
6212 #[cfg(feature = "api-18")]
6213 pub fn OH_Drawing_GetRunPositions(
6214 run: *mut OH_Drawing_Run,
6215 start: i64,
6216 length: i64,
6217 ) -> *mut OH_Drawing_Array;
6218}
6219extern "C" {
6220 #[doc = " @brief Gets the glyph position by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positions The run of position array object <b>OH_Drawing_Array</b>.\n @param index The run of glyph index.\n @return Run of glyph position pointer to an <b>OH_Drawing_Point</b> object.\n @since 18\n @version 1.0"]
6221 #[cfg(feature = "api-18")]
6222 pub fn OH_Drawing_GetRunPositionsByIndex(
6223 positions: *mut OH_Drawing_Array,
6224 index: usize,
6225 ) -> *mut OH_Drawing_Point;
6226}
6227extern "C" {
6228 #[doc = " @brief Releases the memory run of position array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param positions The run of position array object <b>OH_Drawing_Array</b>.\n @since 18"]
6229 #[cfg(feature = "api-18")]
6230 pub fn OH_Drawing_DestroyRunPositions(positions: *mut OH_Drawing_Array);
6231}
6232extern "C" {
6233 #[doc = " @brief Gets the number of glyph.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @return The number of glyph.\n @since 18"]
6234 #[cfg(feature = "api-18")]
6235 pub fn OH_Drawing_GetRunGlyphCount(run: *mut OH_Drawing_Run) -> u32;
6236}
6237extern "C" {
6238 #[doc = " @brief Gets the Font Object of run.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @return The Font Object of run.\n @since 20\n @version 1.0"]
6239 #[cfg(feature = "api-20")]
6240 pub fn OH_Drawing_GetRunFont(run: *mut OH_Drawing_Run) -> *mut OH_Drawing_Font;
6241}
6242extern "C" {
6243 #[doc = " @brief Get the text direction.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @return Return the text direction of an <b>OH_Drawing_TextDirection</b> object.\n @since 20"]
6244 #[cfg(feature = "api-20")]
6245 pub fn OH_Drawing_GetRunTextDirection(run: *mut OH_Drawing_Run) -> OH_Drawing_TextDirection;
6246}
6247extern "C" {
6248 #[doc = " @brief Gets the glyph advance array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param run Indicates the pointer to an <b>OH_Drawing_Run</b> object.\n @param start The run of start index.\n @param length The run of length, if start and length are set to 0, then get all of the current run.\n @return Indicates the pointer to the glyph advance array object <b>OH_Drawing_Array</b>.\n @since 20"]
6249 #[cfg(feature = "api-20")]
6250 pub fn OH_Drawing_GetRunGlyphAdvances(
6251 run: *mut OH_Drawing_Run,
6252 start: u32,
6253 length: u32,
6254 ) -> *mut OH_Drawing_Array;
6255}
6256extern "C" {
6257 #[doc = " @brief Gets the glyph advance by index.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param advances The glyph advance array object <b>OH_Drawing_Array</b>.\n @param index The run of glyph index.\n @return Run of glyph advance pointer to an <b>OH_Drawing_Point</b> object.\n @since 20"]
6258 #[cfg(feature = "api-20")]
6259 pub fn OH_Drawing_GetRunGlyphAdvanceByIndex(
6260 advances: *mut OH_Drawing_Array,
6261 index: usize,
6262 ) -> *mut OH_Drawing_Point;
6263}
6264extern "C" {
6265 #[doc = " @brief Releases the memory of glyph advance array.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param advances The run of glyph advance array object <b>OH_Drawing_Array</b>.\n @since 20"]
6266 #[cfg(feature = "api-20")]
6267 pub fn OH_Drawing_DestroyRunGlyphAdvances(advances: *mut OH_Drawing_Array);
6268}
6269extern "C" {
6270 #[doc = " @brief Creates a default <b>OH_Drawing_Typeface</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n @since 11\n @version 1.0"]
6271 pub fn OH_Drawing_TypefaceCreateDefault() -> *mut OH_Drawing_Typeface;
6272}
6273extern "C" {
6274 #[doc = " @brief Creates an <b>OH_Drawing_Typeface</b> object by file.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path file path.\n @param index file index.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n @since 12\n @version 1.0"]
6275 pub fn OH_Drawing_TypefaceCreateFromFile(
6276 path: *const ::std::os::raw::c_char,
6277 index: ::std::os::raw::c_int,
6278 ) -> *mut OH_Drawing_Typeface;
6279}
6280extern "C" {
6281 #[doc = " @brief Creates an <b>OH_Drawing_Typeface</b> object with the specified font arguments from a file.\n If the <b>OH_Drawing_Typeface</b> object does not support the variations described in fontArguments,\n this function creates an <b>OH_Drawing_Typeface</b> object without font arguments.\n In this case, this function provides the same capability as {@link OH_Drawing_TypefaceCreateFromFile}.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the file path.\n @param fontArguments Indicates the pointer to an <b>OH_Drawing_FontArguments</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty,\n or either path or fontArguments is nullptr, or the path is invalid.\n @since 13\n @version 1.0"]
6282 #[cfg(feature = "api-13")]
6283 pub fn OH_Drawing_TypefaceCreateFromFileWithArguments(
6284 path: *const ::std::os::raw::c_char,
6285 fontArguments: *const OH_Drawing_FontArguments,
6286 ) -> *mut OH_Drawing_Typeface;
6287}
6288extern "C" {
6289 #[doc = " @brief Creates an <b>OH_Drawing_Typeface</b> object with the specified font arguments from\n an existing <b>OH_Drawing_Typeface</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param current Indicates the existing <b>OH_Drawing_Typeface</b> object.\n @param fontArguments Indicates the pointer to an <b>OH_Drawing_FontArguments</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty,\n or either current or fontArguments is nullptr,\n or current does not support the variations described in fontArguments.\n @since 13\n @version 1.0"]
6290 #[cfg(feature = "api-13")]
6291 pub fn OH_Drawing_TypefaceCreateFromCurrent(
6292 current: *const OH_Drawing_Typeface,
6293 fontArguments: *const OH_Drawing_FontArguments,
6294 ) -> *mut OH_Drawing_Typeface;
6295}
6296extern "C" {
6297 #[doc = " @brief Creates an <b>OH_Drawing_Typeface</b> object by given a stream. If the stream is not a valid\n font file, returns nullptr. Ownership of the stream is transferred, so the caller must not reference\n it or free it again.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param memoryStream Indicates the pointer to an <b>OH_Drawing_MemoryStream</b> object.\n @param index memory stream index.\n @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.\n @since 12\n @version 1.0"]
6298 pub fn OH_Drawing_TypefaceCreateFromStream(
6299 memoryStream: *mut OH_Drawing_MemoryStream,
6300 index: i32,
6301 ) -> *mut OH_Drawing_Typeface;
6302}
6303extern "C" {
6304 #[doc = " @brief Destroys an <b>OH_Drawing_Typeface</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @since 11\n @version 1.0"]
6305 pub fn OH_Drawing_TypefaceDestroy(typeface: *mut OH_Drawing_Typeface);
6306}
6307extern "C" {
6308 #[doc = " @brief Creates an <b>OH_Drawing_FontArguments</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @return Returns the pointer to the <b>OH_Drawing_FontArguments</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is that the available memory is empty.\n @since 13\n @version 1.0"]
6309 #[cfg(feature = "api-13")]
6310 pub fn OH_Drawing_FontArgumentsCreate() -> *mut OH_Drawing_FontArguments;
6311}
6312extern "C" {
6313 #[doc = " @brief Adds a font variation axis for an <b>OH_Drawing_FontArguments</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontArguments Indicates the pointer to an <b>OH_Drawing_FontArguments</b> object.\n @param axis Indicates the axis tag, which must contain four ASCII characters.\n @param value Indicates the value of the axis field.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if either fontArguments or axis is nullptr,\n or the length of axis is not 4.\n @since 13\n @version 1.0"]
6314 #[cfg(feature = "api-13")]
6315 pub fn OH_Drawing_FontArgumentsAddVariation(
6316 fontArguments: *mut OH_Drawing_FontArguments,
6317 axis: *const ::std::os::raw::c_char,
6318 value: f32,
6319 ) -> OH_Drawing_ErrorCode;
6320}
6321extern "C" {
6322 #[doc = " @brief Destroys an <b>OH_Drawing_FontArguments</b> object and reclaims the memory occupied by the object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param fontArguments Indicates the pointer to an <b>OH_Drawing_FontArguments</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if fontArguments is nullptr.\n @since 13\n @version 1.0"]
6323 #[cfg(feature = "api-13")]
6324 pub fn OH_Drawing_FontArgumentsDestroy(
6325 fontArguments: *mut OH_Drawing_FontArguments,
6326 ) -> OH_Drawing_ErrorCode;
6327}
6328extern "C" {
6329 #[doc = " @brief Checks if the typeface is bold.\n\n @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @param isBold Indicates if the typeface is bold.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if typeface or isBold is nullptr.\n @since 23\n @version 1.0"]
6330 #[cfg(feature = "api-23")]
6331 pub fn OH_Drawing_TypefaceIsBold(
6332 typeface: *const OH_Drawing_Typeface,
6333 isBold: *mut bool,
6334 ) -> OH_Drawing_ErrorCode;
6335}
6336extern "C" {
6337 #[doc = " @brief Checks if the typeface is italic.\n\n @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @param isItalic Indicates if the typeface is italic.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if typeface or italic is nullptr.\n @since 23\n @version 1.0"]
6338 #[cfg(feature = "api-23")]
6339 pub fn OH_Drawing_TypefaceIsItalic(
6340 typeface: *const OH_Drawing_Typeface,
6341 isItalic: *mut bool,
6342 ) -> OH_Drawing_ErrorCode;
6343}