diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index ddd60c6fdc467b90e23f86b9c608ef4bfa955856..9bdf581f61da05374d9028e623b2e958a73126aa 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -3062,6 +3062,39 @@ void OH_Drawing_SetTextStyleBadgeType(OH_Drawing_TextStyle* style, OH_Drawing_Te */ void OH_Drawing_SetTypographyTextAutoSpace(OH_Drawing_TypographyStyle* style, bool enableAutoSpace); +/** + * @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 text 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 6cf9b9cd4a82244450851ea5ef02367378c298ea..2ea2b4a7e2959ecffa87ed866cb7d542313c53f7 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1989,5 +1989,17 @@ { "first_introduced": "20", "name": "OH_Drawing_TypographyHandlerAddEncodedText" + }, + { + "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