From 72133a9f2226d20375f6ba0aa0f215e2a1b6afe5 Mon Sep 17 00:00:00 2001 From: changleipeng Date: Fri, 6 Sep 2024 16:23:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E8=83=BD=E5=88=A0=E9=99=A4=E7=BA=BF?= =?UTF-8?q?=E4=B8=8B=E5=88=92=E7=BA=BF=E5=90=8C=E6=97=B6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: changleipeng Change-Id: Ide56bceaa401f00f179b8c982c3504015eaade50 --- .../native_drawing/drawing_text_typography.h | 23 +++++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 8 +++++++ 2 files changed, 31 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index e4546ed6c..c436074f9 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -734,6 +734,29 @@ void OH_Drawing_SetTextStyleBaseLine(OH_Drawing_TextStyle*, int /* OH_Drawing_Te */ void OH_Drawing_SetTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); +/** + * @brief Add the text decoration. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param int Indicates the text decoration to add. For details, see the enum OH_Drawing_TextDecoration. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_AddTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); + +/** + * @brief Remove the text decoration. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_TextStyle Indicates the pointer to an OH_Drawing_TextStyle object. + * @param int Indicates the text decoration to remove, shoud be match existing text decorations. + * For details, see the enum OH_Drawing_TextDecoration. + * @since 14 + * @version 1.0 + */ +void OH_Drawing_RemoveTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */); + /** * @brief Sets the color for the text decoration. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index e81640a3f..1fd17e318 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -627,6 +627,14 @@ { "name": "OH_Drawing_SetTextStyleFontWeight" }, { "name": "OH_Drawing_SetTextStyleBaseLine" }, { "name": "OH_Drawing_SetTextStyleDecoration" }, + { + "first_introduced": "14", + "name": "OH_Drawing_AddTextStyleDecoration" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_RemoveTextStyleDecoration" + }, { "name": "OH_Drawing_SetTextStyleDecorationColor" }, { "name": "OH_Drawing_SetTextStyleFontHeight" }, { "name": "OH_Drawing_SetTextStyleFontFamilies" }, -- Gitee