From ab037407fb8467e7596ad44e7f7a50451998a82c Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Thu, 13 Mar 2025 21:32:53 +0800 Subject: [PATCH] Add new interface about badge type Signed-off-by: FTL1ght --- .../native_drawing/drawing_text_typography.h | 25 +++++++++++++++++++ 1 file changed, 25 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..47299c932 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -577,6 +577,21 @@ enum OH_Drawing_FontWidth { FONT_WIDTH_ULTRA_EXPANDED = 9, }; +/** + * @brief Type of badge. + * + * @since 20 + * @version 1.0 + */ +enum OH_Drawing_TextBadgeType { + /* No badge */ + TEXT_BADGE_NONE, + /* Super badge */ + TEXT_SUPER_SCRIPT, + /* Sub badge */ + TEXT_SUB_SCRIPT, +}; + /** * @brief Defines the font style struct. * @@ -2899,6 +2914,16 @@ void OH_Drawing_SetTypographyTextTab(OH_Drawing_TypographyStyle* style, OH_Drawi */ size_t OH_Drawing_GetDrawingArraySize(OH_Drawing_Array* drawingArray); +/** + * @brief Set text badge type. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param textBageType The type of text badge. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_SetTextStyleBadgeType(TextBageType textBageType); + #ifdef __cplusplus } #endif -- Gitee