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#[link(name = "native_drawing")]
9unsafe extern "C" {}
10
11#[repr(C)]
12#[derive(Debug, Copy, Clone)]
13pub struct OH_Drawing_Canvas {
14 _unused: [u8; 0],
15}
16#[repr(C)]
17#[derive(Debug, Copy, Clone)]
18pub struct OH_Drawing_Pen {
19 _unused: [u8; 0],
20}
21#[repr(C)]
22#[derive(Debug, Copy, Clone)]
23pub struct OH_Drawing_Region {
24 _unused: [u8; 0],
25}
26#[repr(C)]
27#[derive(Debug, Copy, Clone)]
28pub struct OH_Drawing_Brush {
29 _unused: [u8; 0],
30}
31#[repr(C)]
32#[derive(Debug, Copy, Clone)]
33pub struct OH_Drawing_Path {
34 _unused: [u8; 0],
35}
36#[repr(C)]
37#[derive(Debug, Copy, Clone)]
38pub struct OH_Drawing_Bitmap {
39 _unused: [u8; 0],
40}
41#[repr(C)]
42#[derive(Debug, Copy, Clone)]
43pub struct OH_Drawing_Point {
44 _unused: [u8; 0],
45}
46#[repr(C)]
47#[derive(Debug, Copy, Clone)]
48pub struct OH_Drawing_PixelMap {
49 _unused: [u8; 0],
50}
51#[repr(C)]
52#[derive(Debug, Copy, Clone)]
53pub struct OH_Drawing_ColorSpace {
54 _unused: [u8; 0],
55}
56#[doc = " @brief Defines a point of 2d.\n\n @since 12\n @version 1.0"]
57#[repr(C)]
58#[derive(Debug, Copy, Clone)]
59pub struct OH_Drawing_Point2D {
60 pub x: f32,
61 pub y: f32,
62}
63#[doc = " @brief Defines a corner radii, which is on x-axis and y-axis.\n\n @since 12\n @version 1.0"]
64pub type OH_Drawing_Corner_Radii = OH_Drawing_Point2D;
65#[doc = " @brief Defines a point of 3d, which is used to describe the coordinate point.\n\n @since 12\n @version 1.0"]
66#[repr(C)]
67#[derive(Debug, Copy, Clone)]
68pub struct OH_Drawing_Point3D {
69 pub x: f32,
70 pub y: f32,
71 pub z: f32,
72}
73#[repr(C)]
74#[derive(Debug, Copy, Clone)]
75pub struct OH_Drawing_PathEffect {
76 _unused: [u8; 0],
77}
78#[repr(C)]
79#[derive(Debug, Copy, Clone)]
80pub struct OH_Drawing_Rect {
81 _unused: [u8; 0],
82}
83#[repr(C)]
84#[derive(Debug, Copy, Clone)]
85pub struct OH_Drawing_RoundRect {
86 _unused: [u8; 0],
87}
88#[repr(C)]
89#[derive(Debug, Copy, Clone)]
90pub struct OH_Drawing_Matrix {
91 _unused: [u8; 0],
92}
93#[repr(C)]
94#[derive(Debug, Copy, Clone)]
95pub struct OH_Drawing_ShaderEffect {
96 _unused: [u8; 0],
97}
98#[repr(C)]
99#[derive(Debug, Copy, Clone)]
100pub struct OH_Drawing_ShadowLayer {
101 _unused: [u8; 0],
102}
103#[repr(C)]
104#[derive(Debug, Copy, Clone)]
105pub struct OH_Drawing_Filter {
106 _unused: [u8; 0],
107}
108#[repr(C)]
109#[derive(Debug, Copy, Clone)]
110pub struct OH_Drawing_MaskFilter {
111 _unused: [u8; 0],
112}
113#[repr(C)]
114#[derive(Debug, Copy, Clone)]
115pub struct OH_Drawing_ColorFilter {
116 _unused: [u8; 0],
117}
118#[repr(C)]
119#[derive(Debug, Copy, Clone)]
120pub struct OH_Drawing_Font {
121 _unused: [u8; 0],
122}
123#[repr(C)]
124#[derive(Debug, Copy, Clone)]
125pub struct OH_Drawing_FontFeatures {
126 _unused: [u8; 0],
127}
128#[repr(C)]
129#[derive(Debug, Copy, Clone)]
130pub struct OH_Drawing_MemoryStream {
131 _unused: [u8; 0],
132}
133#[repr(C)]
134#[derive(Debug, Copy, Clone)]
135pub struct OH_Drawing_FontArguments {
136 _unused: [u8; 0],
137}
138#[repr(C)]
139#[derive(Debug, Copy, Clone)]
140pub struct OH_Drawing_Typeface {
141 _unused: [u8; 0],
142}
143#[repr(C)]
144#[derive(Debug, Copy, Clone)]
145pub struct OH_Drawing_TextBlob {
146 _unused: [u8; 0],
147}
148#[repr(C)]
149#[derive(Debug, Copy, Clone)]
150pub struct OH_Drawing_Image {
151 _unused: [u8; 0],
152}
153#[repr(C)]
154#[derive(Debug, Copy, Clone)]
155pub struct OH_Drawing_ImageFilter {
156 _unused: [u8; 0],
157}
158#[repr(C)]
159#[derive(Debug, Copy, Clone)]
160pub struct OH_Drawing_SamplingOptions {
161 _unused: [u8; 0],
162}
163#[repr(C)]
164#[derive(Debug, Copy, Clone)]
165pub struct OH_Drawing_TextBlobBuilder {
166 _unused: [u8; 0],
167}
168#[repr(C)]
169#[derive(Debug, Copy, Clone)]
170pub struct OH_Drawing_GpuContext {
171 _unused: [u8; 0],
172}
173#[repr(C)]
174#[derive(Debug, Copy, Clone)]
175pub struct OH_Drawing_Surface {
176 _unused: [u8; 0],
177}
178#[doc = " Unknown format."]
179pub const OH_Drawing_ColorFormat_COLOR_FORMAT_UNKNOWN: OH_Drawing_ColorFormat = 0;
180#[doc = " Each pixel is represented by 8 bits, which together indicate alpha."]
181pub const OH_Drawing_ColorFormat_COLOR_FORMAT_ALPHA_8: OH_Drawing_ColorFormat = 1;
182#[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."]
183pub const OH_Drawing_ColorFormat_COLOR_FORMAT_RGB_565: OH_Drawing_ColorFormat = 2;
184#[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."]
185pub const OH_Drawing_ColorFormat_COLOR_FORMAT_ARGB_4444: OH_Drawing_ColorFormat = 3;
186#[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."]
187pub const OH_Drawing_ColorFormat_COLOR_FORMAT_RGBA_8888: OH_Drawing_ColorFormat = 4;
188#[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."]
189pub const OH_Drawing_ColorFormat_COLOR_FORMAT_BGRA_8888: OH_Drawing_ColorFormat = 5;
190#[doc = " @brief Enumerates storage formats of bitmap pixels.\n\n @since 8\n @version 1.0"]
191pub type OH_Drawing_ColorFormat = u32;
192#[doc = " Unknown format."]
193pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNKNOWN: OH_Drawing_AlphaFormat = 0;
194#[doc = " The bitmap does not have the alpha component."]
195pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_OPAQUE: OH_Drawing_AlphaFormat = 1;
196#[doc = " The color component of each pixel is premultiplied by the alpha component."]
197pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_PREMUL: OH_Drawing_AlphaFormat = 2;
198#[doc = " The color component of each pixel is not premultiplied by the alpha component."]
199pub const OH_Drawing_AlphaFormat_ALPHA_FORMAT_UNPREMUL: OH_Drawing_AlphaFormat = 3;
200#[doc = " @brief Enumerates alpha formats of bitmap pixels.\n\n @since 8\n @version 1.0"]
201pub type OH_Drawing_AlphaFormat = u32;
202#[doc = " r = 0."]
203pub const OH_Drawing_BlendMode_BLEND_MODE_CLEAR: OH_Drawing_BlendMode = 0;
204#[doc = " r = s."]
205pub const OH_Drawing_BlendMode_BLEND_MODE_SRC: OH_Drawing_BlendMode = 1;
206#[doc = " r = d."]
207pub const OH_Drawing_BlendMode_BLEND_MODE_DST: OH_Drawing_BlendMode = 2;
208#[doc = " r = s + (1-sa)*d."]
209pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_OVER: OH_Drawing_BlendMode = 3;
210#[doc = " r = d + (1-da)*s."]
211pub const OH_Drawing_BlendMode_BLEND_MODE_DST_OVER: OH_Drawing_BlendMode = 4;
212#[doc = " r = s * da."]
213pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_IN: OH_Drawing_BlendMode = 5;
214#[doc = " r = d * sa."]
215pub const OH_Drawing_BlendMode_BLEND_MODE_DST_IN: OH_Drawing_BlendMode = 6;
216#[doc = " r = s * (1-da)."]
217pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_OUT: OH_Drawing_BlendMode = 7;
218#[doc = " r = d * (1-sa)."]
219pub const OH_Drawing_BlendMode_BLEND_MODE_DST_OUT: OH_Drawing_BlendMode = 8;
220#[doc = " r = s*da + d*(1-sa)."]
221pub const OH_Drawing_BlendMode_BLEND_MODE_SRC_ATOP: OH_Drawing_BlendMode = 9;
222#[doc = " r = d*sa + s*(1-da)."]
223pub const OH_Drawing_BlendMode_BLEND_MODE_DST_ATOP: OH_Drawing_BlendMode = 10;
224#[doc = " r = s*(1-da) + d*(1-sa)."]
225pub const OH_Drawing_BlendMode_BLEND_MODE_XOR: OH_Drawing_BlendMode = 11;
226#[doc = " r = min(s + d, 1)."]
227pub const OH_Drawing_BlendMode_BLEND_MODE_PLUS: OH_Drawing_BlendMode = 12;
228#[doc = " r = s*d."]
229pub const OH_Drawing_BlendMode_BLEND_MODE_MODULATE: OH_Drawing_BlendMode = 13;
230#[doc = " r = s + d - s*d."]
231pub const OH_Drawing_BlendMode_BLEND_MODE_SCREEN: OH_Drawing_BlendMode = 14;
232#[doc = " multiply or screen, depending on destination."]
233pub const OH_Drawing_BlendMode_BLEND_MODE_OVERLAY: OH_Drawing_BlendMode = 15;
234#[doc = " rc = s + d - max(s*da, d*sa), ra = s + (1-sa)*d."]
235pub const OH_Drawing_BlendMode_BLEND_MODE_DARKEN: OH_Drawing_BlendMode = 16;
236#[doc = " rc = s + d - min(s*da, d*sa), ra = s + (1-sa)*d."]
237pub const OH_Drawing_BlendMode_BLEND_MODE_LIGHTEN: OH_Drawing_BlendMode = 17;
238#[doc = " brighten destination to reflect source."]
239pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR_DODGE: OH_Drawing_BlendMode = 18;
240#[doc = " darken destination to reflect source."]
241pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR_BURN: OH_Drawing_BlendMode = 19;
242#[doc = " multiply or screen, depending on source."]
243pub const OH_Drawing_BlendMode_BLEND_MODE_HARD_LIGHT: OH_Drawing_BlendMode = 20;
244#[doc = " lighten or darken, depending on source."]
245pub const OH_Drawing_BlendMode_BLEND_MODE_SOFT_LIGHT: OH_Drawing_BlendMode = 21;
246#[doc = " rc = s + d - 2*(min(s*da, d*sa)), ra = s + (1-sa)*d."]
247pub const OH_Drawing_BlendMode_BLEND_MODE_DIFFERENCE: OH_Drawing_BlendMode = 22;
248#[doc = " rc = s + d - two(s*d), ra = s + (1-sa)*d."]
249pub const OH_Drawing_BlendMode_BLEND_MODE_EXCLUSION: OH_Drawing_BlendMode = 23;
250#[doc = " r = s*(1-da) + d*(1-sa) + s*d."]
251pub const OH_Drawing_BlendMode_BLEND_MODE_MULTIPLY: OH_Drawing_BlendMode = 24;
252#[doc = " hue of source with saturation and luminosity of destination."]
253pub const OH_Drawing_BlendMode_BLEND_MODE_HUE: OH_Drawing_BlendMode = 25;
254#[doc = " saturation of source with hue and luminosity of destination."]
255pub const OH_Drawing_BlendMode_BLEND_MODE_SATURATION: OH_Drawing_BlendMode = 26;
256#[doc = " hue and saturation of source with luminosity of destination."]
257pub const OH_Drawing_BlendMode_BLEND_MODE_COLOR: OH_Drawing_BlendMode = 27;
258#[doc = " luminosity of source with hue and saturation of destination."]
259pub const OH_Drawing_BlendMode_BLEND_MODE_LUMINOSITY: OH_Drawing_BlendMode = 28;
260#[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"]
261pub type OH_Drawing_BlendMode = u32;
262#[doc = " @brief Defines image info struct.\n\n @since 12\n @version 1.0"]
263#[repr(C)]
264#[derive(Debug, Copy, Clone)]
265pub struct OH_Drawing_Image_Info {
266 #[doc = " storage for width of image"]
267 pub width: i32,
268 #[doc = " storage for height of image"]
269 pub height: i32,
270 #[doc = " storage for color formats"]
271 pub colorType: OH_Drawing_ColorFormat,
272 #[doc = " storage for alpha formats"]
273 pub alphaType: OH_Drawing_AlphaFormat,
274}
275#[doc = " @brief Defines rectstyle info struct.\n\n @since 12\n @version 1.0"]
276#[repr(C)]
277#[derive(Debug, Copy, Clone)]
278pub struct OH_Drawing_RectStyle_Info {
279 #[doc = " color of rectstyle"]
280 pub color: u32,
281 #[doc = " radius in left top of rectstyle"]
282 pub leftTopRadius: f64,
283 #[doc = " radius in right top of rectstyle"]
284 pub rightTopRadius: f64,
285 #[doc = " radius in right bottom of rectstyle"]
286 pub rightBottomRadius: f64,
287 #[doc = " radius in left bottom of rectstyle"]
288 pub leftBottomRadius: f64,
289}
290#[doc = " @brief Defines the string information struct.\n\n @since 14\n @version 1.0"]
291#[cfg(feature = "api-14")]
292#[repr(C)]
293#[derive(Debug, Copy, Clone)]
294pub struct OH_Drawing_String {
295 #[doc = " A pointer to a byte string containing UTF-16 encoded entities"]
296 pub strData: *mut u8,
297 #[doc = " The length of `strData` in bytes"]
298 pub strLen: u32,
299}
300#[doc = " uses bytes to represent UTF-8 or ASCII"]
301pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF8: OH_Drawing_TextEncoding = 0;
302#[doc = " uses two byte words to represent most of Unicode"]
303pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF16: OH_Drawing_TextEncoding = 1;
304#[doc = " uses four byte words to represent all of Unicode"]
305pub const OH_Drawing_TextEncoding_TEXT_ENCODING_UTF32: OH_Drawing_TextEncoding = 2;
306#[doc = " uses two byte words to represent glyph indices"]
307pub const OH_Drawing_TextEncoding_TEXT_ENCODING_GLYPH_ID: OH_Drawing_TextEncoding = 3;
308#[doc = " @brief Enumerates text encoding types.\n @since 12\n @version 1.0"]
309pub type OH_Drawing_TextEncoding = u32;
310#[repr(C)]
311#[derive(Debug, Copy, Clone)]
312pub struct OH_Drawing_FontMgr {
313 _unused: [u8; 0],
314}
315#[repr(C)]
316#[derive(Debug, Copy, Clone)]
317pub struct OH_Drawing_FontStyleSet {
318 _unused: [u8; 0],
319}
320#[repr(C)]
321#[derive(Debug, Copy, Clone)]
322pub struct OH_Drawing_RecordCmdUtils {
323 _unused: [u8; 0],
324}
325#[repr(C)]
326#[derive(Debug, Copy, Clone)]
327pub struct OH_Drawing_RecordCmd {
328 _unused: [u8; 0],
329}
330#[repr(C)]
331#[derive(Debug, Copy, Clone)]
332pub struct OH_Drawing_Array {
333 _unused: [u8; 0],
334}
335#[doc = " @brief Defines the pixel format of a bitmap, including the color type and alpha type.\n\n @since 8\n @version 1.0"]
336#[repr(C)]
337#[derive(Debug, Copy, Clone)]
338pub struct OH_Drawing_BitmapFormat {
339 #[doc = " Storage format of bitmap pixels"]
340 pub colorFormat: OH_Drawing_ColorFormat,
341 #[doc = " Alpha format of bitmap pixels"]
342 pub alphaFormat: OH_Drawing_AlphaFormat,
343}
344extern "C" {
345 #[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"]
346 pub fn OH_Drawing_BitmapCreate() -> *mut OH_Drawing_Bitmap;
347}
348extern "C" {
349 #[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"]
350 pub fn OH_Drawing_BitmapDestroy(bitmap: *mut OH_Drawing_Bitmap);
351}
352extern "C" {
353 #[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"]
354 pub fn OH_Drawing_BitmapCreateFromPixels(
355 imageInfo: *mut OH_Drawing_Image_Info,
356 pixels: *mut ::std::os::raw::c_void,
357 rowBytes: u32,
358 ) -> *mut OH_Drawing_Bitmap;
359}
360extern "C" {
361 #[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"]
362 pub fn OH_Drawing_BitmapBuild(
363 bitmap: *mut OH_Drawing_Bitmap,
364 width: u32,
365 height: u32,
366 bitmapFormat: *const OH_Drawing_BitmapFormat,
367 );
368}
369extern "C" {
370 #[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"]
371 pub fn OH_Drawing_BitmapGetWidth(bitmap: *mut OH_Drawing_Bitmap) -> u32;
372}
373extern "C" {
374 #[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"]
375 pub fn OH_Drawing_BitmapGetHeight(bitmap: *mut OH_Drawing_Bitmap) -> u32;
376}
377extern "C" {
378 #[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"]
379 pub fn OH_Drawing_BitmapGetColorFormat(
380 bitmap: *mut OH_Drawing_Bitmap,
381 ) -> OH_Drawing_ColorFormat;
382}
383extern "C" {
384 #[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"]
385 pub fn OH_Drawing_BitmapGetAlphaFormat(
386 bitmap: *mut OH_Drawing_Bitmap,
387 ) -> OH_Drawing_AlphaFormat;
388}
389extern "C" {
390 #[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"]
391 pub fn OH_Drawing_BitmapGetPixels(
392 bitmap: *mut OH_Drawing_Bitmap,
393 ) -> *mut ::std::os::raw::c_void;
394}
395extern "C" {
396 #[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"]
397 pub fn OH_Drawing_BitmapGetImageInfo(
398 bitmap: *mut OH_Drawing_Bitmap,
399 imageInfo: *mut OH_Drawing_Image_Info,
400 );
401}
402extern "C" {
403 #[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"]
404 pub fn OH_Drawing_BitmapReadPixels(
405 bitmap: *mut OH_Drawing_Bitmap,
406 dstInfo: *const OH_Drawing_Image_Info,
407 dstPixels: *mut ::std::os::raw::c_void,
408 dstRowBytes: usize,
409 srcX: i32,
410 srcY: i32,
411 ) -> bool;
412}
413#[doc = " @error Operation completed successfully."]
414pub const OH_Drawing_ErrorCode_OH_DRAWING_SUCCESS: OH_Drawing_ErrorCode = 0;
415#[doc = " @error Permission verification failed."]
416pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_NO_PERMISSION: OH_Drawing_ErrorCode = 201;
417#[doc = " @error Invalid input parameter. For example, the pointer in the parameter is a nullptr."]
418pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INVALID_PARAMETER: OH_Drawing_ErrorCode = 401;
419#[doc = " @error The parameter is not in the valid range."]
420pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE: OH_Drawing_ErrorCode =
421 26200001;
422#[doc = " @error mem allocate failed.\n @since 13"]
423#[cfg(feature = "api-13")]
424pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_ALLOCATION_FAILED: OH_Drawing_ErrorCode = 26200002;
425#[doc = " @error The attribute id is not recognized or supported.\n @since 21"]
426#[cfg(feature = "api-21")]
427pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_ATTRIBUTE_ID_MISMATCH: OH_Drawing_ErrorCode =
428 26200003;
429#[doc = " @error incorrect input parameter. The possible cause is that the provided pointer is null.\n @since 22"]
430#[cfg(feature = "api-22")]
431pub const OH_Drawing_ErrorCode_OH_DRAWING_ERROR_INCORRECT_PARAMETER: OH_Drawing_ErrorCode =
432 26200004;
433#[doc = " @brief Enumerates error codes of drawing.\n @since 12"]
434pub type OH_Drawing_ErrorCode = u32;
435extern "C" {
436 #[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"]
437 pub fn OH_Drawing_ErrorCodeGet() -> OH_Drawing_ErrorCode;
438}
439extern "C" {
440 #[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"]
441 #[cfg(feature = "api-18")]
442 pub fn OH_Drawing_ErrorCodeReset();
443}
444#[repr(C)]
445#[derive(Debug, Copy, Clone)]
446pub struct OH_NativeColorSpaceManager {
447 _unused: [u8; 0],
448}
449extern "C" {
450 #[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"]
451 pub fn OH_Drawing_BrushCreate() -> *mut OH_Drawing_Brush;
452}
453extern "C" {
454 #[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"]
455 pub fn OH_Drawing_BrushCopy(brush: *mut OH_Drawing_Brush) -> *mut OH_Drawing_Brush;
456}
457extern "C" {
458 #[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"]
459 pub fn OH_Drawing_BrushDestroy(brush: *mut OH_Drawing_Brush);
460}
461extern "C" {
462 #[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"]
463 pub fn OH_Drawing_BrushIsAntiAlias(brush: *const OH_Drawing_Brush) -> bool;
464}
465extern "C" {
466 #[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"]
467 pub fn OH_Drawing_BrushSetAntiAlias(brush: *mut OH_Drawing_Brush, antiAlias: bool);
468}
469extern "C" {
470 #[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"]
471 pub fn OH_Drawing_BrushGetColor(brush: *const OH_Drawing_Brush) -> u32;
472}
473extern "C" {
474 #[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"]
475 pub fn OH_Drawing_BrushSetColor(brush: *mut OH_Drawing_Brush, color: u32);
476}
477extern "C" {
478 #[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"]
479 pub fn OH_Drawing_BrushGetAlpha(brush: *const OH_Drawing_Brush) -> u8;
480}
481extern "C" {
482 #[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"]
483 pub fn OH_Drawing_BrushSetAlpha(brush: *mut OH_Drawing_Brush, alpha: u8);
484}
485extern "C" {
486 #[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"]
487 #[cfg(feature = "api-20")]
488 pub fn OH_Drawing_BrushSetColor4f(
489 brush: *mut OH_Drawing_Brush,
490 a: f32,
491 r: f32,
492 g: f32,
493 b: f32,
494 colorSpaceManager: *mut OH_NativeColorSpaceManager,
495 ) -> OH_Drawing_ErrorCode;
496}
497extern "C" {
498 #[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"]
499 #[cfg(feature = "api-20")]
500 pub fn OH_Drawing_BrushGetAlphaFloat(
501 brush: *const OH_Drawing_Brush,
502 a: *mut f32,
503 ) -> OH_Drawing_ErrorCode;
504}
505extern "C" {
506 #[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"]
507 #[cfg(feature = "api-20")]
508 pub fn OH_Drawing_BrushGetRedFloat(
509 brush: *const OH_Drawing_Brush,
510 r: *mut f32,
511 ) -> OH_Drawing_ErrorCode;
512}
513extern "C" {
514 #[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"]
515 #[cfg(feature = "api-20")]
516 pub fn OH_Drawing_BrushGetGreenFloat(
517 brush: *const OH_Drawing_Brush,
518 g: *mut f32,
519 ) -> OH_Drawing_ErrorCode;
520}
521extern "C" {
522 #[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"]
523 #[cfg(feature = "api-20")]
524 pub fn OH_Drawing_BrushGetBlueFloat(
525 brush: *const OH_Drawing_Brush,
526 b: *mut f32,
527 ) -> OH_Drawing_ErrorCode;
528}
529extern "C" {
530 #[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"]
531 pub fn OH_Drawing_BrushSetShaderEffect(
532 brush: *mut OH_Drawing_Brush,
533 shaderEffect: *mut OH_Drawing_ShaderEffect,
534 );
535}
536extern "C" {
537 #[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"]
538 pub fn OH_Drawing_BrushSetShadowLayer(
539 brush: *mut OH_Drawing_Brush,
540 shadowLayer: *mut OH_Drawing_ShadowLayer,
541 );
542}
543extern "C" {
544 #[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"]
545 pub fn OH_Drawing_BrushSetFilter(brush: *mut OH_Drawing_Brush, filter: *mut OH_Drawing_Filter);
546}
547extern "C" {
548 #[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"]
549 pub fn OH_Drawing_BrushGetFilter(brush: *mut OH_Drawing_Brush, filter: *mut OH_Drawing_Filter);
550}
551extern "C" {
552 #[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"]
553 pub fn OH_Drawing_BrushSetBlendMode(
554 brush: *mut OH_Drawing_Brush,
555 blendMode: OH_Drawing_BlendMode,
556 );
557}
558extern "C" {
559 #[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"]
560 pub fn OH_Drawing_BrushReset(brush: *mut OH_Drawing_Brush);
561}
562#[doc = " single sample point (nearest neighbor)"]
563pub const OH_Drawing_FilterMode_FILTER_MODE_NEAREST: OH_Drawing_FilterMode = 0;
564#[doc = " interporate between 2x2 sample points (bilinear interpolation)"]
565pub const OH_Drawing_FilterMode_FILTER_MODE_LINEAR: OH_Drawing_FilterMode = 1;
566#[doc = " @brief Enumerates storage filter mode.\n\n @since 12\n @version 1.0"]
567pub type OH_Drawing_FilterMode = u32;
568#[doc = " ignore mipmap levels, sample from the \"base\""]
569pub const OH_Drawing_MipmapMode_MIPMAP_MODE_NONE: OH_Drawing_MipmapMode = 0;
570#[doc = " sample from the nearest level"]
571pub const OH_Drawing_MipmapMode_MIPMAP_MODE_NEAREST: OH_Drawing_MipmapMode = 1;
572#[doc = " interpolate between the two nearest levels"]
573pub const OH_Drawing_MipmapMode_MIPMAP_MODE_LINEAR: OH_Drawing_MipmapMode = 2;
574#[doc = " @brief Enumerates storage formats mipmap mode.\n\n @since 12\n @version 1.0"]
575pub type OH_Drawing_MipmapMode = u32;
576extern "C" {
577 #[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"]
578 pub fn OH_Drawing_SamplingOptionsCreate(
579 filterMode: OH_Drawing_FilterMode,
580 mipmapMode: OH_Drawing_MipmapMode,
581 ) -> *mut OH_Drawing_SamplingOptions;
582}
583extern "C" {
584 #[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"]
585 #[cfg(feature = "api-20")]
586 pub fn OH_Drawing_SamplingOptionsCopy(
587 samplingOptions: *mut OH_Drawing_SamplingOptions,
588 ) -> *mut OH_Drawing_SamplingOptions;
589}
590extern "C" {
591 #[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"]
592 pub fn OH_Drawing_SamplingOptionsDestroy(samplingOptions: *mut OH_Drawing_SamplingOptions);
593}
594#[doc = " Using sampling only inside bounds in a slower manner."]
595pub const OH_Drawing_SrcRectConstraint_STRICT_SRC_RECT_CONSTRAINT: OH_Drawing_SrcRectConstraint = 0;
596#[doc = " Using sampling outside bounds in a faster manner."]
597pub const OH_Drawing_SrcRectConstraint_FAST_SRC_RECT_CONSTRAINT: OH_Drawing_SrcRectConstraint = 1;
598#[doc = " @brief Enumeration defines the constraint type.\n\n @since 12\n @version 1.0"]
599pub type OH_Drawing_SrcRectConstraint = u32;
600extern "C" {
601 #[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"]
602 pub fn OH_Drawing_CanvasCreate() -> *mut OH_Drawing_Canvas;
603}
604extern "C" {
605 #[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"]
606 #[cfg(feature = "api-20")]
607 pub fn OH_Drawing_CanvasCreateWithPixelMap(
608 pixelMap: *mut OH_Drawing_PixelMap,
609 ) -> *mut OH_Drawing_Canvas;
610}
611extern "C" {
612 #[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"]
613 pub fn OH_Drawing_CanvasDestroy(canvas: *mut OH_Drawing_Canvas);
614}
615extern "C" {
616 #[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"]
617 pub fn OH_Drawing_CanvasBind(canvas: *mut OH_Drawing_Canvas, bitmap: *mut OH_Drawing_Bitmap);
618}
619extern "C" {
620 #[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"]
621 pub fn OH_Drawing_CanvasAttachPen(canvas: *mut OH_Drawing_Canvas, pen: *const OH_Drawing_Pen);
622}
623extern "C" {
624 #[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"]
625 pub fn OH_Drawing_CanvasDetachPen(canvas: *mut OH_Drawing_Canvas);
626}
627extern "C" {
628 #[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"]
629 pub fn OH_Drawing_CanvasAttachBrush(
630 canvas: *mut OH_Drawing_Canvas,
631 brush: *const OH_Drawing_Brush,
632 );
633}
634extern "C" {
635 #[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"]
636 pub fn OH_Drawing_CanvasDetachBrush(canvas: *mut OH_Drawing_Canvas);
637}
638extern "C" {
639 #[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"]
640 pub fn OH_Drawing_CanvasSave(canvas: *mut OH_Drawing_Canvas);
641}
642extern "C" {
643 #[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"]
644 pub fn OH_Drawing_CanvasSaveLayer(
645 canvas: *mut OH_Drawing_Canvas,
646 rect: *const OH_Drawing_Rect,
647 brush: *const OH_Drawing_Brush,
648 );
649}
650extern "C" {
651 #[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"]
652 pub fn OH_Drawing_CanvasRestore(canvas: *mut OH_Drawing_Canvas);
653}
654extern "C" {
655 #[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"]
656 pub fn OH_Drawing_CanvasGetSaveCount(canvas: *mut OH_Drawing_Canvas) -> u32;
657}
658extern "C" {
659 #[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"]
660 pub fn OH_Drawing_CanvasRestoreToCount(canvas: *mut OH_Drawing_Canvas, saveCount: u32);
661}
662extern "C" {
663 #[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"]
664 pub fn OH_Drawing_CanvasDrawLine(
665 canvas: *mut OH_Drawing_Canvas,
666 x1: f32,
667 y1: f32,
668 x2: f32,
669 y2: f32,
670 );
671}
672extern "C" {
673 #[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"]
674 pub fn OH_Drawing_CanvasDrawPath(canvas: *mut OH_Drawing_Canvas, path: *const OH_Drawing_Path);
675}
676extern "C" {
677 #[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"]
678 #[cfg(feature = "api-18")]
679 pub fn OH_Drawing_CanvasDrawPixelMapNine(
680 canvas: *mut OH_Drawing_Canvas,
681 pixelMap: *mut OH_Drawing_PixelMap,
682 center: *const OH_Drawing_Rect,
683 dst: *const OH_Drawing_Rect,
684 mode: OH_Drawing_FilterMode,
685 ) -> OH_Drawing_ErrorCode;
686}
687extern "C" {
688 #[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"]
689 pub fn OH_Drawing_CanvasDrawPixelMapRect(
690 canvas: *mut OH_Drawing_Canvas,
691 pixelMap: *mut OH_Drawing_PixelMap,
692 src: *const OH_Drawing_Rect,
693 dst: *const OH_Drawing_Rect,
694 samplingOptions: *const OH_Drawing_SamplingOptions,
695 );
696}
697extern "C" {
698 #[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"]
699 #[cfg(feature = "api-20")]
700 pub fn OH_Drawing_CanvasDrawPixelMapRectConstraint(
701 canvas: *mut OH_Drawing_Canvas,
702 pixelMap: *mut OH_Drawing_PixelMap,
703 src: *const OH_Drawing_Rect,
704 dst: *const OH_Drawing_Rect,
705 samplingOptions: *const OH_Drawing_SamplingOptions,
706 constraint: OH_Drawing_SrcRectConstraint,
707 ) -> OH_Drawing_ErrorCode;
708}
709extern "C" {
710 #[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"]
711 pub fn OH_Drawing_CanvasDrawBackground(
712 canvas: *mut OH_Drawing_Canvas,
713 brush: *const OH_Drawing_Brush,
714 );
715}
716extern "C" {
717 #[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"]
718 pub fn OH_Drawing_CanvasDrawRegion(
719 canvas: *mut OH_Drawing_Canvas,
720 region: *const OH_Drawing_Region,
721 );
722}
723#[doc = " Draw each point separately."]
724pub const OH_Drawing_PointMode_POINT_MODE_POINTS: OH_Drawing_PointMode = 0;
725#[doc = " Draw each pair of points as a line segment."]
726pub const OH_Drawing_PointMode_POINT_MODE_LINES: OH_Drawing_PointMode = 1;
727#[doc = " Draw the array of points as a open polygon."]
728pub const OH_Drawing_PointMode_POINT_MODE_POLYGON: OH_Drawing_PointMode = 2;
729#[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"]
730pub type OH_Drawing_PointMode = u32;
731extern "C" {
732 #[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"]
733 pub fn OH_Drawing_CanvasDrawPoint(
734 canvas: *mut OH_Drawing_Canvas,
735 point: *const OH_Drawing_Point2D,
736 ) -> OH_Drawing_ErrorCode;
737}
738extern "C" {
739 #[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"]
740 pub fn OH_Drawing_CanvasDrawPoints(
741 canvas: *mut OH_Drawing_Canvas,
742 mode: OH_Drawing_PointMode,
743 count: u32,
744 point2D: *const OH_Drawing_Point2D,
745 );
746}
747extern "C" {
748 #[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"]
749 pub fn OH_Drawing_CanvasDrawBitmap(
750 canvas: *mut OH_Drawing_Canvas,
751 bitmap: *const OH_Drawing_Bitmap,
752 left: f32,
753 top: f32,
754 );
755}
756extern "C" {
757 #[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"]
758 pub fn OH_Drawing_CanvasDrawBitmapRect(
759 canvas: *mut OH_Drawing_Canvas,
760 bitmap: *const OH_Drawing_Bitmap,
761 src: *const OH_Drawing_Rect,
762 dst: *const OH_Drawing_Rect,
763 samplingOptions: *const OH_Drawing_SamplingOptions,
764 );
765}
766extern "C" {
767 #[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"]
768 pub fn OH_Drawing_CanvasDrawRect(canvas: *mut OH_Drawing_Canvas, rect: *const OH_Drawing_Rect);
769}
770extern "C" {
771 #[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"]
772 pub fn OH_Drawing_CanvasDrawCircle(
773 canvas: *mut OH_Drawing_Canvas,
774 point: *const OH_Drawing_Point,
775 radius: f32,
776 );
777}
778extern "C" {
779 #[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"]
780 pub fn OH_Drawing_CanvasDrawColor(
781 canvas: *mut OH_Drawing_Canvas,
782 color: u32,
783 blendMode: OH_Drawing_BlendMode,
784 ) -> OH_Drawing_ErrorCode;
785}
786extern "C" {
787 #[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"]
788 pub fn OH_Drawing_CanvasDrawOval(canvas: *mut OH_Drawing_Canvas, rect: *const OH_Drawing_Rect);
789}
790extern "C" {
791 #[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"]
792 pub fn OH_Drawing_CanvasDrawArc(
793 canvas: *mut OH_Drawing_Canvas,
794 rect: *const OH_Drawing_Rect,
795 startAngle: f32,
796 sweepAngle: f32,
797 );
798}
799extern "C" {
800 #[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"]
801 #[cfg(feature = "api-18")]
802 pub fn OH_Drawing_CanvasDrawArcWithCenter(
803 canvas: *mut OH_Drawing_Canvas,
804 rect: *const OH_Drawing_Rect,
805 startAngle: f32,
806 sweepAngle: f32,
807 useCenter: bool,
808 ) -> OH_Drawing_ErrorCode;
809}
810extern "C" {
811 #[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"]
812 pub fn OH_Drawing_CanvasDrawRoundRect(
813 canvas: *mut OH_Drawing_Canvas,
814 roundRect: *const OH_Drawing_RoundRect,
815 );
816}
817extern "C" {
818 #[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"]
819 #[cfg(feature = "api-18")]
820 pub fn OH_Drawing_CanvasDrawNestedRoundRect(
821 canvas: *mut OH_Drawing_Canvas,
822 outer: *const OH_Drawing_RoundRect,
823 inner: *const OH_Drawing_RoundRect,
824 ) -> OH_Drawing_ErrorCode;
825}
826extern "C" {
827 #[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"]
828 pub fn OH_Drawing_CanvasDrawSingleCharacter(
829 canvas: *mut OH_Drawing_Canvas,
830 str_: *const ::std::os::raw::c_char,
831 font: *const OH_Drawing_Font,
832 x: f32,
833 y: f32,
834 ) -> OH_Drawing_ErrorCode;
835}
836extern "C" {
837 #[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"]
838 #[cfg(feature = "api-20")]
839 pub fn OH_Drawing_CanvasDrawSingleCharacterWithFeatures(
840 canvas: *mut OH_Drawing_Canvas,
841 str_: *const ::std::os::raw::c_char,
842 font: *const OH_Drawing_Font,
843 x: f32,
844 y: f32,
845 fontFeatures: *mut OH_Drawing_FontFeatures,
846 ) -> OH_Drawing_ErrorCode;
847}
848extern "C" {
849 #[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"]
850 pub fn OH_Drawing_CanvasDrawTextBlob(
851 canvas: *mut OH_Drawing_Canvas,
852 textBlob: *const OH_Drawing_TextBlob,
853 x: f32,
854 y: f32,
855 );
856}
857#[doc = " Clip with difference."]
858pub const OH_Drawing_CanvasClipOp_DIFFERENCE: OH_Drawing_CanvasClipOp = 0;
859#[doc = " Clip with intersection."]
860pub const OH_Drawing_CanvasClipOp_INTERSECT: OH_Drawing_CanvasClipOp = 1;
861#[doc = " @brief Enumerates clip op.\n\n @since 11\n @version 1.0"]
862pub type OH_Drawing_CanvasClipOp = u32;
863extern "C" {
864 #[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"]
865 pub fn OH_Drawing_CanvasClipRect(
866 canvas: *mut OH_Drawing_Canvas,
867 rect: *const OH_Drawing_Rect,
868 clipOp: OH_Drawing_CanvasClipOp,
869 doAntiAlias: bool,
870 );
871}
872extern "C" {
873 #[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"]
874 pub fn OH_Drawing_CanvasClipRoundRect(
875 canvas: *mut OH_Drawing_Canvas,
876 roundRect: *const OH_Drawing_RoundRect,
877 clipOp: OH_Drawing_CanvasClipOp,
878 doAntiAlias: bool,
879 );
880}
881extern "C" {
882 #[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"]
883 pub fn OH_Drawing_CanvasClipPath(
884 canvas: *mut OH_Drawing_Canvas,
885 path: *const OH_Drawing_Path,
886 clipOp: OH_Drawing_CanvasClipOp,
887 doAntiAlias: bool,
888 );
889}
890extern "C" {
891 #[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"]
892 pub fn OH_Drawing_CanvasClipRegion(
893 canvas: *mut OH_Drawing_Canvas,
894 region: *const OH_Drawing_Region,
895 clipOp: OH_Drawing_CanvasClipOp,
896 ) -> OH_Drawing_ErrorCode;
897}
898extern "C" {
899 #[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"]
900 pub fn OH_Drawing_CanvasRotate(canvas: *mut OH_Drawing_Canvas, degrees: f32, px: f32, py: f32);
901}
902extern "C" {
903 #[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"]
904 pub fn OH_Drawing_CanvasTranslate(canvas: *mut OH_Drawing_Canvas, dx: f32, dy: f32);
905}
906extern "C" {
907 #[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"]
908 pub fn OH_Drawing_CanvasScale(canvas: *mut OH_Drawing_Canvas, sx: f32, sy: f32);
909}
910extern "C" {
911 #[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"]
912 pub fn OH_Drawing_CanvasSkew(canvas: *mut OH_Drawing_Canvas, sx: f32, sy: f32);
913}
914extern "C" {
915 #[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"]
916 pub fn OH_Drawing_CanvasGetWidth(canvas: *mut OH_Drawing_Canvas) -> i32;
917}
918extern "C" {
919 #[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"]
920 pub fn OH_Drawing_CanvasGetHeight(canvas: *mut OH_Drawing_Canvas) -> i32;
921}
922extern "C" {
923 #[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"]
924 pub fn OH_Drawing_CanvasGetLocalClipBounds(
925 canvas: *mut OH_Drawing_Canvas,
926 rect: *mut OH_Drawing_Rect,
927 );
928}
929extern "C" {
930 #[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"]
931 pub fn OH_Drawing_CanvasGetTotalMatrix(
932 canvas: *mut OH_Drawing_Canvas,
933 matrix: *mut OH_Drawing_Matrix,
934 );
935}
936extern "C" {
937 #[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"]
938 pub fn OH_Drawing_CanvasConcatMatrix(
939 canvas: *mut OH_Drawing_Canvas,
940 matrix: *mut OH_Drawing_Matrix,
941 );
942}
943#[doc = " Use no shadow flags."]
944pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_NONE: OH_Drawing_CanvasShadowFlags = 0;
945#[doc = " The occluding object is transparent."]
946pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_TRANSPARENT_OCCLUDER:
947 OH_Drawing_CanvasShadowFlags = 1;
948#[doc = " No need to analyze shadows."]
949pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_GEOMETRIC_ONLY: OH_Drawing_CanvasShadowFlags =
950 2;
951#[doc = " Use all shadow flags."]
952pub const OH_Drawing_CanvasShadowFlags_SHADOW_FLAGS_ALL: OH_Drawing_CanvasShadowFlags = 3;
953#[doc = " @brief Enumerates of shadow flags.\n\n @since 12\n @version 1.0"]
954pub type OH_Drawing_CanvasShadowFlags = u32;
955extern "C" {
956 #[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"]
957 pub fn OH_Drawing_CanvasDrawShadow(
958 canvas: *mut OH_Drawing_Canvas,
959 path: *mut OH_Drawing_Path,
960 planeParams: OH_Drawing_Point3D,
961 devLightPos: OH_Drawing_Point3D,
962 lightRadius: f32,
963 ambientColor: u32,
964 spotColor: u32,
965 flag: OH_Drawing_CanvasShadowFlags,
966 );
967}
968extern "C" {
969 #[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"]
970 pub fn OH_Drawing_CanvasClear(canvas: *mut OH_Drawing_Canvas, color: u32);
971}
972extern "C" {
973 #[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"]
974 pub fn OH_Drawing_CanvasSetMatrix(
975 canvas: *mut OH_Drawing_Canvas,
976 matrix: *mut OH_Drawing_Matrix,
977 );
978}
979extern "C" {
980 #[doc = " @brief Reset matrix to the idenmtity matrix, any prior matrix state is overwritten.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @since 12\n @version 1.0"]
981 pub fn OH_Drawing_CanvasResetMatrix(canvas: *mut OH_Drawing_Canvas);
982}
983extern "C" {
984 #[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"]
985 pub fn OH_Drawing_CanvasDrawImageRectWithSrc(
986 canvas: *mut OH_Drawing_Canvas,
987 image: *const OH_Drawing_Image,
988 src: *const OH_Drawing_Rect,
989 dst: *const OH_Drawing_Rect,
990 samplingOptions: *const OH_Drawing_SamplingOptions,
991 srcRectConstraint: OH_Drawing_SrcRectConstraint,
992 );
993}
994extern "C" {
995 #[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"]
996 pub fn OH_Drawing_CanvasDrawImageRect(
997 canvas: *mut OH_Drawing_Canvas,
998 image: *mut OH_Drawing_Image,
999 rect: *mut OH_Drawing_Rect,
1000 samplingOptions: *mut OH_Drawing_SamplingOptions,
1001 );
1002}
1003#[doc = " The vertices are a triangle list."]
1004pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES: OH_Drawing_VertexMode = 0;
1005#[doc = " The vertices are a triangle strip."]
1006pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLES_STRIP: OH_Drawing_VertexMode = 1;
1007#[doc = " The vertices are a triangle fan."]
1008pub const OH_Drawing_VertexMode_VERTEX_MODE_TRIANGLE_FAN: OH_Drawing_VertexMode = 2;
1009#[doc = " @brief Enumerates of vertices flags.\n\n @since 12\n @version 1.0"]
1010pub type OH_Drawing_VertexMode = u32;
1011extern "C" {
1012 #[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"]
1013 pub fn OH_Drawing_CanvasDrawVertices(
1014 canvas: *mut OH_Drawing_Canvas,
1015 vertexMmode: OH_Drawing_VertexMode,
1016 vertexCount: i32,
1017 positions: *const OH_Drawing_Point2D,
1018 texs: *const OH_Drawing_Point2D,
1019 colors: *const u32,
1020 indexCount: i32,
1021 indices: *const u16,
1022 mode: OH_Drawing_BlendMode,
1023 );
1024}
1025extern "C" {
1026 #[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"]
1027 pub fn OH_Drawing_CanvasReadPixels(
1028 canvas: *mut OH_Drawing_Canvas,
1029 imageInfo: *mut OH_Drawing_Image_Info,
1030 dstPixels: *mut ::std::os::raw::c_void,
1031 dstRowBytes: u32,
1032 srcX: i32,
1033 srcY: i32,
1034 ) -> bool;
1035}
1036extern "C" {
1037 #[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"]
1038 pub fn OH_Drawing_CanvasReadPixelsToBitmap(
1039 canvas: *mut OH_Drawing_Canvas,
1040 bitmap: *mut OH_Drawing_Bitmap,
1041 srcX: i32,
1042 srcY: i32,
1043 ) -> bool;
1044}
1045extern "C" {
1046 #[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"]
1047 pub fn OH_Drawing_CanvasIsClipEmpty(
1048 canvas: *mut OH_Drawing_Canvas,
1049 isClipEmpty: *mut bool,
1050 ) -> OH_Drawing_ErrorCode;
1051}
1052extern "C" {
1053 #[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"]
1054 pub fn OH_Drawing_CanvasGetImageInfo(
1055 canvas: *mut OH_Drawing_Canvas,
1056 imageInfo: *mut OH_Drawing_Image_Info,
1057 ) -> OH_Drawing_ErrorCode;
1058}
1059extern "C" {
1060 #[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"]
1061 #[cfg(feature = "api-13")]
1062 pub fn OH_Drawing_CanvasDrawRecordCmd(
1063 canvas: *mut OH_Drawing_Canvas,
1064 recordCmd: *mut OH_Drawing_RecordCmd,
1065 ) -> OH_Drawing_ErrorCode;
1066}
1067extern "C" {
1068 #[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"]
1069 #[cfg(feature = "api-19")]
1070 pub fn OH_Drawing_CanvasDrawRecordCmdNesting(
1071 canvas: *mut OH_Drawing_Canvas,
1072 recordCmd: *mut OH_Drawing_RecordCmd,
1073 ) -> OH_Drawing_ErrorCode;
1074}
1075extern "C" {
1076 #[doc = " @brief Checks if the path has been cut off.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param path Indicates the pointer to an <b>OH_Drawing_Paht</b> object.\n @param quickReject Indicates if the path has been cut off.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if canvas or path is nullptr,\n or quickReject is nullptr.\n @since 18\n @version 1.0"]
1077 #[cfg(feature = "api-18")]
1078 pub fn OH_Drawing_CanvasQuickRejectPath(
1079 canvas: *mut OH_Drawing_Canvas,
1080 path: *const OH_Drawing_Path,
1081 quickReject: *mut bool,
1082 ) -> OH_Drawing_ErrorCode;
1083}
1084extern "C" {
1085 #[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"]
1086 #[cfg(feature = "api-18")]
1087 pub fn OH_Drawing_CanvasQuickRejectRect(
1088 canvas: *mut OH_Drawing_Canvas,
1089 rect: *const OH_Drawing_Rect,
1090 quickReject: *mut bool,
1091 ) -> OH_Drawing_ErrorCode;
1092}
1093extern "C" {
1094 #[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"]
1095 pub fn OH_Drawing_ColorSetArgb(alpha: u32, red: u32, green: u32, blue: u32) -> u32;
1096}
1097extern "C" {
1098 #[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"]
1099 pub fn OH_Drawing_ColorFilterCreateBlendMode(
1100 color: u32,
1101 blendMode: OH_Drawing_BlendMode,
1102 ) -> *mut OH_Drawing_ColorFilter;
1103}
1104extern "C" {
1105 #[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"]
1106 pub fn OH_Drawing_ColorFilterCreateCompose(
1107 outerColorFilter: *mut OH_Drawing_ColorFilter,
1108 innerColorFilter: *mut OH_Drawing_ColorFilter,
1109 ) -> *mut OH_Drawing_ColorFilter;
1110}
1111extern "C" {
1112 #[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"]
1113 pub fn OH_Drawing_ColorFilterCreateMatrix(matrix: *const f32) -> *mut OH_Drawing_ColorFilter;
1114}
1115extern "C" {
1116 #[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"]
1117 pub fn OH_Drawing_ColorFilterCreateLinearToSrgbGamma() -> *mut OH_Drawing_ColorFilter;
1118}
1119extern "C" {
1120 #[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"]
1121 pub fn OH_Drawing_ColorFilterCreateSrgbGammaToLinear() -> *mut OH_Drawing_ColorFilter;
1122}
1123extern "C" {
1124 #[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"]
1125 pub fn OH_Drawing_ColorFilterCreateLuma() -> *mut OH_Drawing_ColorFilter;
1126}
1127extern "C" {
1128 #[doc = " @brief Creates an <b>OH_Drawing_ColorFilter</b> with the given mutColor used to multiply source color and addColor\n used to add to source color. The Alpha channel will not be affected.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param mulColor Indicates the color, which is a 32-bit (ARGB) variable.\n @param addColor Indicates the color, which is a 32-bit (ARGB) variable.\n @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.\n @since 20\n @version 1.0"]
1129 #[cfg(feature = "api-20")]
1130 pub fn OH_Drawing_ColorFilterCreateLighting(
1131 mulColor: u32,
1132 addColor: u32,
1133 ) -> *mut OH_Drawing_ColorFilter;
1134}
1135extern "C" {
1136 #[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"]
1137 pub fn OH_Drawing_ColorFilterDestroy(colorFilter: *mut OH_Drawing_ColorFilter);
1138}
1139extern "C" {
1140 #[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"]
1141 pub fn OH_Drawing_ColorSpaceCreateSrgb() -> *mut OH_Drawing_ColorSpace;
1142}
1143extern "C" {
1144 #[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"]
1145 pub fn OH_Drawing_ColorSpaceCreateSrgbLinear() -> *mut OH_Drawing_ColorSpace;
1146}
1147extern "C" {
1148 #[doc = " @brief Destroy an <b>OH_Drawing_ColorSpace</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param colorSpace Indicates the pointer to an <b>OH_Drawing_ColorSpace</b> object.\n @since 12\n @version 1.0"]
1149 pub fn OH_Drawing_ColorSpaceDestroy(colorSpace: *mut OH_Drawing_ColorSpace);
1150}
1151extern "C" {
1152 #[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"]
1153 pub fn OH_Drawing_FilterCreate() -> *mut OH_Drawing_Filter;
1154}
1155extern "C" {
1156 #[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"]
1157 pub fn OH_Drawing_FilterSetImageFilter(
1158 filter: *mut OH_Drawing_Filter,
1159 imageFilter: *mut OH_Drawing_ImageFilter,
1160 );
1161}
1162extern "C" {
1163 #[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"]
1164 pub fn OH_Drawing_FilterSetMaskFilter(
1165 filter: *mut OH_Drawing_Filter,
1166 maskFilter: *mut OH_Drawing_MaskFilter,
1167 );
1168}
1169extern "C" {
1170 #[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"]
1171 pub fn OH_Drawing_FilterSetColorFilter(
1172 filter: *mut OH_Drawing_Filter,
1173 colorFilter: *mut OH_Drawing_ColorFilter,
1174 );
1175}
1176extern "C" {
1177 #[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"]
1178 pub fn OH_Drawing_FilterGetColorFilter(
1179 filter: *mut OH_Drawing_Filter,
1180 colorFilter: *mut OH_Drawing_ColorFilter,
1181 );
1182}
1183extern "C" {
1184 #[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"]
1185 pub fn OH_Drawing_FilterDestroy(filter: *mut OH_Drawing_Filter);
1186}
1187extern "C" {
1188 #[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"]
1189 pub fn OH_Drawing_FontCreate() -> *mut OH_Drawing_Font;
1190}
1191#[doc = " glyph outlines unchanged"]
1192pub const OH_Drawing_FontHinting_FONT_HINTING_NONE: OH_Drawing_FontHinting = 0;
1193#[doc = " minimal modification to improve contrast"]
1194pub const OH_Drawing_FontHinting_FONT_HINTING_SLIGHT: OH_Drawing_FontHinting = 1;
1195#[doc = " glyph outlines modified to improve contrast"]
1196pub const OH_Drawing_FontHinting_FONT_HINTING_NORMAL: OH_Drawing_FontHinting = 2;
1197#[doc = " modifies glyph outlines for maximum contrast"]
1198pub const OH_Drawing_FontHinting_FONT_HINTING_FULL: OH_Drawing_FontHinting = 3;
1199#[doc = " @brief Enumerates font hinting pattern.\n\n @since 12\n @version 1.0"]
1200pub type OH_Drawing_FontHinting = u32;
1201#[doc = " no transparent pixels on glyph edges"]
1202pub const OH_Drawing_FontEdging_FONT_EDGING_ALIAS: OH_Drawing_FontEdging = 0;
1203#[doc = " may have transparent pixels on glyph edges"]
1204pub const OH_Drawing_FontEdging_FONT_EDGING_ANTI_ALIAS: OH_Drawing_FontEdging = 1;
1205#[doc = " glyph positioned in pixel using transparency"]
1206pub const OH_Drawing_FontEdging_FONT_EDGING_SUBPIXEL_ANTI_ALIAS: OH_Drawing_FontEdging = 2;
1207#[doc = " @brief Enumerates font edging effect.\n\n @since 12\n @version 1.0"]
1208pub type OH_Drawing_FontEdging = u32;
1209extern "C" {
1210 #[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"]
1211 pub fn OH_Drawing_FontSetBaselineSnap(font: *mut OH_Drawing_Font, baselineSnap: bool);
1212}
1213extern "C" {
1214 #[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"]
1215 pub fn OH_Drawing_FontIsBaselineSnap(font: *const OH_Drawing_Font) -> bool;
1216}
1217extern "C" {
1218 #[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"]
1219 pub fn OH_Drawing_FontSetSubpixel(font: *mut OH_Drawing_Font, isSubpixel: bool);
1220}
1221extern "C" {
1222 #[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"]
1223 pub fn OH_Drawing_FontIsSubpixel(font: *const OH_Drawing_Font) -> bool;
1224}
1225extern "C" {
1226 #[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"]
1227 pub fn OH_Drawing_FontSetForceAutoHinting(font: *mut OH_Drawing_Font, isForceAutoHinting: bool);
1228}
1229extern "C" {
1230 #[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"]
1231 pub fn OH_Drawing_FontIsForceAutoHinting(font: *const OH_Drawing_Font) -> bool;
1232}
1233extern "C" {
1234 #[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"]
1235 pub fn OH_Drawing_FontSetTypeface(
1236 font: *mut OH_Drawing_Font,
1237 typeface: *mut OH_Drawing_Typeface,
1238 );
1239}
1240extern "C" {
1241 #[doc = " @brief Gets an <b>OH_Drawing_Typeface</b> object from the <b>OH_Drawing_Typeface</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.\n @return OH_Drawing_Typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.\n @since 12\n @version 1.0"]
1242 pub fn OH_Drawing_FontGetTypeface(font: *mut OH_Drawing_Font) -> *mut OH_Drawing_Typeface;
1243}
1244extern "C" {
1245 #[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"]
1246 pub fn OH_Drawing_FontSetTextSize(font: *mut OH_Drawing_Font, textSize: f32);
1247}
1248extern "C" {
1249 #[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"]
1250 pub fn OH_Drawing_FontGetTextSize(font: *const OH_Drawing_Font) -> f32;
1251}
1252extern "C" {
1253 #[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"]
1254 pub fn OH_Drawing_FontCountText(
1255 font: *mut OH_Drawing_Font,
1256 text: *const ::std::os::raw::c_void,
1257 byteLength: usize,
1258 encoding: OH_Drawing_TextEncoding,
1259 ) -> ::std::os::raw::c_int;
1260}
1261extern "C" {
1262 #[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"]
1263 pub fn OH_Drawing_FontTextToGlyphs(
1264 font: *const OH_Drawing_Font,
1265 text: *const ::std::os::raw::c_void,
1266 byteLength: u32,
1267 encoding: OH_Drawing_TextEncoding,
1268 glyphs: *mut u16,
1269 maxGlyphCount: ::std::os::raw::c_int,
1270 ) -> u32;
1271}
1272extern "C" {
1273 #[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"]
1274 pub fn OH_Drawing_FontGetWidths(
1275 font: *const OH_Drawing_Font,
1276 glyphs: *const u16,
1277 count: ::std::os::raw::c_int,
1278 widths: *mut f32,
1279 );
1280}
1281extern "C" {
1282 #[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"]
1283 pub fn OH_Drawing_FontMeasureSingleCharacter(
1284 font: *const OH_Drawing_Font,
1285 str_: *const ::std::os::raw::c_char,
1286 textWidth: *mut f32,
1287 ) -> OH_Drawing_ErrorCode;
1288}
1289extern "C" {
1290 #[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"]
1291 #[cfg(feature = "api-20")]
1292 pub fn OH_Drawing_FontMeasureSingleCharacterWithFeatures(
1293 font: *const OH_Drawing_Font,
1294 str_: *const ::std::os::raw::c_char,
1295 fontFeatures: *const OH_Drawing_FontFeatures,
1296 textWidth: *mut f32,
1297 ) -> OH_Drawing_ErrorCode;
1298}
1299extern "C" {
1300 #[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"]
1301 pub fn OH_Drawing_FontMeasureText(
1302 font: *const OH_Drawing_Font,
1303 text: *const ::std::os::raw::c_void,
1304 byteLength: usize,
1305 encoding: OH_Drawing_TextEncoding,
1306 bounds: *mut OH_Drawing_Rect,
1307 textWidth: *mut f32,
1308 ) -> OH_Drawing_ErrorCode;
1309}
1310extern "C" {
1311 #[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"]
1312 #[cfg(feature = "api-19")]
1313 pub fn OH_Drawing_FontMeasureTextWithBrushOrPen(
1314 font: *const OH_Drawing_Font,
1315 text: *const ::std::os::raw::c_void,
1316 byteLength: usize,
1317 encoding: OH_Drawing_TextEncoding,
1318 brush: *const OH_Drawing_Brush,
1319 pen: *const OH_Drawing_Pen,
1320 bounds: *mut OH_Drawing_Rect,
1321 textWidth: *mut f32,
1322 ) -> OH_Drawing_ErrorCode;
1323}
1324extern "C" {
1325 #[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"]
1326 #[cfg(feature = "api-19")]
1327 pub fn OH_Drawing_FontGetWidthsBounds(
1328 font: *const OH_Drawing_Font,
1329 glyphs: *const u16,
1330 count: ::std::os::raw::c_int,
1331 brush: *const OH_Drawing_Brush,
1332 pen: *const OH_Drawing_Pen,
1333 widths: *mut f32,
1334 bounds: *mut OH_Drawing_Array,
1335 ) -> OH_Drawing_ErrorCode;
1336}
1337extern "C" {
1338 #[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"]
1339 #[cfg(feature = "api-19")]
1340 pub fn OH_Drawing_FontGetPos(
1341 font: *const OH_Drawing_Font,
1342 glyphs: *const u16,
1343 count: ::std::os::raw::c_int,
1344 origin: *const OH_Drawing_Point,
1345 points: *mut OH_Drawing_Point2D,
1346 ) -> OH_Drawing_ErrorCode;
1347}
1348extern "C" {
1349 #[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"]
1350 #[cfg(feature = "api-19")]
1351 pub fn OH_Drawing_FontGetSpacing(
1352 font: *const OH_Drawing_Font,
1353 spacing: *mut f32,
1354 ) -> OH_Drawing_ErrorCode;
1355}
1356extern "C" {
1357 #[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"]
1358 pub fn OH_Drawing_FontSetLinearText(font: *mut OH_Drawing_Font, isLinearText: bool);
1359}
1360extern "C" {
1361 #[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"]
1362 pub fn OH_Drawing_FontIsLinearText(font: *const OH_Drawing_Font) -> bool;
1363}
1364extern "C" {
1365 #[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"]
1366 pub fn OH_Drawing_FontSetTextSkewX(font: *mut OH_Drawing_Font, skewX: f32);
1367}
1368extern "C" {
1369 #[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"]
1370 pub fn OH_Drawing_FontGetTextSkewX(font: *const OH_Drawing_Font) -> f32;
1371}
1372extern "C" {
1373 #[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"]
1374 pub fn OH_Drawing_FontSetFakeBoldText(font: *mut OH_Drawing_Font, isFakeBoldText: bool);
1375}
1376extern "C" {
1377 #[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"]
1378 pub fn OH_Drawing_FontIsFakeBoldText(font: *const OH_Drawing_Font) -> bool;
1379}
1380extern "C" {
1381 #[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"]
1382 pub fn OH_Drawing_FontSetScaleX(font: *mut OH_Drawing_Font, scaleX: f32);
1383}
1384extern "C" {
1385 #[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"]
1386 pub fn OH_Drawing_FontGetScaleX(font: *const OH_Drawing_Font) -> f32;
1387}
1388extern "C" {
1389 #[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"]
1390 pub fn OH_Drawing_FontSetHinting(
1391 font: *mut OH_Drawing_Font,
1392 fontHinting: OH_Drawing_FontHinting,
1393 );
1394}
1395extern "C" {
1396 #[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"]
1397 pub fn OH_Drawing_FontGetHinting(font: *const OH_Drawing_Font) -> OH_Drawing_FontHinting;
1398}
1399extern "C" {
1400 #[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"]
1401 pub fn OH_Drawing_FontSetEmbeddedBitmaps(font: *mut OH_Drawing_Font, isEmbeddedBitmaps: bool);
1402}
1403extern "C" {
1404 #[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"]
1405 pub fn OH_Drawing_FontIsEmbeddedBitmaps(font: *const OH_Drawing_Font) -> bool;
1406}
1407extern "C" {
1408 #[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"]
1409 pub fn OH_Drawing_FontSetEdging(font: *mut OH_Drawing_Font, fontEdging: OH_Drawing_FontEdging);
1410}
1411extern "C" {
1412 #[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"]
1413 pub fn OH_Drawing_FontGetEdging(font: *const OH_Drawing_Font) -> OH_Drawing_FontEdging;
1414}
1415extern "C" {
1416 #[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"]
1417 pub fn OH_Drawing_FontDestroy(font: *mut OH_Drawing_Font);
1418}
1419#[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"]
1420#[repr(C)]
1421#[derive(Debug, Copy, Clone)]
1422pub struct OH_Drawing_Font_Metrics {
1423 #[doc = " Indicating which metrics are valid"]
1424 pub flags: u32,
1425 #[doc = " storage for top in font metrics"]
1426 pub top: f32,
1427 #[doc = " storage for ascent in font metrics"]
1428 pub ascent: f32,
1429 #[doc = " storage for descent in font metrics"]
1430 pub descent: f32,
1431 #[doc = " storage for bottom in font metrics"]
1432 pub bottom: f32,
1433 #[doc = " storage for leading in font metrics"]
1434 pub leading: f32,
1435 #[doc = " Average character width, zero if unknown"]
1436 pub avgCharWidth: f32,
1437 #[doc = " Maximum character width, zero if unknown"]
1438 pub maxCharWidth: f32,
1439 #[doc = " Greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts"]
1440 pub xMin: f32,
1441 #[doc = " Greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts"]
1442 pub xMax: f32,
1443 #[doc = " Height of lower-case letter, zero if unknown, typically negative"]
1444 pub xHeight: f32,
1445 #[doc = " Height of an upper-case letter, zero if unknown, typically negative"]
1446 pub capHeight: f32,
1447 #[doc = " @brief Underline thickness"]
1448 pub underlineThickness: f32,
1449 #[doc = " Distance from baseline to top of stroke, typically positive"]
1450 pub underlinePosition: f32,
1451 #[doc = " Strikeout thickness"]
1452 pub strikeoutThickness: f32,
1453 #[doc = " Distance from baseline to bottom of stroke, typically negative"]
1454 pub strikeoutPosition: f32,
1455}
1456extern "C" {
1457 #[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"]
1458 pub fn OH_Drawing_FontGetMetrics(
1459 font: *mut OH_Drawing_Font,
1460 fontMetrics: *mut OH_Drawing_Font_Metrics,
1461 ) -> f32;
1462}
1463extern "C" {
1464 #[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"]
1465 #[cfg(feature = "api-18")]
1466 pub fn OH_Drawing_FontGetBounds(
1467 font: *const OH_Drawing_Font,
1468 glyphs: *const u16,
1469 count: u32,
1470 bounds: *mut OH_Drawing_Array,
1471 ) -> OH_Drawing_ErrorCode;
1472}
1473extern "C" {
1474 #[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"]
1475 #[cfg(feature = "api-18")]
1476 pub fn OH_Drawing_FontGetPathForGlyph(
1477 font: *const OH_Drawing_Font,
1478 glyph: u16,
1479 path: *mut OH_Drawing_Path,
1480 ) -> OH_Drawing_ErrorCode;
1481}
1482extern "C" {
1483 #[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"]
1484 #[cfg(feature = "api-18")]
1485 pub fn OH_Drawing_FontGetTextPath(
1486 font: *const OH_Drawing_Font,
1487 text: *const ::std::os::raw::c_void,
1488 byteLength: usize,
1489 encoding: OH_Drawing_TextEncoding,
1490 x: f32,
1491 y: f32,
1492 path: *mut OH_Drawing_Path,
1493 ) -> OH_Drawing_ErrorCode;
1494}
1495extern "C" {
1496 #[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"]
1497 #[cfg(feature = "api-20")]
1498 pub fn OH_Drawing_FontFeaturesCreate() -> *mut OH_Drawing_FontFeatures;
1499}
1500extern "C" {
1501 #[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"]
1502 #[cfg(feature = "api-20")]
1503 pub fn OH_Drawing_FontFeaturesAddFeature(
1504 fontFeatures: *mut OH_Drawing_FontFeatures,
1505 name: *const ::std::os::raw::c_char,
1506 value: f32,
1507 ) -> OH_Drawing_ErrorCode;
1508}
1509extern "C" {
1510 #[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"]
1511 #[cfg(feature = "api-20")]
1512 pub fn OH_Drawing_FontFeaturesDestroy(
1513 fontFeatures: *mut OH_Drawing_FontFeatures,
1514 ) -> OH_Drawing_ErrorCode;
1515}
1516extern "C" {
1517 #[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"]
1518 #[cfg(feature = "api-15")]
1519 pub fn OH_Drawing_FontSetThemeFontFollowed(
1520 font: *mut OH_Drawing_Font,
1521 followed: bool,
1522 ) -> OH_Drawing_ErrorCode;
1523}
1524extern "C" {
1525 #[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"]
1526 #[cfg(feature = "api-15")]
1527 pub fn OH_Drawing_FontIsThemeFontFollowed(
1528 font: *const OH_Drawing_Font,
1529 followed: *mut bool,
1530 ) -> OH_Drawing_ErrorCode;
1531}
1532#[repr(C)]
1533#[derive(Debug, Copy, Clone)]
1534pub struct OH_Drawing_FontCollection {
1535 _unused: [u8; 0],
1536}
1537#[repr(C)]
1538#[derive(Debug, Copy, Clone)]
1539pub struct OH_Drawing_Typography {
1540 _unused: [u8; 0],
1541}
1542#[repr(C)]
1543#[derive(Debug, Copy, Clone)]
1544pub struct OH_Drawing_LineTypography {
1545 _unused: [u8; 0],
1546}
1547#[repr(C)]
1548#[derive(Debug, Copy, Clone)]
1549pub struct OH_Drawing_TextStyle {
1550 _unused: [u8; 0],
1551}
1552#[repr(C)]
1553#[derive(Debug, Copy, Clone)]
1554pub struct OH_Drawing_TypographyStyle {
1555 _unused: [u8; 0],
1556}
1557#[repr(C)]
1558#[derive(Debug, Copy, Clone)]
1559pub struct OH_Drawing_TypographyCreate {
1560 _unused: [u8; 0],
1561}
1562#[repr(C)]
1563#[derive(Debug, Copy, Clone)]
1564pub struct OH_Drawing_TextBox {
1565 _unused: [u8; 0],
1566}
1567#[repr(C)]
1568#[derive(Debug, Copy, Clone)]
1569pub struct OH_Drawing_PositionAndAffinity {
1570 _unused: [u8; 0],
1571}
1572#[repr(C)]
1573#[derive(Debug, Copy, Clone)]
1574pub struct OH_Drawing_Range {
1575 _unused: [u8; 0],
1576}
1577#[repr(C)]
1578#[derive(Debug, Copy, Clone)]
1579pub struct OH_Drawing_FontParser {
1580 _unused: [u8; 0],
1581}
1582#[repr(C)]
1583#[derive(Debug, Copy, Clone)]
1584pub struct OH_Drawing_TextShadow {
1585 _unused: [u8; 0],
1586}
1587#[repr(C)]
1588#[derive(Debug, Copy, Clone)]
1589pub struct OH_Drawing_TextTab {
1590 _unused: [u8; 0],
1591}
1592#[repr(C)]
1593#[derive(Debug, Copy, Clone)]
1594pub struct OH_Drawing_TextLine {
1595 _unused: [u8; 0],
1596}
1597#[repr(C)]
1598#[derive(Debug, Copy, Clone)]
1599pub struct OH_Drawing_Run {
1600 _unused: [u8; 0],
1601}
1602#[repr(C)]
1603#[derive(Debug, Copy, Clone)]
1604pub struct OH_Drawing_FontFullDescriptor {
1605 _unused: [u8; 0],
1606}
1607extern "C" {
1608 #[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"]
1609 pub fn OH_Drawing_CreateFontCollection() -> *mut OH_Drawing_FontCollection;
1610}
1611extern "C" {
1612 #[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"]
1613 pub fn OH_Drawing_DestroyFontCollection(fontCollection: *mut OH_Drawing_FontCollection);
1614}
1615extern "C" {
1616 #[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"]
1617 pub fn OH_Drawing_DisableFontCollectionFallback(fontCollection: *mut OH_Drawing_FontCollection);
1618}
1619extern "C" {
1620 #[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"]
1621 pub fn OH_Drawing_DisableFontCollectionSystemFont(
1622 fontCollection: *mut OH_Drawing_FontCollection,
1623 );
1624}
1625extern "C" {
1626 #[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"]
1627 pub fn OH_Drawing_CreateSharedFontCollection() -> *mut OH_Drawing_FontCollection;
1628}
1629extern "C" {
1630 #[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"]
1631 pub fn OH_Drawing_ClearFontCaches(fontCollection: *mut OH_Drawing_FontCollection);
1632}
1633extern "C" {
1634 #[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"]
1635 #[cfg(feature = "api-14")]
1636 pub fn OH_Drawing_GetFontCollectionGlobalInstance() -> *mut OH_Drawing_FontCollection;
1637}
1638#[doc = " Right to left (RTL)"]
1639pub const OH_Drawing_TextDirection_TEXT_DIRECTION_RTL: OH_Drawing_TextDirection = 0;
1640#[doc = " Left to right (LTR)"]
1641pub const OH_Drawing_TextDirection_TEXT_DIRECTION_LTR: OH_Drawing_TextDirection = 1;
1642#[doc = " @brief Enumerates text directions.\n\n @since 8\n @version 1.0"]
1643pub type OH_Drawing_TextDirection = u32;
1644#[doc = " Left-aligned"]
1645pub const OH_Drawing_TextAlign_TEXT_ALIGN_LEFT: OH_Drawing_TextAlign = 0;
1646#[doc = " Right-aligned"]
1647pub const OH_Drawing_TextAlign_TEXT_ALIGN_RIGHT: OH_Drawing_TextAlign = 1;
1648#[doc = " Center-aligned"]
1649pub const OH_Drawing_TextAlign_TEXT_ALIGN_CENTER: OH_Drawing_TextAlign = 2;
1650#[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."]
1651pub const OH_Drawing_TextAlign_TEXT_ALIGN_JUSTIFY: OH_Drawing_TextAlign = 3;
1652#[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>."]
1653pub const OH_Drawing_TextAlign_TEXT_ALIGN_START: OH_Drawing_TextAlign = 4;
1654#[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>."]
1655pub const OH_Drawing_TextAlign_TEXT_ALIGN_END: OH_Drawing_TextAlign = 5;
1656#[doc = " @brief Enumerates text alignment modes.\n\n @since 8\n @version 1.0"]
1657pub type OH_Drawing_TextAlign = u32;
1658#[doc = " Thin"]
1659pub const OH_Drawing_FontWeight_FONT_WEIGHT_100: OH_Drawing_FontWeight = 0;
1660#[doc = " Extra-light"]
1661pub const OH_Drawing_FontWeight_FONT_WEIGHT_200: OH_Drawing_FontWeight = 1;
1662#[doc = " Light"]
1663pub const OH_Drawing_FontWeight_FONT_WEIGHT_300: OH_Drawing_FontWeight = 2;
1664#[doc = " Normal/Regular"]
1665pub const OH_Drawing_FontWeight_FONT_WEIGHT_400: OH_Drawing_FontWeight = 3;
1666#[doc = " Medium"]
1667pub const OH_Drawing_FontWeight_FONT_WEIGHT_500: OH_Drawing_FontWeight = 4;
1668#[doc = " Semi-bold"]
1669pub const OH_Drawing_FontWeight_FONT_WEIGHT_600: OH_Drawing_FontWeight = 5;
1670#[doc = " Bold"]
1671pub const OH_Drawing_FontWeight_FONT_WEIGHT_700: OH_Drawing_FontWeight = 6;
1672#[doc = " Extra-bold"]
1673pub const OH_Drawing_FontWeight_FONT_WEIGHT_800: OH_Drawing_FontWeight = 7;
1674#[doc = " Black"]
1675pub const OH_Drawing_FontWeight_FONT_WEIGHT_900: OH_Drawing_FontWeight = 8;
1676#[doc = " @brief Enumerates font weights.\n\n @since 8\n @version 1.0"]
1677pub type OH_Drawing_FontWeight = u32;
1678#[doc = " Alphabetic, where the letters in alphabets like English sit on."]
1679pub const OH_Drawing_TextBaseline_TEXT_BASELINE_ALPHABETIC: OH_Drawing_TextBaseline = 0;
1680#[doc = " Ideographic. The baseline is at the bottom of the text area."]
1681pub const OH_Drawing_TextBaseline_TEXT_BASELINE_IDEOGRAPHIC: OH_Drawing_TextBaseline = 1;
1682#[doc = " @brief Enumerates text baselines.\n\n @since 8\n @version 1.0"]
1683pub type OH_Drawing_TextBaseline = u32;
1684#[doc = " No decoration."]
1685pub const OH_Drawing_TextDecoration_TEXT_DECORATION_NONE: OH_Drawing_TextDecoration = 0;
1686#[doc = " A underline is used for decoration."]
1687pub const OH_Drawing_TextDecoration_TEXT_DECORATION_UNDERLINE: OH_Drawing_TextDecoration = 1;
1688#[doc = " An overline is used for decoration."]
1689pub const OH_Drawing_TextDecoration_TEXT_DECORATION_OVERLINE: OH_Drawing_TextDecoration = 2;
1690#[doc = " A strikethrough is used for decoration."]
1691pub const OH_Drawing_TextDecoration_TEXT_DECORATION_LINE_THROUGH: OH_Drawing_TextDecoration = 4;
1692#[doc = " @brief Enumerates text decorations.\n\n @since 8\n @version 1.0"]
1693pub type OH_Drawing_TextDecoration = u32;
1694#[doc = " Normal style"]
1695pub const OH_Drawing_FontStyle_FONT_STYLE_NORMAL: OH_Drawing_FontStyle = 0;
1696#[doc = " Italic style"]
1697pub const OH_Drawing_FontStyle_FONT_STYLE_ITALIC: OH_Drawing_FontStyle = 1;
1698#[doc = " Oblique style"]
1699pub const OH_Drawing_FontStyle_FONT_STYLE_OBLIQUE: OH_Drawing_FontStyle = 2;
1700#[doc = " @brief Enumerates font styles.\n\n @since 8\n @version 1.0"]
1701pub type OH_Drawing_FontStyle = u32;
1702#[doc = " Offset At Baseline"]
1703pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_OFFSET_AT_BASELINE:
1704 OH_Drawing_PlaceholderVerticalAlignment = 0;
1705#[doc = " Above Baseline"]
1706pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_ABOVE_BASELINE:
1707 OH_Drawing_PlaceholderVerticalAlignment = 1;
1708#[doc = " Below Baseline"]
1709pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BELOW_BASELINE:
1710 OH_Drawing_PlaceholderVerticalAlignment = 2;
1711#[doc = " Top of Row Box"]
1712pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_TOP_OF_ROW_BOX:
1713 OH_Drawing_PlaceholderVerticalAlignment = 3;
1714#[doc = " Bottom of Row Box"]
1715pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_BOTTOM_OF_ROW_BOX:
1716 OH_Drawing_PlaceholderVerticalAlignment = 4;
1717#[doc = " Center of Row Box"]
1718pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_CENTER_OF_ROW_BOX:
1719 OH_Drawing_PlaceholderVerticalAlignment = 5;
1720#[doc = " Follow paragraph setting\n @since 20"]
1721#[cfg(feature = "api-20")]
1722pub const OH_Drawing_PlaceholderVerticalAlignment_ALIGNMENT_FOLLOW_PARAGRAPH:
1723 OH_Drawing_PlaceholderVerticalAlignment = 6;
1724#[doc = " @brief Enumerates placeholder vertical alignment.\n\n @since 11\n @version 1.0"]
1725pub type OH_Drawing_PlaceholderVerticalAlignment = u32;
1726#[doc = " @brief Defines the placeholder span.\n\n @since 11\n @version 1.0"]
1727#[repr(C)]
1728#[derive(Debug, Copy, Clone)]
1729pub struct OH_Drawing_PlaceholderSpan {
1730 #[doc = " width of placeholder"]
1731 pub width: f64,
1732 #[doc = " height of placeholder"]
1733 pub height: f64,
1734 #[doc = " alignment of placeholder"]
1735 pub alignment: OH_Drawing_PlaceholderVerticalAlignment,
1736 #[doc = " baseline of placeholder"]
1737 pub baseline: OH_Drawing_TextBaseline,
1738 #[doc = " baselineoffset of placeholder"]
1739 pub baselineOffset: f64,
1740}
1741#[doc = " Solid style"]
1742pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_SOLID:
1743 OH_Drawing_TextDecorationStyle = 0;
1744#[doc = " Double style"]
1745pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DOUBLE:
1746 OH_Drawing_TextDecorationStyle = 1;
1747#[doc = " Dotted style"]
1748pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DOTTED:
1749 OH_Drawing_TextDecorationStyle = 2;
1750#[doc = " Dashed style"]
1751pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_DASHED:
1752 OH_Drawing_TextDecorationStyle = 3;
1753#[doc = " Wavy style"]
1754pub const OH_Drawing_TextDecorationStyle_TEXT_DECORATION_STYLE_WAVY:
1755 OH_Drawing_TextDecorationStyle = 4;
1756#[doc = " @brief Enumerates text decoration style.\n\n @since 11\n @version 1.0"]
1757pub type OH_Drawing_TextDecorationStyle = u32;
1758#[doc = " Head modal"]
1759pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_HEAD: OH_Drawing_EllipsisModal = 0;
1760#[doc = " Middle modal"]
1761pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_MIDDLE: OH_Drawing_EllipsisModal = 1;
1762#[doc = " Tail modal"]
1763pub const OH_Drawing_EllipsisModal_ELLIPSIS_MODAL_TAIL: OH_Drawing_EllipsisModal = 2;
1764#[doc = " @brief Enumerates ellipsis modal.\n\n @since 11\n @version 1.0"]
1765pub type OH_Drawing_EllipsisModal = u32;
1766#[doc = " Greedy strategy"]
1767pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_GREEDY: OH_Drawing_BreakStrategy = 0;
1768#[doc = " Quality strategy"]
1769pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_HIGH_QUALITY: OH_Drawing_BreakStrategy = 1;
1770#[doc = " Balanced strategy"]
1771pub const OH_Drawing_BreakStrategy_BREAK_STRATEGY_BALANCED: OH_Drawing_BreakStrategy = 2;
1772#[doc = " @brief Enumerates break strategy.\n\n @since 11\n @version 1.0"]
1773pub type OH_Drawing_BreakStrategy = u32;
1774#[doc = " Normal type"]
1775pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_NORMAL: OH_Drawing_WordBreakType = 0;
1776#[doc = " Break All type"]
1777pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_ALL: OH_Drawing_WordBreakType = 1;
1778#[doc = " Break Word type"]
1779pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_WORD: OH_Drawing_WordBreakType = 2;
1780#[doc = " Break word with hyphens\n @since 18"]
1781#[cfg(feature = "api-18")]
1782pub const OH_Drawing_WordBreakType_WORD_BREAK_TYPE_BREAK_HYPHEN: OH_Drawing_WordBreakType = 3;
1783#[doc = " @brief Enumerates word break type.\n\n @since 11\n @version 1.0"]
1784pub type OH_Drawing_WordBreakType = u32;
1785#[doc = " Tight style"]
1786pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_TIGHT: OH_Drawing_RectHeightStyle = 0;
1787#[doc = " Max style"]
1788pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_MAX: OH_Drawing_RectHeightStyle = 1;
1789#[doc = " Includelinespacemiddle style"]
1790pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEMIDDLE:
1791 OH_Drawing_RectHeightStyle = 2;
1792#[doc = " Includelinespacetop style"]
1793pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACETOP:
1794 OH_Drawing_RectHeightStyle = 3;
1795#[doc = " Includelinespacebottom style"]
1796pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_INCLUDELINESPACEBOTTOM:
1797 OH_Drawing_RectHeightStyle = 4;
1798#[doc = " Struct style"]
1799pub const OH_Drawing_RectHeightStyle_RECT_HEIGHT_STYLE_STRUCT: OH_Drawing_RectHeightStyle = 5;
1800#[doc = " @brief Enumerates rect height style.\n\n @since 11\n @version 1.0"]
1801pub type OH_Drawing_RectHeightStyle = u32;
1802#[doc = " Tight style"]
1803pub const OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_TIGHT: OH_Drawing_RectWidthStyle = 0;
1804#[doc = " Max style"]
1805pub const OH_Drawing_RectWidthStyle_RECT_WIDTH_STYLE_MAX: OH_Drawing_RectWidthStyle = 1;
1806#[doc = " @brief Enumerates rect Width style.\n\n @since 11\n @version 1.0"]
1807pub type OH_Drawing_RectWidthStyle = u32;
1808#[doc = " The list of system font configuration information was successfully obtained"]
1809pub const OH_Drawing_FontConfigInfoErrorCode_SUCCESS_FONT_CONFIG_INFO:
1810 OH_Drawing_FontConfigInfoErrorCode = 0;
1811#[doc = " Unknown error"]
1812pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_UNKNOWN:
1813 OH_Drawing_FontConfigInfoErrorCode = 1;
1814#[doc = " Parse system config file error"]
1815pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_PARSE_FILE:
1816 OH_Drawing_FontConfigInfoErrorCode = 2;
1817#[doc = " Alloc memory error"]
1818pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_ALLOC_MEMORY:
1819 OH_Drawing_FontConfigInfoErrorCode = 3;
1820#[doc = " Copy string data error"]
1821pub const OH_Drawing_FontConfigInfoErrorCode_ERROR_FONT_CONFIG_INFO_COPY_STRING_DATA:
1822 OH_Drawing_FontConfigInfoErrorCode = 4;
1823#[doc = " @brief Gets system font configuration information list result enum.\n\n @since 12\n @version 1.0"]
1824pub type OH_Drawing_FontConfigInfoErrorCode = u32;
1825#[doc = " @brief Fallback font information.\n\n @since 12\n @version 1.0"]
1826#[repr(C)]
1827#[derive(Debug, Copy, Clone)]
1828pub struct OH_Drawing_FontFallbackInfo {
1829 #[doc = " The type of language supported by the font set. The language format is bcp47"]
1830 pub language: *mut ::std::os::raw::c_char,
1831 #[doc = " Font family name"]
1832 pub familyName: *mut ::std::os::raw::c_char,
1833}
1834#[doc = " @brief Fallback font group.\n\n @since 12\n @version 1.0"]
1835#[repr(C)]
1836#[derive(Debug, Copy, Clone)]
1837pub struct OH_Drawing_FontFallbackGroup {
1838 #[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."]
1839 pub groupName: *mut ::std::os::raw::c_char,
1840 #[doc = " Fallback font Info Size"]
1841 pub fallbackInfoSize: usize,
1842 #[doc = " A list of font sets for fallback fonts"]
1843 pub fallbackInfoSet: *mut OH_Drawing_FontFallbackInfo,
1844}
1845#[doc = " @brief Font weight mapping information.\n\n @since 12\n @version 1.0"]
1846#[repr(C)]
1847#[derive(Debug, Copy, Clone)]
1848pub struct OH_Drawing_FontAdjustInfo {
1849 #[doc = " The font's original weight value"]
1850 pub weight: ::std::os::raw::c_int,
1851 #[doc = " The font weight displayed in the application"]
1852 pub to: ::std::os::raw::c_int,
1853}
1854#[doc = " @brief Alias font information.\n\n @since 12\n @version 1.0"]
1855#[repr(C)]
1856#[derive(Debug, Copy, Clone)]
1857pub struct OH_Drawing_FontAliasInfo {
1858 #[doc = " Font family name"]
1859 pub familyName: *mut ::std::os::raw::c_char,
1860 #[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."]
1861 pub weight: ::std::os::raw::c_int,
1862}
1863#[doc = " @brief General font set information supported by the system.\n\n @since 12\n @version 1.0"]
1864#[repr(C)]
1865#[derive(Debug, Copy, Clone)]
1866pub struct OH_Drawing_FontGenericInfo {
1867 #[doc = " Font family name"]
1868 pub familyName: *mut ::std::os::raw::c_char,
1869 #[doc = " The size of alias font lists"]
1870 pub aliasInfoSize: usize,
1871 #[doc = " The size of font weight mapping information lists"]
1872 pub adjustInfoSize: usize,
1873 #[doc = " List of alias fonts"]
1874 pub aliasInfoSet: *mut OH_Drawing_FontAliasInfo,
1875 #[doc = " Font weight mapping information lists"]
1876 pub adjustInfoSet: *mut OH_Drawing_FontAdjustInfo,
1877}
1878#[doc = " @brief System font configuration information.\n\n @since 12\n @version 1.0"]
1879#[repr(C)]
1880#[derive(Debug, Copy, Clone)]
1881pub struct OH_Drawing_FontConfigInfo {
1882 #[doc = " Count of system font file paths"]
1883 pub fontDirSize: usize,
1884 #[doc = " List size of generic font sets"]
1885 pub fontGenericInfoSize: usize,
1886 #[doc = " Count of fallback font set lists"]
1887 pub fallbackGroupSize: usize,
1888 #[doc = " List of system font file paths"]
1889 pub fontDirSet: *mut *mut ::std::os::raw::c_char,
1890 #[doc = " List of generic font sets"]
1891 pub fontGenericInfoSet: *mut OH_Drawing_FontGenericInfo,
1892 #[doc = " List of fallback font sets"]
1893 pub fallbackGroupSet: *mut OH_Drawing_FontFallbackGroup,
1894}
1895#[doc = " @brief Describes the font information.\n\n @since 12\n @version 1.0"]
1896#[repr(C)]
1897#[derive(Debug, Copy, Clone)]
1898pub struct OH_Drawing_FontDescriptor {
1899 #[doc = " The file path of System font"]
1900 pub path: *mut ::std::os::raw::c_char,
1901 #[doc = " A name that uniquely identifies the font"]
1902 pub postScriptName: *mut ::std::os::raw::c_char,
1903 #[doc = " The name of System font"]
1904 pub fullName: *mut ::std::os::raw::c_char,
1905 #[doc = " The family of System font"]
1906 pub fontFamily: *mut ::std::os::raw::c_char,
1907 #[doc = " The subfont family of the system font"]
1908 pub fontSubfamily: *mut ::std::os::raw::c_char,
1909 #[doc = " The weight of System font"]
1910 pub weight: ::std::os::raw::c_int,
1911 #[doc = " The width of System font"]
1912 pub width: ::std::os::raw::c_int,
1913 #[doc = " Whether the system font is tilted"]
1914 pub italic: ::std::os::raw::c_int,
1915 #[doc = " Whether the system font is compact"]
1916 pub monoSpace: bool,
1917 #[doc = " whether symbolic fonts are supported"]
1918 pub symbolic: bool,
1919}
1920#[doc = " @brief The metrics of line.\n\n @since 12\n @version 1.0"]
1921#[repr(C)]
1922#[derive(Debug, Copy, Clone)]
1923pub struct OH_Drawing_LineMetrics {
1924 #[doc = " Text ascender height"]
1925 pub ascender: f64,
1926 #[doc = " Tex descender height"]
1927 pub descender: f64,
1928 #[doc = " The height of a capital letter"]
1929 pub capHeight: f64,
1930 #[doc = " The height of a lowercase letter"]
1931 pub xHeight: f64,
1932 #[doc = " Text width"]
1933 pub width: f64,
1934 #[doc = " Line height"]
1935 pub height: f64,
1936 #[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"]
1937 pub x: f64,
1938 #[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"]
1939 pub y: f64,
1940 #[doc = " Start Index"]
1941 pub startIndex: usize,
1942 #[doc = " End Index"]
1943 pub endIndex: usize,
1944 #[doc = " The metrics information of the first character"]
1945 pub firstCharMetrics: OH_Drawing_Font_Metrics,
1946}
1947#[doc = " both ascend of first row and last row style"]
1948pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_ALL: OH_Drawing_TextHeightBehavior = 0;
1949#[doc = " forbidding ascend of first row style"]
1950pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_FIRST_ASCENT:
1951 OH_Drawing_TextHeightBehavior = 1;
1952#[doc = " forbidding ascend of last row style"]
1953pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_LAST_ASCENT:
1954 OH_Drawing_TextHeightBehavior = 2;
1955#[doc = " neither ascend of first row nor last row style"]
1956pub const OH_Drawing_TextHeightBehavior_TEXT_HEIGHT_DISABLE_ALL: OH_Drawing_TextHeightBehavior = 3;
1957#[doc = " @brief Enumerates of heightmode of text.\n\n @since 12\n @version 1.0"]
1958pub type OH_Drawing_TextHeightBehavior = u32;
1959#[doc = " None style"]
1960pub const OH_Drawing_TextStyleType_TEXT_STYLE_NONE: OH_Drawing_TextStyleType = 0;
1961#[doc = " All attributes style"]
1962pub const OH_Drawing_TextStyleType_TEXT_STYLE_ALL_ATTRIBUTES: OH_Drawing_TextStyleType = 1;
1963#[doc = " Font style"]
1964pub const OH_Drawing_TextStyleType_TEXT_STYLE_FONT: OH_Drawing_TextStyleType = 2;
1965#[doc = " Foreground style"]
1966pub const OH_Drawing_TextStyleType_TEXT_STYLE_FOREGROUND: OH_Drawing_TextStyleType = 3;
1967#[doc = " Background style"]
1968pub const OH_Drawing_TextStyleType_TEXT_STYLE_BACKGROUND: OH_Drawing_TextStyleType = 4;
1969#[doc = " Shadow style"]
1970pub const OH_Drawing_TextStyleType_TEXT_STYLE_SHADOW: OH_Drawing_TextStyleType = 5;
1971#[doc = " Decorations style"]
1972pub const OH_Drawing_TextStyleType_TEXT_STYLE_DECORATIONS: OH_Drawing_TextStyleType = 6;
1973#[doc = " Letter spacing style"]
1974pub const OH_Drawing_TextStyleType_TEXT_STYLE_LETTER_SPACING: OH_Drawing_TextStyleType = 7;
1975#[doc = " Word spacing style"]
1976pub const OH_Drawing_TextStyleType_TEXT_STYLE_WORD_SPACING: OH_Drawing_TextStyleType = 8;
1977#[doc = " @brief Enumerates text style type.\n\n @since 12\n @version 1.0"]
1978pub type OH_Drawing_TextStyleType = u32;
1979pub const OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_CONDENSED: OH_Drawing_FontWidth = 1;
1980pub const OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_CONDENSED: OH_Drawing_FontWidth = 2;
1981pub const OH_Drawing_FontWidth_FONT_WIDTH_CONDENSED: OH_Drawing_FontWidth = 3;
1982pub const OH_Drawing_FontWidth_FONT_WIDTH_SEMI_CONDENSED: OH_Drawing_FontWidth = 4;
1983pub const OH_Drawing_FontWidth_FONT_WIDTH_NORMAL: OH_Drawing_FontWidth = 5;
1984pub const OH_Drawing_FontWidth_FONT_WIDTH_SEMI_EXPANDED: OH_Drawing_FontWidth = 6;
1985pub const OH_Drawing_FontWidth_FONT_WIDTH_EXPANDED: OH_Drawing_FontWidth = 7;
1986pub const OH_Drawing_FontWidth_FONT_WIDTH_EXTRA_EXPANDED: OH_Drawing_FontWidth = 8;
1987pub const OH_Drawing_FontWidth_FONT_WIDTH_ULTRA_EXPANDED: OH_Drawing_FontWidth = 9;
1988#[doc = " @brief Enumerates font width.\n\n @since 12\n @version 1.0"]
1989pub type OH_Drawing_FontWidth = u32;
1990#[doc = " Line height maximum"]
1991#[cfg(feature = "api-21")]
1992pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM:
1993 OH_Drawing_TextStyleAttributeId = 0;
1994#[doc = " Line height minimum"]
1995#[cfg(feature = "api-21")]
1996pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM:
1997 OH_Drawing_TextStyleAttributeId = 1;
1998#[doc = " Line height style"]
1999#[cfg(feature = "api-21")]
2000pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_I_LINE_HEIGHT_STYLE:
2001 OH_Drawing_TextStyleAttributeId = 2;
2002#[doc = " Font width"]
2003#[cfg(feature = "api-21")]
2004pub const OH_Drawing_TextStyleAttributeId_TEXT_STYLE_ATTR_I_FONT_WIDTH:
2005 OH_Drawing_TextStyleAttributeId = 3;
2006#[doc = " @brief Enumerates text style attribute.\n\n @since 21"]
2007#[cfg(feature = "api-21")]
2008pub type OH_Drawing_TextStyleAttributeId = u32;
2009#[doc = " Use the font size as the scale factor for line height scaling"]
2010#[cfg(feature = "api-21")]
2011pub const OH_Drawing_LineHeightStyle_TEXT_LINE_HEIGHT_BY_FONT_SIZE: OH_Drawing_LineHeightStyle = 0;
2012#[doc = " Use the text height after shaping as the scale factor for line height scaling"]
2013#[cfg(feature = "api-21")]
2014pub const OH_Drawing_LineHeightStyle_TEXT_LINE_HEIGHT_BY_FONT_HEIGHT: OH_Drawing_LineHeightStyle =
2015 1;
2016#[doc = " @brief Enumerates line height's scaling type.\n\n @since 21"]
2017#[cfg(feature = "api-21")]
2018pub type OH_Drawing_LineHeightStyle = u32;
2019#[doc = " Line height maximum"]
2020#[cfg(feature = "api-21")]
2021pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MAXIMUM:
2022 OH_Drawing_TypographyStyleAttributeId = 0;
2023#[doc = " Line height minimum"]
2024#[cfg(feature = "api-21")]
2025pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_HEIGHT_MINIMUM:
2026 OH_Drawing_TypographyStyleAttributeId = 1;
2027#[doc = " Line spacing"]
2028#[cfg(feature = "api-21")]
2029pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_D_LINE_SPACING:
2030 OH_Drawing_TypographyStyleAttributeId = 2;
2031#[doc = " Line height style"]
2032#[cfg(feature = "api-21")]
2033pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_I_LINE_HEIGHT_STYLE:
2034 OH_Drawing_TypographyStyleAttributeId = 3;
2035#[doc = " Font width"]
2036#[cfg(feature = "api-21")]
2037pub const OH_Drawing_TypographyStyleAttributeId_TYPOGRAPHY_STYLE_ATTR_I_FONT_WIDTH:
2038 OH_Drawing_TypographyStyleAttributeId = 4;
2039#[doc = " @brief Enumerates typography style attribute.\n\n @since 21"]
2040#[cfg(feature = "api-21")]
2041pub type OH_Drawing_TypographyStyleAttributeId = u32;
2042extern "C" {
2043 #[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"]
2044 #[cfg(feature = "api-21")]
2045 pub fn OH_Drawing_SetTextStyleAttributeDouble(
2046 style: *mut OH_Drawing_TextStyle,
2047 id: OH_Drawing_TextStyleAttributeId,
2048 value: f64,
2049 ) -> OH_Drawing_ErrorCode;
2050}
2051extern "C" {
2052 #[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"]
2053 #[cfg(feature = "api-21")]
2054 pub fn OH_Drawing_GetTextStyleAttributeDouble(
2055 style: *mut OH_Drawing_TextStyle,
2056 id: OH_Drawing_TextStyleAttributeId,
2057 value: *mut f64,
2058 ) -> OH_Drawing_ErrorCode;
2059}
2060extern "C" {
2061 #[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"]
2062 #[cfg(feature = "api-21")]
2063 pub fn OH_Drawing_SetTextStyleAttributeInt(
2064 style: *mut OH_Drawing_TextStyle,
2065 id: OH_Drawing_TextStyleAttributeId,
2066 value: ::std::os::raw::c_int,
2067 ) -> OH_Drawing_ErrorCode;
2068}
2069extern "C" {
2070 #[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"]
2071 #[cfg(feature = "api-21")]
2072 pub fn OH_Drawing_GetTextStyleAttributeInt(
2073 style: *mut OH_Drawing_TextStyle,
2074 id: OH_Drawing_TextStyleAttributeId,
2075 value: *mut ::std::os::raw::c_int,
2076 ) -> OH_Drawing_ErrorCode;
2077}
2078extern "C" {
2079 #[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"]
2080 #[cfg(feature = "api-21")]
2081 pub fn OH_Drawing_SetTypographyStyleAttributeDouble(
2082 style: *mut OH_Drawing_TypographyStyle,
2083 id: OH_Drawing_TypographyStyleAttributeId,
2084 value: f64,
2085 ) -> OH_Drawing_ErrorCode;
2086}
2087extern "C" {
2088 #[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"]
2089 #[cfg(feature = "api-21")]
2090 pub fn OH_Drawing_GetTypographyStyleAttributeDouble(
2091 style: *mut OH_Drawing_TypographyStyle,
2092 id: OH_Drawing_TypographyStyleAttributeId,
2093 value: *mut f64,
2094 ) -> OH_Drawing_ErrorCode;
2095}
2096extern "C" {
2097 #[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"]
2098 #[cfg(feature = "api-21")]
2099 pub fn OH_Drawing_SetTypographyStyleAttributeInt(
2100 style: *mut OH_Drawing_TypographyStyle,
2101 id: OH_Drawing_TypographyStyleAttributeId,
2102 value: ::std::os::raw::c_int,
2103 ) -> OH_Drawing_ErrorCode;
2104}
2105extern "C" {
2106 #[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"]
2107 #[cfg(feature = "api-21")]
2108 pub fn OH_Drawing_GetTypographyStyleAttributeInt(
2109 style: *mut OH_Drawing_TypographyStyle,
2110 id: OH_Drawing_TypographyStyleAttributeId,
2111 value: *mut ::std::os::raw::c_int,
2112 ) -> OH_Drawing_ErrorCode;
2113}
2114#[doc = " No badge"]
2115#[cfg(feature = "api-20")]
2116pub const OH_Drawing_TextBadgeType_TEXT_BADGE_NONE: OH_Drawing_TextBadgeType = 0;
2117#[doc = " Superscript"]
2118#[cfg(feature = "api-20")]
2119pub const OH_Drawing_TextBadgeType_TEXT_SUPERSCRIPT: OH_Drawing_TextBadgeType = 1;
2120#[doc = " Subscript"]
2121#[cfg(feature = "api-20")]
2122pub const OH_Drawing_TextBadgeType_TEXT_SUBSCRIPT: OH_Drawing_TextBadgeType = 2;
2123#[doc = " @brief Type of badge.\n\n @since 20\n @version 1.0"]
2124#[cfg(feature = "api-20")]
2125pub type OH_Drawing_TextBadgeType = u32;
2126#[doc = " Baseline of text line"]
2127#[cfg(feature = "api-20")]
2128pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_BASELINE:
2129 OH_Drawing_TextVerticalAlignment = 0;
2130#[doc = " Bottom of text line"]
2131#[cfg(feature = "api-20")]
2132pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_BOTTOM:
2133 OH_Drawing_TextVerticalAlignment = 1;
2134#[doc = " Center of text line"]
2135#[cfg(feature = "api-20")]
2136pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_CENTER:
2137 OH_Drawing_TextVerticalAlignment = 2;
2138#[doc = " Top of text line"]
2139#[cfg(feature = "api-20")]
2140pub const OH_Drawing_TextVerticalAlignment_TEXT_VERTICAL_ALIGNMENT_TOP:
2141 OH_Drawing_TextVerticalAlignment = 3;
2142#[doc = " @brief Type of vertical alignment.\n\n @since 20\n @version 1.0"]
2143#[cfg(feature = "api-20")]
2144pub type OH_Drawing_TextVerticalAlignment = u32;
2145#[doc = " @brief Defines the font style struct.\n\n @since 12\n @version 1.0"]
2146#[repr(C)]
2147#[derive(Debug, Copy, Clone)]
2148pub struct OH_Drawing_FontStyleStruct {
2149 #[doc = " Font weight"]
2150 pub weight: OH_Drawing_FontWeight,
2151 #[doc = " Font width"]
2152 pub width: OH_Drawing_FontWidth,
2153 #[doc = " Font slant"]
2154 pub slant: OH_Drawing_FontStyle,
2155}
2156#[doc = " @brief Defines the fontfeature.\n\n @since 12\n @version 1.0"]
2157#[repr(C)]
2158#[derive(Debug, Copy, Clone)]
2159pub struct OH_Drawing_FontFeature {
2160 #[doc = " key of fontfeature"]
2161 pub tag: *mut ::std::os::raw::c_char,
2162 #[doc = " value of fontfeature"]
2163 pub value: ::std::os::raw::c_int,
2164}
2165#[doc = " @brief Defines StrutStyle info struct.\n\n @since 12\n @version 1.0"]
2166#[repr(C)]
2167#[derive(Debug, Copy, Clone)]
2168pub struct OH_Drawing_StrutStyle {
2169 #[doc = " The font weight to use when calculating the strut"]
2170 pub weight: OH_Drawing_FontWeight,
2171 #[doc = " The font style to use when calculating the strut"]
2172 pub style: OH_Drawing_FontStyle,
2173 #[doc = " The size of the ascent plus descent in logical pixels"]
2174 pub size: f64,
2175 #[doc = " The minimum height of the strut, as a multiple of fontSize"]
2176 pub heightScale: f64,
2177 #[doc = " Whether the height is override"]
2178 pub heightOverride: bool,
2179 #[doc = " Whether the halfleading is enable"]
2180 pub halfLeading: bool,
2181 #[doc = " The additional leading to apply to the strut as a multiple of Size"]
2182 pub leading: f64,
2183 #[doc = " Whether the strut height should be forced"]
2184 pub forceStrutHeight: bool,
2185 #[doc = " The size of font families"]
2186 pub familiesSize: usize,
2187 #[doc = " The families of the font to use when calculating the strut"]
2188 pub families: *mut *mut ::std::os::raw::c_char,
2189}
2190extern "C" {
2191 #[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"]
2192 pub fn OH_Drawing_CreateTypographyStyle() -> *mut OH_Drawing_TypographyStyle;
2193}
2194extern "C" {
2195 #[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"]
2196 pub fn OH_Drawing_DestroyTypographyStyle(style: *mut OH_Drawing_TypographyStyle);
2197}
2198extern "C" {
2199 #[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"]
2200 pub fn OH_Drawing_SetTypographyTextDirection(
2201 style: *mut OH_Drawing_TypographyStyle,
2202 direction: ::std::os::raw::c_int,
2203 );
2204}
2205extern "C" {
2206 #[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"]
2207 pub fn OH_Drawing_SetTypographyTextAlign(
2208 style: *mut OH_Drawing_TypographyStyle,
2209 align: ::std::os::raw::c_int,
2210 );
2211}
2212extern "C" {
2213 #[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"]
2214 pub fn OH_Drawing_SetTypographyTextMaxLines(
2215 style: *mut OH_Drawing_TypographyStyle,
2216 lineNumber: ::std::os::raw::c_int,
2217 );
2218}
2219extern "C" {
2220 #[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"]
2221 pub fn OH_Drawing_CreateTextStyle() -> *mut OH_Drawing_TextStyle;
2222}
2223extern "C" {
2224 #[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"]
2225 pub fn OH_Drawing_DestroyTextStyle(style: *mut OH_Drawing_TextStyle);
2226}
2227extern "C" {
2228 #[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"]
2229 pub fn OH_Drawing_SetTextStyleColor(style: *mut OH_Drawing_TextStyle, color: u32);
2230}
2231extern "C" {
2232 #[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"]
2233 pub fn OH_Drawing_SetTextStyleFontSize(style: *mut OH_Drawing_TextStyle, fontSize: f64);
2234}
2235extern "C" {
2236 #[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"]
2237 pub fn OH_Drawing_SetTextStyleFontWeight(
2238 style: *mut OH_Drawing_TextStyle,
2239 fontWeight: ::std::os::raw::c_int,
2240 );
2241}
2242extern "C" {
2243 #[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"]
2244 pub fn OH_Drawing_SetTextStyleBaseLine(
2245 style: *mut OH_Drawing_TextStyle,
2246 baseline: ::std::os::raw::c_int,
2247 );
2248}
2249extern "C" {
2250 #[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"]
2251 pub fn OH_Drawing_SetTextStyleDecoration(
2252 style: *mut OH_Drawing_TextStyle,
2253 decoration: ::std::os::raw::c_int,
2254 );
2255}
2256extern "C" {
2257 #[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"]
2258 #[cfg(feature = "api-18")]
2259 pub fn OH_Drawing_AddTextStyleDecoration(
2260 style: *mut OH_Drawing_TextStyle,
2261 decoration: ::std::os::raw::c_int,
2262 );
2263}
2264extern "C" {
2265 #[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"]
2266 #[cfg(feature = "api-18")]
2267 pub fn OH_Drawing_RemoveTextStyleDecoration(
2268 style: *mut OH_Drawing_TextStyle,
2269 decoration: ::std::os::raw::c_int,
2270 );
2271}
2272extern "C" {
2273 #[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"]
2274 pub fn OH_Drawing_SetTextStyleDecorationColor(style: *mut OH_Drawing_TextStyle, color: u32);
2275}
2276extern "C" {
2277 #[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"]
2278 pub fn OH_Drawing_SetTextStyleFontHeight(style: *mut OH_Drawing_TextStyle, fontHeight: f64);
2279}
2280extern "C" {
2281 #[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"]
2282 pub fn OH_Drawing_SetTextStyleFontFamilies(
2283 style: *mut OH_Drawing_TextStyle,
2284 fontFamiliesNumber: ::std::os::raw::c_int,
2285 fontFamilies: *mut *const ::std::os::raw::c_char,
2286 );
2287}
2288extern "C" {
2289 #[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"]
2290 pub fn OH_Drawing_SetTextStyleFontStyle(
2291 style: *mut OH_Drawing_TextStyle,
2292 fontStyle: ::std::os::raw::c_int,
2293 );
2294}
2295extern "C" {
2296 #[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"]
2297 pub fn OH_Drawing_SetTextStyleLocale(
2298 style: *mut OH_Drawing_TextStyle,
2299 locale: *const ::std::os::raw::c_char,
2300 );
2301}
2302extern "C" {
2303 #[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"]
2304 pub fn OH_Drawing_SetTextStyleForegroundBrush(
2305 style: *mut OH_Drawing_TextStyle,
2306 foregroundBrush: *mut OH_Drawing_Brush,
2307 );
2308}
2309extern "C" {
2310 #[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"]
2311 pub fn OH_Drawing_TextStyleGetForegroundBrush(
2312 style: *mut OH_Drawing_TextStyle,
2313 foregroundBrush: *mut OH_Drawing_Brush,
2314 );
2315}
2316extern "C" {
2317 #[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"]
2318 pub fn OH_Drawing_SetTextStyleForegroundPen(
2319 style: *mut OH_Drawing_TextStyle,
2320 foregroundPen: *mut OH_Drawing_Pen,
2321 );
2322}
2323extern "C" {
2324 #[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"]
2325 pub fn OH_Drawing_TextStyleGetForegroundPen(
2326 style: *mut OH_Drawing_TextStyle,
2327 foregroundPen: *mut OH_Drawing_Pen,
2328 );
2329}
2330extern "C" {
2331 #[doc = " @brief Sets the background brush style.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param style Indicates the pointer to a text style object <b>OH_Drawing_TextStyle</b>.\n @param foregroundPen Indicates the pointer to a brush object <b>OH_Drawing_Brush</b>.\n @since 12\n @version 1.0"]
2332 pub fn OH_Drawing_SetTextStyleBackgroundBrush(
2333 style: *mut OH_Drawing_TextStyle,
2334 foregroundPen: *mut OH_Drawing_Brush,
2335 );
2336}
2337extern "C" {
2338 #[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"]
2339 pub fn OH_Drawing_TextStyleGetBackgroundBrush(
2340 style: *mut OH_Drawing_TextStyle,
2341 backgroundBrush: *mut OH_Drawing_Brush,
2342 );
2343}
2344extern "C" {
2345 #[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"]
2346 pub fn OH_Drawing_SetTextStyleBackgroundPen(
2347 style: *mut OH_Drawing_TextStyle,
2348 backgroundPen: *mut OH_Drawing_Pen,
2349 );
2350}
2351extern "C" {
2352 #[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"]
2353 pub fn OH_Drawing_TextStyleGetBackgroundPen(
2354 style: *mut OH_Drawing_TextStyle,
2355 backgroundPen: *mut OH_Drawing_Pen,
2356 );
2357}
2358extern "C" {
2359 #[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"]
2360 pub fn OH_Drawing_CreateTypographyHandler(
2361 style: *mut OH_Drawing_TypographyStyle,
2362 fontCollection: *mut OH_Drawing_FontCollection,
2363 ) -> *mut OH_Drawing_TypographyCreate;
2364}
2365extern "C" {
2366 #[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"]
2367 pub fn OH_Drawing_DestroyTypographyHandler(handler: *mut OH_Drawing_TypographyCreate);
2368}
2369extern "C" {
2370 #[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"]
2371 pub fn OH_Drawing_TypographyHandlerPushTextStyle(
2372 handler: *mut OH_Drawing_TypographyCreate,
2373 style: *mut OH_Drawing_TextStyle,
2374 );
2375}
2376extern "C" {
2377 #[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"]
2378 pub fn OH_Drawing_TypographyHandlerAddText(
2379 handler: *mut OH_Drawing_TypographyCreate,
2380 text: *const ::std::os::raw::c_char,
2381 );
2382}
2383extern "C" {
2384 #[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"]
2385 pub fn OH_Drawing_TypographyHandlerPopTextStyle(handler: *mut OH_Drawing_TypographyCreate);
2386}
2387extern "C" {
2388 #[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"]
2389 pub fn OH_Drawing_CreateTypography(
2390 handler: *mut OH_Drawing_TypographyCreate,
2391 ) -> *mut OH_Drawing_Typography;
2392}
2393extern "C" {
2394 #[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"]
2395 pub fn OH_Drawing_DestroyTypography(typography: *mut OH_Drawing_Typography);
2396}
2397extern "C" {
2398 #[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"]
2399 pub fn OH_Drawing_TypographyLayout(typography: *mut OH_Drawing_Typography, maxWidth: f64);
2400}
2401extern "C" {
2402 #[doc = " @brief Paints text on the canvas.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param typography Indicates the pointer to an <b>OH_Drawing_Typography</b> object.\n @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.\n @param potisionX Indicates the x coordinate.\n @param potisionY Indicates the y coordinate.\n @since 8\n @version 1.0"]
2403 pub fn OH_Drawing_TypographyPaint(
2404 typography: *mut OH_Drawing_Typography,
2405 canvas: *mut OH_Drawing_Canvas,
2406 potisionX: f64,
2407 potisionY: f64,
2408 );
2409}
2410extern "C" {
2411 #[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"]
2412 pub fn OH_Drawing_TypographyPaintOnPath(
2413 typography: *mut OH_Drawing_Typography,
2414 canvas: *mut OH_Drawing_Canvas,
2415 path: *mut OH_Drawing_Path,
2416 hOffset: f64,
2417 vOffset: f64,
2418 );
2419}
2420extern "C" {
2421 #[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"]
2422 pub fn OH_Drawing_TypographyGetMaxWidth(typography: *mut OH_Drawing_Typography) -> f64;
2423}
2424extern "C" {
2425 #[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"]
2426 pub fn OH_Drawing_TypographyGetHeight(typography: *mut OH_Drawing_Typography) -> f64;
2427}
2428extern "C" {
2429 #[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"]
2430 pub fn OH_Drawing_TypographyGetLongestLine(typography: *mut OH_Drawing_Typography) -> f64;
2431}
2432extern "C" {
2433 #[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"]
2434 #[cfg(feature = "api-13")]
2435 pub fn OH_Drawing_TypographyGetLongestLineWithIndent(
2436 typography: *mut OH_Drawing_Typography,
2437 ) -> f64;
2438}
2439extern "C" {
2440 #[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"]
2441 pub fn OH_Drawing_TypographyGetMinIntrinsicWidth(typography: *mut OH_Drawing_Typography)
2442 -> f64;
2443}
2444extern "C" {
2445 #[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"]
2446 pub fn OH_Drawing_TypographyGetMaxIntrinsicWidth(typography: *mut OH_Drawing_Typography)
2447 -> f64;
2448}
2449extern "C" {
2450 #[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"]
2451 pub fn OH_Drawing_TypographyGetAlphabeticBaseline(
2452 typography: *mut OH_Drawing_Typography,
2453 ) -> f64;
2454}
2455extern "C" {
2456 #[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"]
2457 pub fn OH_Drawing_TypographyGetIdeographicBaseline(
2458 typography: *mut OH_Drawing_Typography,
2459 ) -> f64;
2460}
2461extern "C" {
2462 #[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"]
2463 pub fn OH_Drawing_TypographyHandlerAddPlaceholder(
2464 handler: *mut OH_Drawing_TypographyCreate,
2465 span: *mut OH_Drawing_PlaceholderSpan,
2466 );
2467}
2468extern "C" {
2469 #[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"]
2470 pub fn OH_Drawing_TypographyDidExceedMaxLines(typography: *mut OH_Drawing_Typography) -> bool;
2471}
2472extern "C" {
2473 #[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"]
2474 pub fn OH_Drawing_TypographyGetRectsForRange(
2475 typography: *mut OH_Drawing_Typography,
2476 start: usize,
2477 end: usize,
2478 heightStyle: OH_Drawing_RectHeightStyle,
2479 widthStyle: OH_Drawing_RectWidthStyle,
2480 ) -> *mut OH_Drawing_TextBox;
2481}
2482extern "C" {
2483 #[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"]
2484 pub fn OH_Drawing_TypographyGetRectsForPlaceholders(
2485 typography: *mut OH_Drawing_Typography,
2486 ) -> *mut OH_Drawing_TextBox;
2487}
2488extern "C" {
2489 #[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"]
2490 pub fn OH_Drawing_GetLeftFromTextBox(
2491 textbox: *mut OH_Drawing_TextBox,
2492 index: ::std::os::raw::c_int,
2493 ) -> f32;
2494}
2495extern "C" {
2496 #[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"]
2497 pub fn OH_Drawing_GetRightFromTextBox(
2498 textbox: *mut OH_Drawing_TextBox,
2499 index: ::std::os::raw::c_int,
2500 ) -> f32;
2501}
2502extern "C" {
2503 #[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"]
2504 pub fn OH_Drawing_GetTopFromTextBox(
2505 textbox: *mut OH_Drawing_TextBox,
2506 index: ::std::os::raw::c_int,
2507 ) -> f32;
2508}
2509extern "C" {
2510 #[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"]
2511 pub fn OH_Drawing_GetBottomFromTextBox(
2512 textbox: *mut OH_Drawing_TextBox,
2513 index: ::std::os::raw::c_int,
2514 ) -> f32;
2515}
2516extern "C" {
2517 #[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"]
2518 pub fn OH_Drawing_GetTextDirectionFromTextBox(
2519 textbox: *mut OH_Drawing_TextBox,
2520 index: ::std::os::raw::c_int,
2521 ) -> ::std::os::raw::c_int;
2522}
2523extern "C" {
2524 #[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"]
2525 pub fn OH_Drawing_GetSizeOfTextBox(textBox: *mut OH_Drawing_TextBox) -> usize;
2526}
2527extern "C" {
2528 #[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"]
2529 pub fn OH_Drawing_TypographyGetGlyphPositionAtCoordinate(
2530 typography: *mut OH_Drawing_Typography,
2531 dx: f64,
2532 dy: f64,
2533 ) -> *mut OH_Drawing_PositionAndAffinity;
2534}
2535extern "C" {
2536 #[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"]
2537 pub fn OH_Drawing_TypographyGetGlyphPositionAtCoordinateWithCluster(
2538 typography: *mut OH_Drawing_Typography,
2539 dx: f64,
2540 dy: f64,
2541 ) -> *mut OH_Drawing_PositionAndAffinity;
2542}
2543extern "C" {
2544 #[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"]
2545 pub fn OH_Drawing_GetPositionFromPositionAndAffinity(
2546 positionAndAffinity: *mut OH_Drawing_PositionAndAffinity,
2547 ) -> usize;
2548}
2549extern "C" {
2550 #[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"]
2551 pub fn OH_Drawing_GetAffinityFromPositionAndAffinity(
2552 positionandaffinity: *mut OH_Drawing_PositionAndAffinity,
2553 ) -> ::std::os::raw::c_int;
2554}
2555extern "C" {
2556 #[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"]
2557 pub fn OH_Drawing_TypographyGetWordBoundary(
2558 typography: *mut OH_Drawing_Typography,
2559 offset: usize,
2560 ) -> *mut OH_Drawing_Range;
2561}
2562extern "C" {
2563 #[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"]
2564 pub fn OH_Drawing_GetStartFromRange(range: *mut OH_Drawing_Range) -> usize;
2565}
2566extern "C" {
2567 #[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"]
2568 pub fn OH_Drawing_GetEndFromRange(range: *mut OH_Drawing_Range) -> usize;
2569}
2570extern "C" {
2571 #[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"]
2572 pub fn OH_Drawing_TypographyGetLineCount(typography: *mut OH_Drawing_Typography) -> usize;
2573}
2574extern "C" {
2575 #[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"]
2576 pub fn OH_Drawing_SetTextStyleDecorationStyle(
2577 style: *mut OH_Drawing_TextStyle,
2578 decorationStyle: ::std::os::raw::c_int,
2579 );
2580}
2581extern "C" {
2582 #[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"]
2583 pub fn OH_Drawing_SetTextStyleDecorationThicknessScale(
2584 style: *mut OH_Drawing_TextStyle,
2585 decorationThicknessScale: f64,
2586 );
2587}
2588extern "C" {
2589 #[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"]
2590 pub fn OH_Drawing_SetTextStyleLetterSpacing(
2591 style: *mut OH_Drawing_TextStyle,
2592 letterSpacing: f64,
2593 );
2594}
2595extern "C" {
2596 #[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"]
2597 pub fn OH_Drawing_SetTextStyleWordSpacing(style: *mut OH_Drawing_TextStyle, wordSpacing: f64);
2598}
2599extern "C" {
2600 #[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"]
2601 pub fn OH_Drawing_SetTextStyleHalfLeading(style: *mut OH_Drawing_TextStyle, halfLeading: bool);
2602}
2603extern "C" {
2604 #[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"]
2605 pub fn OH_Drawing_SetTextStyleEllipsis(
2606 style: *mut OH_Drawing_TextStyle,
2607 ellipsis: *const ::std::os::raw::c_char,
2608 );
2609}
2610extern "C" {
2611 #[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"]
2612 pub fn OH_Drawing_SetTextStyleEllipsisModal(
2613 style: *mut OH_Drawing_TextStyle,
2614 ellipsisModal: ::std::os::raw::c_int,
2615 );
2616}
2617extern "C" {
2618 #[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"]
2619 pub fn OH_Drawing_SetTypographyTextBreakStrategy(
2620 style: *mut OH_Drawing_TypographyStyle,
2621 breakStrategy: ::std::os::raw::c_int,
2622 );
2623}
2624extern "C" {
2625 #[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"]
2626 pub fn OH_Drawing_SetTypographyTextWordBreakType(
2627 style: *mut OH_Drawing_TypographyStyle,
2628 wordBreakType: ::std::os::raw::c_int,
2629 );
2630}
2631extern "C" {
2632 #[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"]
2633 pub fn OH_Drawing_SetTypographyTextEllipsisModal(
2634 style: *mut OH_Drawing_TypographyStyle,
2635 ellipsisModal: ::std::os::raw::c_int,
2636 );
2637}
2638extern "C" {
2639 #[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"]
2640 pub fn OH_Drawing_TypographyGetLineHeight(
2641 typography: *mut OH_Drawing_Typography,
2642 lineNumber: ::std::os::raw::c_int,
2643 ) -> f64;
2644}
2645extern "C" {
2646 #[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"]
2647 pub fn OH_Drawing_TypographyGetLineWidth(
2648 typography: *mut OH_Drawing_Typography,
2649 lineNumber: ::std::os::raw::c_int,
2650 ) -> f64;
2651}
2652extern "C" {
2653 #[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"]
2654 pub fn OH_Drawing_TypographyGetLineTextRange(
2655 typography: *mut OH_Drawing_Typography,
2656 lineNumber: ::std::os::raw::c_int,
2657 includeSpaces: bool,
2658 ) -> *mut OH_Drawing_Range;
2659}
2660extern "C" {
2661 #[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"]
2662 pub fn OH_Drawing_CreateFontDescriptor() -> *mut OH_Drawing_FontDescriptor;
2663}
2664extern "C" {
2665 #[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"]
2666 pub fn OH_Drawing_DestroyFontDescriptor(descriptor: *mut OH_Drawing_FontDescriptor);
2667}
2668extern "C" {
2669 #[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"]
2670 pub fn OH_Drawing_CreateFontParser() -> *mut OH_Drawing_FontParser;
2671}
2672extern "C" {
2673 #[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"]
2674 pub fn OH_Drawing_DestroyFontParser(parser: *mut OH_Drawing_FontParser);
2675}
2676extern "C" {
2677 #[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"]
2678 pub fn OH_Drawing_FontParserGetSystemFontList(
2679 fontParser: *mut OH_Drawing_FontParser,
2680 num: *mut usize,
2681 ) -> *mut *mut ::std::os::raw::c_char;
2682}
2683extern "C" {
2684 #[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"]
2685 pub fn OH_Drawing_DestroySystemFontList(fontList: *mut *mut ::std::os::raw::c_char, num: usize);
2686}
2687extern "C" {
2688 #[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"]
2689 pub fn OH_Drawing_FontParserGetFontByName(
2690 fontParser: *mut OH_Drawing_FontParser,
2691 name: *const ::std::os::raw::c_char,
2692 ) -> *mut OH_Drawing_FontDescriptor;
2693}
2694extern "C" {
2695 #[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"]
2696 pub fn OH_Drawing_TypographyGetLineMetrics(
2697 typography: *mut OH_Drawing_Typography,
2698 ) -> *mut OH_Drawing_LineMetrics;
2699}
2700extern "C" {
2701 #[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"]
2702 pub fn OH_Drawing_LineMetricsGetSize(lineMetrics: *mut OH_Drawing_LineMetrics) -> usize;
2703}
2704extern "C" {
2705 #[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"]
2706 pub fn OH_Drawing_DestroyLineMetrics(lineMetrics: *mut OH_Drawing_LineMetrics);
2707}
2708extern "C" {
2709 #[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"]
2710 pub fn OH_Drawing_TypographyGetLineMetricsAt(
2711 typography: *mut OH_Drawing_Typography,
2712 lineNumber: ::std::os::raw::c_int,
2713 lineMetric: *mut OH_Drawing_LineMetrics,
2714 ) -> bool;
2715}
2716extern "C" {
2717 #[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"]
2718 pub fn OH_Drawing_SetTypographyTextEllipsis(
2719 style: *mut OH_Drawing_TypographyStyle,
2720 ellipsis: *const ::std::os::raw::c_char,
2721 );
2722}
2723extern "C" {
2724 #[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"]
2725 pub fn OH_Drawing_SetTypographyTextLocale(
2726 style: *mut OH_Drawing_TypographyStyle,
2727 locale: *const ::std::os::raw::c_char,
2728 );
2729}
2730extern "C" {
2731 #[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"]
2732 pub fn OH_Drawing_SetTypographyTextSplitRatio(
2733 style: *mut OH_Drawing_TypographyStyle,
2734 textSplitRatio: f32,
2735 );
2736}
2737extern "C" {
2738 #[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"]
2739 pub fn OH_Drawing_TypographyGetTextStyle(
2740 style: *mut OH_Drawing_TypographyStyle,
2741 ) -> *mut OH_Drawing_TextStyle;
2742}
2743extern "C" {
2744 #[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"]
2745 pub fn OH_Drawing_TypographyGetEffectiveAlignment(
2746 style: *mut OH_Drawing_TypographyStyle,
2747 ) -> ::std::os::raw::c_int;
2748}
2749extern "C" {
2750 #[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"]
2751 pub fn OH_Drawing_TypographyIsLineUnlimited(style: *mut OH_Drawing_TypographyStyle) -> bool;
2752}
2753extern "C" {
2754 #[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"]
2755 pub fn OH_Drawing_TypographyIsEllipsized(style: *mut OH_Drawing_TypographyStyle) -> bool;
2756}
2757extern "C" {
2758 #[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"]
2759 pub fn OH_Drawing_SetTypographyTextStyle(
2760 handler: *mut OH_Drawing_TypographyStyle,
2761 style: *mut OH_Drawing_TextStyle,
2762 );
2763}
2764extern "C" {
2765 #[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"]
2766 pub fn OH_Drawing_TextStyleGetFontMetrics(
2767 typography: *mut OH_Drawing_Typography,
2768 style: *mut OH_Drawing_TextStyle,
2769 fontmetrics: *mut OH_Drawing_Font_Metrics,
2770 ) -> bool;
2771}
2772extern "C" {
2773 #[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"]
2774 pub fn OH_Drawing_TypographyGetLineInfo(
2775 typography: *mut OH_Drawing_Typography,
2776 lineNumber: ::std::os::raw::c_int,
2777 oneLine: bool,
2778 includeWhitespace: bool,
2779 drawingLineMetrics: *mut OH_Drawing_LineMetrics,
2780 ) -> bool;
2781}
2782extern "C" {
2783 #[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"]
2784 pub fn OH_Drawing_SetTypographyTextFontWeight(
2785 style: *mut OH_Drawing_TypographyStyle,
2786 weight: ::std::os::raw::c_int,
2787 );
2788}
2789extern "C" {
2790 #[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"]
2791 pub fn OH_Drawing_SetTypographyTextFontStyle(
2792 style: *mut OH_Drawing_TypographyStyle,
2793 fontStyle: ::std::os::raw::c_int,
2794 );
2795}
2796extern "C" {
2797 #[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"]
2798 pub fn OH_Drawing_SetTypographyTextFontFamily(
2799 style: *mut OH_Drawing_TypographyStyle,
2800 fontFamily: *const ::std::os::raw::c_char,
2801 );
2802}
2803extern "C" {
2804 #[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"]
2805 pub fn OH_Drawing_SetTypographyTextFontSize(
2806 style: *mut OH_Drawing_TypographyStyle,
2807 fontSize: f64,
2808 );
2809}
2810extern "C" {
2811 #[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"]
2812 pub fn OH_Drawing_SetTypographyTextFontHeight(
2813 style: *mut OH_Drawing_TypographyStyle,
2814 fontHeight: f64,
2815 );
2816}
2817extern "C" {
2818 #[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"]
2819 pub fn OH_Drawing_SetTypographyTextHalfLeading(
2820 style: *mut OH_Drawing_TypographyStyle,
2821 halfLeading: bool,
2822 );
2823}
2824extern "C" {
2825 #[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"]
2826 pub fn OH_Drawing_SetTypographyTextUseLineStyle(
2827 style: *mut OH_Drawing_TypographyStyle,
2828 useLineStyle: bool,
2829 );
2830}
2831extern "C" {
2832 #[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"]
2833 pub fn OH_Drawing_SetTypographyTextLineStyleFontWeight(
2834 style: *mut OH_Drawing_TypographyStyle,
2835 weight: ::std::os::raw::c_int,
2836 );
2837}
2838extern "C" {
2839 #[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"]
2840 pub fn OH_Drawing_SetTypographyTextLineStyleFontStyle(
2841 style: *mut OH_Drawing_TypographyStyle,
2842 fontStyle: ::std::os::raw::c_int,
2843 );
2844}
2845extern "C" {
2846 #[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"]
2847 pub fn OH_Drawing_SetTypographyTextLineStyleFontFamilies(
2848 style: *mut OH_Drawing_TypographyStyle,
2849 fontFamiliesNumber: ::std::os::raw::c_int,
2850 fontFamilies: *mut *const ::std::os::raw::c_char,
2851 );
2852}
2853extern "C" {
2854 #[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"]
2855 pub fn OH_Drawing_SetTypographyTextLineStyleFontSize(
2856 style: *mut OH_Drawing_TypographyStyle,
2857 lineStyleFontSize: f64,
2858 );
2859}
2860extern "C" {
2861 #[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"]
2862 pub fn OH_Drawing_SetTypographyTextLineStyleFontHeight(
2863 style: *mut OH_Drawing_TypographyStyle,
2864 lineStyleFontHeight: f64,
2865 );
2866}
2867extern "C" {
2868 #[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"]
2869 pub fn OH_Drawing_SetTypographyTextLineStyleHalfLeading(
2870 style: *mut OH_Drawing_TypographyStyle,
2871 lineStyleHalfLeading: bool,
2872 );
2873}
2874extern "C" {
2875 #[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"]
2876 pub fn OH_Drawing_SetTypographyTextLineStyleSpacingScale(
2877 style: *mut OH_Drawing_TypographyStyle,
2878 spacingScale: f64,
2879 );
2880}
2881extern "C" {
2882 #[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"]
2883 pub fn OH_Drawing_SetTypographyTextLineStyleOnly(
2884 style: *mut OH_Drawing_TypographyStyle,
2885 lineStyleOnly: bool,
2886 );
2887}
2888extern "C" {
2889 #[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"]
2890 pub fn OH_Drawing_CreateTextShadow() -> *mut OH_Drawing_TextShadow;
2891}
2892extern "C" {
2893 #[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"]
2894 pub fn OH_Drawing_DestroyTextShadow(shadow: *mut OH_Drawing_TextShadow);
2895}
2896extern "C" {
2897 #[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"]
2898 pub fn OH_Drawing_TextStyleGetShadows(
2899 style: *mut OH_Drawing_TextStyle,
2900 ) -> *mut OH_Drawing_TextShadow;
2901}
2902extern "C" {
2903 #[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"]
2904 pub fn OH_Drawing_TextStyleGetShadowCount(
2905 style: *mut OH_Drawing_TextStyle,
2906 ) -> ::std::os::raw::c_int;
2907}
2908extern "C" {
2909 #[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"]
2910 pub fn OH_Drawing_TextStyleAddShadow(
2911 style: *mut OH_Drawing_TextStyle,
2912 shadow: *const OH_Drawing_TextShadow,
2913 );
2914}
2915extern "C" {
2916 #[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"]
2917 pub fn OH_Drawing_TextStyleClearShadows(style: *mut OH_Drawing_TextStyle);
2918}
2919extern "C" {
2920 #[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"]
2921 pub fn OH_Drawing_TextStyleGetShadowWithIndex(
2922 style: *mut OH_Drawing_TextStyle,
2923 index: ::std::os::raw::c_int,
2924 ) -> *mut OH_Drawing_TextShadow;
2925}
2926extern "C" {
2927 #[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"]
2928 pub fn OH_Drawing_TypographySetIndents(
2929 typography: *mut OH_Drawing_Typography,
2930 indentsNumber: ::std::os::raw::c_int,
2931 indents: *const f32,
2932 );
2933}
2934extern "C" {
2935 #[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"]
2936 pub fn OH_Drawing_TypographyGetIndentsWithIndex(
2937 typography: *mut OH_Drawing_Typography,
2938 index: ::std::os::raw::c_int,
2939 ) -> f32;
2940}
2941extern "C" {
2942 #[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"]
2943 pub fn OH_Drawing_DestroyTextShadows(shadow: *mut OH_Drawing_TextShadow);
2944}
2945extern "C" {
2946 #[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"]
2947 pub fn OH_Drawing_TypographyTextSetHeightBehavior(
2948 style: *mut OH_Drawing_TypographyStyle,
2949 heightMode: OH_Drawing_TextHeightBehavior,
2950 );
2951}
2952extern "C" {
2953 #[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"]
2954 pub fn OH_Drawing_TypographyTextGetHeightBehavior(
2955 style: *mut OH_Drawing_TypographyStyle,
2956 ) -> OH_Drawing_TextHeightBehavior;
2957}
2958extern "C" {
2959 #[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"]
2960 pub fn OH_Drawing_TextStyleSetBackgroundRect(
2961 style: *mut OH_Drawing_TextStyle,
2962 rectStyleInfo: *const OH_Drawing_RectStyle_Info,
2963 styleId: ::std::os::raw::c_int,
2964 );
2965}
2966extern "C" {
2967 #[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"]
2968 pub fn OH_Drawing_TypographyHandlerAddSymbol(
2969 handler: *mut OH_Drawing_TypographyCreate,
2970 symbol: u32,
2971 );
2972}
2973extern "C" {
2974 #[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"]
2975 pub fn OH_Drawing_TextStyleAddFontFeature(
2976 style: *mut OH_Drawing_TextStyle,
2977 tag: *const ::std::os::raw::c_char,
2978 value: ::std::os::raw::c_int,
2979 );
2980}
2981extern "C" {
2982 #[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"]
2983 pub fn OH_Drawing_TextStyleAddFontVariation(
2984 style: *mut OH_Drawing_TextStyle,
2985 axis: *const ::std::os::raw::c_char,
2986 value: f32,
2987 );
2988}
2989extern "C" {
2990 #[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"]
2991 pub fn OH_Drawing_TextStyleGetFontFeatures(
2992 style: *mut OH_Drawing_TextStyle,
2993 ) -> *mut OH_Drawing_FontFeature;
2994}
2995extern "C" {
2996 #[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"]
2997 pub fn OH_Drawing_TextStyleDestroyFontFeatures(
2998 fontFeature: *mut OH_Drawing_FontFeature,
2999 fontFeatureSize: usize,
3000 );
3001}
3002extern "C" {
3003 #[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"]
3004 pub fn OH_Drawing_TextStyleGetFontFeatureSize(style: *mut OH_Drawing_TextStyle) -> usize;
3005}
3006extern "C" {
3007 #[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"]
3008 pub fn OH_Drawing_TextStyleClearFontFeature(style: *mut OH_Drawing_TextStyle);
3009}
3010extern "C" {
3011 #[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"]
3012 pub fn OH_Drawing_TextStyleSetBaselineShift(style: *mut OH_Drawing_TextStyle, lineShift: f64);
3013}
3014extern "C" {
3015 #[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"]
3016 pub fn OH_Drawing_TextStyleGetBaselineShift(style: *mut OH_Drawing_TextStyle) -> f64;
3017}
3018extern "C" {
3019 #[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"]
3020 pub fn OH_Drawing_TextStyleGetColor(style: *mut OH_Drawing_TextStyle) -> u32;
3021}
3022extern "C" {
3023 #[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"]
3024 pub fn OH_Drawing_TextStyleGetDecorationStyle(
3025 style: *mut OH_Drawing_TextStyle,
3026 ) -> OH_Drawing_TextDecorationStyle;
3027}
3028extern "C" {
3029 #[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"]
3030 pub fn OH_Drawing_TextStyleGetFontWeight(
3031 style: *mut OH_Drawing_TextStyle,
3032 ) -> OH_Drawing_FontWeight;
3033}
3034extern "C" {
3035 #[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"]
3036 pub fn OH_Drawing_TextStyleGetFontStyle(
3037 style: *mut OH_Drawing_TextStyle,
3038 ) -> OH_Drawing_FontStyle;
3039}
3040extern "C" {
3041 #[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"]
3042 pub fn OH_Drawing_TextStyleGetBaseline(
3043 style: *mut OH_Drawing_TextStyle,
3044 ) -> OH_Drawing_TextBaseline;
3045}
3046extern "C" {
3047 #[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"]
3048 pub fn OH_Drawing_TextStyleGetFontFamilies(
3049 style: *mut OH_Drawing_TextStyle,
3050 num: *mut usize,
3051 ) -> *mut *mut ::std::os::raw::c_char;
3052}
3053extern "C" {
3054 #[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"]
3055 pub fn OH_Drawing_TextStyleDestroyFontFamilies(
3056 fontFamilies: *mut *mut ::std::os::raw::c_char,
3057 num: usize,
3058 );
3059}
3060extern "C" {
3061 #[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"]
3062 pub fn OH_Drawing_TextStyleGetFontSize(style: *mut OH_Drawing_TextStyle) -> f64;
3063}
3064extern "C" {
3065 #[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"]
3066 pub fn OH_Drawing_TextStyleGetLetterSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
3067}
3068extern "C" {
3069 #[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"]
3070 pub fn OH_Drawing_TextStyleGetWordSpacing(style: *mut OH_Drawing_TextStyle) -> f64;
3071}
3072extern "C" {
3073 #[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"]
3074 pub fn OH_Drawing_TextStyleGetFontHeight(style: *mut OH_Drawing_TextStyle) -> f64;
3075}
3076extern "C" {
3077 #[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"]
3078 pub fn OH_Drawing_TextStyleGetHalfLeading(style: *mut OH_Drawing_TextStyle) -> bool;
3079}
3080extern "C" {
3081 #[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"]
3082 #[cfg(feature = "api-20")]
3083 pub fn OH_Drawing_SetTypographyVerticalAlignment(
3084 style: *mut OH_Drawing_TypographyStyle,
3085 align: OH_Drawing_TextVerticalAlignment,
3086 );
3087}
3088extern "C" {
3089 #[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"]
3090 pub fn OH_Drawing_TextStyleGetLocale(
3091 style: *mut OH_Drawing_TextStyle,
3092 ) -> *const ::std::os::raw::c_char;
3093}
3094extern "C" {
3095 #[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"]
3096 #[cfg(feature = "api-20")]
3097 pub fn OH_Drawing_SetTextStyleBadgeType(
3098 style: *mut OH_Drawing_TextStyle,
3099 textBadgeType: OH_Drawing_TextBadgeType,
3100 );
3101}
3102extern "C" {
3103 #[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"]
3104 pub fn OH_Drawing_SetTextStyleFontStyleStruct(
3105 drawingTextStyle: *mut OH_Drawing_TextStyle,
3106 fontStyle: OH_Drawing_FontStyleStruct,
3107 );
3108}
3109extern "C" {
3110 #[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"]
3111 pub fn OH_Drawing_TextStyleGetFontStyleStruct(
3112 drawingTextStyle: *mut OH_Drawing_TextStyle,
3113 ) -> OH_Drawing_FontStyleStruct;
3114}
3115extern "C" {
3116 #[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"]
3117 pub fn OH_Drawing_SetTypographyStyleFontStyleStruct(
3118 drawingStyle: *mut OH_Drawing_TypographyStyle,
3119 fontStyle: OH_Drawing_FontStyleStruct,
3120 );
3121}
3122extern "C" {
3123 #[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"]
3124 pub fn OH_Drawing_TypographyStyleGetFontStyleStruct(
3125 drawingStyle: *mut OH_Drawing_TypographyStyle,
3126 ) -> OH_Drawing_FontStyleStruct;
3127}
3128extern "C" {
3129 #[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"]
3130 pub fn OH_Drawing_TextStyleIsEqual(
3131 style: *const OH_Drawing_TextStyle,
3132 comparedStyle: *const OH_Drawing_TextStyle,
3133 ) -> bool;
3134}
3135extern "C" {
3136 #[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"]
3137 pub fn OH_Drawing_TextStyleIsEqualByFont(
3138 style: *const OH_Drawing_TextStyle,
3139 comparedStyle: *const OH_Drawing_TextStyle,
3140 ) -> bool;
3141}
3142extern "C" {
3143 #[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"]
3144 pub fn OH_Drawing_TextStyleIsAttributeMatched(
3145 style: *const OH_Drawing_TextStyle,
3146 comparedStyle: *const OH_Drawing_TextStyle,
3147 textStyleType: OH_Drawing_TextStyleType,
3148 ) -> bool;
3149}
3150extern "C" {
3151 #[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"]
3152 pub fn OH_Drawing_TextStyleSetPlaceholder(style: *mut OH_Drawing_TextStyle);
3153}
3154extern "C" {
3155 #[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"]
3156 pub fn OH_Drawing_TextStyleIsPlaceholder(style: *mut OH_Drawing_TextStyle) -> bool;
3157}
3158extern "C" {
3159 #[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"]
3160 pub fn OH_Drawing_TypographyStyleGetEffectiveAlignment(
3161 style: *mut OH_Drawing_TypographyStyle,
3162 ) -> OH_Drawing_TextAlign;
3163}
3164extern "C" {
3165 #[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"]
3166 pub fn OH_Drawing_TypographyStyleIsHintEnabled(style: *mut OH_Drawing_TypographyStyle) -> bool;
3167}
3168extern "C" {
3169 #[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"]
3170 pub fn OH_Drawing_GetSystemFontConfigInfo(
3171 errorCode: *mut OH_Drawing_FontConfigInfoErrorCode,
3172 ) -> *mut OH_Drawing_FontConfigInfo;
3173}
3174extern "C" {
3175 #[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"]
3176 pub fn OH_Drawing_DestroySystemFontConfigInfo(drawFontCfgInfo: *mut OH_Drawing_FontConfigInfo);
3177}
3178extern "C" {
3179 #[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"]
3180 pub fn OH_Drawing_SetTypographyStyleTextStrutStyle(
3181 style: *mut OH_Drawing_TypographyStyle,
3182 strutstyle: *mut OH_Drawing_StrutStyle,
3183 );
3184}
3185extern "C" {
3186 #[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"]
3187 pub fn OH_Drawing_TypographyStyleDestroyStrutStyle(strutstyle: *mut OH_Drawing_StrutStyle);
3188}
3189extern "C" {
3190 #[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"]
3191 pub fn OH_Drawing_TypographyStyleGetStrutStyle(
3192 style: *mut OH_Drawing_TypographyStyle,
3193 ) -> *mut OH_Drawing_StrutStyle;
3194}
3195extern "C" {
3196 #[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"]
3197 pub fn OH_Drawing_TypographyStyleStrutStyleEquals(
3198 from: *mut OH_Drawing_StrutStyle,
3199 to: *mut OH_Drawing_StrutStyle,
3200 ) -> bool;
3201}
3202extern "C" {
3203 #[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"]
3204 pub fn OH_Drawing_TypographyStyleSetHintsEnabled(
3205 style: *mut OH_Drawing_TypographyStyle,
3206 hintsEnabled: bool,
3207 );
3208}
3209extern "C" {
3210 #[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"]
3211 pub fn OH_Drawing_TypographyGetLineFontMetrics(
3212 typography: *mut OH_Drawing_Typography,
3213 lineNumber: usize,
3214 fontMetricsSize: *mut usize,
3215 ) -> *mut OH_Drawing_Font_Metrics;
3216}
3217extern "C" {
3218 #[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"]
3219 pub fn OH_Drawing_TypographyDestroyLineFontMetrics(
3220 lineFontMetric: *mut OH_Drawing_Font_Metrics,
3221 );
3222}
3223extern "C" {
3224 #[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"]
3225 pub fn OH_Drawing_TypographyMarkDirty(typography: *mut OH_Drawing_Typography);
3226}
3227extern "C" {
3228 #[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"]
3229 pub fn OH_Drawing_TypographyGetUnresolvedGlyphsCount(
3230 typography: *mut OH_Drawing_Typography,
3231 ) -> i32;
3232}
3233extern "C" {
3234 #[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"]
3235 pub fn OH_Drawing_TypographyUpdateFontSize(
3236 typography: *mut OH_Drawing_Typography,
3237 from: usize,
3238 to: usize,
3239 fontSize: f32,
3240 );
3241}
3242extern "C" {
3243 #[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"]
3244 #[cfg(feature = "api-20")]
3245 pub fn OH_Drawing_TypographyUpdateFontColor(typography: *mut OH_Drawing_Typography, color: u32);
3246}
3247extern "C" {
3248 #[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"]
3249 #[cfg(feature = "api-20")]
3250 pub fn OH_Drawing_TypographyUpdateDecoration(
3251 typography: *mut OH_Drawing_Typography,
3252 decoration: OH_Drawing_TextDecoration,
3253 );
3254}
3255extern "C" {
3256 #[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"]
3257 #[cfg(feature = "api-20")]
3258 pub fn OH_Drawing_TypographyUpdateDecorationThicknessScale(
3259 typography: *mut OH_Drawing_Typography,
3260 decorationThicknessScale: f64,
3261 );
3262}
3263extern "C" {
3264 #[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"]
3265 #[cfg(feature = "api-20")]
3266 pub fn OH_Drawing_TypographyUpdateDecorationStyle(
3267 typography: *mut OH_Drawing_Typography,
3268 decorationStyle: OH_Drawing_TextDecorationStyle,
3269 );
3270}
3271extern "C" {
3272 #[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"]
3273 #[cfg(feature = "api-20")]
3274 pub fn OH_Drawing_TypographyUpdateDecorationColor(
3275 typography: *mut OH_Drawing_Typography,
3276 color: u32,
3277 );
3278}
3279extern "C" {
3280 #[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"]
3281 pub fn OH_Drawing_TypographyTextGetLineStyle(style: *mut OH_Drawing_TypographyStyle) -> bool;
3282}
3283extern "C" {
3284 #[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"]
3285 pub fn OH_Drawing_TypographyTextlineStyleGetFontWeight(
3286 style: *mut OH_Drawing_TypographyStyle,
3287 ) -> OH_Drawing_FontWeight;
3288}
3289extern "C" {
3290 #[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"]
3291 pub fn OH_Drawing_TypographyTextlineStyleGetFontStyle(
3292 style: *mut OH_Drawing_TypographyStyle,
3293 ) -> OH_Drawing_FontStyle;
3294}
3295extern "C" {
3296 #[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"]
3297 pub fn OH_Drawing_TypographyTextlineStyleGetFontFamilies(
3298 style: *mut OH_Drawing_TypographyStyle,
3299 num: *mut usize,
3300 ) -> *mut *mut ::std::os::raw::c_char;
3301}
3302extern "C" {
3303 #[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"]
3304 pub fn OH_Drawing_TypographyTextlineStyleDestroyFontFamilies(
3305 fontFamilies: *mut *mut ::std::os::raw::c_char,
3306 fontFamiliesNum: usize,
3307 );
3308}
3309extern "C" {
3310 #[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"]
3311 pub fn OH_Drawing_TypographyTextlineStyleGetFontSize(
3312 style: *mut OH_Drawing_TypographyStyle,
3313 ) -> f64;
3314}
3315extern "C" {
3316 #[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"]
3317 pub fn OH_Drawing_TypographyTextlineStyleGetHeightScale(
3318 style: *mut OH_Drawing_TypographyStyle,
3319 ) -> f64;
3320}
3321extern "C" {
3322 #[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"]
3323 pub fn OH_Drawing_TypographyTextlineStyleGetHeightOnly(
3324 style: *mut OH_Drawing_TypographyStyle,
3325 ) -> bool;
3326}
3327extern "C" {
3328 #[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"]
3329 pub fn OH_Drawing_TypographyTextlineStyleGetHalfLeading(
3330 style: *mut OH_Drawing_TypographyStyle,
3331 ) -> bool;
3332}
3333extern "C" {
3334 #[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"]
3335 pub fn OH_Drawing_TypographyTextlineStyleGetSpacingScale(
3336 style: *mut OH_Drawing_TypographyStyle,
3337 ) -> f64;
3338}
3339extern "C" {
3340 #[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"]
3341 pub fn OH_Drawing_TypographyTextlineGetStyleOnly(
3342 style: *mut OH_Drawing_TypographyStyle,
3343 ) -> bool;
3344}
3345extern "C" {
3346 #[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"]
3347 pub fn OH_Drawing_TypographyGetTextAlign(
3348 style: *mut OH_Drawing_TypographyStyle,
3349 ) -> OH_Drawing_TextAlign;
3350}
3351extern "C" {
3352 #[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"]
3353 pub fn OH_Drawing_TypographyGetTextDirection(
3354 style: *mut OH_Drawing_TypographyStyle,
3355 ) -> OH_Drawing_TextDirection;
3356}
3357extern "C" {
3358 #[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"]
3359 pub fn OH_Drawing_TypographyGetTextMaxLines(style: *mut OH_Drawing_TypographyStyle) -> usize;
3360}
3361extern "C" {
3362 #[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"]
3363 pub fn OH_Drawing_TypographyGetTextEllipsis(
3364 style: *mut OH_Drawing_TypographyStyle,
3365 ) -> *mut ::std::os::raw::c_char;
3366}
3367extern "C" {
3368 #[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"]
3369 pub fn OH_Drawing_TypographyDestroyEllipsis(ellipsis: *mut ::std::os::raw::c_char);
3370}
3371extern "C" {
3372 #[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"]
3373 pub fn OH_Drawing_TypographyStyleEquals(
3374 from: *mut OH_Drawing_TypographyStyle,
3375 to: *mut OH_Drawing_TypographyStyle,
3376 ) -> bool;
3377}
3378extern "C" {
3379 #[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"]
3380 pub fn OH_Drawing_TypographyDestroyTextBox(textBox: *mut OH_Drawing_TextBox);
3381}
3382extern "C" {
3383 #[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"]
3384 pub fn OH_Drawing_SetTextShadow(
3385 shadow: *mut OH_Drawing_TextShadow,
3386 color: u32,
3387 offset: *mut OH_Drawing_Point,
3388 blurRadius: f64,
3389 );
3390}
3391extern "C" {
3392 #[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"]
3393 #[cfg(feature = "api-18")]
3394 pub fn OH_Drawing_CreateTextTab(
3395 alignment: OH_Drawing_TextAlign,
3396 location: f32,
3397 ) -> *mut OH_Drawing_TextTab;
3398}
3399extern "C" {
3400 #[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"]
3401 #[cfg(feature = "api-18")]
3402 pub fn OH_Drawing_DestroyTextTab(tab: *mut OH_Drawing_TextTab);
3403}
3404extern "C" {
3405 #[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"]
3406 #[cfg(feature = "api-18")]
3407 pub fn OH_Drawing_GetTextTabAlignment(tab: *mut OH_Drawing_TextTab) -> OH_Drawing_TextAlign;
3408}
3409extern "C" {
3410 #[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"]
3411 #[cfg(feature = "api-18")]
3412 pub fn OH_Drawing_GetTextTabLocation(tab: *mut OH_Drawing_TextTab) -> f32;
3413}
3414extern "C" {
3415 #[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"]
3416 #[cfg(feature = "api-18")]
3417 pub fn OH_Drawing_SetTypographyTextTab(
3418 style: *mut OH_Drawing_TypographyStyle,
3419 tab: *mut OH_Drawing_TextTab,
3420 );
3421}
3422extern "C" {
3423 #[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"]
3424 #[cfg(feature = "api-14")]
3425 pub fn OH_Drawing_GetDrawingArraySize(drawingArray: *mut OH_Drawing_Array) -> usize;
3426}
3427extern "C" {
3428 #[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"]
3429 #[cfg(feature = "api-20")]
3430 pub fn OH_Drawing_SetTypographyTextTrailingSpaceOptimized(
3431 style: *mut OH_Drawing_TypographyStyle,
3432 trailingSpaceOptimized: bool,
3433 );
3434}
3435extern "C" {
3436 #[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"]
3437 #[cfg(feature = "api-20")]
3438 pub fn OH_Drawing_TypographyHandlerAddEncodedText(
3439 handler: *mut OH_Drawing_TypographyCreate,
3440 text: *const ::std::os::raw::c_void,
3441 byteLength: usize,
3442 textEncodingType: OH_Drawing_TextEncoding,
3443 );
3444}
3445extern "C" {
3446 #[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"]
3447 #[cfg(feature = "api-20")]
3448 pub fn OH_Drawing_SetTypographyTextAutoSpace(
3449 style: *mut OH_Drawing_TypographyStyle,
3450 enableAutoSpace: bool,
3451 );
3452}
3453extern "C" {
3454 #[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"]
3455 #[cfg(feature = "api-20")]
3456 pub fn OH_Drawing_CopyTypographyStyle(
3457 style: *mut OH_Drawing_TypographyStyle,
3458 ) -> *mut OH_Drawing_TypographyStyle;
3459}
3460extern "C" {
3461 #[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"]
3462 #[cfg(feature = "api-20")]
3463 pub fn OH_Drawing_CopyTextStyle(style: *mut OH_Drawing_TextStyle) -> *mut OH_Drawing_TextStyle;
3464}
3465extern "C" {
3466 #[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"]
3467 #[cfg(feature = "api-20")]
3468 pub fn OH_Drawing_CopyTextShadow(
3469 shadow: *mut OH_Drawing_TextShadow,
3470 ) -> *mut OH_Drawing_TextShadow;
3471}
3472extern "C" {
3473 #[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"]
3474 pub fn OH_Drawing_FontMgrCreate() -> *mut OH_Drawing_FontMgr;
3475}
3476extern "C" {
3477 #[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"]
3478 pub fn OH_Drawing_FontMgrDestroy(drawingFontMgr: *mut OH_Drawing_FontMgr);
3479}
3480extern "C" {
3481 #[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"]
3482 pub fn OH_Drawing_FontMgrGetFamilyCount(
3483 drawingFontMgr: *mut OH_Drawing_FontMgr,
3484 ) -> ::std::os::raw::c_int;
3485}
3486extern "C" {
3487 #[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"]
3488 pub fn OH_Drawing_FontMgrGetFamilyName(
3489 drawingFontMgr: *mut OH_Drawing_FontMgr,
3490 index: ::std::os::raw::c_int,
3491 ) -> *mut ::std::os::raw::c_char;
3492}
3493extern "C" {
3494 #[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"]
3495 pub fn OH_Drawing_FontMgrDestroyFamilyName(familyName: *mut ::std::os::raw::c_char);
3496}
3497extern "C" {
3498 #[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"]
3499 pub fn OH_Drawing_FontMgrCreateFontStyleSet(
3500 drawingFontMgr: *mut OH_Drawing_FontMgr,
3501 index: ::std::os::raw::c_int,
3502 ) -> *mut OH_Drawing_FontStyleSet;
3503}
3504extern "C" {
3505 #[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"]
3506 pub fn OH_Drawing_FontMgrDestroyFontStyleSet(drawingFontStyleSet: *mut OH_Drawing_FontStyleSet);
3507}
3508extern "C" {
3509 #[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"]
3510 pub fn OH_Drawing_FontMgrMatchFamily(
3511 drawingFontMgr: *mut OH_Drawing_FontMgr,
3512 familyName: *const ::std::os::raw::c_char,
3513 ) -> *mut OH_Drawing_FontStyleSet;
3514}
3515extern "C" {
3516 #[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"]
3517 pub fn OH_Drawing_FontMgrMatchFamilyStyle(
3518 drawingFontMgr: *mut OH_Drawing_FontMgr,
3519 familyName: *const ::std::os::raw::c_char,
3520 fontStyle: OH_Drawing_FontStyleStruct,
3521 ) -> *mut OH_Drawing_Typeface;
3522}
3523extern "C" {
3524 #[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"]
3525 pub fn OH_Drawing_FontMgrMatchFamilyStyleCharacter(
3526 drawingFontMgr: *mut OH_Drawing_FontMgr,
3527 familyName: *const ::std::os::raw::c_char,
3528 fontStyle: OH_Drawing_FontStyleStruct,
3529 bcp47: *mut *const ::std::os::raw::c_char,
3530 bcp47Count: ::std::os::raw::c_int,
3531 character: i32,
3532 ) -> *mut OH_Drawing_Typeface;
3533}
3534extern "C" {
3535 #[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"]
3536 pub fn OH_Drawing_FontStyleSetCreateTypeface(
3537 fontStyleSet: *mut OH_Drawing_FontStyleSet,
3538 index: ::std::os::raw::c_int,
3539 ) -> *mut OH_Drawing_Typeface;
3540}
3541extern "C" {
3542 #[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"]
3543 pub fn OH_Drawing_FontStyleSetGetStyle(
3544 fontStyleSet: *mut OH_Drawing_FontStyleSet,
3545 index: i32,
3546 styleName: *mut *mut ::std::os::raw::c_char,
3547 ) -> OH_Drawing_FontStyleStruct;
3548}
3549extern "C" {
3550 #[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"]
3551 pub fn OH_Drawing_FontStyleSetFreeStyleName(styleName: *mut *mut ::std::os::raw::c_char);
3552}
3553extern "C" {
3554 #[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"]
3555 pub fn OH_Drawing_FontStyleSetMatchStyle(
3556 fontStyleSet: *mut OH_Drawing_FontStyleSet,
3557 fontStyleStruct: OH_Drawing_FontStyleStruct,
3558 ) -> *mut OH_Drawing_Typeface;
3559}
3560extern "C" {
3561 #[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"]
3562 pub fn OH_Drawing_FontStyleSetCount(
3563 fontStyleSet: *mut OH_Drawing_FontStyleSet,
3564 ) -> ::std::os::raw::c_int;
3565}
3566#[doc = " @brief Defines the options about GPU context.\n\n @since 12\n @version 1.0\n @deprecated since 18"]
3567#[repr(C)]
3568#[derive(Debug, Copy, Clone)]
3569pub struct OH_Drawing_GpuContextOptions {
3570 #[doc = " If true this allows path mask textures to be cached"]
3571 pub allowPathMaskCaching: bool,
3572}
3573extern "C" {
3574 #[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"]
3575 pub fn OH_Drawing_GpuContextCreateFromGL(
3576 gpuContextOptions: OH_Drawing_GpuContextOptions,
3577 ) -> *mut OH_Drawing_GpuContext;
3578}
3579extern "C" {
3580 #[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"]
3581 #[cfg(feature = "api-16")]
3582 pub fn OH_Drawing_GpuContextCreate() -> *mut OH_Drawing_GpuContext;
3583}
3584extern "C" {
3585 #[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"]
3586 pub fn OH_Drawing_GpuContextDestroy(gpuContext: *mut OH_Drawing_GpuContext);
3587}
3588extern "C" {
3589 #[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"]
3590 pub fn OH_Drawing_ImageCreate() -> *mut OH_Drawing_Image;
3591}
3592extern "C" {
3593 #[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"]
3594 pub fn OH_Drawing_ImageDestroy(image: *mut OH_Drawing_Image);
3595}
3596extern "C" {
3597 #[doc = " @brief Rebuilds an <b>OH_Drawing_Image</b> object, sharing or copying bitmap pixels.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.\n @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.\n @return Returns true if successed.\n @since 12\n @version 1.0"]
3598 pub fn OH_Drawing_ImageBuildFromBitmap(
3599 image: *mut OH_Drawing_Image,
3600 bitmap: *mut OH_Drawing_Bitmap,
3601 ) -> bool;
3602}
3603extern "C" {
3604 #[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"]
3605 pub fn OH_Drawing_ImageGetWidth(image: *mut OH_Drawing_Image) -> i32;
3606}
3607extern "C" {
3608 #[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"]
3609 pub fn OH_Drawing_ImageGetHeight(image: *mut OH_Drawing_Image) -> i32;
3610}
3611extern "C" {
3612 #[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"]
3613 pub fn OH_Drawing_ImageGetImageInfo(
3614 image: *mut OH_Drawing_Image,
3615 imageInfo: *mut OH_Drawing_Image_Info,
3616 );
3617}
3618#[doc = " Replicate the edge color if the shader effect draws outside of its original bounds."]
3619pub const OH_Drawing_TileMode_CLAMP: OH_Drawing_TileMode = 0;
3620#[doc = " Repeat the shader effect image horizontally and vertically."]
3621pub const OH_Drawing_TileMode_REPEAT: OH_Drawing_TileMode = 1;
3622#[doc = " Repeat the shader effect image horizontally and vertically, alternating mirror images\n so that adjacent images always seam."]
3623pub const OH_Drawing_TileMode_MIRROR: OH_Drawing_TileMode = 2;
3624#[doc = " Only draw within the original domain, return transparent-black everywhere else."]
3625pub const OH_Drawing_TileMode_DECAL: OH_Drawing_TileMode = 3;
3626#[doc = " @brief Enumerates tile mode.\n\n @since 11\n @version 1.0"]
3627pub type OH_Drawing_TileMode = u32;
3628extern "C" {
3629 #[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"]
3630 pub fn OH_Drawing_ShaderEffectCreateColorShader(color: u32) -> *mut OH_Drawing_ShaderEffect;
3631}
3632extern "C" {
3633 #[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"]
3634 pub fn OH_Drawing_ShaderEffectCreateLinearGradient(
3635 startPt: *const OH_Drawing_Point,
3636 endPt: *const OH_Drawing_Point,
3637 colors: *const u32,
3638 pos: *const f32,
3639 size: u32,
3640 tileMode: OH_Drawing_TileMode,
3641 ) -> *mut OH_Drawing_ShaderEffect;
3642}
3643extern "C" {
3644 #[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"]
3645 pub fn OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMatrix(
3646 startPt: *const OH_Drawing_Point2D,
3647 endPt: *const OH_Drawing_Point2D,
3648 colors: *const u32,
3649 pos: *const f32,
3650 size: u32,
3651 tileMode: OH_Drawing_TileMode,
3652 matrix: *const OH_Drawing_Matrix,
3653 ) -> *mut OH_Drawing_ShaderEffect;
3654}
3655extern "C" {
3656 #[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"]
3657 pub fn OH_Drawing_ShaderEffectCreateRadialGradient(
3658 centerPt: *const OH_Drawing_Point,
3659 radius: f32,
3660 colors: *const u32,
3661 pos: *const f32,
3662 size: u32,
3663 tileMode: OH_Drawing_TileMode,
3664 ) -> *mut OH_Drawing_ShaderEffect;
3665}
3666extern "C" {
3667 #[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"]
3668 pub fn OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix(
3669 centerPt: *const OH_Drawing_Point2D,
3670 radius: f32,
3671 colors: *const u32,
3672 pos: *const f32,
3673 size: u32,
3674 tileMode: OH_Drawing_TileMode,
3675 matrix: *const OH_Drawing_Matrix,
3676 ) -> *mut OH_Drawing_ShaderEffect;
3677}
3678extern "C" {
3679 #[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"]
3680 #[cfg(feature = "api-20")]
3681 pub fn OH_Drawing_ShaderEffectCreateSweepGradientWithLocalMatrix(
3682 centerPt: *const OH_Drawing_Point,
3683 colors: *const u32,
3684 pos: *const f32,
3685 size: u32,
3686 tileMode: OH_Drawing_TileMode,
3687 matrix: *const OH_Drawing_Matrix,
3688 ) -> *mut OH_Drawing_ShaderEffect;
3689}
3690extern "C" {
3691 #[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"]
3692 pub fn OH_Drawing_ShaderEffectCreateSweepGradient(
3693 centerPt: *const OH_Drawing_Point,
3694 colors: *const u32,
3695 pos: *const f32,
3696 size: u32,
3697 tileMode: OH_Drawing_TileMode,
3698 ) -> *mut OH_Drawing_ShaderEffect;
3699}
3700extern "C" {
3701 #[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"]
3702 pub fn OH_Drawing_ShaderEffectCreateImageShader(
3703 image: *mut OH_Drawing_Image,
3704 tileX: OH_Drawing_TileMode,
3705 tileY: OH_Drawing_TileMode,
3706 samplingOptions: *const OH_Drawing_SamplingOptions,
3707 matrix: *const OH_Drawing_Matrix,
3708 ) -> *mut OH_Drawing_ShaderEffect;
3709}
3710extern "C" {
3711 #[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"]
3712 #[cfg(feature = "api-20")]
3713 pub fn OH_Drawing_ShaderEffectCreatePixelMapShader(
3714 pixelMap: *mut OH_Drawing_PixelMap,
3715 tileX: OH_Drawing_TileMode,
3716 tileY: OH_Drawing_TileMode,
3717 samplingOptions: *const OH_Drawing_SamplingOptions,
3718 matrix: *const OH_Drawing_Matrix,
3719 ) -> *mut OH_Drawing_ShaderEffect;
3720}
3721extern "C" {
3722 #[doc = " @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a conical gradient given two circles.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param startPt Indicates the center of the start circle for the gradient.\n @param startRadius Indicates the radius of the start circle for this gradient.\n @param endPt Indicates the center of the start circle for the gradient.\n @param endRadius Indicates the radius of the start circle for this gradient.\n @param colors Indicates the colors to be distributed between the two points.\n @param pos Indicates the relative position of each corresponding color in the colors array.\n @param size Indicates the number of colors and pos.\n @param tileMode Indicates the tile mode.\n @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,\nwhich represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.\nIf matrix is nullptr, defaults to the identity matrix.\n @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.\n If nullptr is returned, the creation fails.\n The possible cause of the failure is any of startPt, endPt, colors and pos is nullptr.\n @since 12\n @version 1.0"]
3723 pub fn OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(
3724 startPt: *const OH_Drawing_Point2D,
3725 startRadius: f32,
3726 endPt: *const OH_Drawing_Point2D,
3727 endRadius: f32,
3728 colors: *const u32,
3729 pos: *const f32,
3730 size: u32,
3731 tileMode: OH_Drawing_TileMode,
3732 matrix: *const OH_Drawing_Matrix,
3733 ) -> *mut OH_Drawing_ShaderEffect;
3734}
3735extern "C" {
3736 #[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"]
3737 #[cfg(feature = "api-20")]
3738 pub fn OH_Drawing_ShaderEffectCreateCompose(
3739 dst: *mut OH_Drawing_ShaderEffect,
3740 src: *mut OH_Drawing_ShaderEffect,
3741 mode: OH_Drawing_BlendMode,
3742 ) -> *mut OH_Drawing_ShaderEffect;
3743}
3744extern "C" {
3745 #[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"]
3746 pub fn OH_Drawing_ShaderEffectDestroy(shaderEffect: *mut OH_Drawing_ShaderEffect);
3747}
3748extern "C" {
3749 #[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"]
3750 pub fn OH_Drawing_ImageFilterCreateBlur(
3751 sigmaX: f32,
3752 sigmaY: f32,
3753 tileMode: OH_Drawing_TileMode,
3754 imageFilter: *mut OH_Drawing_ImageFilter,
3755 ) -> *mut OH_Drawing_ImageFilter;
3756}
3757extern "C" {
3758 #[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"]
3759 #[cfg(feature = "api-20")]
3760 pub fn OH_Drawing_ImageFilterCreateBlurWithCrop(
3761 sigmaX: f32,
3762 sigmaY: f32,
3763 tileMode: OH_Drawing_TileMode,
3764 input: *mut OH_Drawing_ImageFilter,
3765 rect: *const OH_Drawing_Rect,
3766 ) -> *mut OH_Drawing_ImageFilter;
3767}
3768extern "C" {
3769 #[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"]
3770 pub fn OH_Drawing_ImageFilterCreateFromColorFilter(
3771 colorFilter: *mut OH_Drawing_ColorFilter,
3772 imageFilter: *mut OH_Drawing_ImageFilter,
3773 ) -> *mut OH_Drawing_ImageFilter;
3774}
3775extern "C" {
3776 #[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"]
3777 #[cfg(feature = "api-20")]
3778 pub fn OH_Drawing_ImageFilterCreateOffset(
3779 x: f32,
3780 y: f32,
3781 imageFilter: *mut OH_Drawing_ImageFilter,
3782 ) -> *mut OH_Drawing_ImageFilter;
3783}
3784extern "C" {
3785 #[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"]
3786 #[cfg(feature = "api-20")]
3787 pub fn OH_Drawing_ImageFilterCreateFromShaderEffect(
3788 shaderEffect: *mut OH_Drawing_ShaderEffect,
3789 ) -> *mut OH_Drawing_ImageFilter;
3790}
3791extern "C" {
3792 #[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"]
3793 pub fn OH_Drawing_ImageFilterDestroy(imageFilter: *mut OH_Drawing_ImageFilter);
3794}
3795#[doc = " Fuzzy inside and outside."]
3796pub const OH_Drawing_BlurType_NORMAL: OH_Drawing_BlurType = 0;
3797#[doc = " Solid inside, fuzzy outside."]
3798pub const OH_Drawing_BlurType_SOLID: OH_Drawing_BlurType = 1;
3799#[doc = " Nothing inside, fuzzy outside."]
3800pub const OH_Drawing_BlurType_OUTER: OH_Drawing_BlurType = 2;
3801#[doc = " Fuzzy inside, nothing outside."]
3802pub const OH_Drawing_BlurType_INNER: OH_Drawing_BlurType = 3;
3803#[doc = " @brief Enumerates blur type.\n\n @since 11\n @version 1.0"]
3804pub type OH_Drawing_BlurType = u32;
3805extern "C" {
3806 #[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"]
3807 pub fn OH_Drawing_MaskFilterCreateBlur(
3808 blurType: OH_Drawing_BlurType,
3809 sigma: f32,
3810 respectCTM: bool,
3811 ) -> *mut OH_Drawing_MaskFilter;
3812}
3813extern "C" {
3814 #[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"]
3815 pub fn OH_Drawing_MaskFilterDestroy(maskFilter: *mut OH_Drawing_MaskFilter);
3816}
3817extern "C" {
3818 #[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"]
3819 pub fn OH_Drawing_MatrixCreate() -> *mut OH_Drawing_Matrix;
3820}
3821extern "C" {
3822 #[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"]
3823 #[cfg(feature = "api-20")]
3824 pub fn OH_Drawing_MatrixCopy(matrix: *const OH_Drawing_Matrix) -> *mut OH_Drawing_Matrix;
3825}
3826extern "C" {
3827 #[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"]
3828 pub fn OH_Drawing_MatrixCreateRotation(deg: f32, x: f32, y: f32) -> *mut OH_Drawing_Matrix;
3829}
3830extern "C" {
3831 #[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"]
3832 pub fn OH_Drawing_MatrixCreateScale(
3833 sx: f32,
3834 sy: f32,
3835 px: f32,
3836 py: f32,
3837 ) -> *mut OH_Drawing_Matrix;
3838}
3839extern "C" {
3840 #[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"]
3841 pub fn OH_Drawing_MatrixCreateTranslation(dx: f32, dy: f32) -> *mut OH_Drawing_Matrix;
3842}
3843extern "C" {
3844 #[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"]
3845 pub fn OH_Drawing_MatrixSetMatrix(
3846 matrix: *mut OH_Drawing_Matrix,
3847 scaleX: f32,
3848 skewX: f32,
3849 transX: f32,
3850 skewY: f32,
3851 scaleY: f32,
3852 transY: f32,
3853 persp0: f32,
3854 persp1: f32,
3855 persp2: f32,
3856 );
3857}
3858#[doc = " Scales in x and y to fill destination rect."]
3859pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_FILL: OH_Drawing_ScaleToFit = 0;
3860#[doc = " Scales and aligns to left and top."]
3861pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_START: OH_Drawing_ScaleToFit = 1;
3862#[doc = " Scales and aligns to center."]
3863pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_CENTER: OH_Drawing_ScaleToFit = 2;
3864#[doc = " Scales and aligns to right and bottom."]
3865pub const OH_Drawing_ScaleToFit_SCALE_TO_FIT_END: OH_Drawing_ScaleToFit = 3;
3866#[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"]
3867pub type OH_Drawing_ScaleToFit = u32;
3868extern "C" {
3869 #[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"]
3870 pub fn OH_Drawing_MatrixSetRectToRect(
3871 matrix: *mut OH_Drawing_Matrix,
3872 src: *const OH_Drawing_Rect,
3873 dst: *const OH_Drawing_Rect,
3874 stf: OH_Drawing_ScaleToFit,
3875 ) -> bool;
3876}
3877extern "C" {
3878 #[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"]
3879 pub fn OH_Drawing_MatrixPreRotate(
3880 matrix: *mut OH_Drawing_Matrix,
3881 degree: f32,
3882 px: f32,
3883 py: f32,
3884 );
3885}
3886extern "C" {
3887 #[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"]
3888 pub fn OH_Drawing_MatrixPreScale(
3889 matrix: *mut OH_Drawing_Matrix,
3890 sx: f32,
3891 sy: f32,
3892 px: f32,
3893 py: f32,
3894 );
3895}
3896extern "C" {
3897 #[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"]
3898 pub fn OH_Drawing_MatrixPreTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
3899}
3900extern "C" {
3901 #[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"]
3902 pub fn OH_Drawing_MatrixPostRotate(
3903 matrix: *mut OH_Drawing_Matrix,
3904 degree: f32,
3905 px: f32,
3906 py: f32,
3907 );
3908}
3909extern "C" {
3910 #[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"]
3911 pub fn OH_Drawing_MatrixPostScale(
3912 matrix: *mut OH_Drawing_Matrix,
3913 sx: f32,
3914 sy: f32,
3915 px: f32,
3916 py: f32,
3917 );
3918}
3919extern "C" {
3920 #[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"]
3921 pub fn OH_Drawing_MatrixPostTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
3922}
3923extern "C" {
3924 #[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"]
3925 pub fn OH_Drawing_MatrixReset(matrix: *mut OH_Drawing_Matrix);
3926}
3927extern "C" {
3928 #[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"]
3929 pub fn OH_Drawing_MatrixConcat(
3930 total: *mut OH_Drawing_Matrix,
3931 a: *const OH_Drawing_Matrix,
3932 b: *const OH_Drawing_Matrix,
3933 );
3934}
3935extern "C" {
3936 #[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"]
3937 pub fn OH_Drawing_MatrixGetAll(
3938 matrix: *mut OH_Drawing_Matrix,
3939 value: *mut f32,
3940 ) -> OH_Drawing_ErrorCode;
3941}
3942extern "C" {
3943 #[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"]
3944 #[cfg(feature = "api-22")]
3945 pub fn OH_Drawing_MatrixPreConcat(
3946 a: *mut OH_Drawing_Matrix,
3947 b: *mut OH_Drawing_Matrix,
3948 ) -> OH_Drawing_ErrorCode;
3949}
3950extern "C" {
3951 #[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"]
3952 pub fn OH_Drawing_MatrixGetValue(
3953 matrix: *mut OH_Drawing_Matrix,
3954 index: ::std::os::raw::c_int,
3955 ) -> f32;
3956}
3957extern "C" {
3958 #[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"]
3959 pub fn OH_Drawing_MatrixRotate(matrix: *mut OH_Drawing_Matrix, degree: f32, px: f32, py: f32);
3960}
3961extern "C" {
3962 #[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"]
3963 pub fn OH_Drawing_MatrixTranslate(matrix: *mut OH_Drawing_Matrix, dx: f32, dy: f32);
3964}
3965extern "C" {
3966 #[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"]
3967 pub fn OH_Drawing_MatrixScale(
3968 matrix: *mut OH_Drawing_Matrix,
3969 sx: f32,
3970 sy: f32,
3971 px: f32,
3972 py: f32,
3973 );
3974}
3975extern "C" {
3976 #[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"]
3977 pub fn OH_Drawing_MatrixInvert(
3978 matrix: *mut OH_Drawing_Matrix,
3979 inverse: *mut OH_Drawing_Matrix,
3980 ) -> bool;
3981}
3982extern "C" {
3983 #[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"]
3984 pub fn OH_Drawing_MatrixSetPolyToPoly(
3985 matrix: *mut OH_Drawing_Matrix,
3986 src: *const OH_Drawing_Point2D,
3987 dst: *const OH_Drawing_Point2D,
3988 count: u32,
3989 ) -> bool;
3990}
3991extern "C" {
3992 #[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"]
3993 pub fn OH_Drawing_MatrixMapPoints(
3994 matrix: *const OH_Drawing_Matrix,
3995 src: *const OH_Drawing_Point2D,
3996 dst: *mut OH_Drawing_Point2D,
3997 count: ::std::os::raw::c_int,
3998 );
3999}
4000extern "C" {
4001 #[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"]
4002 pub fn OH_Drawing_MatrixMapRect(
4003 matrix: *const OH_Drawing_Matrix,
4004 src: *const OH_Drawing_Rect,
4005 dst: *mut OH_Drawing_Rect,
4006 ) -> bool;
4007}
4008extern "C" {
4009 #[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"]
4010 pub fn OH_Drawing_MatrixIsEqual(
4011 matrix: *mut OH_Drawing_Matrix,
4012 other: *mut OH_Drawing_Matrix,
4013 ) -> bool;
4014}
4015extern "C" {
4016 #[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"]
4017 pub fn OH_Drawing_MatrixIsIdentity(matrix: *mut OH_Drawing_Matrix) -> bool;
4018}
4019extern "C" {
4020 #[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"]
4021 pub fn OH_Drawing_MatrixDestroy(matrix: *mut OH_Drawing_Matrix);
4022}
4023extern "C" {
4024 #[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"]
4025 pub fn OH_Drawing_MemoryStreamCreate(
4026 data: *const ::std::os::raw::c_void,
4027 length: usize,
4028 copyData: bool,
4029 ) -> *mut OH_Drawing_MemoryStream;
4030}
4031extern "C" {
4032 #[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"]
4033 pub fn OH_Drawing_MemoryStreamDestroy(memoryStream: *mut OH_Drawing_MemoryStream);
4034}
4035#[doc = " clockwise direction for adding closed contours"]
4036pub const OH_Drawing_PathDirection_PATH_DIRECTION_CW: OH_Drawing_PathDirection = 0;
4037#[doc = " counter-clockwise direction for adding closed contours"]
4038pub const OH_Drawing_PathDirection_PATH_DIRECTION_CCW: OH_Drawing_PathDirection = 1;
4039#[doc = " @brief Direction for adding closed contours.\n\n @since 12\n @version 1.0"]
4040pub type OH_Drawing_PathDirection = u32;
4041#[doc = " Specifies that \"inside\" is computed by a non-zero sum of signed edge crossings"]
4042pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_WINDING: OH_Drawing_PathFillType = 0;
4043#[doc = " Specifies that \"inside\" is computed by an odd number of edge crossings"]
4044pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_EVEN_ODD: OH_Drawing_PathFillType = 1;
4045#[doc = " Same as Winding, but draws outside of the path, rather than inside"]
4046pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_INVERSE_WINDING: OH_Drawing_PathFillType = 2;
4047#[doc = " Same as EvenOdd, but draws outside of the path, rather than inside"]
4048pub const OH_Drawing_PathFillType_PATH_FILL_TYPE_INVERSE_EVEN_ODD: OH_Drawing_PathFillType = 3;
4049#[doc = " @brief FillType of path.\n\n @since 12\n @version 1.0"]
4050pub type OH_Drawing_PathFillType = u32;
4051#[doc = " Appended to destination unaltered"]
4052pub const OH_Drawing_PathAddMode_PATH_ADD_MODE_APPEND: OH_Drawing_PathAddMode = 0;
4053#[doc = " Add line if prior contour is not closed"]
4054pub const OH_Drawing_PathAddMode_PATH_ADD_MODE_EXTEND: OH_Drawing_PathAddMode = 1;
4055#[doc = " @brief Add mode of path.\n\n @since 12\n @version 1.0"]
4056pub type OH_Drawing_PathAddMode = u32;
4057#[doc = " Difference operation."]
4058pub const OH_Drawing_PathOpMode_PATH_OP_MODE_DIFFERENCE: OH_Drawing_PathOpMode = 0;
4059#[doc = " Intersect operation."]
4060pub const OH_Drawing_PathOpMode_PATH_OP_MODE_INTERSECT: OH_Drawing_PathOpMode = 1;
4061#[doc = " Union operation."]
4062pub const OH_Drawing_PathOpMode_PATH_OP_MODE_UNION: OH_Drawing_PathOpMode = 2;
4063#[doc = " Xor operation."]
4064pub const OH_Drawing_PathOpMode_PATH_OP_MODE_XOR: OH_Drawing_PathOpMode = 3;
4065#[doc = " Reverse difference operation."]
4066pub const OH_Drawing_PathOpMode_PATH_OP_MODE_REVERSE_DIFFERENCE: OH_Drawing_PathOpMode = 4;
4067#[doc = " @brief Operations when two paths are combined.\n\n @since 12\n @version 1.0"]
4068pub type OH_Drawing_PathOpMode = u32;
4069#[doc = " Gets position."]
4070pub const OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
4071 0;
4072#[doc = " Gets tangent."]
4073pub const OH_Drawing_PathMeasureMatrixFlags_GET_TANGENT_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
4074 1;
4075#[doc = " Gets both position and tangent."]
4076pub const OH_Drawing_PathMeasureMatrixFlags_GET_POSITION_AND_TANGENT_MATRIX:
4077 OH_Drawing_PathMeasureMatrixFlags = 2;
4078#[doc = " @brief Enumerates the matrix information corresponding to the path measurements.\n\n @since 12\n @version 1.0"]
4079pub type OH_Drawing_PathMeasureMatrixFlags = u32;
4080extern "C" {
4081 #[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"]
4082 pub fn OH_Drawing_PathCreate() -> *mut OH_Drawing_Path;
4083}
4084extern "C" {
4085 #[doc = " @brief Creates an <b>OH_Drawing_Path</b> copy object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param path Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @return Returns the pointer to the <b>OH_Drawing_Path</b> object created.\n @since 12\n @version 1.0"]
4086 pub fn OH_Drawing_PathCopy(path: *mut OH_Drawing_Path) -> *mut OH_Drawing_Path;
4087}
4088extern "C" {
4089 #[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"]
4090 pub fn OH_Drawing_PathDestroy(path: *mut OH_Drawing_Path);
4091}
4092extern "C" {
4093 #[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"]
4094 #[cfg(feature = "api-20")]
4095 pub fn OH_Drawing_PathSetPath(
4096 path: *mut OH_Drawing_Path,
4097 other: *mut OH_Drawing_Path,
4098 ) -> OH_Drawing_ErrorCode;
4099}
4100extern "C" {
4101 #[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"]
4102 #[cfg(feature = "api-20")]
4103 pub fn OH_Drawing_PathIsEmpty(
4104 path: *mut OH_Drawing_Path,
4105 isEmpty: *mut bool,
4106 ) -> OH_Drawing_ErrorCode;
4107}
4108extern "C" {
4109 #[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"]
4110 #[cfg(feature = "api-20")]
4111 pub fn OH_Drawing_PathIsRect(
4112 path: *mut OH_Drawing_Path,
4113 rect: *mut OH_Drawing_Rect,
4114 isRect: *mut bool,
4115 ) -> OH_Drawing_ErrorCode;
4116}
4117extern "C" {
4118 #[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"]
4119 pub fn OH_Drawing_PathMoveTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
4120}
4121extern "C" {
4122 #[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"]
4123 pub fn OH_Drawing_PathLineTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
4124}
4125extern "C" {
4126 #[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"]
4127 pub fn OH_Drawing_PathArcTo(
4128 path: *mut OH_Drawing_Path,
4129 x1: f32,
4130 y1: f32,
4131 x2: f32,
4132 y2: f32,
4133 startDeg: f32,
4134 sweepDeg: f32,
4135 );
4136}
4137extern "C" {
4138 #[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"]
4139 pub fn OH_Drawing_PathQuadTo(
4140 path: *mut OH_Drawing_Path,
4141 ctrlX: f32,
4142 ctrlY: f32,
4143 endX: f32,
4144 endY: f32,
4145 );
4146}
4147extern "C" {
4148 #[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"]
4149 pub fn OH_Drawing_PathConicTo(
4150 path: *mut OH_Drawing_Path,
4151 ctrlX: f32,
4152 ctrlY: f32,
4153 endX: f32,
4154 endY: f32,
4155 weight: f32,
4156 );
4157}
4158extern "C" {
4159 #[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"]
4160 pub fn OH_Drawing_PathCubicTo(
4161 path: *mut OH_Drawing_Path,
4162 ctrlX1: f32,
4163 ctrlY1: f32,
4164 ctrlX2: f32,
4165 ctrlY2: f32,
4166 endX: f32,
4167 endY: f32,
4168 );
4169}
4170extern "C" {
4171 #[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"]
4172 pub fn OH_Drawing_PathRMoveTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
4173}
4174extern "C" {
4175 #[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"]
4176 pub fn OH_Drawing_PathRLineTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
4177}
4178extern "C" {
4179 #[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"]
4180 pub fn OH_Drawing_PathRQuadTo(
4181 path: *mut OH_Drawing_Path,
4182 ctrlX: f32,
4183 ctrlY: f32,
4184 endX: f32,
4185 endY: f32,
4186 );
4187}
4188extern "C" {
4189 #[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"]
4190 pub fn OH_Drawing_PathRConicTo(
4191 path: *mut OH_Drawing_Path,
4192 ctrlX: f32,
4193 ctrlY: f32,
4194 endX: f32,
4195 endY: f32,
4196 weight: f32,
4197 );
4198}
4199extern "C" {
4200 #[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"]
4201 pub fn OH_Drawing_PathRCubicTo(
4202 path: *mut OH_Drawing_Path,
4203 ctrlX1: f32,
4204 ctrlY1: f32,
4205 ctrlX2: f32,
4206 ctrlY2: f32,
4207 endX: f32,
4208 endY: f32,
4209 );
4210}
4211extern "C" {
4212 #[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"]
4213 pub fn OH_Drawing_PathAddRect(
4214 path: *mut OH_Drawing_Path,
4215 left: f32,
4216 top: f32,
4217 right: f32,
4218 bottom: f32,
4219 pathDirection: OH_Drawing_PathDirection,
4220 );
4221}
4222extern "C" {
4223 #[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"]
4224 pub fn OH_Drawing_PathAddRectWithInitialCorner(
4225 path: *mut OH_Drawing_Path,
4226 rect: *const OH_Drawing_Rect,
4227 pathDirection: OH_Drawing_PathDirection,
4228 start: u32,
4229 );
4230}
4231extern "C" {
4232 #[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"]
4233 pub fn OH_Drawing_PathAddRoundRect(
4234 path: *mut OH_Drawing_Path,
4235 roundRect: *const OH_Drawing_RoundRect,
4236 pathDirection: OH_Drawing_PathDirection,
4237 );
4238}
4239extern "C" {
4240 #[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"]
4241 pub fn OH_Drawing_PathAddOvalWithInitialPoint(
4242 path: *mut OH_Drawing_Path,
4243 rect: *const OH_Drawing_Rect,
4244 start: u32,
4245 pathDirection: OH_Drawing_PathDirection,
4246 );
4247}
4248extern "C" {
4249 #[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"]
4250 pub fn OH_Drawing_PathAddOval(
4251 path: *mut OH_Drawing_Path,
4252 rect: *const OH_Drawing_Rect,
4253 pathDirection: OH_Drawing_PathDirection,
4254 );
4255}
4256extern "C" {
4257 #[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"]
4258 pub fn OH_Drawing_PathAddArc(
4259 path: *mut OH_Drawing_Path,
4260 rect: *const OH_Drawing_Rect,
4261 startAngle: f32,
4262 sweepAngle: f32,
4263 );
4264}
4265extern "C" {
4266 #[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"]
4267 pub fn OH_Drawing_PathAddPath(
4268 path: *mut OH_Drawing_Path,
4269 src: *const OH_Drawing_Path,
4270 matrix: *const OH_Drawing_Matrix,
4271 );
4272}
4273extern "C" {
4274 #[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"]
4275 pub fn OH_Drawing_PathAddPathWithMatrixAndMode(
4276 path: *mut OH_Drawing_Path,
4277 src: *const OH_Drawing_Path,
4278 matrix: *const OH_Drawing_Matrix,
4279 pathAddMode: OH_Drawing_PathAddMode,
4280 );
4281}
4282extern "C" {
4283 #[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"]
4284 pub fn OH_Drawing_PathAddPathWithMode(
4285 path: *mut OH_Drawing_Path,
4286 src: *const OH_Drawing_Path,
4287 pathAddMode: OH_Drawing_PathAddMode,
4288 );
4289}
4290extern "C" {
4291 #[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"]
4292 pub fn OH_Drawing_PathAddPathWithOffsetAndMode(
4293 path: *mut OH_Drawing_Path,
4294 src: *const OH_Drawing_Path,
4295 dx: f32,
4296 dy: f32,
4297 pathAddMode: OH_Drawing_PathAddMode,
4298 );
4299}
4300extern "C" {
4301 #[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"]
4302 pub fn OH_Drawing_PathAddPolygon(
4303 path: *mut OH_Drawing_Path,
4304 points: *const OH_Drawing_Point2D,
4305 count: u32,
4306 isClosed: bool,
4307 );
4308}
4309extern "C" {
4310 #[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"]
4311 pub fn OH_Drawing_PathAddCircle(
4312 path: *mut OH_Drawing_Path,
4313 x: f32,
4314 y: f32,
4315 radius: f32,
4316 pathDirection: OH_Drawing_PathDirection,
4317 );
4318}
4319extern "C" {
4320 #[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"]
4321 pub fn OH_Drawing_PathBuildFromSvgString(
4322 path: *mut OH_Drawing_Path,
4323 str_: *const ::std::os::raw::c_char,
4324 ) -> bool;
4325}
4326extern "C" {
4327 #[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"]
4328 pub fn OH_Drawing_PathContains(path: *mut OH_Drawing_Path, x: f32, y: f32) -> bool;
4329}
4330extern "C" {
4331 #[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"]
4332 pub fn OH_Drawing_PathTransform(path: *mut OH_Drawing_Path, matrix: *const OH_Drawing_Matrix);
4333}
4334extern "C" {
4335 #[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"]
4336 pub fn OH_Drawing_PathTransformWithPerspectiveClip(
4337 src: *mut OH_Drawing_Path,
4338 matrix: *const OH_Drawing_Matrix,
4339 dst: *mut OH_Drawing_Path,
4340 applyPerspectiveClip: bool,
4341 );
4342}
4343extern "C" {
4344 #[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"]
4345 pub fn OH_Drawing_PathSetFillType(
4346 path: *mut OH_Drawing_Path,
4347 pathFillType: OH_Drawing_PathFillType,
4348 );
4349}
4350extern "C" {
4351 #[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"]
4352 #[cfg(feature = "api-20")]
4353 pub fn OH_Drawing_PathGetFillType(
4354 path: *mut OH_Drawing_Path,
4355 pathFillType: *mut OH_Drawing_PathFillType,
4356 ) -> OH_Drawing_ErrorCode;
4357}
4358extern "C" {
4359 #[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"]
4360 pub fn OH_Drawing_PathGetLength(path: *mut OH_Drawing_Path, forceClosed: bool) -> f32;
4361}
4362extern "C" {
4363 #[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"]
4364 pub fn OH_Drawing_PathGetBounds(path: *mut OH_Drawing_Path, rect: *mut OH_Drawing_Rect);
4365}
4366extern "C" {
4367 #[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"]
4368 pub fn OH_Drawing_PathClose(path: *mut OH_Drawing_Path);
4369}
4370extern "C" {
4371 #[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"]
4372 pub fn OH_Drawing_PathOffset(
4373 path: *mut OH_Drawing_Path,
4374 dst: *mut OH_Drawing_Path,
4375 dx: f32,
4376 dy: f32,
4377 );
4378}
4379extern "C" {
4380 #[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"]
4381 pub fn OH_Drawing_PathReset(path: *mut OH_Drawing_Path);
4382}
4383extern "C" {
4384 #[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"]
4385 pub fn OH_Drawing_PathIsClosed(path: *mut OH_Drawing_Path, forceClosed: bool) -> bool;
4386}
4387extern "C" {
4388 #[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"]
4389 pub fn OH_Drawing_PathGetPositionTangent(
4390 path: *mut OH_Drawing_Path,
4391 forceClosed: bool,
4392 distance: f32,
4393 position: *mut OH_Drawing_Point2D,
4394 tangent: *mut OH_Drawing_Point2D,
4395 ) -> bool;
4396}
4397extern "C" {
4398 #[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"]
4399 #[cfg(feature = "api-18")]
4400 pub fn OH_Drawing_PathGetSegment(
4401 path: *mut OH_Drawing_Path,
4402 forceClosed: bool,
4403 start: f32,
4404 stop: f32,
4405 startWithMoveTo: bool,
4406 dst: *mut OH_Drawing_Path,
4407 result: *mut bool,
4408 ) -> OH_Drawing_ErrorCode;
4409}
4410extern "C" {
4411 #[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"]
4412 pub fn OH_Drawing_PathOp(
4413 path: *mut OH_Drawing_Path,
4414 other: *const OH_Drawing_Path,
4415 op: OH_Drawing_PathOpMode,
4416 ) -> bool;
4417}
4418extern "C" {
4419 #[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"]
4420 pub fn OH_Drawing_PathGetMatrix(
4421 path: *mut OH_Drawing_Path,
4422 forceClosed: bool,
4423 distance: f32,
4424 matrix: *mut OH_Drawing_Matrix,
4425 flag: OH_Drawing_PathMeasureMatrixFlags,
4426 ) -> bool;
4427}
4428extern "C" {
4429 #[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"]
4430 #[cfg(feature = "api-20")]
4431 pub fn OH_Drawing_PathApproximate(
4432 path: *mut OH_Drawing_Path,
4433 acceptableError: f32,
4434 vals: *mut f32,
4435 count: *mut u32,
4436 ) -> OH_Drawing_ErrorCode;
4437}
4438extern "C" {
4439 #[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"]
4440 #[cfg(feature = "api-20")]
4441 pub fn OH_Drawing_PathInterpolate(
4442 path: *mut OH_Drawing_Path,
4443 other: *mut OH_Drawing_Path,
4444 weight: f32,
4445 success: *mut bool,
4446 interpolatedPath: *mut OH_Drawing_Path,
4447 ) -> OH_Drawing_ErrorCode;
4448}
4449extern "C" {
4450 #[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"]
4451 #[cfg(feature = "api-20")]
4452 pub fn OH_Drawing_PathIsInterpolate(
4453 path: *mut OH_Drawing_Path,
4454 other: *mut OH_Drawing_Path,
4455 result: *mut bool,
4456 ) -> OH_Drawing_ErrorCode;
4457}
4458#[doc = " Indicates translation effect."]
4459#[cfg(feature = "api-18")]
4460pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_TRANSLATE: OH_Drawing_PathDashStyle = 0;
4461#[doc = " Indicates rotation effect."]
4462#[cfg(feature = "api-18")]
4463pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_ROTATE: OH_Drawing_PathDashStyle = 1;
4464#[doc = " Indicates morph effect."]
4465#[cfg(feature = "api-18")]
4466pub const OH_Drawing_PathDashStyle_DRAWING_PATH_DASH_STYLE_MORPH: OH_Drawing_PathDashStyle = 2;
4467#[doc = " @brief Enumerate path dash style.\n\n @since 18\n @version 1.0"]
4468#[cfg(feature = "api-18")]
4469pub type OH_Drawing_PathDashStyle = u32;
4470extern "C" {
4471 #[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"]
4472 #[cfg(feature = "api-18")]
4473 pub fn OH_Drawing_CreateComposePathEffect(
4474 outer: *mut OH_Drawing_PathEffect,
4475 inner: *mut OH_Drawing_PathEffect,
4476 ) -> *mut OH_Drawing_PathEffect;
4477}
4478extern "C" {
4479 #[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"]
4480 #[cfg(feature = "api-18")]
4481 pub fn OH_Drawing_CreateCornerPathEffect(radius: f32) -> *mut OH_Drawing_PathEffect;
4482}
4483extern "C" {
4484 #[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"]
4485 pub fn OH_Drawing_CreateDashPathEffect(
4486 intervals: *mut f32,
4487 count: ::std::os::raw::c_int,
4488 phase: f32,
4489 ) -> *mut OH_Drawing_PathEffect;
4490}
4491extern "C" {
4492 #[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"]
4493 #[cfg(feature = "api-18")]
4494 pub fn OH_Drawing_CreateDiscretePathEffect(
4495 segLength: f32,
4496 deviation: f32,
4497 ) -> *mut OH_Drawing_PathEffect;
4498}
4499extern "C" {
4500 #[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"]
4501 #[cfg(feature = "api-18")]
4502 pub fn OH_Drawing_CreatePathDashEffect(
4503 path: *const OH_Drawing_Path,
4504 advance: f32,
4505 phase: f32,
4506 type_: OH_Drawing_PathDashStyle,
4507 ) -> *mut OH_Drawing_PathEffect;
4508}
4509extern "C" {
4510 #[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"]
4511 #[cfg(feature = "api-18")]
4512 pub fn OH_Drawing_CreateSumPathEffect(
4513 firstPathEffect: *mut OH_Drawing_PathEffect,
4514 secondPathEffect: *mut OH_Drawing_PathEffect,
4515 ) -> *mut OH_Drawing_PathEffect;
4516}
4517extern "C" {
4518 #[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"]
4519 pub fn OH_Drawing_PathEffectDestroy(pathEffect: *mut OH_Drawing_PathEffect);
4520}
4521extern "C" {
4522 #[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"]
4523 pub fn OH_Drawing_PenCreate() -> *mut OH_Drawing_Pen;
4524}
4525extern "C" {
4526 #[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"]
4527 pub fn OH_Drawing_PenCopy(pen: *mut OH_Drawing_Pen) -> *mut OH_Drawing_Pen;
4528}
4529extern "C" {
4530 #[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"]
4531 pub fn OH_Drawing_PenDestroy(pen: *mut OH_Drawing_Pen);
4532}
4533extern "C" {
4534 #[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"]
4535 pub fn OH_Drawing_PenIsAntiAlias(pen: *const OH_Drawing_Pen) -> bool;
4536}
4537extern "C" {
4538 #[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"]
4539 pub fn OH_Drawing_PenSetAntiAlias(pen: *mut OH_Drawing_Pen, antiAlias: bool);
4540}
4541extern "C" {
4542 #[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"]
4543 pub fn OH_Drawing_PenGetColor(pen: *const OH_Drawing_Pen) -> u32;
4544}
4545extern "C" {
4546 #[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"]
4547 pub fn OH_Drawing_PenSetColor(pen: *mut OH_Drawing_Pen, color: u32);
4548}
4549extern "C" {
4550 #[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"]
4551 pub fn OH_Drawing_PenGetAlpha(pen: *const OH_Drawing_Pen) -> u8;
4552}
4553extern "C" {
4554 #[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"]
4555 pub fn OH_Drawing_PenSetAlpha(pen: *mut OH_Drawing_Pen, alpha: u8);
4556}
4557extern "C" {
4558 #[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"]
4559 #[cfg(feature = "api-20")]
4560 pub fn OH_Drawing_PenSetColor4f(
4561 pen: *mut OH_Drawing_Pen,
4562 a: f32,
4563 r: f32,
4564 g: f32,
4565 b: f32,
4566 colorSpaceManager: *mut OH_NativeColorSpaceManager,
4567 ) -> OH_Drawing_ErrorCode;
4568}
4569extern "C" {
4570 #[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"]
4571 #[cfg(feature = "api-20")]
4572 pub fn OH_Drawing_PenGetAlphaFloat(
4573 pen: *mut OH_Drawing_Pen,
4574 a: *mut f32,
4575 ) -> OH_Drawing_ErrorCode;
4576}
4577extern "C" {
4578 #[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"]
4579 #[cfg(feature = "api-20")]
4580 pub fn OH_Drawing_PenGetRedFloat(pen: *mut OH_Drawing_Pen, r: *mut f32)
4581 -> OH_Drawing_ErrorCode;
4582}
4583extern "C" {
4584 #[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"]
4585 #[cfg(feature = "api-20")]
4586 pub fn OH_Drawing_PenGetGreenFloat(
4587 pen: *mut OH_Drawing_Pen,
4588 g: *mut f32,
4589 ) -> OH_Drawing_ErrorCode;
4590}
4591extern "C" {
4592 #[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"]
4593 #[cfg(feature = "api-20")]
4594 pub fn OH_Drawing_PenGetBlueFloat(
4595 pen: *mut OH_Drawing_Pen,
4596 b: *mut f32,
4597 ) -> OH_Drawing_ErrorCode;
4598}
4599extern "C" {
4600 #[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"]
4601 pub fn OH_Drawing_PenGetWidth(pen: *const OH_Drawing_Pen) -> f32;
4602}
4603extern "C" {
4604 #[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"]
4605 pub fn OH_Drawing_PenSetWidth(pen: *mut OH_Drawing_Pen, width: f32);
4606}
4607extern "C" {
4608 #[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"]
4609 pub fn OH_Drawing_PenGetMiterLimit(pen: *const OH_Drawing_Pen) -> f32;
4610}
4611extern "C" {
4612 #[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"]
4613 pub fn OH_Drawing_PenSetMiterLimit(pen: *mut OH_Drawing_Pen, miter: f32);
4614}
4615#[doc = " There is no cap style. Both ends of the line segment are cut off square."]
4616pub const OH_Drawing_PenLineCapStyle_LINE_FLAT_CAP: OH_Drawing_PenLineCapStyle = 0;
4617#[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."]
4618pub const OH_Drawing_PenLineCapStyle_LINE_SQUARE_CAP: OH_Drawing_PenLineCapStyle = 1;
4619#[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."]
4620pub const OH_Drawing_PenLineCapStyle_LINE_ROUND_CAP: OH_Drawing_PenLineCapStyle = 2;
4621#[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"]
4622pub type OH_Drawing_PenLineCapStyle = u32;
4623extern "C" {
4624 #[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"]
4625 pub fn OH_Drawing_PenGetCap(pen: *const OH_Drawing_Pen) -> OH_Drawing_PenLineCapStyle;
4626}
4627extern "C" {
4628 #[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"]
4629 pub fn OH_Drawing_PenSetCap(pen: *mut OH_Drawing_Pen, capStyle: OH_Drawing_PenLineCapStyle);
4630}
4631#[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."]
4632pub const OH_Drawing_PenLineJoinStyle_LINE_MITER_JOIN: OH_Drawing_PenLineJoinStyle = 0;
4633#[doc = " Round corner."]
4634pub const OH_Drawing_PenLineJoinStyle_LINE_ROUND_JOIN: OH_Drawing_PenLineJoinStyle = 1;
4635#[doc = " Beveled corner."]
4636pub const OH_Drawing_PenLineJoinStyle_LINE_BEVEL_JOIN: OH_Drawing_PenLineJoinStyle = 2;
4637#[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"]
4638pub type OH_Drawing_PenLineJoinStyle = u32;
4639extern "C" {
4640 #[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"]
4641 pub fn OH_Drawing_PenGetJoin(pen: *const OH_Drawing_Pen) -> OH_Drawing_PenLineJoinStyle;
4642}
4643extern "C" {
4644 #[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"]
4645 pub fn OH_Drawing_PenSetJoin(pen: *mut OH_Drawing_Pen, joinStyle: OH_Drawing_PenLineJoinStyle);
4646}
4647extern "C" {
4648 #[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"]
4649 pub fn OH_Drawing_PenSetShaderEffect(
4650 pen: *mut OH_Drawing_Pen,
4651 shaderEffect: *mut OH_Drawing_ShaderEffect,
4652 );
4653}
4654extern "C" {
4655 #[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"]
4656 pub fn OH_Drawing_PenSetShadowLayer(
4657 pen: *mut OH_Drawing_Pen,
4658 shadowLayer: *mut OH_Drawing_ShadowLayer,
4659 );
4660}
4661extern "C" {
4662 #[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"]
4663 pub fn OH_Drawing_PenSetPathEffect(
4664 pen: *mut OH_Drawing_Pen,
4665 pathEffect: *mut OH_Drawing_PathEffect,
4666 );
4667}
4668extern "C" {
4669 #[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"]
4670 pub fn OH_Drawing_PenSetFilter(pen: *mut OH_Drawing_Pen, filter: *mut OH_Drawing_Filter);
4671}
4672extern "C" {
4673 #[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"]
4674 pub fn OH_Drawing_PenGetFilter(pen: *mut OH_Drawing_Pen, filter: *mut OH_Drawing_Filter);
4675}
4676extern "C" {
4677 #[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"]
4678 pub fn OH_Drawing_PenSetBlendMode(pen: *mut OH_Drawing_Pen, blendMode: OH_Drawing_BlendMode);
4679}
4680extern "C" {
4681 #[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"]
4682 pub fn OH_Drawing_PenGetFillPath(
4683 pen: *mut OH_Drawing_Pen,
4684 src: *const OH_Drawing_Path,
4685 dst: *mut OH_Drawing_Path,
4686 rect: *const OH_Drawing_Rect,
4687 matrix: *const OH_Drawing_Matrix,
4688 ) -> bool;
4689}
4690extern "C" {
4691 #[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"]
4692 pub fn OH_Drawing_PenReset(pen: *mut OH_Drawing_Pen);
4693}
4694#[repr(C)]
4695#[derive(Debug, Copy, Clone)]
4696pub struct NativePixelMap_ {
4697 _unused: [u8; 0],
4698}
4699#[repr(C)]
4700#[derive(Debug, Copy, Clone)]
4701pub struct OH_PixelmapNative {
4702 _unused: [u8; 0],
4703}
4704extern "C" {
4705 #[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"]
4706 pub fn OH_Drawing_PixelMapGetFromNativePixelMap(
4707 nativePixelMap: *mut NativePixelMap_,
4708 ) -> *mut OH_Drawing_PixelMap;
4709}
4710extern "C" {
4711 #[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"]
4712 pub fn OH_Drawing_PixelMapGetFromOhPixelMapNative(
4713 pixelmapNative: *mut OH_PixelmapNative,
4714 ) -> *mut OH_Drawing_PixelMap;
4715}
4716extern "C" {
4717 #[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"]
4718 pub fn OH_Drawing_PixelMapDissolve(pixelMap: *mut OH_Drawing_PixelMap);
4719}
4720extern "C" {
4721 #[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"]
4722 pub fn OH_Drawing_PointCreate(x: f32, y: f32) -> *mut OH_Drawing_Point;
4723}
4724extern "C" {
4725 #[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"]
4726 pub fn OH_Drawing_PointGetX(
4727 point: *const OH_Drawing_Point,
4728 x: *mut f32,
4729 ) -> OH_Drawing_ErrorCode;
4730}
4731extern "C" {
4732 #[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"]
4733 pub fn OH_Drawing_PointGetY(
4734 point: *const OH_Drawing_Point,
4735 y: *mut f32,
4736 ) -> OH_Drawing_ErrorCode;
4737}
4738extern "C" {
4739 #[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"]
4740 pub fn OH_Drawing_PointSet(
4741 point: *mut OH_Drawing_Point,
4742 x: f32,
4743 y: f32,
4744 ) -> OH_Drawing_ErrorCode;
4745}
4746extern "C" {
4747 #[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"]
4748 pub fn OH_Drawing_PointDestroy(point: *mut OH_Drawing_Point);
4749}
4750extern "C" {
4751 #[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"]
4752 #[cfg(feature = "api-13")]
4753 pub fn OH_Drawing_RecordCmdUtilsCreate() -> *mut OH_Drawing_RecordCmdUtils;
4754}
4755extern "C" {
4756 #[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"]
4757 #[cfg(feature = "api-13")]
4758 pub fn OH_Drawing_RecordCmdUtilsDestroy(
4759 recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
4760 ) -> OH_Drawing_ErrorCode;
4761}
4762extern "C" {
4763 #[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"]
4764 #[cfg(feature = "api-13")]
4765 pub fn OH_Drawing_RecordCmdUtilsBeginRecording(
4766 recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
4767 width: i32,
4768 height: i32,
4769 canvas: *mut *mut OH_Drawing_Canvas,
4770 ) -> OH_Drawing_ErrorCode;
4771}
4772extern "C" {
4773 #[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"]
4774 #[cfg(feature = "api-13")]
4775 pub fn OH_Drawing_RecordCmdUtilsFinishRecording(
4776 recordCmdUtils: *mut OH_Drawing_RecordCmdUtils,
4777 recordCmd: *mut *mut OH_Drawing_RecordCmd,
4778 ) -> OH_Drawing_ErrorCode;
4779}
4780extern "C" {
4781 #[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"]
4782 #[cfg(feature = "api-13")]
4783 pub fn OH_Drawing_RecordCmdDestroy(
4784 recordCmd: *mut OH_Drawing_RecordCmd,
4785 ) -> OH_Drawing_ErrorCode;
4786}
4787extern "C" {
4788 #[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"]
4789 pub fn OH_Drawing_RectCreate(
4790 left: f32,
4791 top: f32,
4792 right: f32,
4793 bottom: f32,
4794 ) -> *mut OH_Drawing_Rect;
4795}
4796extern "C" {
4797 #[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"]
4798 pub fn OH_Drawing_RectIntersect(
4799 rect: *mut OH_Drawing_Rect,
4800 other: *const OH_Drawing_Rect,
4801 ) -> bool;
4802}
4803extern "C" {
4804 #[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"]
4805 pub fn OH_Drawing_RectJoin(rect: *mut OH_Drawing_Rect, other: *const OH_Drawing_Rect) -> bool;
4806}
4807extern "C" {
4808 #[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"]
4809 pub fn OH_Drawing_RectSetLeft(rect: *mut OH_Drawing_Rect, left: f32);
4810}
4811extern "C" {
4812 #[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"]
4813 pub fn OH_Drawing_RectSetTop(rect: *mut OH_Drawing_Rect, top: f32);
4814}
4815extern "C" {
4816 #[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"]
4817 pub fn OH_Drawing_RectSetRight(rect: *mut OH_Drawing_Rect, right: f32);
4818}
4819extern "C" {
4820 #[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"]
4821 pub fn OH_Drawing_RectSetBottom(rect: *mut OH_Drawing_Rect, bottom: f32);
4822}
4823extern "C" {
4824 #[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"]
4825 pub fn OH_Drawing_RectGetLeft(rect: *mut OH_Drawing_Rect) -> f32;
4826}
4827extern "C" {
4828 #[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"]
4829 pub fn OH_Drawing_RectGetTop(rect: *mut OH_Drawing_Rect) -> f32;
4830}
4831extern "C" {
4832 #[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"]
4833 pub fn OH_Drawing_RectGetRight(rect: *mut OH_Drawing_Rect) -> f32;
4834}
4835extern "C" {
4836 #[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"]
4837 pub fn OH_Drawing_RectGetBottom(rect: *mut OH_Drawing_Rect) -> f32;
4838}
4839extern "C" {
4840 #[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"]
4841 pub fn OH_Drawing_RectGetHeight(rect: *mut OH_Drawing_Rect) -> f32;
4842}
4843extern "C" {
4844 #[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"]
4845 pub fn OH_Drawing_RectGetWidth(rect: *mut OH_Drawing_Rect) -> f32;
4846}
4847extern "C" {
4848 #[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"]
4849 pub fn OH_Drawing_RectCopy(src: *mut OH_Drawing_Rect, dst: *mut OH_Drawing_Rect);
4850}
4851extern "C" {
4852 #[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"]
4853 pub fn OH_Drawing_RectDestroy(rect: *mut OH_Drawing_Rect);
4854}
4855extern "C" {
4856 #[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"]
4857 #[cfg(feature = "api-18")]
4858 pub fn OH_Drawing_RectCreateArray(size: usize) -> *mut OH_Drawing_Array;
4859}
4860extern "C" {
4861 #[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"]
4862 #[cfg(feature = "api-18")]
4863 pub fn OH_Drawing_RectGetArraySize(
4864 rectArray: *mut OH_Drawing_Array,
4865 pSize: *mut usize,
4866 ) -> OH_Drawing_ErrorCode;
4867}
4868extern "C" {
4869 #[doc = " @brief Gets the specified <b>OH_Drawing_Rect</b> object from <b>OH_Drawing_Array</b> object.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @param rectArray Indicates the array object.\n @param index Indicates the index of array, caller must make sure the index is valid.\n @param rect Pointers to Pointer of <b>OH_Drawing_Rect</b> object, returned to the caller.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if rectArray or rect is nullptr,\n or index is valid.\n @since 18\n @version 1.0"]
4870 #[cfg(feature = "api-18")]
4871 pub fn OH_Drawing_RectGetArrayElement(
4872 rectArray: *mut OH_Drawing_Array,
4873 index: usize,
4874 rect: *mut *mut OH_Drawing_Rect,
4875 ) -> OH_Drawing_ErrorCode;
4876}
4877extern "C" {
4878 #[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"]
4879 #[cfg(feature = "api-18")]
4880 pub fn OH_Drawing_RectDestroyArray(rectArray: *mut OH_Drawing_Array) -> OH_Drawing_ErrorCode;
4881}
4882extern "C" {
4883 #[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"]
4884 #[cfg(feature = "api-22")]
4885 pub fn OH_Drawing_RectContains(
4886 rect: *mut OH_Drawing_Rect,
4887 other: *const OH_Drawing_Rect,
4888 isContains: *mut bool,
4889 ) -> OH_Drawing_ErrorCode;
4890}
4891extern "C" {
4892 #[doc = " @brief Add the specified values to the left and top boundaried of an <b>OH_Drawing_Rect</b> object.\n\n @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.\n @param left Indicates the value added to the left boundary of an <b>OH_Drawing_Rect</b> object.\n @param top Indicates the value added to the top boundary of an <b>OH_Drawing_Rect</b> object.\n @param right Indicates the value added to the right boundary of an <b>OH_Drawing_Rect</b> object.\n @param bottom Indicates the value added to the bottom boundary of an <b>OH_Drawing_Rect</b> object.\n @return Returns the error code.\n Returns {@link OH_DRAWING_SUCCESS} if the operation is successful.\n Returns {@link OH_DRAWING_ERROR_INCORRECT_PARAMETER} if rect is nullptr.\n @since 22\n @version 1.0"]
4893 #[cfg(feature = "api-22")]
4894 pub fn OH_Drawing_RectInset(
4895 rect: *mut OH_Drawing_Rect,
4896 left: f32,
4897 top: f32,
4898 right: f32,
4899 bottom: f32,
4900 ) -> OH_Drawing_ErrorCode;
4901}
4902#[doc = " Difference operation."]
4903pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_DIFFERENCE: OH_Drawing_RegionOpMode = 0;
4904#[doc = " Intersect operation."]
4905pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_INTERSECT: OH_Drawing_RegionOpMode = 1;
4906#[doc = " Union operation."]
4907pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_UNION: OH_Drawing_RegionOpMode = 2;
4908#[doc = " Xor operation."]
4909pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_XOR: OH_Drawing_RegionOpMode = 3;
4910#[doc = " Reverse difference operation."]
4911pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_REVERSE_DIFFERENCE: OH_Drawing_RegionOpMode = 4;
4912#[doc = " Replace operation."]
4913pub const OH_Drawing_RegionOpMode_REGION_OP_MODE_REPLACE: OH_Drawing_RegionOpMode = 5;
4914#[doc = " @brief Operations when two regions are combined.\n\n @since 12\n @version 1.0"]
4915pub type OH_Drawing_RegionOpMode = u32;
4916extern "C" {
4917 #[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"]
4918 pub fn OH_Drawing_RegionCreate() -> *mut OH_Drawing_Region;
4919}
4920extern "C" {
4921 #[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"]
4922 #[cfg(feature = "api-20")]
4923 pub fn OH_Drawing_RegionCopy(region: *const OH_Drawing_Region) -> *mut OH_Drawing_Region;
4924}
4925extern "C" {
4926 #[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"]
4927 pub fn OH_Drawing_RegionContains(region: *mut OH_Drawing_Region, x: i32, y: i32) -> bool;
4928}
4929extern "C" {
4930 #[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"]
4931 pub fn OH_Drawing_RegionOp(
4932 region: *mut OH_Drawing_Region,
4933 other: *const OH_Drawing_Region,
4934 op: OH_Drawing_RegionOpMode,
4935 ) -> bool;
4936}
4937extern "C" {
4938 #[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"]
4939 pub fn OH_Drawing_RegionSetRect(
4940 region: *mut OH_Drawing_Region,
4941 rect: *const OH_Drawing_Rect,
4942 ) -> bool;
4943}
4944extern "C" {
4945 #[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"]
4946 pub fn OH_Drawing_RegionSetPath(
4947 region: *mut OH_Drawing_Region,
4948 path: *const OH_Drawing_Path,
4949 clip: *const OH_Drawing_Region,
4950 ) -> bool;
4951}
4952extern "C" {
4953 #[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"]
4954 pub fn OH_Drawing_RegionDestroy(region: *mut OH_Drawing_Region);
4955}
4956extern "C" {
4957 #[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"]
4958 #[cfg(feature = "api-22")]
4959 pub fn OH_Drawing_RegionEmpty(region: *mut OH_Drawing_Region) -> OH_Drawing_ErrorCode;
4960}
4961extern "C" {
4962 #[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"]
4963 pub fn OH_Drawing_RegisterFont(
4964 arg1: *mut OH_Drawing_FontCollection,
4965 fontFamily: *const ::std::os::raw::c_char,
4966 familySrc: *const ::std::os::raw::c_char,
4967 ) -> u32;
4968}
4969extern "C" {
4970 #[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"]
4971 pub fn OH_Drawing_RegisterFontBuffer(
4972 arg1: *mut OH_Drawing_FontCollection,
4973 fontFamily: *const ::std::os::raw::c_char,
4974 fontBuffer: *mut u8,
4975 length: usize,
4976 ) -> u32;
4977}
4978extern "C" {
4979 #[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"]
4980 #[cfg(feature = "api-20")]
4981 pub fn OH_Drawing_UnregisterFont(
4982 fontCollection: *mut OH_Drawing_FontCollection,
4983 fontFamily: *const ::std::os::raw::c_char,
4984 ) -> u32;
4985}
4986#[doc = " Index of top-left corner radii."]
4987pub const OH_Drawing_CornerPos_CORNER_POS_TOP_LEFT: OH_Drawing_CornerPos = 0;
4988#[doc = " Index of top-right corner radii."]
4989pub const OH_Drawing_CornerPos_CORNER_POS_TOP_RIGHT: OH_Drawing_CornerPos = 1;
4990#[doc = " Index of bottom-right corner radii."]
4991pub const OH_Drawing_CornerPos_CORNER_POS_BOTTOM_RIGHT: OH_Drawing_CornerPos = 2;
4992#[doc = " Index of bottom-left corner radii."]
4993pub const OH_Drawing_CornerPos_CORNER_POS_BOTTOM_LEFT: OH_Drawing_CornerPos = 3;
4994#[doc = " @brief Enumerates of corner radii position.\n\n @since 12\n @version 1.0"]
4995pub type OH_Drawing_CornerPos = u32;
4996extern "C" {
4997 #[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"]
4998 pub fn OH_Drawing_RoundRectCreate(
4999 rect: *const OH_Drawing_Rect,
5000 xRad: f32,
5001 yRad: f32,
5002 ) -> *mut OH_Drawing_RoundRect;
5003}
5004extern "C" {
5005 #[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"]
5006 #[cfg(feature = "api-20")]
5007 pub fn OH_Drawing_RoundRectCopy(
5008 roundRect: *const OH_Drawing_RoundRect,
5009 ) -> *mut OH_Drawing_RoundRect;
5010}
5011extern "C" {
5012 #[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"]
5013 pub fn OH_Drawing_RoundRectSetCorner(
5014 roundRect: *mut OH_Drawing_RoundRect,
5015 pos: OH_Drawing_CornerPos,
5016 radii: OH_Drawing_Corner_Radii,
5017 );
5018}
5019extern "C" {
5020 #[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"]
5021 pub fn OH_Drawing_RoundRectGetCorner(
5022 roundRect: *mut OH_Drawing_RoundRect,
5023 pos: OH_Drawing_CornerPos,
5024 ) -> OH_Drawing_Corner_Radii;
5025}
5026extern "C" {
5027 #[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"]
5028 pub fn OH_Drawing_RoundRectDestroy(roundRect: *mut OH_Drawing_RoundRect);
5029}
5030extern "C" {
5031 #[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"]
5032 pub fn OH_Drawing_RoundRectOffset(
5033 roundRect: *mut OH_Drawing_RoundRect,
5034 dx: f32,
5035 dy: f32,
5036 ) -> OH_Drawing_ErrorCode;
5037}
5038extern "C" {
5039 #[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"]
5040 pub fn OH_Drawing_ShadowLayerCreate(
5041 blurRadius: f32,
5042 x: f32,
5043 y: f32,
5044 color: u32,
5045 ) -> *mut OH_Drawing_ShadowLayer;
5046}
5047extern "C" {
5048 #[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"]
5049 pub fn OH_Drawing_ShadowLayerDestroy(shadowLayer: *mut OH_Drawing_ShadowLayer);
5050}
5051extern "C" {
5052 #[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"]
5053 pub fn OH_Drawing_SurfaceCreateFromGpuContext(
5054 gpuContext: *mut OH_Drawing_GpuContext,
5055 flag: bool,
5056 imageInfo: OH_Drawing_Image_Info,
5057 ) -> *mut OH_Drawing_Surface;
5058}
5059extern "C" {
5060 #[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"]
5061 #[cfg(feature = "api-16")]
5062 pub fn OH_Drawing_SurfaceCreateOnScreen(
5063 gpuContext: *mut OH_Drawing_GpuContext,
5064 imageInfo: OH_Drawing_Image_Info,
5065 window: *mut ::std::os::raw::c_void,
5066 ) -> *mut OH_Drawing_Surface;
5067}
5068extern "C" {
5069 #[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"]
5070 pub fn OH_Drawing_SurfaceGetCanvas(surface: *mut OH_Drawing_Surface) -> *mut OH_Drawing_Canvas;
5071}
5072extern "C" {
5073 #[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"]
5074 #[cfg(feature = "api-16")]
5075 pub fn OH_Drawing_SurfaceFlush(surface: *mut OH_Drawing_Surface) -> OH_Drawing_ErrorCode;
5076}
5077extern "C" {
5078 #[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"]
5079 pub fn OH_Drawing_SurfaceDestroy(surface: *mut OH_Drawing_Surface);
5080}
5081extern "C" {
5082 #[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"]
5083 pub fn OH_Drawing_TextBlobBuilderCreate() -> *mut OH_Drawing_TextBlobBuilder;
5084}
5085extern "C" {
5086 #[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"]
5087 pub fn OH_Drawing_TextBlobCreateFromText(
5088 text: *const ::std::os::raw::c_void,
5089 byteLength: usize,
5090 font: *const OH_Drawing_Font,
5091 textEncoding: OH_Drawing_TextEncoding,
5092 ) -> *mut OH_Drawing_TextBlob;
5093}
5094extern "C" {
5095 #[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"]
5096 pub fn OH_Drawing_TextBlobCreateFromPosText(
5097 text: *const ::std::os::raw::c_void,
5098 byteLength: usize,
5099 point2D: *mut OH_Drawing_Point2D,
5100 font: *const OH_Drawing_Font,
5101 textEncoding: OH_Drawing_TextEncoding,
5102 ) -> *mut OH_Drawing_TextBlob;
5103}
5104extern "C" {
5105 #[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"]
5106 pub fn OH_Drawing_TextBlobCreateFromString(
5107 str_: *const ::std::os::raw::c_char,
5108 font: *const OH_Drawing_Font,
5109 textEncoding: OH_Drawing_TextEncoding,
5110 ) -> *mut OH_Drawing_TextBlob;
5111}
5112extern "C" {
5113 #[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"]
5114 pub fn OH_Drawing_TextBlobGetBounds(
5115 textBlob: *mut OH_Drawing_TextBlob,
5116 rect: *mut OH_Drawing_Rect,
5117 );
5118}
5119extern "C" {
5120 #[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"]
5121 pub fn OH_Drawing_TextBlobUniqueID(textBlob: *const OH_Drawing_TextBlob) -> u32;
5122}
5123#[doc = " @brief Defines a run, supplies storage for glyphs and positions.\n\n @since 11\n @version 1.0"]
5124#[repr(C)]
5125#[derive(Debug, Copy, Clone)]
5126pub struct OH_Drawing_RunBuffer {
5127 #[doc = " storage for glyph indexes in run"]
5128 pub glyphs: *mut u16,
5129 #[doc = " storage for glyph positions in run"]
5130 pub pos: *mut f32,
5131 #[doc = " storage for text UTF-8 code units in run"]
5132 pub utf8text: *mut ::std::os::raw::c_char,
5133 #[doc = " storage for glyph clusters (index of UTF-8 code unit)"]
5134 pub clusters: *mut u32,
5135}
5136extern "C" {
5137 #[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"]
5138 pub fn OH_Drawing_TextBlobBuilderAllocRunPos(
5139 textBlobBuilder: *mut OH_Drawing_TextBlobBuilder,
5140 font: *const OH_Drawing_Font,
5141 count: i32,
5142 rect: *const OH_Drawing_Rect,
5143 ) -> *const OH_Drawing_RunBuffer;
5144}
5145extern "C" {
5146 #[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"]
5147 pub fn OH_Drawing_TextBlobBuilderMake(
5148 textBlobBuilder: *mut OH_Drawing_TextBlobBuilder,
5149 ) -> *mut OH_Drawing_TextBlob;
5150}
5151extern "C" {
5152 #[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"]
5153 pub fn OH_Drawing_TextBlobDestroy(textBlob: *mut OH_Drawing_TextBlob);
5154}
5155extern "C" {
5156 #[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"]
5157 pub fn OH_Drawing_TextBlobBuilderDestroy(textBlobBuilder: *mut OH_Drawing_TextBlobBuilder);
5158}
5159#[doc = " All font types"]
5160#[cfg(feature = "api-14")]
5161pub const OH_Drawing_SystemFontType_ALL: OH_Drawing_SystemFontType = 1;
5162#[doc = " System generic font type"]
5163#[cfg(feature = "api-14")]
5164pub const OH_Drawing_SystemFontType_GENERIC: OH_Drawing_SystemFontType = 2;
5165#[doc = " Stylish font type"]
5166#[cfg(feature = "api-14")]
5167pub const OH_Drawing_SystemFontType_STYLISH: OH_Drawing_SystemFontType = 4;
5168#[doc = " Installed font types"]
5169#[cfg(feature = "api-14")]
5170pub const OH_Drawing_SystemFontType_INSTALLED: OH_Drawing_SystemFontType = 8;
5171#[doc = " Customized font types\n @since 18"]
5172#[cfg(feature = "api-18")]
5173pub const OH_Drawing_SystemFontType_CUSTOMIZED: OH_Drawing_SystemFontType = 16;
5174#[doc = " @brief An enumeration of system font types.\n\n @since 14"]
5175#[cfg(feature = "api-14")]
5176pub type OH_Drawing_SystemFontType = u32;
5177#[doc = " The file path of the font"]
5178#[cfg(feature = "api-22")]
5179pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_PATH:
5180 OH_Drawing_FontFullDescriptorAttributeId = 0;
5181#[doc = " A name that uniquely identifies the font"]
5182#[cfg(feature = "api-22")]
5183pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_POSTSCRIPT_NAME:
5184 OH_Drawing_FontFullDescriptorAttributeId = 1;
5185#[doc = " The full name of the font"]
5186#[cfg(feature = "api-22")]
5187pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_FULL_NAME:
5188 OH_Drawing_FontFullDescriptorAttributeId = 2;
5189#[doc = " The family name of the font"]
5190#[cfg(feature = "api-22")]
5191pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_FAMILY_NAME:
5192 OH_Drawing_FontFullDescriptorAttributeId = 3;
5193#[doc = " The subfont family of the font"]
5194#[cfg(feature = "api-22")]
5195pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_S_SUB_FAMILY_NAME:
5196 OH_Drawing_FontFullDescriptorAttributeId = 4;
5197#[doc = " The weight of the font"]
5198#[cfg(feature = "api-22")]
5199pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_WEIGHT:
5200 OH_Drawing_FontFullDescriptorAttributeId = 5;
5201#[doc = " The width of the font"]
5202#[cfg(feature = "api-22")]
5203pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_WIDTH:
5204 OH_Drawing_FontFullDescriptorAttributeId = 6;
5205#[doc = " Whether the font is tilted"]
5206#[cfg(feature = "api-22")]
5207pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_I_ITALIC:
5208 OH_Drawing_FontFullDescriptorAttributeId = 7;
5209#[doc = " Whether the font is monospaced"]
5210#[cfg(feature = "api-22")]
5211pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_B_MONO:
5212 OH_Drawing_FontFullDescriptorAttributeId = 8;
5213#[doc = " whether symbolic fonts are supported"]
5214#[cfg(feature = "api-22")]
5215pub const OH_Drawing_FontFullDescriptorAttributeId_FULL_DESCRIPTOR_ATTR_B_SYMBOLIC:
5216 OH_Drawing_FontFullDescriptorAttributeId = 9;
5217#[doc = " @brief An enumeration of font full descriptor attribute.\n\n @since 22"]
5218#[cfg(feature = "api-22")]
5219pub type OH_Drawing_FontFullDescriptorAttributeId = u32;
5220extern "C" {
5221 #[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"]
5222 #[cfg(feature = "api-18")]
5223 pub fn OH_Drawing_MatchFontDescriptors(
5224 desc: *mut OH_Drawing_FontDescriptor,
5225 num: *mut usize,
5226 ) -> *mut OH_Drawing_FontDescriptor;
5227}
5228extern "C" {
5229 #[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"]
5230 #[cfg(feature = "api-18")]
5231 pub fn OH_Drawing_DestroyFontDescriptors(
5232 descriptors: *mut OH_Drawing_FontDescriptor,
5233 num: usize,
5234 );
5235}
5236extern "C" {
5237 #[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"]
5238 #[cfg(feature = "api-14")]
5239 pub fn OH_Drawing_GetFontDescriptorByFullName(
5240 fullName: *const OH_Drawing_String,
5241 fontType: OH_Drawing_SystemFontType,
5242 ) -> *mut OH_Drawing_FontDescriptor;
5243}
5244extern "C" {
5245 #[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"]
5246 #[cfg(feature = "api-14")]
5247 pub fn OH_Drawing_GetSystemFontFullNamesByType(
5248 fontType: OH_Drawing_SystemFontType,
5249 ) -> *mut OH_Drawing_Array;
5250}
5251extern "C" {
5252 #[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"]
5253 #[cfg(feature = "api-14")]
5254 pub fn OH_Drawing_GetSystemFontFullNameByIndex(
5255 fullNameArray: *mut OH_Drawing_Array,
5256 index: usize,
5257 ) -> *const OH_Drawing_String;
5258}
5259extern "C" {
5260 #[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"]
5261 #[cfg(feature = "api-14")]
5262 pub fn OH_Drawing_DestroySystemFontFullNames(fullNameArray: *mut OH_Drawing_Array);
5263}
5264extern "C" {
5265 #[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"]
5266 #[cfg(feature = "api-22")]
5267 pub fn OH_Drawing_GetFontFullDescriptorsFromStream(
5268 data: *const ::std::os::raw::c_void,
5269 size: usize,
5270 ) -> *mut OH_Drawing_Array;
5271}
5272extern "C" {
5273 #[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"]
5274 #[cfg(feature = "api-22")]
5275 pub fn OH_Drawing_GetFontFullDescriptorsFromPath(
5276 path: *const ::std::os::raw::c_char,
5277 ) -> *mut OH_Drawing_Array;
5278}
5279extern "C" {
5280 #[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"]
5281 #[cfg(feature = "api-22")]
5282 pub fn OH_Drawing_GetFontFullDescriptorByIndex(
5283 descriptorArray: *mut OH_Drawing_Array,
5284 index: usize,
5285 ) -> *const OH_Drawing_FontFullDescriptor;
5286}
5287extern "C" {
5288 #[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"]
5289 #[cfg(feature = "api-22")]
5290 pub fn OH_Drawing_DestroyFontFullDescriptors(descriptorArray: *mut OH_Drawing_Array);
5291}
5292extern "C" {
5293 #[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"]
5294 #[cfg(feature = "api-22")]
5295 pub fn OH_Drawing_GetFontFullDescriptorAttributeInt(
5296 descriptor: *const OH_Drawing_FontFullDescriptor,
5297 id: OH_Drawing_FontFullDescriptorAttributeId,
5298 value: *mut ::std::os::raw::c_int,
5299 ) -> OH_Drawing_ErrorCode;
5300}
5301extern "C" {
5302 #[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"]
5303 #[cfg(feature = "api-22")]
5304 pub fn OH_Drawing_GetFontFullDescriptorAttributeBool(
5305 descriptor: *const OH_Drawing_FontFullDescriptor,
5306 id: OH_Drawing_FontFullDescriptorAttributeId,
5307 value: *mut bool,
5308 ) -> OH_Drawing_ErrorCode;
5309}
5310extern "C" {
5311 #[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"]
5312 #[cfg(feature = "api-22")]
5313 pub fn OH_Drawing_GetFontFullDescriptorAttributeString(
5314 descriptor: *const OH_Drawing_FontFullDescriptor,
5315 id: OH_Drawing_FontFullDescriptorAttributeId,
5316 str_: *mut OH_Drawing_String,
5317 ) -> OH_Drawing_ErrorCode;
5318}
5319#[doc = " Follow system's high contrast settings for text rendering"]
5320#[cfg(feature = "api-20")]
5321pub const OH_Drawing_TextHighContrast_TEXT_FOLLOW_SYSTEM_HIGH_CONTRAST:
5322 OH_Drawing_TextHighContrast = 0;
5323#[doc = " Disable high contrast rendering regardless of system settings"]
5324#[cfg(feature = "api-20")]
5325pub const OH_Drawing_TextHighContrast_TEXT_APP_DISABLE_HIGH_CONTRAST: OH_Drawing_TextHighContrast =
5326 1;
5327#[doc = " Enable high contrast rendering regardless of system settings"]
5328#[cfg(feature = "api-20")]
5329pub const OH_Drawing_TextHighContrast_TEXT_APP_ENABLE_HIGH_CONTRAST: OH_Drawing_TextHighContrast =
5330 2;
5331#[doc = " @brief Defines text rendering high contrast mode to enhance readability.\n @since 20\n @version 1.0"]
5332#[cfg(feature = "api-20")]
5333pub type OH_Drawing_TextHighContrast = u32;
5334#[doc = " Uses the glyph defined in the font file, which could be an empty box, blank space, or custom symbol etc."]
5335#[cfg(feature = "api-20")]
5336pub const OH_Drawing_TextUndefinedGlyphDisplay_TEXT_NO_GLYPH_USE_DEFAULT:
5337 OH_Drawing_TextUndefinedGlyphDisplay = 0;
5338#[doc = " Always render tofu blocks for missing glyphs."]
5339#[cfg(feature = "api-20")]
5340pub const OH_Drawing_TextUndefinedGlyphDisplay_TEXT_NO_GLYPH_USE_TOFU:
5341 OH_Drawing_TextUndefinedGlyphDisplay = 1;
5342#[doc = " @brief Visual representations for undefined (.notdef) glyphs.\n\n @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing\n @since 20"]
5343#[cfg(feature = "api-20")]
5344pub type OH_Drawing_TextUndefinedGlyphDisplay = u32;
5345extern "C" {
5346 #[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"]
5347 #[cfg(feature = "api-20")]
5348 pub fn OH_Drawing_SetTextHighContrast(action: OH_Drawing_TextHighContrast);
5349}
5350extern "C" {
5351 #[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"]
5352 #[cfg(feature = "api-20")]
5353 pub fn OH_Drawing_SetTextUndefinedGlyphDisplay(
5354 undefinedGlyphDisplay: OH_Drawing_TextUndefinedGlyphDisplay,
5355 );
5356}
5357extern "C" {
5358 #[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"]
5359 #[cfg(feature = "api-18")]
5360 pub fn OH_Drawing_TypographyGetTextLines(
5361 typography: *mut OH_Drawing_Typography,
5362 ) -> *mut OH_Drawing_Array;
5363}
5364extern "C" {
5365 #[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"]
5366 #[cfg(feature = "api-18")]
5367 pub fn OH_Drawing_DestroyTextLines(lines: *mut OH_Drawing_Array);
5368}
5369extern "C" {
5370 #[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"]
5371 #[cfg(feature = "api-18")]
5372 pub fn OH_Drawing_DestroyTextLine(line: *mut OH_Drawing_TextLine);
5373}
5374extern "C" {
5375 #[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"]
5376 #[cfg(feature = "api-18")]
5377 pub fn OH_Drawing_GetTextLineByIndex(
5378 lines: *mut OH_Drawing_Array,
5379 index: usize,
5380 ) -> *mut OH_Drawing_TextLine;
5381}
5382extern "C" {
5383 #[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"]
5384 #[cfg(feature = "api-18")]
5385 pub fn OH_Drawing_TextLineGetGlyphCount(line: *mut OH_Drawing_TextLine) -> f64;
5386}
5387extern "C" {
5388 #[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"]
5389 #[cfg(feature = "api-18")]
5390 pub fn OH_Drawing_TextLineGetTextRange(
5391 line: *mut OH_Drawing_TextLine,
5392 start: *mut usize,
5393 end: *mut usize,
5394 );
5395}
5396extern "C" {
5397 #[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"]
5398 #[cfg(feature = "api-18")]
5399 pub fn OH_Drawing_TextLineGetGlyphRuns(line: *mut OH_Drawing_TextLine)
5400 -> *mut OH_Drawing_Array;
5401}
5402extern "C" {
5403 #[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"]
5404 #[cfg(feature = "api-18")]
5405 pub fn OH_Drawing_DestroyRuns(runs: *mut OH_Drawing_Array);
5406}
5407extern "C" {
5408 #[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"]
5409 #[cfg(feature = "api-18")]
5410 pub fn OH_Drawing_GetRunByIndex(
5411 runs: *mut OH_Drawing_Array,
5412 index: usize,
5413 ) -> *mut OH_Drawing_Run;
5414}
5415extern "C" {
5416 #[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"]
5417 #[cfg(feature = "api-18")]
5418 pub fn OH_Drawing_TextLinePaint(
5419 line: *mut OH_Drawing_TextLine,
5420 canvas: *mut OH_Drawing_Canvas,
5421 x: f64,
5422 y: f64,
5423 );
5424}
5425extern "C" {
5426 #[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"]
5427 #[cfg(feature = "api-18")]
5428 pub fn OH_Drawing_TextLineCreateTruncatedLine(
5429 line: *mut OH_Drawing_TextLine,
5430 width: f64,
5431 mode: ::std::os::raw::c_int,
5432 ellipsis: *const ::std::os::raw::c_char,
5433 ) -> *mut OH_Drawing_TextLine;
5434}
5435extern "C" {
5436 #[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"]
5437 #[cfg(feature = "api-18")]
5438 pub fn OH_Drawing_TextLineGetTypographicBounds(
5439 line: *mut OH_Drawing_TextLine,
5440 ascent: *mut f64,
5441 descent: *mut f64,
5442 leading: *mut f64,
5443 ) -> f64;
5444}
5445extern "C" {
5446 #[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"]
5447 #[cfg(feature = "api-18")]
5448 pub fn OH_Drawing_TextLineGetImageBounds(
5449 line: *mut OH_Drawing_TextLine,
5450 ) -> *mut OH_Drawing_Rect;
5451}
5452extern "C" {
5453 #[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"]
5454 #[cfg(feature = "api-18")]
5455 pub fn OH_Drawing_TextLineGetTrailingSpaceWidth(line: *mut OH_Drawing_TextLine) -> f64;
5456}
5457extern "C" {
5458 #[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"]
5459 #[cfg(feature = "api-18")]
5460 pub fn OH_Drawing_TextLineGetStringIndexForPosition(
5461 line: *mut OH_Drawing_TextLine,
5462 point: *mut OH_Drawing_Point,
5463 ) -> i32;
5464}
5465extern "C" {
5466 #[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"]
5467 #[cfg(feature = "api-18")]
5468 pub fn OH_Drawing_TextLineGetOffsetForStringIndex(
5469 line: *mut OH_Drawing_TextLine,
5470 index: i32,
5471 ) -> f64;
5472}
5473#[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"]
5474#[cfg(feature = "api-18")]
5475pub type Drawing_CaretOffsetsCallback =
5476 ::std::option::Option<unsafe extern "C" fn(offset: f64, index: i32, leadingEdge: bool) -> bool>;
5477extern "C" {
5478 #[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"]
5479 #[cfg(feature = "api-18")]
5480 pub fn OH_Drawing_TextLineEnumerateCaretOffsets(
5481 line: *mut OH_Drawing_TextLine,
5482 callback: Drawing_CaretOffsetsCallback,
5483 );
5484}
5485extern "C" {
5486 #[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"]
5487 #[cfg(feature = "api-18")]
5488 pub fn OH_Drawing_TextLineGetAlignmentOffset(
5489 line: *mut OH_Drawing_TextLine,
5490 alignmentFactor: f64,
5491 alignmentWidth: f64,
5492 ) -> f64;
5493}
5494extern "C" {
5495 #[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"]
5496 #[cfg(feature = "api-18")]
5497 pub fn OH_Drawing_CreateLineTypography(
5498 handler: *mut OH_Drawing_TypographyCreate,
5499 ) -> *mut OH_Drawing_LineTypography;
5500}
5501extern "C" {
5502 #[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"]
5503 #[cfg(feature = "api-18")]
5504 pub fn OH_Drawing_DestroyLineTypography(lineTypography: *mut OH_Drawing_LineTypography);
5505}
5506extern "C" {
5507 #[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"]
5508 #[cfg(feature = "api-18")]
5509 pub fn OH_Drawing_LineTypographyGetLineBreak(
5510 lineTypography: *mut OH_Drawing_LineTypography,
5511 startIndex: usize,
5512 width: f64,
5513 ) -> usize;
5514}
5515extern "C" {
5516 #[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"]
5517 #[cfg(feature = "api-18")]
5518 pub fn OH_Drawing_LineTypographyCreateLine(
5519 lineTypography: *mut OH_Drawing_LineTypography,
5520 startIndex: usize,
5521 count: usize,
5522 ) -> *mut OH_Drawing_TextLine;
5523}
5524extern "C" {
5525 #[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"]
5526 #[cfg(feature = "api-18")]
5527 pub fn OH_Drawing_GetRunStringIndices(
5528 run: *mut OH_Drawing_Run,
5529 start: i64,
5530 length: i64,
5531 ) -> *mut OH_Drawing_Array;
5532}
5533extern "C" {
5534 #[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"]
5535 #[cfg(feature = "api-18")]
5536 pub fn OH_Drawing_GetRunStringIndicesByIndex(
5537 stringIndices: *mut OH_Drawing_Array,
5538 index: usize,
5539 ) -> u64;
5540}
5541extern "C" {
5542 #[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"]
5543 #[cfg(feature = "api-18")]
5544 pub fn OH_Drawing_DestroyRunStringIndices(stringIndices: *mut OH_Drawing_Array);
5545}
5546extern "C" {
5547 #[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"]
5548 #[cfg(feature = "api-18")]
5549 pub fn OH_Drawing_GetRunStringRange(
5550 run: *mut OH_Drawing_Run,
5551 location: *mut u64,
5552 length: *mut u64,
5553 );
5554}
5555extern "C" {
5556 #[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"]
5557 #[cfg(feature = "api-18")]
5558 pub fn OH_Drawing_GetRunTypographicBounds(
5559 run: *mut OH_Drawing_Run,
5560 ascent: *mut f32,
5561 descent: *mut f32,
5562 leading: *mut f32,
5563 ) -> f32;
5564}
5565extern "C" {
5566 #[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"]
5567 #[cfg(feature = "api-18")]
5568 pub fn OH_Drawing_RunPaint(
5569 canvas: *mut OH_Drawing_Canvas,
5570 run: *mut OH_Drawing_Run,
5571 x: f64,
5572 y: f64,
5573 );
5574}
5575extern "C" {
5576 #[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"]
5577 #[cfg(feature = "api-18")]
5578 pub fn OH_Drawing_GetRunImageBounds(run: *mut OH_Drawing_Run) -> *mut OH_Drawing_Rect;
5579}
5580extern "C" {
5581 #[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"]
5582 #[cfg(feature = "api-18")]
5583 pub fn OH_Drawing_DestroyRunImageBounds(rect: *mut OH_Drawing_Rect);
5584}
5585extern "C" {
5586 #[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"]
5587 #[cfg(feature = "api-18")]
5588 pub fn OH_Drawing_GetRunGlyphs(
5589 run: *mut OH_Drawing_Run,
5590 start: i64,
5591 length: i64,
5592 ) -> *mut OH_Drawing_Array;
5593}
5594extern "C" {
5595 #[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"]
5596 #[cfg(feature = "api-18")]
5597 pub fn OH_Drawing_GetRunGlyphsByIndex(glyphs: *mut OH_Drawing_Array, index: usize) -> u16;
5598}
5599extern "C" {
5600 #[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"]
5601 #[cfg(feature = "api-18")]
5602 pub fn OH_Drawing_DestroyRunGlyphs(glyphs: *mut OH_Drawing_Array);
5603}
5604extern "C" {
5605 #[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"]
5606 #[cfg(feature = "api-18")]
5607 pub fn OH_Drawing_GetRunPositions(
5608 run: *mut OH_Drawing_Run,
5609 start: i64,
5610 length: i64,
5611 ) -> *mut OH_Drawing_Array;
5612}
5613extern "C" {
5614 #[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"]
5615 #[cfg(feature = "api-18")]
5616 pub fn OH_Drawing_GetRunPositionsByIndex(
5617 positions: *mut OH_Drawing_Array,
5618 index: usize,
5619 ) -> *mut OH_Drawing_Point;
5620}
5621extern "C" {
5622 #[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"]
5623 #[cfg(feature = "api-18")]
5624 pub fn OH_Drawing_DestroyRunPositions(positions: *mut OH_Drawing_Array);
5625}
5626extern "C" {
5627 #[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"]
5628 #[cfg(feature = "api-18")]
5629 pub fn OH_Drawing_GetRunGlyphCount(run: *mut OH_Drawing_Run) -> u32;
5630}
5631extern "C" {
5632 #[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"]
5633 #[cfg(feature = "api-20")]
5634 pub fn OH_Drawing_GetRunFont(run: *mut OH_Drawing_Run) -> *mut OH_Drawing_Font;
5635}
5636extern "C" {
5637 #[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"]
5638 #[cfg(feature = "api-20")]
5639 pub fn OH_Drawing_GetRunTextDirection(run: *mut OH_Drawing_Run) -> OH_Drawing_TextDirection;
5640}
5641extern "C" {
5642 #[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"]
5643 #[cfg(feature = "api-20")]
5644 pub fn OH_Drawing_GetRunGlyphAdvances(
5645 run: *mut OH_Drawing_Run,
5646 start: u32,
5647 length: u32,
5648 ) -> *mut OH_Drawing_Array;
5649}
5650extern "C" {
5651 #[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"]
5652 #[cfg(feature = "api-20")]
5653 pub fn OH_Drawing_GetRunGlyphAdvanceByIndex(
5654 advances: *mut OH_Drawing_Array,
5655 index: usize,
5656 ) -> *mut OH_Drawing_Point;
5657}
5658extern "C" {
5659 #[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"]
5660 #[cfg(feature = "api-20")]
5661 pub fn OH_Drawing_DestroyRunGlyphAdvances(advances: *mut OH_Drawing_Array);
5662}
5663extern "C" {
5664 #[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"]
5665 pub fn OH_Drawing_TypefaceCreateDefault() -> *mut OH_Drawing_Typeface;
5666}
5667extern "C" {
5668 #[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"]
5669 pub fn OH_Drawing_TypefaceCreateFromFile(
5670 path: *const ::std::os::raw::c_char,
5671 index: ::std::os::raw::c_int,
5672 ) -> *mut OH_Drawing_Typeface;
5673}
5674extern "C" {
5675 #[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"]
5676 #[cfg(feature = "api-13")]
5677 pub fn OH_Drawing_TypefaceCreateFromFileWithArguments(
5678 path: *const ::std::os::raw::c_char,
5679 fontArguments: *const OH_Drawing_FontArguments,
5680 ) -> *mut OH_Drawing_Typeface;
5681}
5682extern "C" {
5683 #[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"]
5684 #[cfg(feature = "api-13")]
5685 pub fn OH_Drawing_TypefaceCreateFromCurrent(
5686 current: *const OH_Drawing_Typeface,
5687 fontArguments: *const OH_Drawing_FontArguments,
5688 ) -> *mut OH_Drawing_Typeface;
5689}
5690extern "C" {
5691 #[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"]
5692 pub fn OH_Drawing_TypefaceCreateFromStream(
5693 memoryStream: *mut OH_Drawing_MemoryStream,
5694 index: i32,
5695 ) -> *mut OH_Drawing_Typeface;
5696}
5697extern "C" {
5698 #[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"]
5699 pub fn OH_Drawing_TypefaceDestroy(typeface: *mut OH_Drawing_Typeface);
5700}
5701extern "C" {
5702 #[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"]
5703 #[cfg(feature = "api-13")]
5704 pub fn OH_Drawing_FontArgumentsCreate() -> *mut OH_Drawing_FontArguments;
5705}
5706extern "C" {
5707 #[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"]
5708 #[cfg(feature = "api-13")]
5709 pub fn OH_Drawing_FontArgumentsAddVariation(
5710 fontArguments: *mut OH_Drawing_FontArguments,
5711 axis: *const ::std::os::raw::c_char,
5712 value: f32,
5713 ) -> OH_Drawing_ErrorCode;
5714}
5715extern "C" {
5716 #[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"]
5717 #[cfg(feature = "api-13")]
5718 pub fn OH_Drawing_FontArgumentsDestroy(
5719 fontArguments: *mut OH_Drawing_FontArguments,
5720 ) -> OH_Drawing_ErrorCode;
5721}