From a2e7b86ced6f4212d4bcd192553881327a046d12 Mon Sep 17 00:00:00 2001 From: Gloria Date: Thu, 24 Nov 2022 20:29:20 +0800 Subject: [PATCH] Update docs against 11105 Signed-off-by: wusongqing --- en/application-dev/napi/drawing-guidelines.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/en/application-dev/napi/drawing-guidelines.md b/en/application-dev/napi/drawing-guidelines.md index 7cbf0e3d9e..1355a27dcf 100644 --- a/en/application-dev/napi/drawing-guidelines.md +++ b/en/application-dev/napi/drawing-guidelines.md @@ -4,11 +4,11 @@ The Native Drawing module provides APIs for drawing 2D graphics and text. The following scenarios are common for drawing development: * Drawing 2D graphics -* Drawing and painting text +* Drawing text drawing ## Available APIs -| API| Description| +| API| Description| | -------- | -------- | | OH_Drawing_BitmapCreate (void) | Creates a bitmap object.| | OH_Drawing_BitmapBuild (OH_Drawing_Bitmap *, const uint32_t width, const uint32_t height, const OH_Drawing_BitmapFormat *) | Initializes the width and height of a bitmap object and sets the pixel format for the bitmap.| @@ -19,7 +19,7 @@ The Native Drawing module provides APIs for drawing 2D graphics and text. The fo | OH_Drawing_CanvasDrawPath (OH_Drawing_Canvas *, const OH_Drawing_Path *) | Draws a path.| | OH_Drawing_PathCreate (void) | Creates a path object.| | OH_Drawing_PathMoveTo (OH_Drawing_Path *, float x, float y) | Sets the start point of a path.| -| OH_Drawing_PathLineTo (OH_Drawing_Path *, float x, float y) | Draws a line segment from the last point of a path to the target point. | +| OH_Drawing_PathLineTo (OH_Drawing_Path *, float x, float y) | Draws a line segment from the last point of a path to the target point.| | OH_Drawing_PathClose (OH_Drawing_Path *) | Closes a path. A line segment from the start point to the last point of the path is added.| | OH_Drawing_PenCreate (void) | Creates a pen object.| | OH_Drawing_PenSetAntiAlias (OH_Drawing_Pen *, bool) | Checks whether anti-aliasing is enabled for a pen. If anti-aliasing is enabled, edges will be drawn with partial transparency.| @@ -138,7 +138,7 @@ The following steps describe how to use the canvas and brush of the Native Drawi OH_Drawing_BitmapDestory(cBitmap); ``` -## Development Procedure for Text Drawing and Display +## Development Procedure for Text Drawing The following steps describe how to use the text drawing and display feature of the Native Drawing module. 1. **Create a canvas and a bitmap.** @@ -196,7 +196,8 @@ The following steps describe how to use the text drawing and display feature of // Set the maximum width. double maxWidth = 800.0; OH_Drawing_TypographyLayout(typography, maxWidth); - // Set the start position for text display. + // Set the start position for drawing the text on the canvas. double position[2] = {10.0, 15.0}; + // Draw the text on the canvas. OH_Drawing_TypographyPaint(typography, cCanvas, position[0], position[1]); ``` -- GitLab