17777dab0Sopenharmony_ci/*
27777dab0Sopenharmony_ci * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
37777dab0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47777dab0Sopenharmony_ci * you may not use this file except in compliance with the License.
57777dab0Sopenharmony_ci * You may obtain a copy of the License at
67777dab0Sopenharmony_ci *
77777dab0Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
87777dab0Sopenharmony_ci *
97777dab0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107777dab0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117777dab0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127777dab0Sopenharmony_ci * See the License for the specific language governing permissions and
137777dab0Sopenharmony_ci * limitations under the License.
147777dab0Sopenharmony_ci */
157777dab0Sopenharmony_ci
167777dab0Sopenharmony_ci#ifndef C_INCLUDE_DRAWING_PATH_H
177777dab0Sopenharmony_ci#define C_INCLUDE_DRAWING_PATH_H
187777dab0Sopenharmony_ci
197777dab0Sopenharmony_ci/**
207777dab0Sopenharmony_ci * @addtogroup Drawing
217777dab0Sopenharmony_ci * @{
227777dab0Sopenharmony_ci *
237777dab0Sopenharmony_ci * @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
247777dab0Sopenharmony_ci *
257777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
267777dab0Sopenharmony_ci *
277777dab0Sopenharmony_ci * @since 8
287777dab0Sopenharmony_ci * @version 1.0
297777dab0Sopenharmony_ci */
307777dab0Sopenharmony_ci
317777dab0Sopenharmony_ci/**
327777dab0Sopenharmony_ci * @file drawing_path.h
337777dab0Sopenharmony_ci *
347777dab0Sopenharmony_ci * @brief Declares functions related to the <b>path</b> object in the drawing module.
357777dab0Sopenharmony_ci *
367777dab0Sopenharmony_ci * @kit ArkGraphics2D
377777dab0Sopenharmony_ci * @library libnative_drawing.so
387777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
397777dab0Sopenharmony_ci * @since 8
407777dab0Sopenharmony_ci * @version 1.0
417777dab0Sopenharmony_ci */
427777dab0Sopenharmony_ci
437777dab0Sopenharmony_ci#include "drawing_types.h"
447777dab0Sopenharmony_ci
457777dab0Sopenharmony_ci#ifdef __cplusplus
467777dab0Sopenharmony_ciextern "C" {
477777dab0Sopenharmony_ci#endif
487777dab0Sopenharmony_ci
497777dab0Sopenharmony_ci/**
507777dab0Sopenharmony_ci * @brief Direction for adding closed contours.
517777dab0Sopenharmony_ci *
527777dab0Sopenharmony_ci * @since 12
537777dab0Sopenharmony_ci * @version 1.0
547777dab0Sopenharmony_ci */
557777dab0Sopenharmony_citypedef enum {
567777dab0Sopenharmony_ci    /** clockwise direction for adding closed contours */
577777dab0Sopenharmony_ci    PATH_DIRECTION_CW,
587777dab0Sopenharmony_ci    /** counter-clockwise direction for adding closed contours */
597777dab0Sopenharmony_ci    PATH_DIRECTION_CCW,
607777dab0Sopenharmony_ci} OH_Drawing_PathDirection;
617777dab0Sopenharmony_ci
627777dab0Sopenharmony_ci/**
637777dab0Sopenharmony_ci * @brief FillType of path.
647777dab0Sopenharmony_ci *
657777dab0Sopenharmony_ci * @since 12
667777dab0Sopenharmony_ci * @version 1.0
677777dab0Sopenharmony_ci */
687777dab0Sopenharmony_citypedef enum {
697777dab0Sopenharmony_ci    /** Specifies that "inside" is computed by a non-zero sum of signed edge crossings */
707777dab0Sopenharmony_ci    PATH_FILL_TYPE_WINDING,
717777dab0Sopenharmony_ci    /** Specifies that "inside" is computed by an odd number of edge crossings */
727777dab0Sopenharmony_ci    PATH_FILL_TYPE_EVEN_ODD,
737777dab0Sopenharmony_ci    /** Same as Winding, but draws outside of the path, rather than inside */
747777dab0Sopenharmony_ci    PATH_FILL_TYPE_INVERSE_WINDING,
757777dab0Sopenharmony_ci    /** Same as EvenOdd, but draws outside of the path, rather than inside */
767777dab0Sopenharmony_ci    PATH_FILL_TYPE_INVERSE_EVEN_ODD,
777777dab0Sopenharmony_ci} OH_Drawing_PathFillType;
787777dab0Sopenharmony_ci
797777dab0Sopenharmony_ci/**
807777dab0Sopenharmony_ci * @brief Add mode of path.
817777dab0Sopenharmony_ci *
827777dab0Sopenharmony_ci * @since 12
837777dab0Sopenharmony_ci * @version 1.0
847777dab0Sopenharmony_ci */
857777dab0Sopenharmony_citypedef enum {
867777dab0Sopenharmony_ci    /** Appended to destination unaltered */
877777dab0Sopenharmony_ci    PATH_ADD_MODE_APPEND,
887777dab0Sopenharmony_ci    /** Add line if prior contour is not closed */
897777dab0Sopenharmony_ci    PATH_ADD_MODE_EXTEND,
907777dab0Sopenharmony_ci} OH_Drawing_PathAddMode;
917777dab0Sopenharmony_ci
927777dab0Sopenharmony_ci/**
937777dab0Sopenharmony_ci * @brief Operations when two paths are combined.
947777dab0Sopenharmony_ci *
957777dab0Sopenharmony_ci * @since 12
967777dab0Sopenharmony_ci * @version 1.0
977777dab0Sopenharmony_ci */
987777dab0Sopenharmony_citypedef enum {
997777dab0Sopenharmony_ci    /**
1007777dab0Sopenharmony_ci     * Difference operation.
1017777dab0Sopenharmony_ci     */
1027777dab0Sopenharmony_ci    PATH_OP_MODE_DIFFERENCE,
1037777dab0Sopenharmony_ci    /**
1047777dab0Sopenharmony_ci     * Intersect operation.
1057777dab0Sopenharmony_ci     */
1067777dab0Sopenharmony_ci    PATH_OP_MODE_INTERSECT,
1077777dab0Sopenharmony_ci    /**
1087777dab0Sopenharmony_ci     * Union operation.
1097777dab0Sopenharmony_ci     */
1107777dab0Sopenharmony_ci    PATH_OP_MODE_UNION,
1117777dab0Sopenharmony_ci    /**
1127777dab0Sopenharmony_ci     * Xor operation.
1137777dab0Sopenharmony_ci     */
1147777dab0Sopenharmony_ci    PATH_OP_MODE_XOR,
1157777dab0Sopenharmony_ci    /**
1167777dab0Sopenharmony_ci     * Reverse difference operation.
1177777dab0Sopenharmony_ci     */
1187777dab0Sopenharmony_ci    PATH_OP_MODE_REVERSE_DIFFERENCE,
1197777dab0Sopenharmony_ci} OH_Drawing_PathOpMode;
1207777dab0Sopenharmony_ci
1217777dab0Sopenharmony_ci/**
1227777dab0Sopenharmony_ci * @brief Enumerates the matrix information corresponding to the path measurements.
1237777dab0Sopenharmony_ci *
1247777dab0Sopenharmony_ci * @since 12
1257777dab0Sopenharmony_ci * @version 1.0
1267777dab0Sopenharmony_ci */
1277777dab0Sopenharmony_citypedef enum {
1287777dab0Sopenharmony_ci    /**
1297777dab0Sopenharmony_ci     * Gets position.
1307777dab0Sopenharmony_ci     */
1317777dab0Sopenharmony_ci    GET_POSITION_MATRIX,
1327777dab0Sopenharmony_ci    /**
1337777dab0Sopenharmony_ci     * Gets tangent.
1347777dab0Sopenharmony_ci     */
1357777dab0Sopenharmony_ci    GET_TANGENT_MATRIX,
1367777dab0Sopenharmony_ci    /**
1377777dab0Sopenharmony_ci     * Gets both position and tangent.
1387777dab0Sopenharmony_ci     */
1397777dab0Sopenharmony_ci    GET_POSITION_AND_TANGENT_MATRIX,
1407777dab0Sopenharmony_ci} OH_Drawing_PathMeasureMatrixFlags;
1417777dab0Sopenharmony_ci
1427777dab0Sopenharmony_ci/**
1437777dab0Sopenharmony_ci * @brief Creates an <b>OH_Drawing_Path</b> object.
1447777dab0Sopenharmony_ci *
1457777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1467777dab0Sopenharmony_ci * @return Returns the pointer to the <b>OH_Drawing_Path</b> object created.
1477777dab0Sopenharmony_ci * @since 8
1487777dab0Sopenharmony_ci * @version 1.0
1497777dab0Sopenharmony_ci */
1507777dab0Sopenharmony_ciOH_Drawing_Path* OH_Drawing_PathCreate(void);
1517777dab0Sopenharmony_ci
1527777dab0Sopenharmony_ci/**
1537777dab0Sopenharmony_ci * @brief Creates an <b>OH_Drawing_Path</b> copy object.
1547777dab0Sopenharmony_ci *
1557777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1567777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
1577777dab0Sopenharmony_ci * @return Returns the pointer to the <b>OH_Drawing_Path</b> object created.
1587777dab0Sopenharmony_ci * @since 12
1597777dab0Sopenharmony_ci * @version 1.0
1607777dab0Sopenharmony_ci */
1617777dab0Sopenharmony_ciOH_Drawing_Path* OH_Drawing_PathCopy(OH_Drawing_Path*);
1627777dab0Sopenharmony_ci
1637777dab0Sopenharmony_ci/**
1647777dab0Sopenharmony_ci * @brief Destroys an <b>OH_Drawing_Path</b> object and reclaims the memory occupied by the object.
1657777dab0Sopenharmony_ci *
1667777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1677777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1687777dab0Sopenharmony_ci * @since 8
1697777dab0Sopenharmony_ci * @version 1.0
1707777dab0Sopenharmony_ci */
1717777dab0Sopenharmony_civoid OH_Drawing_PathDestroy(OH_Drawing_Path*);
1727777dab0Sopenharmony_ci
1737777dab0Sopenharmony_ci/**
1747777dab0Sopenharmony_ci * @brief Sets the start point of a path.
1757777dab0Sopenharmony_ci *
1767777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1777777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1787777dab0Sopenharmony_ci * @param x Indicates the x coordinate of the start point.
1797777dab0Sopenharmony_ci * @param y Indicates the y coordinate of the start point.
1807777dab0Sopenharmony_ci * @since 8
1817777dab0Sopenharmony_ci * @version 1.0
1827777dab0Sopenharmony_ci */
1837777dab0Sopenharmony_civoid OH_Drawing_PathMoveTo(OH_Drawing_Path*, float x, float y);
1847777dab0Sopenharmony_ci
1857777dab0Sopenharmony_ci/**
1867777dab0Sopenharmony_ci * @brief Draws a line segment from the last point of a path to the target point.
1877777dab0Sopenharmony_ci *
1887777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
1897777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
1907777dab0Sopenharmony_ci * @param x Indicates the x coordinate of the target point.
1917777dab0Sopenharmony_ci * @param y Indicates the y coordinate of the target point.
1927777dab0Sopenharmony_ci * @since 8
1937777dab0Sopenharmony_ci * @version 1.0
1947777dab0Sopenharmony_ci */
1957777dab0Sopenharmony_civoid OH_Drawing_PathLineTo(OH_Drawing_Path*, float x, float y);
1967777dab0Sopenharmony_ci
1977777dab0Sopenharmony_ci/**
1987777dab0Sopenharmony_ci * @brief Draws an arc to a path.
1997777dab0Sopenharmony_ci *
2007777dab0Sopenharmony_ci * This is done by using angle arc mode. In this mode, a rectangle that encloses an ellipse is specified first,
2017777dab0Sopenharmony_ci * and then a start angle and a sweep angle are specified.
2027777dab0Sopenharmony_ci * The arc is a portion of the ellipse defined by the start angle and the sweep angle.
2037777dab0Sopenharmony_ci * By default, a line segment from the last point of the path to the start point of the arc is also added.
2047777dab0Sopenharmony_ci *
2057777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2067777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
2077777dab0Sopenharmony_ci * @param x1 Indicates the x coordinate of the upper left corner of the rectangle.
2087777dab0Sopenharmony_ci * @param y1 Indicates the y coordinate of the upper left corner of the rectangle.
2097777dab0Sopenharmony_ci * @param x2 Indicates the x coordinate of the lower right corner of the rectangle.
2107777dab0Sopenharmony_ci * @param y2 Indicates the y coordinate of the lower right corner of the rectangle.
2117777dab0Sopenharmony_ci * @param startDeg Indicates the start angle, in degrees.
2127777dab0Sopenharmony_ci * @param sweepDeg Indicates the angle to sweep, in degrees.
2137777dab0Sopenharmony_ci * @since 8
2147777dab0Sopenharmony_ci * @version 1.0
2157777dab0Sopenharmony_ci */
2167777dab0Sopenharmony_civoid OH_Drawing_PathArcTo(OH_Drawing_Path*, float x1, float y1, float x2, float y2, float startDeg, float sweepDeg);
2177777dab0Sopenharmony_ci
2187777dab0Sopenharmony_ci/**
2197777dab0Sopenharmony_ci * @brief Draws a quadratic Bezier curve from the last point of a path to the target point.
2207777dab0Sopenharmony_ci *
2217777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2227777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
2237777dab0Sopenharmony_ci * @param ctrlX Indicates the x coordinate of the control point.
2247777dab0Sopenharmony_ci * @param ctrlY Indicates the y coordinate of the control point.
2257777dab0Sopenharmony_ci * @param endX Indicates the x coordinate of the target point.
2267777dab0Sopenharmony_ci * @param endY Indicates the y coordinate of the target point.
2277777dab0Sopenharmony_ci * @since 8
2287777dab0Sopenharmony_ci * @version 1.0
2297777dab0Sopenharmony_ci */
2307777dab0Sopenharmony_civoid OH_Drawing_PathQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY);
2317777dab0Sopenharmony_ci
2327777dab0Sopenharmony_ci/**
2337777dab0Sopenharmony_ci * @brief Draws a conic from the last point of a path to the target point.
2347777dab0Sopenharmony_ci *
2357777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2367777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
2377777dab0Sopenharmony_ci * @param ctrlX Indicates the x coordinate of the control point.
2387777dab0Sopenharmony_ci * @param ctrlY Indicates the y coordinate of the control point.
2397777dab0Sopenharmony_ci * @param endX Indicates the x coordinate of the target point.
2407777dab0Sopenharmony_ci * @param endY Indicates the y coordinate of the target point.
2417777dab0Sopenharmony_ci * @param weight Indicates the weight of added conic.
2427777dab0Sopenharmony_ci * @since 12
2437777dab0Sopenharmony_ci * @version 1.0
2447777dab0Sopenharmony_ci */
2457777dab0Sopenharmony_civoid OH_Drawing_PathConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY, float weight);
2467777dab0Sopenharmony_ci
2477777dab0Sopenharmony_ci/**
2487777dab0Sopenharmony_ci * @brief Draws a cubic Bezier curve from the last point of a path to the target point.
2497777dab0Sopenharmony_ci *
2507777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2517777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
2527777dab0Sopenharmony_ci * @param ctrlX1 Indicates the x coordinate of the first control point.
2537777dab0Sopenharmony_ci * @param ctrlY1 Indicates the y coordinate of the first control point.
2547777dab0Sopenharmony_ci * @param ctrlX2 Indicates the x coordinate of the second control point.
2557777dab0Sopenharmony_ci * @param ctrlY2 Indicates the y coordinate of the second control point.
2567777dab0Sopenharmony_ci * @param endX Indicates the x coordinate of the target point.
2577777dab0Sopenharmony_ci * @param endY Indicates the y coordinate of the target point.
2587777dab0Sopenharmony_ci * @since 8
2597777dab0Sopenharmony_ci * @version 1.0
2607777dab0Sopenharmony_ci */
2617777dab0Sopenharmony_civoid OH_Drawing_PathCubicTo(
2627777dab0Sopenharmony_ci    OH_Drawing_Path*, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2, float endX, float endY);
2637777dab0Sopenharmony_ci
2647777dab0Sopenharmony_ci/**
2657777dab0Sopenharmony_ci * @brief Sets the relative starting point of a path.
2667777dab0Sopenharmony_ci *
2677777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2687777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
2697777dab0Sopenharmony_ci * @param x Indicates the x coordinate of the relative starting point.
2707777dab0Sopenharmony_ci * @param y Indicates the y coordinate of the relative starting point.
2717777dab0Sopenharmony_ci * @since 12
2727777dab0Sopenharmony_ci * @version 1.0
2737777dab0Sopenharmony_ci */
2747777dab0Sopenharmony_civoid OH_Drawing_PathRMoveTo(OH_Drawing_Path*, float x, float y);
2757777dab0Sopenharmony_ci
2767777dab0Sopenharmony_ci/**
2777777dab0Sopenharmony_ci * @brief Draws a line segment from the last point of a path to the relative target point.
2787777dab0Sopenharmony_ci *
2797777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2807777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
2817777dab0Sopenharmony_ci * @param x Indicates the x coordinate of the relative target point.
2827777dab0Sopenharmony_ci * @param y Indicates the y coordinate of the relative target point.
2837777dab0Sopenharmony_ci * @since 12
2847777dab0Sopenharmony_ci * @version 1.0
2857777dab0Sopenharmony_ci */
2867777dab0Sopenharmony_civoid OH_Drawing_PathRLineTo(OH_Drawing_Path*, float x, float y);
2877777dab0Sopenharmony_ci
2887777dab0Sopenharmony_ci/**
2897777dab0Sopenharmony_ci * @brief Draws a quadratic bezier curve from the last point of a path to the relative target point.
2907777dab0Sopenharmony_ci *
2917777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
2927777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
2937777dab0Sopenharmony_ci * @param ctrlX Indicates the x coordinate of the relative control point.
2947777dab0Sopenharmony_ci * @param ctrlY Indicates the y coordinate of the relative control point.
2957777dab0Sopenharmony_ci * @param endX Indicates the x coordinate of the relative target point.
2967777dab0Sopenharmony_ci * @param endY Indicates the y coordinate of the relative target point.
2977777dab0Sopenharmony_ci * @since 12
2987777dab0Sopenharmony_ci * @version 1.0
2997777dab0Sopenharmony_ci */
3007777dab0Sopenharmony_civoid OH_Drawing_PathRQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY);
3017777dab0Sopenharmony_ci
3027777dab0Sopenharmony_ci/**
3037777dab0Sopenharmony_ci * @brief Draws a conic from the last point of a path to the relative target point.
3047777dab0Sopenharmony_ci *
3057777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
3067777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
3077777dab0Sopenharmony_ci * @param ctrlX Indicates the x coordinate of the relative control point.
3087777dab0Sopenharmony_ci * @param ctrlY Indicates the y coordinate of the relative control point.
3097777dab0Sopenharmony_ci * @param endX Indicates the x coordinate of the relative target point.
3107777dab0Sopenharmony_ci * @param endY Indicates the y coordinate of the relative target point.
3117777dab0Sopenharmony_ci * @param weight Indicates the weight of added conic.
3127777dab0Sopenharmony_ci * @since 12
3137777dab0Sopenharmony_ci * @version 1.0
3147777dab0Sopenharmony_ci */
3157777dab0Sopenharmony_civoid OH_Drawing_PathRConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY, float weight);
3167777dab0Sopenharmony_ci
3177777dab0Sopenharmony_ci/**
3187777dab0Sopenharmony_ci * @brief Draws a cubic bezier curve from the last point of a path to the relative target point.
3197777dab0Sopenharmony_ci *
3207777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
3217777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
3227777dab0Sopenharmony_ci * @param ctrlX1 Indicates the x coordinate of the first relative control point.
3237777dab0Sopenharmony_ci * @param ctrlY1 Indicates the y coordinate of the first relative control point.
3247777dab0Sopenharmony_ci * @param ctrlX2 Indicates the x coordinate of the second relative control point.
3257777dab0Sopenharmony_ci * @param ctrlY2 Indicates the y coordinate of the second relative control point.
3267777dab0Sopenharmony_ci * @param endX Indicates the x coordinate of the relative target point.
3277777dab0Sopenharmony_ci * @param endY Indicates the y coordinate of the relative target point.
3287777dab0Sopenharmony_ci * @since 12
3297777dab0Sopenharmony_ci * @version 1.0
3307777dab0Sopenharmony_ci */
3317777dab0Sopenharmony_civoid OH_Drawing_PathRCubicTo(OH_Drawing_Path*, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2,
3327777dab0Sopenharmony_ci    float endX, float endY);
3337777dab0Sopenharmony_ci
3347777dab0Sopenharmony_ci/**
3357777dab0Sopenharmony_ci * @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction.
3367777dab0Sopenharmony_ci *
3377777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
3387777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
3397777dab0Sopenharmony_ci * @param left Indicates the left coordinate of the upper left corner of the rectangle.
3407777dab0Sopenharmony_ci * @param top Indicates the top coordinate of the upper top corner of the rectangle.
3417777dab0Sopenharmony_ci * @param right Indicates the right coordinate of the lower right corner of the rectangle.
3427777dab0Sopenharmony_ci * @param bottom Indicates the bottom coordinate of the lower bottom corner of the rectangle.
3437777dab0Sopenharmony_ci * @param OH_Drawing_PathDirection Indicates the path direction.
3447777dab0Sopenharmony_ci * @since 12
3457777dab0Sopenharmony_ci * @version 1.0
3467777dab0Sopenharmony_ci */
3477777dab0Sopenharmony_civoid OH_Drawing_PathAddRect(OH_Drawing_Path*, float left, float top, float right, float bottom,
3487777dab0Sopenharmony_ci    OH_Drawing_PathDirection);
3497777dab0Sopenharmony_ci
3507777dab0Sopenharmony_ci/**
3517777dab0Sopenharmony_ci * @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction.
3527777dab0Sopenharmony_ci *
3537777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
3547777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
3557777dab0Sopenharmony_ci * @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
3567777dab0Sopenharmony_ci * @param OH_Drawing_PathDirection Indicates the path direction.
3577777dab0Sopenharmony_ci * @param start Indicates initial corner of rect to add.
3587777dab0Sopenharmony_ci * @since 12
3597777dab0Sopenharmony_ci * @version 1.0
3607777dab0Sopenharmony_ci */
3617777dab0Sopenharmony_civoid OH_Drawing_PathAddRectWithInitialCorner(OH_Drawing_Path*, const OH_Drawing_Rect*,
3627777dab0Sopenharmony_ci    OH_Drawing_PathDirection, uint32_t start);
3637777dab0Sopenharmony_ci
3647777dab0Sopenharmony_ci/**
3657777dab0Sopenharmony_ci * @brief Adds a new contour to the path, defined by the round rect, and wound in the specified direction.
3667777dab0Sopenharmony_ci *
3677777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
3687777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
3697777dab0Sopenharmony_ci * @param OH_Drawing_RoundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
3707777dab0Sopenharmony_ci * @param OH_Drawing_PathDirection Indicates the path direction.
3717777dab0Sopenharmony_ci * @since 12
3727777dab0Sopenharmony_ci * @version 1.0
3737777dab0Sopenharmony_ci */
3747777dab0Sopenharmony_civoid OH_Drawing_PathAddRoundRect(OH_Drawing_Path*, const OH_Drawing_RoundRect* roundRect, OH_Drawing_PathDirection);
3757777dab0Sopenharmony_ci
3767777dab0Sopenharmony_ci/**
3777777dab0Sopenharmony_ci * @brief Adds a oval to the path, defined by the rect, and wound in the specified direction.
3787777dab0Sopenharmony_ci *
3797777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
3807777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
3817777dab0Sopenharmony_ci * @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
3827777dab0Sopenharmony_ci * @param start Index of initial point of ellipse.
3837777dab0Sopenharmony_ci * @param OH_Drawing_PathDirection Indicates the path direction.
3847777dab0Sopenharmony_ci * @since 12
3857777dab0Sopenharmony_ci * @version 1.0
3867777dab0Sopenharmony_ci */
3877777dab0Sopenharmony_civoid OH_Drawing_PathAddOvalWithInitialPoint(OH_Drawing_Path*, const OH_Drawing_Rect*,
3887777dab0Sopenharmony_ci    uint32_t start, OH_Drawing_PathDirection);
3897777dab0Sopenharmony_ci
3907777dab0Sopenharmony_ci/**
3917777dab0Sopenharmony_ci * @brief Adds a oval to the path, defined by the rect, and wound in the specified direction.
3927777dab0Sopenharmony_ci *
3937777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
3947777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
3957777dab0Sopenharmony_ci * @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
3967777dab0Sopenharmony_ci * @param OH_Drawing_PathDirection Indicates the path direction.
3977777dab0Sopenharmony_ci * @since 12
3987777dab0Sopenharmony_ci * @version 1.0
3997777dab0Sopenharmony_ci */
4007777dab0Sopenharmony_civoid OH_Drawing_PathAddOval(OH_Drawing_Path*, const OH_Drawing_Rect*, OH_Drawing_PathDirection);
4017777dab0Sopenharmony_ci
4027777dab0Sopenharmony_ci/**
4037777dab0Sopenharmony_ci * @brief Appends arc to path, as the start of new contour.Arc added is part of ellipse bounded by oval,
4047777dab0Sopenharmony_ci * from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees
4057777dab0Sopenharmony_ci * is aligned with the positive x-axis, and positive sweeps extends arc clockwise.If sweepAngle <= -360, or
4067777dab0Sopenharmony_ci * sweepAngle >= 360; and startAngle modulo 90 is nearly zero, append oval instead of arc. Otherwise, sweepAngle
4077777dab0Sopenharmony_ci * values are treated modulo 360, and arc may or may not draw depending on numeric rounding.
4087777dab0Sopenharmony_ci *
4097777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
4107777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4117777dab0Sopenharmony_ci * @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
4127777dab0Sopenharmony_ci * @param startAngle Indicates the starting angle of arc in degrees.
4137777dab0Sopenharmony_ci * @param sweepAngle Indicates the sweep, in degrees. Positive is clockwise.
4147777dab0Sopenharmony_ci * @since 12
4157777dab0Sopenharmony_ci * @version 1.0
4167777dab0Sopenharmony_ci */
4177777dab0Sopenharmony_civoid OH_Drawing_PathAddArc(OH_Drawing_Path*, const OH_Drawing_Rect*, float startAngle, float sweepAngle);
4187777dab0Sopenharmony_ci
4197777dab0Sopenharmony_ci/**
4207777dab0Sopenharmony_ci * @brief Appends src path to path, transformed by matrix. Transformed curves may have different verbs,
4217777dab0Sopenharmony_ci * point, and conic weights.
4227777dab0Sopenharmony_ci *
4237777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
4247777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4257777dab0Sopenharmony_ci * @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4267777dab0Sopenharmony_ci * @param OH_Drawing_Matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.
4277777dab0Sopenharmony_ci * @since 12
4287777dab0Sopenharmony_ci * @version 1.0
4297777dab0Sopenharmony_ci */
4307777dab0Sopenharmony_civoid OH_Drawing_PathAddPath(OH_Drawing_Path*, const OH_Drawing_Path* src, const OH_Drawing_Matrix*);
4317777dab0Sopenharmony_ci
4327777dab0Sopenharmony_ci/**
4337777dab0Sopenharmony_ci * @brief Appends src path to path, transformed by matrix and mode. Transformed curves may have different verbs,
4347777dab0Sopenharmony_ci * point, and conic weights.
4357777dab0Sopenharmony_ci *
4367777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
4377777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4387777dab0Sopenharmony_ci * @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4397777dab0Sopenharmony_ci * @param OH_Drawing_Matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.
4407777dab0Sopenharmony_ci * @param OH_Drawing_PathAddMode Indicates the add path's add mode.
4417777dab0Sopenharmony_ci * @since 12
4427777dab0Sopenharmony_ci * @version 1.0
4437777dab0Sopenharmony_ci */
4447777dab0Sopenharmony_civoid OH_Drawing_PathAddPathWithMatrixAndMode(OH_Drawing_Path* path, const OH_Drawing_Path* src,
4457777dab0Sopenharmony_ci    const OH_Drawing_Matrix*, OH_Drawing_PathAddMode);
4467777dab0Sopenharmony_ci
4477777dab0Sopenharmony_ci/**
4487777dab0Sopenharmony_ci * @brief Appends src path to path, transformed by mode. Transformed curves may have different verbs,
4497777dab0Sopenharmony_ci * point, and conic weights.
4507777dab0Sopenharmony_ci *
4517777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
4527777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4537777dab0Sopenharmony_ci * @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object, which is Appends src path to path.
4547777dab0Sopenharmony_ci * @param OH_Drawing_PathAddMode Indicates the add path's add mode.
4557777dab0Sopenharmony_ci * @since 12
4567777dab0Sopenharmony_ci * @version 1.0
4577777dab0Sopenharmony_ci */
4587777dab0Sopenharmony_civoid OH_Drawing_PathAddPathWithMode(OH_Drawing_Path* path, const OH_Drawing_Path* src, OH_Drawing_PathAddMode);
4597777dab0Sopenharmony_ci
4607777dab0Sopenharmony_ci/**
4617777dab0Sopenharmony_ci * @brief Appends src path to path, transformed by offset and mode. Transformed curves may have different verbs,
4627777dab0Sopenharmony_ci * point, and conic weights.
4637777dab0Sopenharmony_ci *
4647777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
4657777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4667777dab0Sopenharmony_ci * @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4677777dab0Sopenharmony_ci * @param dx Indicates offset added to src path x-axis coordinates.
4687777dab0Sopenharmony_ci * @param dy Indicates offset added to src path y-axis coordinates.
4697777dab0Sopenharmony_ci * @param OH_Drawing_PathAddMode Indicates the add path's add mode.
4707777dab0Sopenharmony_ci * @since 12
4717777dab0Sopenharmony_ci * @version 1.0
4727777dab0Sopenharmony_ci */
4737777dab0Sopenharmony_civoid OH_Drawing_PathAddPathWithOffsetAndMode(OH_Drawing_Path* path, const OH_Drawing_Path* src, float dx, float dy,
4747777dab0Sopenharmony_ci    OH_Drawing_PathAddMode);
4757777dab0Sopenharmony_ci
4767777dab0Sopenharmony_ci/**
4777777dab0Sopenharmony_ci * @brief Adds contour created from point array, adding (count - 1) line segments.
4787777dab0Sopenharmony_ci *
4797777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
4807777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4817777dab0Sopenharmony_ci * @param points Indicates the point array.
4827777dab0Sopenharmony_ci * @param count Indicates the size of point array.
4837777dab0Sopenharmony_ci * @param isClosed Indicates Whether to add lines that connect the end and start.
4847777dab0Sopenharmony_ci * @since 12
4857777dab0Sopenharmony_ci * @version 1.0
4867777dab0Sopenharmony_ci */
4877777dab0Sopenharmony_civoid OH_Drawing_PathAddPolygon(OH_Drawing_Path* path, const OH_Drawing_Point2D* points, uint32_t count, bool isClosed);
4887777dab0Sopenharmony_ci
4897777dab0Sopenharmony_ci/**
4907777dab0Sopenharmony_ci * @brief  Adds a circle to the path, and wound in the specified direction.
4917777dab0Sopenharmony_ci *
4927777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
4937777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
4947777dab0Sopenharmony_ci * @param x Indicates the x coordinate of the center of the circle.
4957777dab0Sopenharmony_ci * @param y Indicates the y coordinate of the center of the circle.
4967777dab0Sopenharmony_ci * @param radius Indicates the radius of the circle.
4977777dab0Sopenharmony_ci * @param OH_Drawing_PathDirection Indicates the path direction.
4987777dab0Sopenharmony_ci * @since 12
4997777dab0Sopenharmony_ci * @version 1.0
5007777dab0Sopenharmony_ci */
5017777dab0Sopenharmony_civoid OH_Drawing_PathAddCircle(OH_Drawing_Path* path, float x, float y, float radius, OH_Drawing_PathDirection);
5027777dab0Sopenharmony_ci
5037777dab0Sopenharmony_ci/**
5047777dab0Sopenharmony_ci * @brief Parses the svg path from the string.
5057777dab0Sopenharmony_ci *
5067777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
5077777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5087777dab0Sopenharmony_ci * @param str Indicates the string of the SVG path.
5097777dab0Sopenharmony_ci * @return Returns true if build path is successful, returns false otherwise.
5107777dab0Sopenharmony_ci * @since 12
5117777dab0Sopenharmony_ci * @version 1.0
5127777dab0Sopenharmony_ci */
5137777dab0Sopenharmony_cibool OH_Drawing_PathBuildFromSvgString(OH_Drawing_Path* path, const char* str);
5147777dab0Sopenharmony_ci
5157777dab0Sopenharmony_ci/**
5167777dab0Sopenharmony_ci * @brief Return the status that point (x, y) is contained by path.
5177777dab0Sopenharmony_ci *
5187777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
5197777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5207777dab0Sopenharmony_ci * @param x Indicates the x-axis value of containment test.
5217777dab0Sopenharmony_ci * @param y Indicates the y-axis value of containment test.
5227777dab0Sopenharmony_ci * @return Returns true if the point (x, y) is contained by path.
5237777dab0Sopenharmony_ci * @since 12
5247777dab0Sopenharmony_ci * @version 1.0
5257777dab0Sopenharmony_ci */
5267777dab0Sopenharmony_cibool OH_Drawing_PathContains(OH_Drawing_Path*, float x, float y);
5277777dab0Sopenharmony_ci
5287777dab0Sopenharmony_ci/**
5297777dab0Sopenharmony_ci * @brief Transforms verb array, point array, and weight by matrix. transform may change verbs
5307777dab0Sopenharmony_ci * and increase their number. path is replaced by transformed data.
5317777dab0Sopenharmony_ci *
5327777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
5337777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5347777dab0Sopenharmony_ci * @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
5357777dab0Sopenharmony_ci * @since 12
5367777dab0Sopenharmony_ci * @version 1.0
5377777dab0Sopenharmony_ci */
5387777dab0Sopenharmony_civoid OH_Drawing_PathTransform(OH_Drawing_Path*, const OH_Drawing_Matrix*);
5397777dab0Sopenharmony_ci
5407777dab0Sopenharmony_ci/**
5417777dab0Sopenharmony_ci * @brief Transforms verb array, point array, and weight by matrix.
5427777dab0Sopenharmony_ci * Transform may change verbs and increase their number.
5437777dab0Sopenharmony_ci *
5447777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
5457777dab0Sopenharmony_ci * @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5467777dab0Sopenharmony_ci * @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
5477777dab0Sopenharmony_ci * @param dst Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5487777dab0Sopenharmony_ci * @param applyPerspectiveClip Indicates whether to apply perspective clip.
5497777dab0Sopenharmony_ci * @since 12
5507777dab0Sopenharmony_ci * @version 1.0
5517777dab0Sopenharmony_ci */
5527777dab0Sopenharmony_civoid OH_Drawing_PathTransformWithPerspectiveClip(OH_Drawing_Path* src, const OH_Drawing_Matrix*,
5537777dab0Sopenharmony_ci    OH_Drawing_Path* dst, bool applyPerspectiveClip);
5547777dab0Sopenharmony_ci
5557777dab0Sopenharmony_ci/**
5567777dab0Sopenharmony_ci * @brief Sets FillType, the rule used to fill path.
5577777dab0Sopenharmony_ci *
5587777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
5597777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5607777dab0Sopenharmony_ci * @param OH_Drawing_PathFillType Indicates the add path's fill type.
5617777dab0Sopenharmony_ci * @since 12
5627777dab0Sopenharmony_ci * @version 1.0
5637777dab0Sopenharmony_ci */
5647777dab0Sopenharmony_civoid OH_Drawing_PathSetFillType(OH_Drawing_Path*, OH_Drawing_PathFillType);
5657777dab0Sopenharmony_ci
5667777dab0Sopenharmony_ci/**
5677777dab0Sopenharmony_ci * @brief Gets the length of the current path object.
5687777dab0Sopenharmony_ci *
5697777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
5707777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5717777dab0Sopenharmony_ci * @param forceClosed Indicates whether free to modify/delete the path after this call.
5727777dab0Sopenharmony_ci * @return Returns the length of the current path object.
5737777dab0Sopenharmony_ci * @since 12
5747777dab0Sopenharmony_ci * @version 1.0
5757777dab0Sopenharmony_ci */
5767777dab0Sopenharmony_cifloat OH_Drawing_PathGetLength(OH_Drawing_Path*, bool forceClosed);
5777777dab0Sopenharmony_ci
5787777dab0Sopenharmony_ci/**
5797777dab0Sopenharmony_ci * @brief Gets the smallest bounding box that contains the path.
5807777dab0Sopenharmony_ci *
5817777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
5827777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5837777dab0Sopenharmony_ci * @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
5847777dab0Sopenharmony_ci * @since 12
5857777dab0Sopenharmony_ci * @version 1.0
5867777dab0Sopenharmony_ci */
5877777dab0Sopenharmony_civoid OH_Drawing_PathGetBounds(OH_Drawing_Path*, OH_Drawing_Rect*);
5887777dab0Sopenharmony_ci
5897777dab0Sopenharmony_ci/**
5907777dab0Sopenharmony_ci * @brief Closes a path. A line segment from the start point to the last point of the path is added.
5917777dab0Sopenharmony_ci *
5927777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
5937777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
5947777dab0Sopenharmony_ci * @since 8
5957777dab0Sopenharmony_ci * @version 1.0
5967777dab0Sopenharmony_ci */
5977777dab0Sopenharmony_civoid OH_Drawing_PathClose(OH_Drawing_Path*);
5987777dab0Sopenharmony_ci
5997777dab0Sopenharmony_ci/**
6007777dab0Sopenharmony_ci * @brief Offset path replaces dst.
6017777dab0Sopenharmony_ci *
6027777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
6037777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
6047777dab0Sopenharmony_ci * @param dst Indicates the pointer to an <b>OH_Drawing_Path</b> object.
6057777dab0Sopenharmony_ci * @param dx Indicates offset added to dst path x-axis coordinates.
6067777dab0Sopenharmony_ci * @param dy Indicates offset added to dst path y-axis coordinates.
6077777dab0Sopenharmony_ci * @since 12
6087777dab0Sopenharmony_ci * @version 1.0
6097777dab0Sopenharmony_ci */
6107777dab0Sopenharmony_civoid OH_Drawing_PathOffset(OH_Drawing_Path* path, OH_Drawing_Path* dst, float dx, float dy);
6117777dab0Sopenharmony_ci
6127777dab0Sopenharmony_ci/**
6137777dab0Sopenharmony_ci * @brief Resets path data.
6147777dab0Sopenharmony_ci *
6157777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
6167777dab0Sopenharmony_ci * @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
6177777dab0Sopenharmony_ci * @since 8
6187777dab0Sopenharmony_ci * @version 1.0
6197777dab0Sopenharmony_ci */
6207777dab0Sopenharmony_civoid OH_Drawing_PathReset(OH_Drawing_Path*);
6217777dab0Sopenharmony_ci
6227777dab0Sopenharmony_ci/**
6237777dab0Sopenharmony_ci * @brief Determines whether the path current contour is closed.
6247777dab0Sopenharmony_ci *
6257777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
6267777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
6277777dab0Sopenharmony_ci * @param forceClosed Whether to close the Path.
6287777dab0Sopenharmony_ci * @return Returns <b>true</b> if the path current contour is closed; returns <b>false</b> otherwise.
6297777dab0Sopenharmony_ci * @since 12
6307777dab0Sopenharmony_ci * @version 1.0
6317777dab0Sopenharmony_ci */
6327777dab0Sopenharmony_cibool OH_Drawing_PathIsClosed(OH_Drawing_Path* path, bool forceClosed);
6337777dab0Sopenharmony_ci
6347777dab0Sopenharmony_ci/**
6357777dab0Sopenharmony_ci * @brief Gets the position and tangent of the distance from the starting position of the Path.
6367777dab0Sopenharmony_ci *
6377777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
6387777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
6397777dab0Sopenharmony_ci * @param forceClosed Whether to close the Path.
6407777dab0Sopenharmony_ci * @param distance The distance from the start of the Path.
6417777dab0Sopenharmony_ci * @param position Sets to the position of distance from the starting position of the Path.
6427777dab0Sopenharmony_ci * @param tangent Sets to the tangent of distance from the starting position of the Path.
6437777dab0Sopenharmony_ci * @return Returns <b>true</b> if succeeded; returns <b>false</b> otherwise.
6447777dab0Sopenharmony_ci * @since 12
6457777dab0Sopenharmony_ci * @version 1.0
6467777dab0Sopenharmony_ci */
6477777dab0Sopenharmony_cibool OH_Drawing_PathGetPositionTangent(OH_Drawing_Path* path, bool forceClosed,
6487777dab0Sopenharmony_ci    float distance, OH_Drawing_Point2D* position, OH_Drawing_Point2D* tangent);
6497777dab0Sopenharmony_ci
6507777dab0Sopenharmony_ci/**
6517777dab0Sopenharmony_ci * @brief Combines two paths.
6527777dab0Sopenharmony_ci *
6537777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
6547777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
6557777dab0Sopenharmony_ci * @param other Indicates the pointer to an <b>OH_Drawing_Path</b> object.
6567777dab0Sopenharmony_ci * @param op Indicates the operation to apply to combine.
6577777dab0Sopenharmony_ci * @return Returns <b>true</b> if constructed path is not empty; returns <b>false</b> otherwise.
6587777dab0Sopenharmony_ci * @since 12
6597777dab0Sopenharmony_ci * @version 1.0
6607777dab0Sopenharmony_ci */
6617777dab0Sopenharmony_cibool OH_Drawing_PathOp(OH_Drawing_Path* path, const OH_Drawing_Path* other, OH_Drawing_PathOpMode op);
6627777dab0Sopenharmony_ci
6637777dab0Sopenharmony_ci/**
6647777dab0Sopenharmony_ci * @brief Computes the corresponding matrix at the specified distance.
6657777dab0Sopenharmony_ci *
6667777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
6677777dab0Sopenharmony_ci * @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
6687777dab0Sopenharmony_ci * @param forceClosed Whether to close the Path.
6697777dab0Sopenharmony_ci * @param distance The distance from the start of the Path.
6707777dab0Sopenharmony_ci * @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
6717777dab0Sopenharmony_ci * @param flag Indicates what should be returned in the matrix.
6727777dab0Sopenharmony_ci * @return Returns <b>false</b> if path is nullptr or zero-length;
6737777dab0Sopenharmony_ci           returns <b>true</b> if path is not nullptr and not zero-length.
6747777dab0Sopenharmony_ci * @since 12
6757777dab0Sopenharmony_ci * @version 1.0
6767777dab0Sopenharmony_ci */
6777777dab0Sopenharmony_cibool OH_Drawing_PathGetMatrix(OH_Drawing_Path* path, bool forceClosed,
6787777dab0Sopenharmony_ci    float distance, OH_Drawing_Matrix* matrix, OH_Drawing_PathMeasureMatrixFlags flag);
6797777dab0Sopenharmony_ci
6807777dab0Sopenharmony_ci#ifdef __cplusplus
6817777dab0Sopenharmony_ci}
6827777dab0Sopenharmony_ci#endif
6837777dab0Sopenharmony_ci/** @} */
6847777dab0Sopenharmony_ci#endif
685