From c78dc83cc4d29a1e90b4da9f5e8fdf0f80d08955 Mon Sep 17 00:00:00 2001 From: liuwei793 Date: Wed, 16 Oct 2024 11:14:23 +0800 Subject: [PATCH] "typeface add interface" Signed-off-by: liuwei793 --- .../graphic_2d/native_drawing/drawing_typeface.h | 16 ++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_typeface.h b/graphic/graphic_2d/native_drawing/drawing_typeface.h index fa3d016e9..663d8c0df 100644 --- a/graphic/graphic_2d/native_drawing/drawing_typeface.h +++ b/graphic/graphic_2d/native_drawing/drawing_typeface.h @@ -172,6 +172,22 @@ OH_Drawing_ErrorCode OH_Drawing_FontArgumentsAddVariation(OH_Drawing_FontArgumen */ OH_Drawing_ErrorCode OH_Drawing_FontArgumentsDestroy(OH_Drawing_FontArguments* fontArguments); +/** + * @brief Indicates whether two OH_Drawing_Typeface objects are equal. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param typeface Indicates the pointer to an OH_Drawing_Typeface object. + * @param other Indicates the pointer to an OH_Drawing_Typeface object. + * @param isEqual Indicates results. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of typeface, other and isEqual is nullptr. + * @since 14 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_TypefaceIsEqual(OH_Drawing_Typeface* typeface, OH_Drawing_Typeface* other, + bool* isEqual); + #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 353ce3f53..1c0038ede 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1721,5 +1721,9 @@ { "first_introduced": "14", "name":"OH_Drawing_GetRunGlyphCount" + }, + { + "first_introduced": "14", + "name": "OH_Drawing_TypefaceIsEqual" } ] \ No newline at end of file -- Gitee