From 06d2726f596a1c9c296c2fe5e5ac846ae9f2a155 Mon Sep 17 00:00:00 2001 From: liufei Date: Fri, 14 Mar 2025 09:23:51 +0800 Subject: [PATCH] add update typography interface Signed-off-by: liufei --- .../native_drawing/drawing_text_typography.h | 47 +++++++++++++++++++ 1 file 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 966621728..39bf58e6c 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2899,6 +2899,53 @@ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawi */ size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray); +/** + * @brief Update the font color of the typography + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param color Indicates the color to update. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_TypographyUpdateFontColor(OH_Drawing_Typography* typography, uint32_t color); + +/** + * @brief Update the decoration of the typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param decoration Indicates the text decoration to update. For details, see the enum + * OH_Drawing_TextDecoration. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_TypographyUpdateDecoration(OH_Drawing_Typography* typography, int decoration); + +/** + * @brief Update the decoration thickness scale of the typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param decorationThicknessScale Indicates the pointer to the array object OH_Drawing_Array. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_TypographyUpdateDecorationThicknessScale(OH_Drawing_Typography* typography, + double decorationThicknessScale); + +/** + * @brief Update the decoration style of typography. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param style Indicates the text decoration style to update. + * For details, see the enum OH_Drawing_TextDecorationStyle. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_TypographyUpdateDecorationStyle(OH_Drawing_Typography* typography, + OH_Drawing_TextDecorationStyle style); #ifdef __cplusplus } #endif -- Gitee