From ad3c7db5cd6240a8e08a4fe53dca552f2cc60689 Mon Sep 17 00:00:00 2001 From: lemon_u Date: Fri, 16 May 2025 15:47:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B7=E5=BC=8Fcopy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lemon_u --- .../native_drawing/drawing_text_typography.h | 34 +++++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 13 +++++++ 2 files changed, 47 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index f08f8060c..7fd7274e2 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2933,6 +2933,40 @@ size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray); */ void OH_Drawing_SetTextStyleBadgeType(OH_Drawing_TextStyle* style, OH_Drawing_TextBadgeType textBageType); +/** + * @brief Copy a typography style object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @return Returns the pointer to the copied OH_Drawing_TypographyStyle object. + * @since 20 + * @version 1.0 + */ +OH_Drawing_TypographyStyle* OH_Drawing_CopyTypographyStyle(OH_Drawing_TypographyStyle* style); + + +/** + * @brief Copy a text style object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TextStyle object. + * @return Returns the pointer to the copied OH_Drawing_TextStyle object. + * @since 20 + * @version 1.0 + */ +OH_Drawing_TextStyle* OH_Drawing_CopyTextStyle(OH_Drawing_TextStyle* style); + +/** + * @brief Copy a shadow object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param shadow Indicates the pointer to an OH_Drawing_TextShadow object. + * @return Returns the pointer to the copied OH_Drawing_TextShadow object. + * @since 20 + * @version 1.0 + */ +OH_Drawing_TextShadow* OH_Drawing_CopyTextShadow(OH_Drawing_TextShadow* shadow); + #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 d39f4f1c0..433cca9ac 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1797,5 +1797,18 @@ { "first_introduced": "20", "name": "OH_Drawing_SetTextStyleBadgeType" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_CopyTextStyle" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_CopyTypographyStyle" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_CopyTextShadow" } + ] \ No newline at end of file -- Gitee From dbe72a4d363cf8b08df740a0a8471160b092b213 Mon Sep 17 00:00:00 2001 From: lemon_u Date: Fri, 16 May 2025 15:55:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B7=E5=BC=8Fcopy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lemon_u --- graphic/graphic_2d/native_drawing/drawing_text_typography.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 7fd7274e2..e26544366 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2957,7 +2957,7 @@ OH_Drawing_TypographyStyle* OH_Drawing_CopyTypographyStyle(OH_Drawing_Typography OH_Drawing_TextStyle* OH_Drawing_CopyTextStyle(OH_Drawing_TextStyle* style); /** - * @brief Copy a shadow object. + * @brief Copy a text shadow object. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param shadow Indicates the pointer to an OH_Drawing_TextShadow object. -- Gitee From 622b2cf53be87b83dbdb015aaf349bd3251ace41 Mon Sep 17 00:00:00 2001 From: lemon_u Date: Fri, 16 May 2025 16:00:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B7=E5=BC=8Fcopy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lemon_u --- graphic/graphic_2d/native_drawing/drawing_text_typography.h | 1 - graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json | 1 - 2 files changed, 2 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index e26544366..098bd7d30 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2944,7 +2944,6 @@ void OH_Drawing_SetTextStyleBadgeType(OH_Drawing_TextStyle* style, OH_Drawing_Te */ OH_Drawing_TypographyStyle* OH_Drawing_CopyTypographyStyle(OH_Drawing_TypographyStyle* style); - /** * @brief Copy a text style object. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 433cca9ac..de8290e20 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1810,5 +1810,4 @@ "first_introduced": "20", "name": "OH_Drawing_CopyTextShadow" } - ] \ No newline at end of file -- Gitee