Skip to main content

ohos_drawing_sys/path/
path_ffi.rs

1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6use crate::types::*;
7
8#[cfg(feature = "api-12")]
9#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
10impl OH_Drawing_PathDirection {
11    /// clockwise direction for adding closed contours
12    pub const PATH_DIRECTION_CW: OH_Drawing_PathDirection = OH_Drawing_PathDirection(0);
13    /// counter-clockwise direction for adding closed contours
14    pub const PATH_DIRECTION_CCW: OH_Drawing_PathDirection = OH_Drawing_PathDirection(1);
15}
16#[repr(transparent)]
17/// Direction for adding closed contours.
18///
19///
20/// Available since API-level: 12
21///
22/// Version: 1.0
23#[cfg(feature = "api-12")]
24#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
25#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
26pub struct OH_Drawing_PathDirection(pub ::core::ffi::c_uint);
27#[cfg(feature = "api-12")]
28#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
29impl OH_Drawing_PathFillType {
30    /// Specifies that "inside" is computed by a non-zero sum of signed edge crossings
31    pub const PATH_FILL_TYPE_WINDING: OH_Drawing_PathFillType = OH_Drawing_PathFillType(0);
32    /// Specifies that "inside" is computed by an odd number of edge crossings
33    pub const PATH_FILL_TYPE_EVEN_ODD: OH_Drawing_PathFillType = OH_Drawing_PathFillType(1);
34    /// Same as Winding, but draws outside of the path, rather than inside
35    pub const PATH_FILL_TYPE_INVERSE_WINDING: OH_Drawing_PathFillType = OH_Drawing_PathFillType(2);
36    /// Same as EvenOdd, but draws outside of the path, rather than inside
37    pub const PATH_FILL_TYPE_INVERSE_EVEN_ODD: OH_Drawing_PathFillType = OH_Drawing_PathFillType(3);
38}
39#[repr(transparent)]
40/// FillType of path.
41///
42///
43/// Available since API-level: 12
44///
45/// Version: 1.0
46#[cfg(feature = "api-12")]
47#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
48#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
49pub struct OH_Drawing_PathFillType(pub ::core::ffi::c_uint);
50#[cfg(feature = "api-12")]
51#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
52impl OH_Drawing_PathAddMode {
53    /// Appended to destination unaltered
54    pub const PATH_ADD_MODE_APPEND: OH_Drawing_PathAddMode = OH_Drawing_PathAddMode(0);
55    /// Add line if prior contour is not closed
56    pub const PATH_ADD_MODE_EXTEND: OH_Drawing_PathAddMode = OH_Drawing_PathAddMode(1);
57}
58#[repr(transparent)]
59/// Add mode of path.
60///
61///
62/// Available since API-level: 12
63///
64/// Version: 1.0
65#[cfg(feature = "api-12")]
66#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
67#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
68pub struct OH_Drawing_PathAddMode(pub ::core::ffi::c_uint);
69#[cfg(feature = "api-12")]
70#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
71impl OH_Drawing_PathOpMode {
72    /// Difference operation.
73    pub const PATH_OP_MODE_DIFFERENCE: OH_Drawing_PathOpMode = OH_Drawing_PathOpMode(0);
74    /// Intersect operation.
75    pub const PATH_OP_MODE_INTERSECT: OH_Drawing_PathOpMode = OH_Drawing_PathOpMode(1);
76    /// Union operation.
77    pub const PATH_OP_MODE_UNION: OH_Drawing_PathOpMode = OH_Drawing_PathOpMode(2);
78    /// Xor operation.
79    pub const PATH_OP_MODE_XOR: OH_Drawing_PathOpMode = OH_Drawing_PathOpMode(3);
80    /// Reverse difference operation.
81    pub const PATH_OP_MODE_REVERSE_DIFFERENCE: OH_Drawing_PathOpMode = OH_Drawing_PathOpMode(4);
82}
83#[repr(transparent)]
84/// Operations when two paths are combined.
85///
86///
87/// Available since API-level: 12
88///
89/// Version: 1.0
90#[cfg(feature = "api-12")]
91#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
92#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
93pub struct OH_Drawing_PathOpMode(pub ::core::ffi::c_uint);
94#[cfg(feature = "api-12")]
95#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
96impl OH_Drawing_PathMeasureMatrixFlags {
97    /// Gets position.
98    pub const GET_POSITION_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
99        OH_Drawing_PathMeasureMatrixFlags(0);
100    /// Gets tangent.
101    pub const GET_TANGENT_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
102        OH_Drawing_PathMeasureMatrixFlags(1);
103    /// Gets both position and tangent.
104    pub const GET_POSITION_AND_TANGENT_MATRIX: OH_Drawing_PathMeasureMatrixFlags =
105        OH_Drawing_PathMeasureMatrixFlags(2);
106}
107#[repr(transparent)]
108/// Enumerates the matrix information corresponding to the path measurements.
109///
110///
111/// Available since API-level: 12
112///
113/// Version: 1.0
114#[cfg(feature = "api-12")]
115#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
116#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
117pub struct OH_Drawing_PathMeasureMatrixFlags(pub ::core::ffi::c_uint);
118extern "C" {
119    /// Creates an <b>OH_Drawing_Path</b> object.
120    ///
121    ///
122    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
123    ///
124    /// # Returns
125    ///
126    /// * Returns the pointer to the <b>OH_Drawing_Path</b> object created.
127    ///
128    /// Available since API-level: 8
129    ///
130    /// Version: 1.0
131    pub fn OH_Drawing_PathCreate() -> *mut OH_Drawing_Path;
132    /// Creates an <b>OH_Drawing_Path</b> copy object.
133    ///
134    ///
135    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
136    /// # Arguments
137    ///
138    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
139    ///
140    /// # Returns
141    ///
142    /// * Returns the pointer to the <b>OH_Drawing_Path</b> object created.
143    ///
144    /// Available since API-level: 12
145    ///
146    /// Version: 1.0
147    #[cfg(feature = "api-12")]
148    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
149    pub fn OH_Drawing_PathCopy(path: *mut OH_Drawing_Path) -> *mut OH_Drawing_Path;
150    /// Destroys an <b>OH_Drawing_Path</b> object and reclaims the memory occupied by the object.
151    ///
152    ///
153    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
154    /// # Arguments
155    ///
156    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
157    ///
158    /// Available since API-level: 8
159    ///
160    /// Version: 1.0
161    pub fn OH_Drawing_PathDestroy(path: *mut OH_Drawing_Path);
162    /// Sets <b>OH_Drawing_Path</b> object with the same content of another.
163    ///
164    ///
165    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
166    /// # Arguments
167    ///
168    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
169    ///
170    /// * `other` - Indicates the pointer to an <b>OH_Drawing_Path</b> object to copy content from.
171    ///
172    /// # Returns
173    ///
174    /// * Returns the error code.
175    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
176    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if path or other is nullptr.
177    ///
178    /// Available since API-level: 20
179    ///
180    /// Version: 1.0
181    #[cfg(feature = "api-20")]
182    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
183    pub fn OH_Drawing_PathSetPath(
184        path: *mut OH_Drawing_Path,
185        other: *mut OH_Drawing_Path,
186    ) -> crate::error_code::DrawingResult;
187    /// Checks if <b>OH_Drawing_Path</b> object is empty.
188    ///
189    ///
190    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
191    /// # Arguments
192    ///
193    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
194    ///
195    /// * `isEmpty` - Indicates the return value.
196    ///
197    /// # Returns
198    ///
199    /// * Returns the error code.
200    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
201    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if path or isEmpty is nullptr.
202    ///
203    /// Available since API-level: 20
204    ///
205    /// Version: 1.0
206    #[cfg(feature = "api-20")]
207    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
208    pub fn OH_Drawing_PathIsEmpty(
209        path: *mut OH_Drawing_Path,
210        isEmpty: *mut bool,
211    ) -> crate::error_code::DrawingResult;
212    /// Checks if <b>OH_Drawing_Path</b> represents a rectangle.
213    ///
214    ///
215    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
216    /// # Arguments
217    ///
218    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
219    ///
220    /// * `rect` - Indicates the Pointer to an <b>OH_Drawing_Rect</b> object.
221    ///
222    /// * `isRect` - Indicates the return value.
223    ///
224    /// # Returns
225    ///
226    /// * Returns the error code.
227    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
228    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if path or isRect is nullptr.
229    ///
230    /// Available since API-level: 20
231    ///
232    /// Version: 1.0
233    #[cfg(feature = "api-20")]
234    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
235    pub fn OH_Drawing_PathIsRect(
236        path: *mut OH_Drawing_Path,
237        rect: *mut OH_Drawing_Rect,
238        isRect: *mut bool,
239    ) -> crate::error_code::DrawingResult;
240    /// Sets the start point of a path.
241    ///
242    ///
243    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
244    /// # Arguments
245    ///
246    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
247    ///
248    /// * `x` - Indicates the x coordinate of the start point.
249    ///
250    /// * `y` - Indicates the y coordinate of the start point.
251    ///
252    /// Available since API-level: 8
253    ///
254    /// Version: 1.0
255    pub fn OH_Drawing_PathMoveTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
256    /// Draws a line segment from the last point of a path to the target point.
257    ///
258    ///
259    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
260    /// # Arguments
261    ///
262    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
263    ///
264    /// * `x` - Indicates the x coordinate of the target point.
265    ///
266    /// * `y` - Indicates the y coordinate of the target point.
267    ///
268    /// Available since API-level: 8
269    ///
270    /// Version: 1.0
271    pub fn OH_Drawing_PathLineTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
272    /// Draws an arc to a path.
273    ///
274    /// This is done by using angle arc mode. In this mode, a rectangle that encloses an ellipse is specified first,
275    /// and then a start angle and a sweep angle are specified.
276    /// The arc is a portion of the ellipse defined by the start angle and the sweep angle.
277    /// By default, a line segment from the last point of the path to the start point of the arc is also added.
278    ///
279    ///
280    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
281    /// # Arguments
282    ///
283    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
284    ///
285    /// * `x1` - Indicates the x coordinate of the upper left corner of the rectangle.
286    ///
287    /// * `y1` - Indicates the y coordinate of the upper left corner of the rectangle.
288    ///
289    /// * `x2` - Indicates the x coordinate of the lower right corner of the rectangle.
290    ///
291    /// * `y2` - Indicates the y coordinate of the lower right corner of the rectangle.
292    ///
293    /// * `startDeg` - Indicates the start angle, in degrees.
294    ///
295    /// * `sweepDeg` - Indicates the angle to sweep, in degrees.
296    ///
297    /// Available since API-level: 8
298    ///
299    /// Version: 1.0
300    pub fn OH_Drawing_PathArcTo(
301        path: *mut OH_Drawing_Path,
302        x1: f32,
303        y1: f32,
304        x2: f32,
305        y2: f32,
306        startDeg: f32,
307        sweepDeg: f32,
308    );
309    /// Draws a quadratic Bezier curve from the last point of a path to the target point.
310    ///
311    ///
312    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
313    /// # Arguments
314    ///
315    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
316    ///
317    /// * `ctrlX` - Indicates the x coordinate of the control point.
318    ///
319    /// * `ctrlY` - Indicates the y coordinate of the control point.
320    ///
321    /// * `endX` - Indicates the x coordinate of the target point.
322    ///
323    /// * `endY` - Indicates the y coordinate of the target point.
324    ///
325    /// Available since API-level: 8
326    ///
327    /// Version: 1.0
328    pub fn OH_Drawing_PathQuadTo(
329        path: *mut OH_Drawing_Path,
330        ctrlX: f32,
331        ctrlY: f32,
332        endX: f32,
333        endY: f32,
334    );
335    /// Draws a conic from the last point of a path to the target point.
336    ///
337    ///
338    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
339    /// # Arguments
340    ///
341    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
342    ///
343    /// * `ctrlX` - Indicates the x coordinate of the control point.
344    ///
345    /// * `ctrlY` - Indicates the y coordinate of the control point.
346    ///
347    /// * `endX` - Indicates the x coordinate of the target point.
348    ///
349    /// * `endY` - Indicates the y coordinate of the target point.
350    ///
351    /// * `weight` - Indicates the weight of added conic.
352    ///
353    /// Available since API-level: 12
354    ///
355    /// Version: 1.0
356    #[cfg(feature = "api-12")]
357    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
358    pub fn OH_Drawing_PathConicTo(
359        path: *mut OH_Drawing_Path,
360        ctrlX: f32,
361        ctrlY: f32,
362        endX: f32,
363        endY: f32,
364        weight: f32,
365    );
366    /// Draws a cubic Bezier curve from the last point of a path to the target point.
367    ///
368    ///
369    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
370    /// # Arguments
371    ///
372    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
373    ///
374    /// * `ctrlX1` - Indicates the x coordinate of the first control point.
375    ///
376    /// * `ctrlY1` - Indicates the y coordinate of the first control point.
377    ///
378    /// * `ctrlX2` - Indicates the x coordinate of the second control point.
379    ///
380    /// * `ctrlY2` - Indicates the y coordinate of the second control point.
381    ///
382    /// * `endX` - Indicates the x coordinate of the target point.
383    ///
384    /// * `endY` - Indicates the y coordinate of the target point.
385    ///
386    /// Available since API-level: 8
387    ///
388    /// Version: 1.0
389    pub fn OH_Drawing_PathCubicTo(
390        path: *mut OH_Drawing_Path,
391        ctrlX1: f32,
392        ctrlY1: f32,
393        ctrlX2: f32,
394        ctrlY2: f32,
395        endX: f32,
396        endY: f32,
397    );
398    /// Sets the relative starting point of a path.
399    ///
400    ///
401    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
402    /// # Arguments
403    ///
404    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
405    ///
406    /// * `x` - Indicates the x coordinate of the relative starting point.
407    ///
408    /// * `y` - Indicates the y coordinate of the relative starting point.
409    ///
410    /// Available since API-level: 12
411    ///
412    /// Version: 1.0
413    #[cfg(feature = "api-12")]
414    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
415    pub fn OH_Drawing_PathRMoveTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
416    /// Draws a line segment from the last point of a path to the relative target point.
417    ///
418    ///
419    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
420    /// # Arguments
421    ///
422    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
423    ///
424    /// * `x` - Indicates the x coordinate of the relative target point.
425    ///
426    /// * `y` - Indicates the y coordinate of the relative target point.
427    ///
428    /// Available since API-level: 12
429    ///
430    /// Version: 1.0
431    #[cfg(feature = "api-12")]
432    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
433    pub fn OH_Drawing_PathRLineTo(path: *mut OH_Drawing_Path, x: f32, y: f32);
434    /// Draws a quadratic bezier curve from the last point of a path to the relative target point.
435    ///
436    ///
437    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
438    /// # Arguments
439    ///
440    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
441    ///
442    /// * `ctrlX` - Indicates the x coordinate of the relative control point.
443    ///
444    /// * `ctrlY` - Indicates the y coordinate of the relative control point.
445    ///
446    /// * `endX` - Indicates the x coordinate of the relative target point.
447    ///
448    /// * `endY` - Indicates the y coordinate of the relative target point.
449    ///
450    /// Available since API-level: 12
451    ///
452    /// Version: 1.0
453    #[cfg(feature = "api-12")]
454    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
455    pub fn OH_Drawing_PathRQuadTo(
456        path: *mut OH_Drawing_Path,
457        ctrlX: f32,
458        ctrlY: f32,
459        endX: f32,
460        endY: f32,
461    );
462    /// Draws a conic from the last point of a path to the relative target point.
463    ///
464    ///
465    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
466    /// # Arguments
467    ///
468    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
469    ///
470    /// * `ctrlX` - Indicates the x coordinate of the relative control point.
471    ///
472    /// * `ctrlY` - Indicates the y coordinate of the relative control point.
473    ///
474    /// * `endX` - Indicates the x coordinate of the relative target point.
475    ///
476    /// * `endY` - Indicates the y coordinate of the relative target point.
477    ///
478    /// * `weight` - Indicates the weight of added conic.
479    ///
480    /// Available since API-level: 12
481    ///
482    /// Version: 1.0
483    #[cfg(feature = "api-12")]
484    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
485    pub fn OH_Drawing_PathRConicTo(
486        path: *mut OH_Drawing_Path,
487        ctrlX: f32,
488        ctrlY: f32,
489        endX: f32,
490        endY: f32,
491        weight: f32,
492    );
493    /// Draws a cubic bezier curve from the last point of a path to the relative target point.
494    ///
495    ///
496    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
497    /// # Arguments
498    ///
499    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
500    ///
501    /// * `ctrlX1` - Indicates the x coordinate of the first relative control point.
502    ///
503    /// * `ctrlY1` - Indicates the y coordinate of the first relative control point.
504    ///
505    /// * `ctrlX2` - Indicates the x coordinate of the second relative control point.
506    ///
507    /// * `ctrlY2` - Indicates the y coordinate of the second relative control point.
508    ///
509    /// * `endX` - Indicates the x coordinate of the relative target point.
510    ///
511    /// * `endY` - Indicates the y coordinate of the relative target point.
512    ///
513    /// Available since API-level: 12
514    ///
515    /// Version: 1.0
516    #[cfg(feature = "api-12")]
517    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
518    pub fn OH_Drawing_PathRCubicTo(
519        path: *mut OH_Drawing_Path,
520        ctrlX1: f32,
521        ctrlY1: f32,
522        ctrlX2: f32,
523        ctrlY2: f32,
524        endX: f32,
525        endY: f32,
526    );
527    /// Adds a new contour to the path, defined by the rect, and wound in the specified direction.
528    ///
529    ///
530    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
531    /// # Arguments
532    ///
533    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
534    ///
535    /// * `left` - Indicates the left coordinate of the upper left corner of the rectangle.
536    ///
537    /// * `top` - Indicates the top coordinate of the upper top corner of the rectangle.
538    ///
539    /// * `right` - Indicates the right coordinate of the lower right corner of the rectangle.
540    ///
541    /// * `bottom` - Indicates the bottom coordinate of the lower bottom corner of the rectangle.
542    ///
543    /// * `pathDirection` - Indicates the path direction.
544    ///
545    /// Available since API-level: 12
546    ///
547    /// Version: 1.0
548    #[cfg(feature = "api-12")]
549    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
550    pub fn OH_Drawing_PathAddRect(
551        path: *mut OH_Drawing_Path,
552        left: f32,
553        top: f32,
554        right: f32,
555        bottom: f32,
556        pathDirection: OH_Drawing_PathDirection,
557    );
558    /// Adds a new contour to the path, defined by the rect, and wound in the specified direction.
559    ///
560    ///
561    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
562    /// # Arguments
563    ///
564    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
565    ///
566    /// * `rect` - Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
567    ///
568    /// * `pathDirection` - Indicates the path direction.
569    ///
570    /// * `start` - Indicates initial corner of rect to add.
571    ///
572    /// Available since API-level: 12
573    ///
574    /// Version: 1.0
575    #[cfg(feature = "api-12")]
576    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
577    pub fn OH_Drawing_PathAddRectWithInitialCorner(
578        path: *mut OH_Drawing_Path,
579        rect: *const OH_Drawing_Rect,
580        pathDirection: OH_Drawing_PathDirection,
581        start: u32,
582    );
583    /// Adds a new contour to the path, defined by the round rect, and wound in the specified direction.
584    ///
585    ///
586    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
587    /// # Arguments
588    ///
589    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
590    ///
591    /// * `roundRect` - Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
592    ///
593    /// * `pathDirection` - Indicates the path direction.
594    ///
595    /// Available since API-level: 12
596    ///
597    /// Version: 1.0
598    #[cfg(feature = "api-12")]
599    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
600    pub fn OH_Drawing_PathAddRoundRect(
601        path: *mut OH_Drawing_Path,
602        roundRect: *const OH_Drawing_RoundRect,
603        pathDirection: OH_Drawing_PathDirection,
604    );
605    /// Adds a oval to the path, defined by the rect, and wound in the specified direction.
606    ///
607    ///
608    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
609    /// # Arguments
610    ///
611    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
612    ///
613    /// * `rect` - Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
614    ///
615    /// * `start` - Index of initial point of ellipse.
616    ///
617    /// * `pathDirection` - Indicates the path direction.
618    ///
619    /// Available since API-level: 12
620    ///
621    /// Version: 1.0
622    #[cfg(feature = "api-12")]
623    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
624    pub fn OH_Drawing_PathAddOvalWithInitialPoint(
625        path: *mut OH_Drawing_Path,
626        rect: *const OH_Drawing_Rect,
627        start: u32,
628        pathDirection: OH_Drawing_PathDirection,
629    );
630    /// Adds a oval to the path, defined by the rect, and wound in the specified direction.
631    ///
632    ///
633    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
634    /// # Arguments
635    ///
636    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
637    ///
638    /// * `rect` - Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
639    ///
640    /// * `pathDirection` - Indicates the path direction.
641    ///
642    /// Available since API-level: 12
643    ///
644    /// Version: 1.0
645    #[cfg(feature = "api-12")]
646    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
647    pub fn OH_Drawing_PathAddOval(
648        path: *mut OH_Drawing_Path,
649        rect: *const OH_Drawing_Rect,
650        pathDirection: OH_Drawing_PathDirection,
651    );
652    /// Appends arc to path, as the start of new contour.Arc added is part of ellipse bounded by oval,
653    /// from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees
654    /// is aligned with the positive x-axis, and positive sweeps extends arc clockwise.If sweepAngle <= -360, or
655    /// sweepAngle >= 360; and startAngle modulo 90 is nearly zero, append oval instead of arc. Otherwise, sweepAngle
656    /// values are treated modulo 360, and arc may or may not draw depending on numeric rounding.
657    ///
658    ///
659    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
660    /// # Arguments
661    ///
662    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
663    ///
664    /// * `rect` - Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
665    ///
666    /// * `startAngle` - Indicates the starting angle of arc in degrees.
667    ///
668    /// * `sweepAngle` - Indicates the sweep, in degrees. Positive is clockwise.
669    ///
670    /// Available since API-level: 12
671    ///
672    /// Version: 1.0
673    #[cfg(feature = "api-12")]
674    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
675    pub fn OH_Drawing_PathAddArc(
676        path: *mut OH_Drawing_Path,
677        rect: *const OH_Drawing_Rect,
678        startAngle: f32,
679        sweepAngle: f32,
680    );
681    /// Appends src path to path, transformed by matrix. Transformed curves may have different verbs,
682    /// point, and conic weights.
683    ///
684    ///
685    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
686    /// # Arguments
687    ///
688    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
689    ///
690    /// * `src` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
691    ///
692    /// * `matrix` - Indicates the length of the <b>OH_Drawing_Matrix</b> object.
693    ///
694    /// Available since API-level: 12
695    ///
696    /// Version: 1.0
697    #[cfg(feature = "api-12")]
698    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
699    pub fn OH_Drawing_PathAddPath(
700        path: *mut OH_Drawing_Path,
701        src: *const OH_Drawing_Path,
702        matrix: *const OH_Drawing_Matrix,
703    );
704    /// Appends src path to path, transformed by matrix and mode. Transformed curves may have different verbs,
705    /// point, and conic weights.
706    ///
707    ///
708    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
709    /// # Arguments
710    ///
711    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
712    ///
713    /// * `src` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
714    ///
715    /// * `matrix` - Indicates the length of the <b>OH_Drawing_Matrix</b> object.
716    ///
717    /// * `pathAddMode` - Indicates the add path's add mode.
718    ///
719    /// Available since API-level: 12
720    ///
721    /// Version: 1.0
722    #[cfg(feature = "api-12")]
723    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
724    pub fn OH_Drawing_PathAddPathWithMatrixAndMode(
725        path: *mut OH_Drawing_Path,
726        src: *const OH_Drawing_Path,
727        matrix: *const OH_Drawing_Matrix,
728        pathAddMode: OH_Drawing_PathAddMode,
729    );
730    /// Appends src path to path, transformed by mode. Transformed curves may have different verbs,
731    /// point, and conic weights.
732    ///
733    ///
734    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
735    /// # Arguments
736    ///
737    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
738    ///
739    /// * `src` - Indicates the pointer to an <b>OH_Drawing_Path</b> object, which is Appends src path to path.
740    ///
741    /// * `pathAddMode` - Indicates the add path's add mode.
742    ///
743    /// Available since API-level: 12
744    ///
745    /// Version: 1.0
746    #[cfg(feature = "api-12")]
747    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
748    pub fn OH_Drawing_PathAddPathWithMode(
749        path: *mut OH_Drawing_Path,
750        src: *const OH_Drawing_Path,
751        pathAddMode: OH_Drawing_PathAddMode,
752    );
753    /// Appends src path to path, transformed by offset and mode. Transformed curves may have different verbs,
754    /// point, and conic weights.
755    ///
756    ///
757    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
758    /// # Arguments
759    ///
760    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
761    ///
762    /// * `src` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
763    ///
764    /// * `dx` - Indicates offset added to src path x-axis coordinates.
765    ///
766    /// * `dy` - Indicates offset added to src path y-axis coordinates.
767    ///
768    /// * `pathAddMode` - Indicates the add path's add mode.
769    ///
770    /// Available since API-level: 12
771    ///
772    /// Version: 1.0
773    #[cfg(feature = "api-12")]
774    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
775    pub fn OH_Drawing_PathAddPathWithOffsetAndMode(
776        path: *mut OH_Drawing_Path,
777        src: *const OH_Drawing_Path,
778        dx: f32,
779        dy: f32,
780        pathAddMode: OH_Drawing_PathAddMode,
781    );
782    /// Adds contour created from point array, adding (count - 1) line segments.
783    ///
784    ///
785    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
786    /// # Arguments
787    ///
788    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
789    ///
790    /// * `points` - Indicates the point array.
791    ///
792    /// * `count` - Indicates the size of point array.
793    ///
794    /// * `isClosed` - Indicates Whether to add lines that connect the end and start.
795    ///
796    /// Available since API-level: 12
797    ///
798    /// Version: 1.0
799    #[cfg(feature = "api-12")]
800    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
801    pub fn OH_Drawing_PathAddPolygon(
802        path: *mut OH_Drawing_Path,
803        points: *const OH_Drawing_Point2D,
804        count: u32,
805        isClosed: bool,
806    );
807    /// Adds a circle to the path, and wound in the specified direction.
808    ///
809    ///
810    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
811    /// # Arguments
812    ///
813    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
814    ///
815    /// * `x` - Indicates the x coordinate of the center of the circle.
816    ///
817    /// * `y` - Indicates the y coordinate of the center of the circle.
818    ///
819    /// * `radius` - Indicates the radius of the circle.
820    ///
821    /// * `pathDirection` - Indicates the path direction.
822    ///
823    /// Available since API-level: 12
824    ///
825    /// Version: 1.0
826    #[cfg(feature = "api-12")]
827    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
828    pub fn OH_Drawing_PathAddCircle(
829        path: *mut OH_Drawing_Path,
830        x: f32,
831        y: f32,
832        radius: f32,
833        pathDirection: OH_Drawing_PathDirection,
834    );
835    /// Parses the svg path from the string.
836    ///
837    ///
838    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
839    /// # Arguments
840    ///
841    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
842    ///
843    /// * `str` - Indicates the string of the SVG path.
844    ///
845    /// # Returns
846    ///
847    /// * Returns true if build path is successful, returns false otherwise.
848    ///
849    /// Available since API-level: 12
850    ///
851    /// Version: 1.0
852    #[cfg(feature = "api-12")]
853    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
854    pub fn OH_Drawing_PathBuildFromSvgString(
855        path: *mut OH_Drawing_Path,
856        str_: *const ::core::ffi::c_char,
857    ) -> bool;
858    /// Return the status that point (x, y) is contained by path.
859    ///
860    ///
861    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
862    /// # Arguments
863    ///
864    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
865    ///
866    /// * `x` - Indicates the x-axis value of containment test.
867    ///
868    /// * `y` - Indicates the y-axis value of containment test.
869    ///
870    /// # Returns
871    ///
872    /// * Returns true if the point (x, y) is contained by path.
873    ///
874    /// Available since API-level: 12
875    ///
876    /// Version: 1.0
877    #[cfg(feature = "api-12")]
878    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
879    pub fn OH_Drawing_PathContains(path: *mut OH_Drawing_Path, x: f32, y: f32) -> bool;
880    /// Transforms verb array, point array, and weight by matrix. transform may change verbs
881    /// and increase their number. path is replaced by transformed data.
882    ///
883    ///
884    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
885    /// # Arguments
886    ///
887    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
888    ///
889    /// * `matrix` - Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
890    ///
891    /// Available since API-level: 12
892    ///
893    /// Version: 1.0
894    #[cfg(feature = "api-12")]
895    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
896    pub fn OH_Drawing_PathTransform(path: *mut OH_Drawing_Path, matrix: *const OH_Drawing_Matrix);
897    /// Transforms verb array, point array, and weight by matrix.
898    /// Transform may change verbs and increase their number.
899    ///
900    ///
901    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
902    /// # Arguments
903    ///
904    /// * `src` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
905    ///
906    /// * `matrix` - Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
907    ///
908    /// * `dst` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
909    ///
910    /// * `applyPerspectiveClip` - Indicates whether to apply perspective clip.
911    ///
912    /// Available since API-level: 12
913    ///
914    /// Version: 1.0
915    #[cfg(feature = "api-12")]
916    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
917    pub fn OH_Drawing_PathTransformWithPerspectiveClip(
918        src: *mut OH_Drawing_Path,
919        matrix: *const OH_Drawing_Matrix,
920        dst: *mut OH_Drawing_Path,
921        applyPerspectiveClip: bool,
922    );
923    /// Sets FillType, the rule used to fill path.
924    ///
925    ///
926    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
927    /// # Arguments
928    ///
929    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
930    ///
931    /// * `pathFillType` - Indicates the add path's fill type.
932    ///
933    /// Available since API-level: 12
934    ///
935    /// Version: 1.0
936    #[cfg(feature = "api-12")]
937    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
938    pub fn OH_Drawing_PathSetFillType(
939        path: *mut OH_Drawing_Path,
940        pathFillType: OH_Drawing_PathFillType,
941    );
942    /// Gets FillType, the rule used to fill path.
943    ///
944    ///
945    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
946    /// # Arguments
947    ///
948    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
949    ///
950    /// * `pathFillType` - Indicates the FillType apply to path.
951    ///
952    /// # Returns
953    ///
954    /// * Returns the error code.
955    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
956    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if path or pathFillType is nullptr.
957    ///
958    /// Available since API-level: 20
959    ///
960    /// Version: 1.0
961    #[cfg(feature = "api-20")]
962    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
963    pub fn OH_Drawing_PathGetFillType(
964        path: *mut OH_Drawing_Path,
965        pathFillType: *mut OH_Drawing_PathFillType,
966    ) -> crate::error_code::DrawingResult;
967    /// Gets the length of the current path object.
968    ///
969    ///
970    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
971    /// # Arguments
972    ///
973    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
974    ///
975    /// * `forceClosed` - Indicates whether free to modify/delete the path after this call.
976    ///
977    /// # Returns
978    ///
979    /// * Returns the length of the current path object.
980    ///
981    /// Available since API-level: 12
982    ///
983    /// Version: 1.0
984    #[cfg(feature = "api-12")]
985    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
986    pub fn OH_Drawing_PathGetLength(path: *mut OH_Drawing_Path, forceClosed: bool) -> f32;
987    /// Gets the smallest bounding box that contains the path.
988    ///
989    ///
990    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
991    /// # Arguments
992    ///
993    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
994    ///
995    /// * `rect` - Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
996    ///
997    /// Available since API-level: 12
998    ///
999    /// Version: 1.0
1000    #[cfg(feature = "api-12")]
1001    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1002    pub fn OH_Drawing_PathGetBounds(path: *mut OH_Drawing_Path, rect: *mut OH_Drawing_Rect);
1003    /// Closes a path. A line segment from the start point to the last point of the path is added.
1004    ///
1005    ///
1006    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1007    /// # Arguments
1008    ///
1009    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1010    ///
1011    /// Available since API-level: 8
1012    ///
1013    /// Version: 1.0
1014    pub fn OH_Drawing_PathClose(path: *mut OH_Drawing_Path);
1015    /// Offset path replaces dst.
1016    ///
1017    ///
1018    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1019    /// # Arguments
1020    ///
1021    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1022    ///
1023    /// * `dst` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1024    ///
1025    /// * `dx` - Indicates offset added to dst path x-axis coordinates.
1026    ///
1027    /// * `dy` - Indicates offset added to dst path y-axis coordinates.
1028    ///
1029    /// Available since API-level: 12
1030    ///
1031    /// Version: 1.0
1032    #[cfg(feature = "api-12")]
1033    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1034    pub fn OH_Drawing_PathOffset(
1035        path: *mut OH_Drawing_Path,
1036        dst: *mut OH_Drawing_Path,
1037        dx: f32,
1038        dy: f32,
1039    );
1040    /// Resets path data.
1041    ///
1042    ///
1043    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1044    /// # Arguments
1045    ///
1046    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1047    ///
1048    /// Available since API-level: 8
1049    ///
1050    /// Version: 1.0
1051    pub fn OH_Drawing_PathReset(path: *mut OH_Drawing_Path);
1052    /// Determines whether the path current contour is closed.
1053    ///
1054    ///
1055    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1056    /// # Arguments
1057    ///
1058    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1059    ///
1060    /// * `forceClosed` - Whether to close the Path.
1061    ///
1062    /// # Returns
1063    ///
1064    /// * Returns <b>true</b> if the path current contour is closed; returns <b>false</b> otherwise.
1065    ///
1066    /// Available since API-level: 12
1067    ///
1068    /// Version: 1.0
1069    #[cfg(feature = "api-12")]
1070    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1071    pub fn OH_Drawing_PathIsClosed(path: *mut OH_Drawing_Path, forceClosed: bool) -> bool;
1072    /// Gets the position and tangent of the distance from the starting position of the Path.
1073    ///
1074    ///
1075    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1076    /// # Arguments
1077    ///
1078    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1079    ///
1080    /// * `forceClosed` - Whether to close the Path.
1081    ///
1082    /// * `distance` - The distance from the start of the Path.
1083    ///
1084    /// * `position` - Sets to the position of distance from the starting position of the Path.
1085    ///
1086    /// * `tangent` - Sets to the tangent of distance from the starting position of the Path.
1087    ///
1088    /// # Returns
1089    ///
1090    /// * Returns <b>true</b> if succeeded; returns <b>false</b> otherwise.
1091    ///
1092    /// Available since API-level: 12
1093    ///
1094    /// Version: 1.0
1095    #[cfg(feature = "api-12")]
1096    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1097    pub fn OH_Drawing_PathGetPositionTangent(
1098        path: *mut OH_Drawing_Path,
1099        forceClosed: bool,
1100        distance: f32,
1101        position: *mut OH_Drawing_Point2D,
1102        tangent: *mut OH_Drawing_Point2D,
1103    ) -> bool;
1104    /// Gets the path between the start and end points.
1105    ///
1106    ///
1107    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1108    /// # Arguments
1109    ///
1110    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1111    ///
1112    /// * `forceClosed` - Whether to close the path.
1113    ///
1114    /// * `start` - The distance from the starting point of the segment to the starting point of the path.
1115    ///
1116    /// * `stop` - The distance from the end point of the segment to the starting point of the path.
1117    ///
1118    /// * `startWithMoveTo` - Whether the path obtained moveTo to the starting segment.
1119    ///
1120    /// * `dst` - The path obtained.
1121    ///
1122    /// * `result` - Indicates the result of getting the path segment.
1123    /// The value is false if the segment is zero-length or start >= stop, and true otherwise.
1124    ///
1125    /// # Returns
1126    ///
1127    /// * Returns the error code.
1128    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
1129    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if any of path, dst and result is nullptr.
1130    ///
1131    /// Available since API-level: 18
1132    ///
1133    /// Version: 1.0
1134    #[cfg(feature = "api-18")]
1135    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
1136    pub fn OH_Drawing_PathGetSegment(
1137        path: *mut OH_Drawing_Path,
1138        forceClosed: bool,
1139        start: f32,
1140        stop: f32,
1141        startWithMoveTo: bool,
1142        dst: *mut OH_Drawing_Path,
1143        result: *mut bool,
1144    ) -> crate::error_code::DrawingResult;
1145    /// Combines two paths.
1146    ///
1147    ///
1148    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1149    /// # Arguments
1150    ///
1151    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1152    ///
1153    /// * `other` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1154    ///
1155    /// * `op` - Indicates the operation to apply to combine.
1156    ///
1157    /// # Returns
1158    ///
1159    /// * Returns <b>true</b> if constructed path is not empty; returns <b>false</b> otherwise.
1160    ///
1161    /// Available since API-level: 12
1162    ///
1163    /// Version: 1.0
1164    #[cfg(feature = "api-12")]
1165    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1166    pub fn OH_Drawing_PathOp(
1167        path: *mut OH_Drawing_Path,
1168        other: *const OH_Drawing_Path,
1169        op: OH_Drawing_PathOpMode,
1170    ) -> bool;
1171    /// Computes the corresponding matrix at the specified distance.
1172    ///
1173    ///
1174    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1175    /// # Arguments
1176    ///
1177    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1178    ///
1179    /// * `forceClosed` - Whether to close the Path.
1180    ///
1181    /// * `distance` - The distance from the start of the Path.
1182    ///
1183    /// * `matrix` - Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
1184    ///
1185    /// * `flag` - Indicates what should be returned in the matrix.
1186    ///
1187    /// # Returns
1188    ///
1189    /// * Returns <b>false</b> if path is nullptr or zero-length;
1190    /// returns <b>true</b> if path is not nullptr and not zero-length.
1191    ///
1192    /// Available since API-level: 12
1193    ///
1194    /// Version: 1.0
1195    #[cfg(feature = "api-12")]
1196    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1197    pub fn OH_Drawing_PathGetMatrix(
1198        path: *mut OH_Drawing_Path,
1199        forceClosed: bool,
1200        distance: f32,
1201        matrix: *mut OH_Drawing_Matrix,
1202        flag: OH_Drawing_PathMeasureMatrixFlags,
1203    ) -> bool;
1204    /// Approximates the path with a series of line segments.
1205    ///
1206    ///
1207    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1208    /// # Arguments
1209    ///
1210    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1211    ///
1212    /// * `acceptableError` - Indicates the acceptable error for a line on the path. Should be no less than 0.
1213    ///
1214    /// * `vals` - Indicates the storage for the computed array containing point components.
1215    /// There are three components for each point:
1216    /// 1.Fraction along the length of the path that the point resides.
1217    /// 2.The x coordinate of the point.
1218    /// 3.The y coordinate of the point.
1219    ///
1220    /// * `count` - Returns with the size of array.
1221    ///
1222    /// # Returns
1223    ///
1224    /// * Returns the error code.
1225    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
1226    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if path or count is nullptr.
1227    /// Returns [`OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE`] if acceptableError is less than 0.
1228    ///
1229    /// Available since API-level: 20
1230    ///
1231    /// Version: 1.0
1232    #[cfg(feature = "api-20")]
1233    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1234    pub fn OH_Drawing_PathApproximate(
1235        path: *mut OH_Drawing_Path,
1236        acceptableError: f32,
1237        vals: *mut f32,
1238        count: *mut u32,
1239    ) -> crate::error_code::DrawingResult;
1240    /// Performs interpolation between the current path and another path based on a given weight, and stores the
1241    /// result in the target path object.
1242    ///
1243    ///
1244    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1245    /// # Arguments
1246    ///
1247    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1248    ///
1249    /// * `other` - Indicates the pointer to an <b>OH_Drawing_Path</b> object to be interpolated with path.
1250    ///
1251    /// * `weight` - Indicates the interpolation weight, which must be in the range [0, 1].
1252    ///
1253    /// * `success` - Indicates the interpolation is success or not.
1254    ///
1255    /// * `interpolatedPath` - Indicates the pointer to an <b>OH_Drawing_Path</b> object to store the result.
1256    ///
1257    /// # Returns
1258    ///
1259    /// * Returns the error code.
1260    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
1261    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if either path, other, success or interpolatedPath is
1262    /// nullptr.
1263    /// Returns [`OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE`] if weight is outside the range [0, 1].
1264    ///
1265    /// Available since API-level: 20
1266    ///
1267    /// Version: 1.0
1268    #[cfg(feature = "api-20")]
1269    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1270    pub fn OH_Drawing_PathInterpolate(
1271        path: *mut OH_Drawing_Path,
1272        other: *mut OH_Drawing_Path,
1273        weight: f32,
1274        success: *mut bool,
1275        interpolatedPath: *mut OH_Drawing_Path,
1276    ) -> crate::error_code::DrawingResult;
1277    /// Checks whether the current path is compatible with another path (other) for interpolation, which means
1278    /// they have exactly the same structure, both paths must have the same operations, in the same order.
1279    /// If any of the operations are of type CONIC, then the weights of those conics must also match.
1280    ///
1281    ///
1282    /// Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeDrawing
1283    /// # Arguments
1284    ///
1285    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1286    ///
1287    /// * `other` - Indicates the pointer to an <b>OH_Drawing_Path</b> object to be interpolated with path.
1288    ///
1289    /// * `result` - Indicates whether the current path and the other path are compatible for interpolation.
1290    /// The value is true if the paths are compatible, and false otherwise.
1291    ///
1292    /// # Returns
1293    ///
1294    /// * Returns the error code.
1295    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
1296    /// Returns [`OH_DRAWING_ERROR_INVALID_PARAMETER`] if either path, other or result is nullptr.
1297    ///
1298    /// Available since API-level: 20
1299    ///
1300    /// Version: 1.0
1301    #[cfg(feature = "api-20")]
1302    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1303    pub fn OH_Drawing_PathIsInterpolate(
1304        path: *mut OH_Drawing_Path,
1305        other: *mut OH_Drawing_Path,
1306        result: *mut bool,
1307    ) -> crate::error_code::DrawingResult;
1308    /// Checks if the fill type is one of the INVERSE variants.
1309    ///
1310    /// # Arguments
1311    ///
1312    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1313    ///
1314    /// * `isInverse` - Indicates if the filltype is one of the INVERSE variants.
1315    ///
1316    /// # Returns
1317    ///
1318    /// * Returns the error code.
1319    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
1320    /// Returns [`OH_DRAWING_ERROR_INCORRECT_PARAMETER`] if path or isInverse is nullptr.
1321    ///
1322    /// Available since API-level: 23
1323    ///
1324    /// Version: 1.0
1325    #[cfg(feature = "api-23")]
1326    #[cfg_attr(docsrs, doc(cfg(feature = "api-23")))]
1327    pub fn OH_Drawing_PathIsInverseFillType(
1328        path: *const OH_Drawing_Path,
1329        isInverse: *mut bool,
1330    ) -> crate::error_code::DrawingResult;
1331    /// Toggles the INVERSE state of the filltype.
1332    ///
1333    /// # Arguments
1334    ///
1335    /// * `path` - Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1336    ///
1337    /// # Returns
1338    ///
1339    /// * Returns the error code.
1340    /// Returns [`OH_DRAWING_SUCCESS`] if the operation is successful.
1341    /// Returns [`OH_DRAWING_ERROR_INCORRECT_PARAMETER`] if path is nullptr.
1342    ///
1343    /// Available since API-level: 23
1344    ///
1345    /// Version: 1.0
1346    #[cfg(feature = "api-23")]
1347    #[cfg_attr(docsrs, doc(cfg(feature = "api-23")))]
1348    pub fn OH_Drawing_PathToggleInverseFillType(
1349        path: *mut OH_Drawing_Path,
1350    ) -> crate::error_code::DrawingResult;
1351}