diff --git a/graphic/graphic_2d/native_drawing/BUILD.gn b/graphic/graphic_2d/native_drawing/BUILD.gn
index 44f9f3218dcef5fc46550c6f659ff930ec0a5591..6d8e22e3cb09f200a9cbe0f441c97b2466e5d46e 100644
--- a/graphic/graphic_2d/native_drawing/BUILD.gn
+++ b/graphic/graphic_2d/native_drawing/BUILD.gn
@@ -28,6 +28,7 @@ ohos_ndk_headers("native_drawing_header") {
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_mask_filter.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_matrix.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_path.h",
+ "//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_path_effect.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_pen.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_point.h",
"//interface/sdk_c/graphic/graphic_2d/native_drawing/drawing_rect.h",
@@ -59,6 +60,7 @@ ohos_ndk_library("libnative_drawing_ndk") {
"native_drawing/drawing_mask_filter.h",
"native_drawing/drawing_matrix.h",
"native_drawing/drawing_path.h",
+ "native_drawing/drawing_path_effect.h",
"native_drawing/drawing_pen.h",
"native_drawing/drawing_point.h",
"native_drawing/drawing_rect.h",
diff --git a/graphic/graphic_2d/native_drawing/drawing_canvas.h b/graphic/graphic_2d/native_drawing/drawing_canvas.h
index cc37815899750dae0d247397f59ebc3db6e23256..4e85fa73625049414d1f00f12c58052f3d9d2382 100644
--- a/graphic/graphic_2d/native_drawing/drawing_canvas.h
+++ b/graphic/graphic_2d/native_drawing/drawing_canvas.h
@@ -363,6 +363,107 @@ void OH_Drawing_CanvasScale(OH_Drawing_Canvas*, float sx, float sy);
*/
void OH_Drawing_CanvasClear(OH_Drawing_Canvas*, uint32_t color);
+/**
+ * @brief Get the width of a canvas.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @since 12
+ * @version 1.0
+ */
+int32_t OH_Drawing_CanvasGetWidth(OH_Drawing_Canvas*);
+
+/**
+ * @brief Get the height of a canvas.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @since 12
+ * @version 1.0
+ */
+int32_t OH_Drawing_CanvasGetHeight(OH_Drawing_Canvas*);
+
+/**
+ * @brief Get the bounds of clip of a canvas.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @return The pointer to an OH_Drawing_Rect object, represents the boundar of clip,
+ * transformed by inverse of matrix.
+ * @since 12
+ * @version 1.0
+ */
+OH_Drawing_Rect* OH_Drawing_CanvasGetLocalClipBounds(OH_Drawing_Canvas*);
+
+/**
+ * @brief Get a 3x3 matrix of the transform from local coordinates to 'device'
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @return The pointer to an OH_Drawing_Matrix object.
+ * @since 12
+ * @version 1.0
+ */
+OH_Drawing_Matrix* OH_Drawing_CanvasGetLocalToDevice(OH_Drawing_Canvas*);
+
+/**
+ * @brief Use the passed matrix to transforming the geometry, then use existing matrix.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @param OH_Drawing_Matrix Indicates the pointer to an OH_Drawing_Matrix object,
+ * represents the matrix which is passed.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_CanvasConcatMatrix(OH_Drawing_Canvas*, OH_Drawing_Matrix*);
+
+/**
+ * @brief Enumerates of shadow flags.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef enum {
+ /**
+ * Use no shadow flags.
+ */
+ SHADOW_FLAGS_NONE,
+ /**
+ * The occluding object is transparent.
+ */
+ SHADOW_FLAGS_TRANSPARENT_OCCLUDER,
+ /**
+ * No need to analyze shadows.
+ */
+ SHADOW_FLAGS_GEOMETRIC_ONLY,
+ /**
+ * Use all shadow falgs.
+ */
+ SHADOW_FLAGS_ALL,
+} OH_Drawing_CanvasShadowFlags;
+
+/**
+ * @brief Use circular light to draw an offset spot shadow and outlining ambient shadow for the given path.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object.
+ * @param OH_Drawing_Path Indicates the pointer to an OH_Drawing_Path object, use to generate shadows.
+ * @param OH_Drawing_Point3 Indicates the pointer to an OH_Drawing_Point3 object.
+ * represents the value of the function which returns Z offset of the occluder from the canvas based on x and y.
+ * @param OH_Drawing_Point3 Indicates the pointer to an OH_Drawing_Point3 object.
+ * represents the position of the light relative to the canvas.
+ * @param lightRadius The radius of the circular light.
+ * @param ambientColor Ambient shadow's color.
+ * @param spotColor Spot shadow's color.
+ * @param flag Indicates the flag to control opaque occluder, shadow, and light position.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_CanvasDrawShadow(OH_Drawing_Canvas*, OH_Drawing_Path*, OH_Drawing_Point3*,
+ OH_Drawing_Point3*, float lightRadius, uint32_t ambientColor, uint32_t spotColor,
+ OH_Drawing_CanvasShadowFlags flag);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_path_effect.h b/graphic/graphic_2d/native_drawing/drawing_path_effect.h
new file mode 100644
index 0000000000000000000000000000000000000000..90aee6f3ac2a3087ea0fa2b94a91c8fb4cf7c3cd
--- /dev/null
+++ b/graphic/graphic_2d/native_drawing/drawing_path_effect.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2023 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef C_INCLUDE_DRAWING_PATH_EFFECT_H
+#define C_INCLUDE_DRAWING_PATH_EFFECT_H
+
+/**
+ * @addtogroup Drawing
+ * @{
+ *
+ * @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ *
+ * @since 12
+ * @version 1.0
+ */
+
+/**
+ * @file drawing_path_effect.h
+ *
+ * @brief Declares functions related to the pathEffect object in the drawing module.
+ *
+ * @since 12
+ * @version 1.0
+ */
+
+#include "drawing_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Creates an OH_Drawing_PathEffect object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param intervals Indicates a array which contain an even number of entries.
+ * @param count Indicates the number of elements of the intervals array.
+ * @param phase Indicates the offset into intervals array.
+ * @return Returns the pointer to the OH_Drawing_PathEffect object created.
+ * @since 12
+ * @version 1.0
+ */
+OH_Drawing_PathEffect* OH_Drawing_CreateDashPathEffect(float* intervals, int count, float phase);
+
+/**
+ * @brief Destroys an OH_Drawing_PathEffect object and reclaims the memory occupied by the object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_PathEffect Indicates the pointer to an OH_Drawing_PathEffect object.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_PathEffectDestroy(OH_Drawing_PathEffect*);
+
+#ifdef __cplusplus
+}
+#endif
+/** @} */
+#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_point.h b/graphic/graphic_2d/native_drawing/drawing_point.h
index f63faf78d885ee6a432dfb677b524e3f1934fdb1..53c828604da8cbc73a8966afd3e1121c33a6fc03 100644
--- a/graphic/graphic_2d/native_drawing/drawing_point.h
+++ b/graphic/graphic_2d/native_drawing/drawing_point.h
@@ -65,6 +65,29 @@ OH_Drawing_Point* OH_Drawing_PointCreate(float x, float y);
*/
void OH_Drawing_PointDestroy(OH_Drawing_Point*);
+/**
+ * @brief Creates an OH_Drawing_Point3 object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param x Indicates the x-axis coordinates of the point.
+ * @param y Indicates the y-axis coordinates of the point.
+ * @param z Indicates the z-axis coordinates of the point.
+ * @return Returns the pointer to the OH_Drawing_Point3 object created.
+ * @since 12
+ * @version 1.0
+ */
+OH_Drawing_Point3* OH_Drawing_Point3Create(float x, float y, float z);
+
+/**
+ * @brief Destroys an OH_Drawing_Point3 object and reclaims the memory occupied by the object.
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
+ * @param OH_Drawing_Point3 Indicates the pointer to an OH_Drawing_Point3 object.
+ * @since 12
+ * @version 1.0
+ */
+void OH_Drawing_Point3Destroy(OH_Drawing_Point3*);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_drawing/drawing_types.h b/graphic/graphic_2d/native_drawing/drawing_types.h
index cdf7f35cc7738dc86e91aa114147e4e10c70f3ef..d0ba2e730f05203d1c5f6783bdbfa8c15815fa28 100644
--- a/graphic/graphic_2d/native_drawing/drawing_types.h
+++ b/graphic/graphic_2d/native_drawing/drawing_types.h
@@ -92,6 +92,22 @@ typedef struct OH_Drawing_Bitmap OH_Drawing_Bitmap;
*/
typedef struct OH_Drawing_Point OH_Drawing_Point;
+/**
+ * @brief Defines a point of 3x3, which is used to describe the coordinate point.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef struct OH_Drawing_Point3 OH_Drawing_Point3;
+
+/**
+ * @brief Defines a pathEffect, which is used to affects stroked paths.
+ *
+ * @since 12
+ * @version 1.0
+ */
+typedef struct OH_Drawing_PathEffect OH_Drawing_PathEffect;
+
/**
* @brief Defines a rect, which is used to describe the rectangle.
*
diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
index 314e98b4190bd230729f7e365372eca4559d92d7..225b632d6f0bc9353115aae39460f45d7ed8fd99 100644
--- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
+++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json
@@ -41,6 +41,14 @@
{ "name": "OH_Drawing_CanvasTranslate" },
{ "name": "OH_Drawing_CanvasScale" },
{ "name": "OH_Drawing_CanvasClear" },
+ { "name": "OH_Drawing_CanvasGetWidth" },
+ { "name": "OH_Drawing_CanvasGetHeight" },
+ { "name": "OH_Drawing_CanvasGetLocalClipBounds" },
+ { "name": "OH_Drawing_CanvasGetLocalToDevice" },
+ { "name": "OH_Drawing_CanvasConcatMatrix" },
+ { "name": "OH_Drawing_CanvasDrawShadow" },
+ { "name": "OH_Drawing_CreateDashPathEffect" },
+ { "name": "OH_Drawing_PathEffectDestroy" },
{ "name": "OH_Drawing_ColorFilterCreateBlendMode" },
{ "name": "OH_Drawing_ColorFilterCreateCompose" },
{ "name": "OH_Drawing_ColorFilterCreateLinearToSrgbGamma" },
@@ -93,6 +101,8 @@
{ "name": "OH_Drawing_PenSetShaderEffect" },
{ "name": "OH_Drawing_PointCreate" },
{ "name": "OH_Drawing_PointDestroy" },
+ { "name": "OH_Drawing_Point3Create" },
+ { "name": "OH_Drawing_Point3Destroy" },
{ "name": "OH_Drawing_ColorSetArgb" },
{ "name": "OH_Drawing_CreateFontCollection" },
{ "name": "OH_Drawing_DestroyFontCollection" },