From e63efa0a7f938549d76c048a777973349ca17953 Mon Sep 17 00:00:00 2001 From: zhangwenting Date: Thu, 25 Apr 2024 22:50:10 +0800 Subject: [PATCH] OH_Drawing_TypographyPaintOnPath Signed-off-by: zhangwenting --- .../native_drawing/drawing_text_typography.h | 15 +++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 3690793f2..3c83c56b6 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -977,6 +977,21 @@ void OH_Drawing_TypographyLayout(OH_Drawing_Typography*, double /* maxWidth */); void OH_Drawing_TypographyPaint(OH_Drawing_Typography*, OH_Drawing_Canvas*, double /* potisionX */, double /* potisionY */); +/** + * @brief Paints path text on the canvas. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param OH_Drawing_Typography Indicates the pointer to an OH_Drawing_Typography object. + * @param OH_Drawing_Canvas Indicates the pointer to an OH_Drawing_Canvas object. + * @param OH_Drawing_Path Indicates path information. + * @param double Indicates the distance along the path to add to the text's starting position. + * @param double Indicates the distance above(-) or below(+) the path to position the text. + * @since 12 + * @version 1.0 + */ +void OH_Drawing_TypographyPaintOnPath(OH_Drawing_Typography*, OH_Drawing_Canvas*, OH_Drawing_Path*, + double /* hOffset */, double /* vOffset */); + /** * @brief Gets the max width. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index b2a73b331..1b5569415 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -464,6 +464,10 @@ { "name": "OH_Drawing_DestroyTypography" }, { "name": "OH_Drawing_TypographyLayout" }, { "name": "OH_Drawing_TypographyPaint" }, + { + "first_introduced": "12", + "name": "OH_Drawing_TypographyPaintOnPath" + }, { "name": "OH_Drawing_TypographyGetMaxWidth" }, { "name": "OH_Drawing_TypographyGetHeight" }, { "name": "OH_Drawing_TypographyGetLongestLine" }, -- Gitee