From 5775215c3ae55cab1b4b0ae347028c9dfe7fc2e0 Mon Sep 17 00:00:00 2001 From: mobHot Date: Tue, 6 May 2025 14:51:28 +0800 Subject: [PATCH] add the interface of updating decoration color Signed-off-by: mobHot Change-Id: Ib95e209c2e50900ede8976b42c2c8955e3e5d020 --- .../native_drawing/drawing_text_typography.h | 11 +++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 9052c16972..1a124f8a9a 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2612,6 +2612,17 @@ int32_t OH_Drawing_TypographyGetUnresolvedGlyphsCount(OH_Drawing_Typography* typ */ void OH_Drawing_TypographyUpdateFontSize(OH_Drawing_Typography* typography, size_t from, size_t to, float fontSize); +/** + * @brief Updates the decoration color of the paragraph. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param color Indicates the text decoration color to update. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_TypographyUpdateDecorationColor(OH_Drawing_Typography* typography, uint32_t color); + /** * @brief Get whether the text layout enables line styles. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 208814b740..9861c083d1 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1522,6 +1522,10 @@ "first_introduced": "12", "name": "OH_Drawing_TypographyUpdateFontSize" }, + { + "first_introduced": "20", + "name": "OH_Drawing_TypographyUpdateDecorationColor" + }, { "first_introduced": "12", "name": "OH_Drawing_TypographyTextGetLineStyle" -- Gitee