From 8c3bf3a19d719339e6f0b0f67b3d1df173dca514 Mon Sep 17 00:00:00 2001 From: guoxing Date: Mon, 22 Jan 2024 12:21:00 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: guoxing --- .../native_drawing/drawing_text_typography.h | 13 +++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 3a5e5ef589f..ce73be523ba 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -1001,6 +1001,19 @@ double OH_Drawing_TypographyGetLineHeight(OH_Drawing_Typography*, int); */ double OH_Drawing_TypographyGetLineWidth(OH_Drawing_Typography*, int); +/** + * @brief get line text range. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param int Indicates the line number. + * @param bool Indicates whether spaces are contained. + * @return Returns line text range. + * @since 12 + * @version 1.0 + */ +OH_Drawing_Range* OH_Drawing_TypographyGetLineTextRange(OH_Drawing_Typography*, int, bool); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 64d2dd98891..430200198f9 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -323,5 +323,9 @@ { "first_introduced": "11", "name": "OH_Drawing_RegisterFontBuffer" + }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyGetLineTextRange" } ] \ No newline at end of file -- Gitee