diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 355635ea1102caaebffbea66a3e8efe32159f742..1fa3e610c3002f54dbe163bd163da6ef912998ce 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -1028,6 +1028,20 @@ double OH_Drawing_TypographyGetHeight(OH_Drawing_Typography*); */ double OH_Drawing_TypographyGetLongestLine(OH_Drawing_Typography*); +/** + * @brief Obtains the width of the longest line with indent. You are advised to + * round up the return value in actual use. When the text content is empty, the + * minimum float value, that is, 0.0, is returned. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Typography Pointer to an OH_Drawing_Typography object, which is obtained by + * {@link OH_Drawing_CreateTypography}. + * @return Returns the width of the longest line with indent. + * @since 13 + * @version 1.1 + */ +double OH_Drawing_TypographyGetLongestLineWithIndent(OH_Drawing_Typography*); + /** * @brief Gets the min intrinsic width. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 5f0503977701871b7aae307aa923489bc8de0424..dcf8e09f9c4c11fbc9d464a242c706ae233ca0b6 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -699,6 +699,10 @@ { "name": "OH_Drawing_TypographyGetMaxWidth" }, { "name": "OH_Drawing_TypographyGetHeight" }, { "name": "OH_Drawing_TypographyGetLongestLine" }, + { + "first_introduced": "13", + "name": "OH_Drawing_TypographyGetLongestLineWithIndent" + }, { "name": "OH_Drawing_TypographyGetMinIntrinsicWidth" }, { "name": "OH_Drawing_TypographyGetMaxIntrinsicWidth" }, { "name": "OH_Drawing_TypographyGetAlphabeticBaseline" },