diff --git a/graphic/graphic_2d/native_drawing/drawing_path_effect.h b/graphic/graphic_2d/native_drawing/drawing_path_effect.h index b3260d576e27c033b8091db77e436454def765c9..6132bf17356e4eefb6ef17cca6d17eb841726675 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path_effect.h +++ b/graphic/graphic_2d/native_drawing/drawing_path_effect.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -69,6 +69,43 @@ OH_Drawing_PathEffect* OH_Drawing_CreateDashPathEffect(float* intervals, int cou */ void OH_Drawing_PathEffectDestroy(OH_Drawing_PathEffect*); +/** + * @brief Creates an OH_Drawing_PathEffect object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param segLength Indicates the maximum segment length of the path. + * @param dev Indicates the deviation during drawing. + * @param seedAssist Indicates generate effect pseudo-random sequence, the default value is zero. + * @return Returns the pointer to the OH_Drawing_PathEffect object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_PathEffect* OH_Drawing_CreateDiscretePathEffect(float segLength, float dev, uint32_t seedAssist = 0); + +/** + * @brief Creates an OH_Drawing_PathEffect object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param radius Indicates the degree of curvature of the arc, + * the radius to use must be greater than 0 in order to take effect. + * @return Returns the pointer to the OH_Drawing_PathEffect object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_PathEffect* OH_Drawing_CreateCornerPathEffect(float radius); + +/** + * @brief Creates an OH_Drawing_PathEffect object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param outer Indicates an OH_Drawing_PathEffect object + * @param inner Indicates an OH_Drawing_PathEffect object + * @return Returns the pointer to the OH_Drawing_PathEffect object created. + * @since 14 + * @version 1.0 + */ +OH_Drawing_PathEffect* OH_Drawing_CreateComposePathEffect(OH_Drawing_PathEffect* outer, OH_Drawing_PathEffect* inner); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 353ce3f539771d30cdac90947de31c81c38d3c4d..a21c2d2be8e82db1f0b84fcff5baa6a79e302422 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1721,5 +1721,17 @@ { "first_introduced": "14", "name":"OH_Drawing_GetRunGlyphCount" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_CreateDiscretePathEffect" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_CreateCornerPathEffect" + }, + { + "first_introduced": "14", + "name":"OH_Drawing_CreateComposePathEffect" } ] \ No newline at end of file