From 143a6d5360cedfbf705f6a1738737945d38efa50 Mon Sep 17 00:00:00 2001 From: esterzhou Date: Mon, 21 Mar 2022 00:50:11 +0800 Subject: [PATCH] update docs Signed-off-by: esterzhou --- .../arkui-ts/ts-basic-components-span.md | 4 +- .../arkui-ts/ts-basic-components-text.md | 40 +-- .../arkui-ts/ts-basic-components-textinput.md | 52 +-- .../arkui-ts/ts-canvasrenderingcontext2d.md | 314 +++++++++--------- .../reference/arkui-ts/ts-container-list.md | 20 +- .../arkui-ts/ts-methods-custom-dialog-box.md | 24 +- .../ts-offscreencanvasrenderingcontext2d.md | 302 ++++++++--------- 7 files changed, 378 insertions(+), 378 deletions(-) diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-span.md b/en/application-dev/reference/arkui-ts/ts-basic-components-span.md index a00a62fabf..4303717b6c 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-span.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-span.md @@ -23,9 +23,9 @@ None Span(content: string) - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | content | string | Yes | - | Text content. | + | content | string | Yes | - | Text content. | ## Attributes diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-text.md b/en/application-dev/reference/arkui-ts/ts-basic-components-text.md index 15fc34079e..a5e43392fa 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-text.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-text.md @@ -15,7 +15,7 @@ None ## Child Components -The **<Text>** component can contain the child component [](../reference/arkui-ts/ts-basic-components-span.md). +The **<Text>** component can contain the child component [](ts-basic-components-span.md). ## APIs @@ -23,9 +23,9 @@ The **<Text>** component can contain the child component [](../refer Text(content?: string) - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | content | string | No | '' | Text content, which is the content of the child component **<Span>**. This parameter does not take effect when the child component **<Span>** is contained. | + | content | string | No | '' | Text content, which is the content of the child component **<Span>**. This parameter does not take effect when the child component **<Span>** is contained. | ## Attributes @@ -41,33 +41,33 @@ Text(content?: string) | textCase | TextCase | TextCase.Normal | Text case. | - TextAlign enums - | Name | Description | + | Name | Description | | -------- | -------- | - | Center | The text is center-aligned. | - | Start | The text is aligned with the direction in which the text is written. | - | End | The text is aligned with the opposite direction in which the text is written. | + | Center | The text is center-aligned. | + | Start | The text is aligned with the direction in which the text is written. | + | End | The text is aligned with the opposite direction in which the text is written. | - TextOverflow enums - | Name | Description | + | Name | Description | | -------- | -------- | - | Clip | Extra text is truncated. | - | Ellipsis | The ellipsis (...) is used for extra-long text. | - | None | No truncation or ellipsis is used for extra-long text. | + | Clip | Extra text is truncated. | + | Ellipsis | The ellipsis (...) is used for extra-long text. | + | None | No truncation or ellipsis is used for extra-long text. | - TextDecorationType enums - | Name | Description | + | Name | Description | | -------- | -------- | - | Underline | An underline is used. | - | LineThrough | A strikethrough is used. | - | Overline | An overline is used. | - | None | No decorative line is used. | + | Underline | An underline is used. | + | LineThrough | A strikethrough is used. | + | Overline | An overline is used. | + | None | No decorative line is used. | - TextCase enums - | Name | Description | + | Name | Description | | -------- | -------- | - | Normal | The original case of the text is retained. | - | LowerCase | All letters in the text are in lowercase. | - | UpperCase | All letters in the text are in uppercase. | + | Normal | The original case of the text is retained. | + | LowerCase | All letters in the text are in lowercase. | + | UpperCase | All letters in the text are in uppercase. | > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > The **<Text>** component cannot contain both the text and the child component **<Span>**. If both of them exist, only the content in **<Span>** is displayed. diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-textinput.md b/en/application-dev/reference/arkui-ts/ts-basic-components-textinput.md index 4aeeb531d8..369fe964a4 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-textinput.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-textinput.md @@ -23,10 +23,10 @@ None TextInput(value?:{placeholder?: string controller?: TextInputController}) - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | placeholder | string | No | - | Text displayed when there is no input. | - | controller8+ | [TextInputController](#textinputcontroller8) | No | - | Text input controller. | + | placeholder | string | No | - | Text displayed when there is no input. | + | controller8+ | [TextInputController](#textinputcontroller8) | No | - | Text input controller. | ## Attributes @@ -41,33 +41,33 @@ In addition to [universal attributes](ts-universal-attributes.md), the following | enterKeyType | EnterKeyType | EnterKeyType.Done | How the Enter key is labeled. | | caretColor | Color | - | Color of the caret (also known as the text insertion cursor). | | maxLength8+ | number | - | Maximum number of characters in the text input. | -| inputFilter8+ | {
value: [ResourceStr](../../ui/ts-types.md#resourcestr8),
error?: (value: string)
} | - | Regular expression for input filtering. Only inputs that comply with the regular expression can be displayed. Other inputs are ignored. The specified regular expression can match single characters, but not strings. Example: ^(? =.\*\d)(? =.\*[a-z])(? =.\*[A-Z]).{8,10}$. Strong passwords containing 8 to 10 characters cannot be filtered.
- **value**: indicates the regular expression to set.
- **error**: returns the ignored content when regular expression matching fails. | +| inputFilter8+ | {
value: [ResourceStr](../../ui/ts-types.md)8+,
error?: (value: string)
} | - | Regular expression for input filtering. Only inputs that comply with the regular expression can be displayed. Other inputs are ignored. The specified regular expression can match single characters, but not strings. Example: ^(? =.\*\d)(? =.\*[a-z])(? =.\*[A-Z]).{8,10}$. Strong passwords containing 8 to 10 characters cannot be filtered.
- **value**: indicates the regular expression to set.
- **error**: returns the ignored content when regular expression matching fails. | - EnterKeyType enums - | Name | Description | + | Name | Description | | -------- | -------- | - | EnterKeyType.Go | The Enter key is labeled "Go." | - | EnterKeyType.Search | The Enter key is labeled "Search." | - | EnterKeyType.Send | The Enter key is labeled "Send." | - | EnterKeyType.Next | The Enter key is labeled "Next." | - | EnterKeyType.Done | The Enter key is labeled "Done." | + | EnterKeyType.Go | The Enter key is labeled "Go." | + | EnterKeyType.Search | The Enter key is labeled "Search." | + | EnterKeyType.Send | The Enter key is labeled "Send." | + | EnterKeyType.Next | The Enter key is labeled "Next." | + | EnterKeyType.Done | The Enter key is labeled "Done." | - InputType enums - | Name | Description | + | Name | Description | | -------- | -------- | - | InputType.Normal | Normal input mode. | - | InputType.Password | Password input mode. | - | InputType.Email | Email address input mode. | - | InputType.Number | Digit input mode. | + | InputType.Normal | Normal input mode. | + | InputType.Password | Password input mode. | + | InputType.Email | Email address input mode. | + | InputType.Number | Digit input mode. | ### TextInputController8+ Implements the controller of the **<TextInput>** component. - | Name | Description | +| Name | Description | | -------- | -------- | -| caretPosition(value: number):void | Position of the input cursor.
**value**: indicates the length from the start of the string to the position where the input cursor is located. | +| caretPosition(value: number):void | Position of the input cursor.
**value**: indicates the length from the start of the string to the position where the input cursor is located. | ### Objects to Import @@ -85,21 +85,21 @@ caretPosition(value: number): void Sets the cursor in a specified position. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | value | number | Yes | - | Position of the input cursor.
**value**: indicates the length from the start of the string to the position where the input cursor is located. | + | value | number | Yes | - | Position of the input cursor.
**value**: indicates the length from the start of the string to the position where the input cursor is located. | ## Events - | Name | Description | +| Name | Description | | -------- | -------- | -| onChange(value: string) => void | Triggered when the input changes. | -| onSubmit(callback: (enterKey: EnterKeyType) => void) | Triggered when the Enter key on the physical or soft keyboard is pressed. | -| onEditChanged(callback: (isEditing: boolean) => void) | Triggered when the input status changes. | -| onCopy8+(callback:(value: string) => void) | Triggered when the copy button on the pasteboard, which displays when the text box is long pressed, is clicked.
**value**: text to be copied. | -| onCut8+(callback:(value: string) => void) | Triggered when the cut button on the pasteboard, which displays when the text box is long pressed, is clicked.
**value**: text to be cut. | -| onPaste8+(callback:(value: string) => void) | Triggered when the paste button on the pasteboard, which displays when the text box is long pressed, is clicked.
**value**: text to be pasted. | +| onChange(value: string) => void | Triggered when the input changes. | +| onSubmit(callback: (enterKey: EnterKeyType) => void) | Triggered when the Enter key on the physical or soft keyboard is pressed. | +| onEditChanged(callback: (isEditing: boolean) => void) | Triggered when the input status changes. | +| onCopy8+(callback:(value: string) => void) | Triggered when the copy button on the pasteboard, which displays when the text box is long pressed, is clicked.
**value**: text to be copied. | +| onCut8+(callback:(value: string) => void) | Triggered when the cut button on the pasteboard, which displays when the text box is long pressed, is clicked.
**value**: text to be cut. | +| onPaste8+(callback:(value: string) => void) | Triggered when the paste button on the pasteboard, which displays when the text box is long pressed, is clicked.
**value**: text to be pasted. | ## Example diff --git a/en/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md b/en/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md index be0646828f..9a7c1f3987 100644 --- a/en/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md +++ b/en/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md @@ -13,9 +13,9 @@ Use **RenderingContext** to draw rectangles, text, images, and other objects on CanvasRenderingContext2D(setting: RenderingContextSetting) - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | setting | [RenderingContextSettings](#renderingcontextsettings) | Yes | - | See RenderingContextSettings. | + | setting | [RenderingContextSettings](#renderingcontextsettings) | Yes | - | See RenderingContextSettings. | ### RenderingContextSettings @@ -25,9 +25,9 @@ RenderingContextSettings(antialias?: bool) Configures the settings of a **CanvasRenderingContext2D** object, including whether to enable antialiasing. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | antialias | bool | No | false | Whether antialiasing is enabled. | + | antialias | bool | No | false | Whether antialiasing is enabled. | ## Attributes @@ -439,19 +439,19 @@ struct LineDashOffset { ### globalCompositeOperation - | Name | Description | +| Name | Description | | -------- | -------- | -| source-over | Displays the new drawing above the existing drawing. This attribute is used by default. | -| source-atop | Displays the new drawing on the top of the existing drawing. | -| source-in | Displays the new drawing inside the existing drawing. | -| source-out | Displays the part of the new drawing that is outside of the existing drawing. | -| destination-over | Displays the existing drawing above the new drawing. | -| destination-atop | Displays the existing drawing on the top of the new drawing. | -| destination-in | Displays the existing drawing inside the new drawing. | -| destination-out | Displays the part of the existing drawing that is outside of the new drawing. | -| lighter | Displays both the new drawing and the existing drawing. | -| copy | Displays the new drawing and neglects the existing drawing. | -| xor | Combines the new drawing and existing drawing using the XOR operation. | +| source-over | Displays the new drawing above the existing drawing. This attribute is used by default. | +| source-atop | Displays the new drawing on the top of the existing drawing. | +| source-in | Displays the new drawing inside the existing drawing. | +| source-out | Displays the part of the new drawing that is outside of the existing drawing. | +| destination-over | Displays the existing drawing above the new drawing. | +| destination-atop | Displays the existing drawing on the top of the new drawing. | +| destination-in | Displays the existing drawing inside the new drawing. | +| destination-out | Displays the part of the existing drawing that is outside of the new drawing. | +| lighter | Displays both the new drawing and the existing drawing. | +| copy | Displays the new drawing and neglects the existing drawing. | +| xor | Combines the new drawing and existing drawing using the XOR operation. | ``` @@ -659,12 +659,12 @@ fillRect(x: number, y: number, w: number, h: number): void Fills a rectangle on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | - | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | - | width | number | Yes | 0 | Width of the rectangle. | - | height | number | Yes | 0 | Height of the rectangle. | + | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | + | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | + | width | number | Yes | 0 | Width of the rectangle. | + | height | number | Yes | 0 | Height of the rectangle. | - Example @@ -701,12 +701,12 @@ strokeRect(x: number, y: number, w: number, h: number): void Draws an outlined rectangle on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | - | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | - | width | number | Yes | 0 | Width of the rectangle. | - | height | number | Yes | 0 | Height of the rectangle. | + | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | + | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | + | width | number | Yes | 0 | Width of the rectangle. | + | height | number | Yes | 0 | Height of the rectangle. | - Example @@ -742,12 +742,12 @@ clearRect(x: number, y: number, w: number, h: number): void Clears the content in a rectangle on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | - | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | - | width | number | Yes | 0 | Width of the rectangle. | - | height | number | Yes | 0 | Height of the rectangle. | + | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | + | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | + | width | number | Yes | 0 | Width of the rectangle. | + | height | number | Yes | 0 | Height of the rectangle. | - Example @@ -785,11 +785,11 @@ fillText(text: string, x: number, y: number): void Draws filled text on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | text | string | Yes | "" | Text to draw. | - | x | number | Yes | 0 | X-coordinate of the lower left corner of the text. | - | y | number | Yes | 0 | Y-coordinate of the lower left corner of the text. | + | text | string | Yes | "" | Text to draw. | + | x | number | Yes | 0 | X-coordinate of the lower left corner of the text. | + | y | number | Yes | 0 | Y-coordinate of the lower left corner of the text. | - Example @@ -826,11 +826,11 @@ strokeText(text: string, x: number, y: number): void Draws a text stroke on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | text | string | Yes | "" | Text to draw. | - | x | number | Yes | 0 | X-coordinate of the lower left corner of the text. | - | y | number | Yes | 0 | Y-coordinate of the lower left corner of the text. | + | text | string | Yes | "" | Text to draw. | + | x | number | Yes | 0 | X-coordinate of the lower left corner of the text. | + | y | number | Yes | 0 | Y-coordinate of the lower left corner of the text. | - Example @@ -867,19 +867,19 @@ measureText(text: string): TextMetrics Returns a **TextMetrics** object used to obtain the width of specified text. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | text | string | Yes | "" | Text to be measured. | + | text | string | Yes | "" | Text to be measured. | - Return value - | Type | Description | + | Type | Description | | -------- | -------- | - | TextMetrics | **TextMetrics** object. | + | TextMetrics | **TextMetrics** object. | - **TextMetrics** attributes - | Name | Type | Description | + | Name | Type | Description | | -------- | -------- | -------- | - | width | number | Width of the text. | + | width | number | Width of the text. | - Example @@ -917,9 +917,9 @@ stroke(path?: Path2D): void Strokes a path. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | path | [Path2D](../reference/arkui-ts/ts-components-canvas-path2d.md) | No | null | A **Path2D** path to draw. | + | path | [Path2D](ts-components-canvas-path2d.md) | No | null | A **Path2D** path to draw. | - Example @@ -998,10 +998,10 @@ moveTo(x: number, y: number): void Moves a drawing path to a target position on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the target position. | - | y | number | Yes | 0 | Y-coordinate of the target position. | + | x | number | Yes | 0 | X-coordinate of the target position. | + | y | number | Yes | 0 | Y-coordinate of the target position. | - Example @@ -1041,10 +1041,10 @@ lineTo(x: number, y: number): void Connects the current point to a target position using a straight line. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the target position. | - | y | number | Yes | 0 | Y-coordinate of the target position. | + | x | number | Yes | 0 | X-coordinate of the target position. | + | y | number | Yes | 0 | Y-coordinate of the target position. | - Example @@ -1123,10 +1123,10 @@ createPattern(image: ImageBitmap, repetition: string): void Creates a pattern for image filling based on a specified source image and repetition mode. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | image | [ERROR:Invalid link:en-us_topic_0000001212378364.xml#en-us_topic_0000001193075104_xref1892917323814,link:en-us_topic_0000001192915114.xml](en-us_topic_0000001192915114.xml) | Yes | null | Source image. For details, see [ERROR:Invalid link:en-us_topic_0000001212378364.xml#xref539610179238,link:en-us_topic_0000001192915114.xml](en-us_topic_0000001192915114.xml). | - | repetition | string | Yes | "" | Repetition mode. The value can be **'repeat'**, **'repeat-x'**, **'repeat-y'**, or **'no-repeat'**. | + | image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | Yes | null | Source image. For details, see ImageBitmap. | + | repetition | string | Yes | "" | Repetition mode. The value can be **'repeat'**, **'repeat-x'**, **'repeat-y'**, or **'no-repeat'**. | - Example @@ -1166,14 +1166,14 @@ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, Draws a cubic bezier curve on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | cp1x | number | Yes | 0 | X-coordinate of the first parameter of the bezier curve. | - | cp1y | number | Yes | 0 | Y-coordinate of the first parameter of the bezier curve. | - | cp2x | number | Yes | 0 | X-coordinate of the second parameter of the bezier curve. | - | cp2y | number | Yes | 0 | Y-coordinate of the second parameter of the bezier curve. | - | x | number | Yes | 0 | X-coordinate of the end point on the bezier curve. | - | y | number | Yes | 0 | Y-coordinate of the end point on the bezier curve. | + | cp1x | number | Yes | 0 | X-coordinate of the first parameter of the bezier curve. | + | cp1y | number | Yes | 0 | Y-coordinate of the first parameter of the bezier curve. | + | cp2x | number | Yes | 0 | X-coordinate of the second parameter of the bezier curve. | + | cp2y | number | Yes | 0 | Y-coordinate of the second parameter of the bezier curve. | + | x | number | Yes | 0 | X-coordinate of the end point on the bezier curve. | + | y | number | Yes | 0 | Y-coordinate of the end point on the bezier curve. | - Example @@ -1213,12 +1213,12 @@ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void Draws a quadratic curve on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | cpx | number | Yes | 0 | X-coordinate of the bezier curve parameter. | - | cpy | number | Yes | 0 | Y-coordinate of the bezier curve parameter. | - | x | number | Yes | 0 | X-coordinate of the end point on the bezier curve. | - | y | number | Yes | 0 | Y-coordinate of the end point on the bezier curve. | + | cpx | number | Yes | 0 | X-coordinate of the bezier curve parameter. | + | cpy | number | Yes | 0 | Y-coordinate of the bezier curve parameter. | + | x | number | Yes | 0 | X-coordinate of the end point on the bezier curve. | + | y | number | Yes | 0 | Y-coordinate of the end point on the bezier curve. | - Example @@ -1257,14 +1257,14 @@ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, Draws an arc on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the center point of the arc. | - | y | number | Yes | 0 | Y-coordinate of the center point of the arc. | - | radius | number | Yes | 0 | Radius of the arc. | - | startAngle | number | Yes | 0 | Start radian of the arc. | - | endAngle | number | Yes | 0 | End radian of the arc. | - | anticlockwise | boolean | No | false | Whether to draw the arc counterclockwise. | + | x | number | Yes | 0 | X-coordinate of the center point of the arc. | + | y | number | Yes | 0 | Y-coordinate of the center point of the arc. | + | radius | number | Yes | 0 | Radius of the arc. | + | startAngle | number | Yes | 0 | Start radian of the arc. | + | endAngle | number | Yes | 0 | End radian of the arc. | + | anticlockwise | boolean | No | false | Whether to draw the arc counterclockwise. | - Example @@ -1303,13 +1303,13 @@ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void Draws an arc based on the radius and points on the arc. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x1 | number | Yes | 0 | X-coordinate of the first point on the arc. | - | y1 | number | Yes | 0 | Y-coordinate of the first point on the arc. | - | x2 | number | Yes | 0 | X-coordinate of the second point on the arc. | - | y2 | number | Yes | 0 | Y-coordinate of the second point on the arc. | - | radius | number | Yes | 0 | Radius of the arc. | + | x1 | number | Yes | 0 | X-coordinate of the first point on the arc. | + | y1 | number | Yes | 0 | Y-coordinate of the first point on the arc. | + | x2 | number | Yes | 0 | X-coordinate of the second point on the arc. | + | y2 | number | Yes | 0 | Y-coordinate of the second point on the arc. | + | radius | number | Yes | 0 | Radius of the arc. | - Example @@ -1348,16 +1348,16 @@ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number Draws an ellipse in the specified rectangular region. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the ellipse center. | - | y | number | Yes | 0 | Y-coordinate of the ellipse center. | - | radiusX | number | Yes | 0 | Ellipse radius on the x-axis. | - | radiusY | number | Yes | 0 | Ellipse radius on the y-axis. | - | rotation | number | Yes | 0 | Rotation angle of the ellipse, in radians. | - | startAngle | number | Yes | 0 | Angle of the start point for drawing the ellipse, in radians. | - | endAngle | number | Yes | 0 | Angle of the end point for drawing the ellipse, in radians. | - | anticlockwise | boolean | No | false | Whether to draw the ellipse in the counterclockwise direction. | + | x | number | Yes | 0 | X-coordinate of the ellipse center. | + | y | number | Yes | 0 | Y-coordinate of the ellipse center. | + | radiusX | number | Yes | 0 | Ellipse radius on the x-axis. | + | radiusY | number | Yes | 0 | Ellipse radius on the y-axis. | + | rotation | number | Yes | 0 | Rotation angle of the ellipse, in radians. | + | startAngle | number | Yes | 0 | Angle of the start point for drawing the ellipse, in radians. | + | endAngle | number | Yes | 0 | Angle of the end point for drawing the ellipse, in radians. | + | anticlockwise | boolean | No | false | Whether to draw the ellipse in the counterclockwise direction. | - Example @@ -1397,12 +1397,12 @@ rect(x: number, y: number, width: number, height: number): void Creates a rectangle. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | - | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | - | width | number | Yes | 0 | Width of the rectangle. | - | height | number | Yes | 0 | Height of the rectangle. | + | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | + | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | + | width | number | Yes | 0 | Width of the rectangle. | + | height | number | Yes | 0 | Height of the rectangle. | - Example @@ -1513,9 +1513,9 @@ rotate(rotate: number): void Rotates a canvas clockwise around its coordinate axes. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | rotate | number | Yes | 0 | Clockwise rotation angle. You can use **Math.PI / 180** to convert the angle to a radian. | + | rotate | number | Yes | 0 | Clockwise rotation angle. You can use **Math.PI / 180** to convert the angle to a radian. | - Example @@ -1553,10 +1553,10 @@ scale(x: number, y: number): void Scales a canvas based on scale factors. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | Horizontal scale factor. | - | y | number | Yes | 0 | Vertical scale factor. | + | x | number | Yes | 0 | Horizontal scale factor. | + | y | number | Yes | 0 | Vertical scale factor. | - Example @@ -1602,14 +1602,14 @@ Defines a transformation matrix. To transform a graph, you only need to set para > - y' = skewX \* x + scaleY \* y + translateY - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | scaleX | number | Yes | 0 | X-axis scale. | - | skewX | number | Yes | 0 | X-axis skew. | - | skewY | number | Yes | 0 | Y-axis skew. | - | scaleY | number | Yes | 0 | Y-axis scale. | - | translateX | number | Yes | 0 | X-axis translation. | - | translateY | number | Yes | 0 | Y-axis translation. | + | scaleX | number | Yes | 0 | X-axis scale. | + | skewX | number | Yes | 0 | X-axis skew. | + | skewY | number | Yes | 0 | Y-axis skew. | + | scaleY | number | Yes | 0 | Y-axis scale. | + | translateX | number | Yes | 0 | X-axis translation. | + | translateY | number | Yes | 0 | Y-axis translation. | - Example @@ -1653,14 +1653,14 @@ setTransform(scaleX: number, skewX: number, skewY: number, scale: number, transl Resets the existing transformation matrix and creates a new transformation matrix by using the same parameters as the **transform()** function. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | scaleX | number | Yes | 0 | X-axis scale. | - | skewX | number | Yes | 0 | X-axis skew. | - | skewY | number | Yes | 0 | Y-axis skew. | - | scaleY | number | Yes | 0 | Y-axis scale. | - | translateX | number | Yes | 0 | X-axis translation. | - | translateY | number | Yes | 0 | Y-axis translation. | + | scaleX | number | Yes | 0 | X-axis scale. | + | skewX | number | Yes | 0 | X-axis skew. | + | skewY | number | Yes | 0 | Y-axis skew. | + | scaleY | number | Yes | 0 | Y-axis scale. | + | translateX | number | Yes | 0 | X-axis translation. | + | translateY | number | Yes | 0 | Y-axis translation. | - Example @@ -1701,10 +1701,10 @@ translate(x: number, y: number): void Moves the origin of the coordinate system. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-axis translation. | - | y | number | Yes | 0 | Y-axis translation. | + | x | number | Yes | 0 | X-axis translation. | + | y | number | Yes | 0 | Y-axis translation. | - Example @@ -1747,17 +1747,17 @@ drawImage(image: ImageBitmap, sx: number, sy: number, sWidth: number, sHeight: n Draws an image. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | image | [ERROR:Invalid link:en-us_topic_0000001212378364.xml#en-us_topic_0000001193075104_xref962584519412,link:en-us_topic_0000001192915114.xml](en-us_topic_0000001192915114.xml) | Yes | null | Image resource. For details, see [ERROR:Invalid link:en-us_topic_0000001212378364.xml#xref29052050153012,link:en-us_topic_0000001192915114.xml](en-us_topic_0000001192915114.xml). | - | sx | number | No | 0 | X-coordinate of the upper left corner of the rectangle used to crop the source image. | - | sy | number | No | 0 | Y-coordinate of the upper left corner of the rectangle used to crop the source image. | - | sWidth | number | No | 0 | Target width to crop the source image. | - | sHeight | number | No | 0 | Target height to crop the source image. | - | dx | number | Yes | 0 | X-coordinate of the upper left corner of the drawing area on the canvas. | - | dy | number | Yes | 0 | Y-coordinate of the upper left corner of the drawing area on the canvas. | - | dWidth | number | No | 0 | Width of the drawing area. | - | dHeight | number | No | 0 | Height of the drawing area. | + | image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | Yes | null | Image resource. For details, see ImageBitmap | + | sx | number | No | 0 | X-coordinate of the upper left corner of the rectangle used to crop the source image. | + | sy | number | No | 0 | Y-coordinate of the upper left corner of the rectangle used to crop the source image. | + | sWidth | number | No | 0 | Target width to crop the source image. | + | sHeight | number | No | 0 | Target height to crop the source image. | + | dx | number | Yes | 0 | X-coordinate of the upper left corner of the drawing area on the canvas. | + | dy | number | Yes | 0 | Y-coordinate of the upper left corner of the drawing area on the canvas. | + | dWidth | number | No | 0 | Width of the drawing area. | + | dHeight | number | No | 0 | Height of the drawing area. | - Example @@ -1795,10 +1795,10 @@ createImageData(width: number, height: number): Object Creates an **ImageData** object. For details, see [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md). - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | width | number | Yes | 0 | Width of the **ImageData** object. | - | height | number | Yes | 0 | Height of the **ImageData** object. | + | width | number | Yes | 0 | Width of the **ImageData** object. | + | height | number | Yes | 0 | Height of the **ImageData** object. | ### createImageData @@ -1808,9 +1808,9 @@ createImageData(imageData: Object): Object Creates an **ImageData** object. For details, see [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md). - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | imagedata | Object | Yes | null | **ImageData** object with the same width and height copied from the original **ImageData** object. | + | imagedata | Object | Yes | null | **ImageData** object with the same width and height copied from the original **ImageData** object. | ### getImageData @@ -1819,12 +1819,12 @@ getImageData(sx: number, sy: number, sw: number, sh: number): Object Creates an [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md) object with pixels in the specified area on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area. | - | sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area. | - | sw | number | Yes | 0 | Width of the output area. | - | sh | number | Yes | 0 | Height of the output area. | + | sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area. | + | sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area. | + | sw | number | Yes | 0 | Width of the output area. | + | sh | number | Yes | 0 | Height of the output area. | ### putImageData @@ -1834,15 +1834,15 @@ putImageData(imageData: Object, dx: number, dy: number, dirtyX?: number, dirtyY? Puts the [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md) onto a rectangular area on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | imagedata | Object | Yes | null | **ImageData** object with pixels to put onto the canvas. | - | dx | number | Yes | 0 | X-axis offset of the rectangular area on the canvas. | - | dy | number | Yes | 0 | Y-axis offset of the rectangular area on the canvas. | - | dirtyX | number | No | 0 | X-axis offset of the upper left corner of the rectangular area relative to that of the source image. | - | dirtyY | number | No | 0 | Y-axis offset of the upper left corner of the rectangular area relative to that of the source image. | - | dirtyWidth | number | No | Width of the **ImageData** object | Width of the rectangular area to crop the source image. | - | dirtyHeight | number | No | Height of the **ImageData** object | Height of the rectangular area to crop the source image. | + | imagedata | Object | Yes | null | **ImageData** object with pixels to put onto the canvas. | + | dx | number | Yes | 0 | X-axis offset of the rectangular area on the canvas. | + | dy | number | Yes | 0 | Y-axis offset of the rectangular area on the canvas. | + | dirtyX | number | No | 0 | X-axis offset of the upper left corner of the rectangular area relative to that of the source image. | + | dirtyY | number | No | 0 | Y-axis offset of the upper left corner of the rectangular area relative to that of the source image. | + | dirtyWidth | number | No | Width of the **ImageData** object | Width of the rectangular area to crop the source image. | + | dirtyHeight | number | No | Height of the **ImageData** object | Height of the rectangular area to crop the source image. | - Example @@ -1950,12 +1950,12 @@ createLinearGradient(x0: number, y0: number, x1: number, y1: number): void Creates a linear gradient. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x0 | number | Yes | 0 | X-coordinate of the start point. | - | y0 | number | Yes | 0 | Y-coordinate of the start point. | - | x1 | number | Yes | 0 | X-coordinate of the end point. | - | y1 | number | Yes | 0 | Y-coordinate of the end point. | + | x0 | number | Yes | 0 | X-coordinate of the start point. | + | y0 | number | Yes | 0 | Y-coordinate of the start point. | + | x1 | number | Yes | 0 | X-coordinate of the end point. | + | y1 | number | Yes | 0 | Y-coordinate of the end point. | - Example @@ -1997,14 +1997,14 @@ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, Creates a linear gradient. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x0 | number | Yes | 0 | X-coordinate of the center of the start circle. | - | y0 | number | Yes | 0 | Y-coordinate of the center of the start circle. | - | r0 | number | Yes | 0 | Radius of the start circle, which must be a non-negative finite number. | - | x1 | number | Yes | 0 | X-coordinate of the center of the end circle. | - | y1 | number | Yes | 0 | Y-coordinate of the center of the end circle. | - | r1 | number | Yes | 0 | Radius of the end circle, which must be a non-negative finite number. | + | x0 | number | Yes | 0 | X-coordinate of the center of the start circle. | + | y0 | number | Yes | 0 | Y-coordinate of the center of the start circle. | + | r0 | number | Yes | 0 | Radius of the start circle, which must be a non-negative finite number. | + | x1 | number | Yes | 0 | X-coordinate of the center of the end circle. | + | y1 | number | Yes | 0 | Y-coordinate of the center of the end circle. | + | r1 | number | Yes | 0 | Radius of the end circle, which must be a non-negative finite number. | - Example diff --git a/en/application-dev/reference/arkui-ts/ts-container-list.md b/en/application-dev/reference/arkui-ts/ts-container-list.md index ec669200e2..889dff5c43 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-list.md +++ b/en/application-dev/reference/arkui-ts/ts-container-list.md @@ -15,7 +15,7 @@ None ## Child Components -This component contains the child component [](../reference/arkui-ts/ts-container-listitem.md). +This component contains the child component [](ts-container-listitem.md). ## APIs @@ -23,10 +23,10 @@ This component contains the child component [](../reference/arkui-ts/t List(value:{space?: number, initialIndex?: number}) - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | space | number | No | 0 | Spacing between list items. | - | initialIndex | number | No | 0 | Item displayed at the beginning of the component when the current list is loaded for the first time, that is, the first item to be displayed. If the configured sequence number is greater than the sequence number of the last item, the setting does not take effect. | + | space | number | No | 0 | Spacing between list items. | + | initialIndex | number | No | 0 | Item displayed at the beginning of the component when the current list is loaded for the first time, that is, the first item to be displayed. If the configured sequence number is greater than the sequence number of the last item, the setting does not take effect. | ## Attributes @@ -42,18 +42,18 @@ List(value:{space?: number, initialIndex?: number}) | restoreId8+ | number | - | Migration ID of the component. During application migration, the status of the component is migrated to the component with the same migration ID on the peer end.
For a **<List>** component, the status includes the item serial number displayed at the start position. | - EdgeEffect enums - | Name | Description | + | Name | Description | | -------- | -------- | - | Spring | Similar to the physical dynamic effect of a spring. After scrolling to the edge, you can continue to scroll for a distance based on the initial speed or by touching the knob of the scrollbar. After you release your hand, the knob is rebounded. | - | None | No effect after the scroll bar is moved to the edge. | + | Spring | Similar to the physical dynamic effect of a spring. After scrolling to the edge, you can continue to scroll for a distance based on the initial speed or by touching the knob of the scrollbar. After you release your hand, the knob is rebounded. | + | None | No effect after the scroll bar is moved to the edge. | ## Events - | Name | Description | +| Name | Description | | -------- | -------- | -| onItemDelete(index: number) => boolean | Triggered when a list item is deleted. | -| onScrollIndex(firstIndex: number, lastIndex: number) => void | Triggered when the start position and end position of the current list are changed. | +| onItemDelete(index: number) => boolean | Triggered when a list item is deleted. | +| onScrollIndex(firstIndex: number, lastIndex: number) => void | Triggered when the start position and end position of the current list are changed. | > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > To enable the editable mode for a list, the following conditions must be met: diff --git a/en/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md b/en/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md index d4585e9691..c064d4cd32 100644 --- a/en/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md +++ b/en/application-dev/reference/arkui-ts/ts-methods-custom-dialog-box.md @@ -16,7 +16,7 @@ CustomDialogController(value:{builder: CustomDialog, cancel?: () => void, aut - Parameters | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | builder | [CustomDialog](../../ui/ ts-component-based-customdialog.md) | Yes | - | Constructor of the custom dialog box content. | + | builder | [CustomDialog](../../ui/ts-component-based-customdialog.md) | Yes | - | Constructor of the custom dialog box content. | | cancel | () => void | No | - | Callback invoked when the dialog box is closed after the overlay exits. | | autoCancel | boolean | No | true | Whether to allow users to click the overlay to exit. | | alignment | DialogAlignment | No | DialogAlignment.Default | Alignment mode of the dialog box in the vertical direction. | @@ -24,18 +24,18 @@ CustomDialogController(value:{builder: CustomDialog, cancel?: () => void, aut | customStyle | boolean | No | false | Whether the style of the dialog box is customized. | - DialogAlignment enums - | Name | Description | + | Name | Description | | -------- | -------- | - | Top | Aligns vertically to the top. | - | Center | Aligns vertically to the middle. | - | Bottom | Aligns vertically to the bottom. | - | Default | Default alignment. | - | TopStart8+ | Top left alignment. | - | TopEnd8+ | Top right alignment. | - | CenterStart8+ | Center left alignment. | - | CenterEnd8+ | Center right alignment. | - | BottomStart8+ | Bottom left alignment. | - | BottomEnd8+ | Bottom right alignment. | + | Top | Aligns vertically to the top. | + | Center | Aligns vertically to the middle. | + | Bottom | Aligns vertically to the bottom. | + | Default | Default alignment. | + | TopStart8+ | Top left alignment. | + | TopEnd8+ | Top right alignment. | + | CenterStart8+ | Center left alignment. | + | CenterEnd8+ | Center right alignment. | + | BottomStart8+ | Bottom left alignment. | + | BottomEnd8+ | Bottom right alignment. | ### CustomDialogController diff --git a/en/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md b/en/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md index 7cdd1c5d4a..4d0a7c3de4 100644 --- a/en/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md +++ b/en/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md @@ -462,19 +462,19 @@ struct LineDashOffset { ### globalCompositeOperation - | Name | Description | +| Name | Description | | -------- | -------- | -| source-over | Displays the new drawing above the existing drawing. This attribute is used by default. | -| source-atop | Displays the new drawing on the top of the existing drawing. | -| source-in | Displays the new drawing inside the existing drawing. | -| source-out | Displays the part of the new drawing that is outside of the existing drawing. | -| destination-over | Displays the existing drawing above the new drawing. | -| destination-atop | Displays the existing drawing on the top of the new drawing. | -| destination-in | Displays the existing drawing inside the new drawing. | -| destination-out | Displays the part of the existing drawing that is outside of the new drawing. | -| lighter | Displays both the new drawing and the existing drawing. | -| copy | Displays the new drawing and neglects the existing drawing. | -| xor | Combines the new drawing and existing drawing using the XOR operation. | +| source-over | Displays the new drawing above the existing drawing. This attribute is used by default. | +| source-atop | Displays the new drawing on the top of the existing drawing. | +| source-in | Displays the new drawing inside the existing drawing. | +| source-out | Displays the part of the new drawing that is outside of the existing drawing. | +| destination-over | Displays the existing drawing above the new drawing. | +| destination-atop | Displays the existing drawing on the top of the new drawing. | +| destination-in | Displays the existing drawing inside the new drawing. | +| destination-out | Displays the part of the existing drawing that is outside of the new drawing. | +| lighter | Displays both the new drawing and the existing drawing. | +| copy | Displays the new drawing and neglects the existing drawing. | +| xor | Combines the new drawing and existing drawing using the XOR operation. | ``` @@ -702,12 +702,12 @@ fillRect(x: number, y: number, w: number, h: number): void Fills a rectangle on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | - | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | - | width | number | Yes | 0 | Width of the rectangle. | - | height | number | Yes | 0 | Height of the rectangle. | + | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | + | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | + | width | number | Yes | 0 | Width of the rectangle. | + | height | number | Yes | 0 | Height of the rectangle. | - Example @@ -747,12 +747,12 @@ strokeRect(x: number, y: number, w: number, h: number): void Draws an outlined rectangle on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | - | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | - | width | number | Yes | 0 | Width of the rectangle. | - | height | number | Yes | 0 | Height of the rectangle. | + | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | + | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | + | width | number | Yes | 0 | Width of the rectangle. | + | height | number | Yes | 0 | Height of the rectangle. | - Example @@ -791,12 +791,12 @@ clearRect(x: number, y: number, w: number, h: number): void Clears the content in a rectangle on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | - | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | - | width | number | Yes | 0 | Width of the rectangle. | - | height | number | Yes | 0 | Height of the rectangle. | + | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | + | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | + | width | number | Yes | 0 | Width of the rectangle. | + | height | number | Yes | 0 | Height of the rectangle. | - Example @@ -837,11 +837,11 @@ fillText(text: string, x: number, y: number): void Draws filled text on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | text | string | Yes | "" | Text to draw. | - | x | number | Yes | 0 | X-coordinate of the lower left corner of the text. | - | y | number | Yes | 0 | Y-coordinate of the lower left corner of the text. | + | text | string | Yes | "" | Text to draw. | + | x | number | Yes | 0 | X-coordinate of the lower left corner of the text. | + | y | number | Yes | 0 | Y-coordinate of the lower left corner of the text. | - Example @@ -881,11 +881,11 @@ strokeText(text: string, x: number, y: number): void Draws a text stroke on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | text | string | Yes | "" | Text to draw. | - | x | number | Yes | 0 | X-coordinate of the lower left corner of the text. | - | y | number | Yes | 0 | Y-coordinate of the lower left corner of the text. | + | text | string | Yes | "" | Text to draw. | + | x | number | Yes | 0 | X-coordinate of the lower left corner of the text. | + | y | number | Yes | 0 | Y-coordinate of the lower left corner of the text. | - Example @@ -925,19 +925,19 @@ measureText(text: string): TextMetrics Returns a **TextMetrics** object used to obtain the width of specified text. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | text | string | Yes | "" | Text to be measured. | + | text | string | Yes | "" | Text to be measured. | - Return value - | Type | Description | + | Type | Description | | -------- | -------- | - | [ERROR:Invalid link:en-us_topic_0000001212218420.xml#en-us_topic_0000001192595178_xref4588645104013,link:#en-us_topic_0000001192595178_li0376175812415](#en-us_topic_0000001192595178_li0376175812415) | **TextMetrics** object. | + | TextMetrics | **TextMetrics** object. | - **TextMetrics** attributes - | Name | Type | Description | + | Name | Type | Description | | -------- | -------- | -------- | - | width | number | Width of the text. | + | width | number | Width of the text. | - Example @@ -1063,10 +1063,10 @@ moveTo(x: number, y: number): void Moves a drawing path to a target position on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the target position. | - | y | number | Yes | 0 | Y-coordinate of the target position. | + | x | number | Yes | 0 | X-coordinate of the target position. | + | y | number | Yes | 0 | Y-coordinate of the target position. | - Example @@ -1108,10 +1108,10 @@ lineTo(x: number, y: number): void Connects the current point to a target position using a straight line. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the target position. | - | y | number | Yes | 0 | Y-coordinate of the target position. | + | x | number | Yes | 0 | X-coordinate of the target position. | + | y | number | Yes | 0 | Y-coordinate of the target position. | - Example @@ -1194,10 +1194,10 @@ createPattern(image: ImageBitmap, repetition: string): CanvasPattern Creates a pattern for image filling based on a specified source image and repetition mode. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | image | [ERROR:Invalid link:en-us_topic_0000001212218420.xml#en-us_topic_0000001192595178_xref1892917323814,link:en-us_topic_0000001192915114.xml](en-us_topic_0000001192915114.xml) | Yes | null | Source image. For details, see [ERROR:Invalid link:en-us_topic_0000001212218420.xml#xref13437192515430,link:en-us_topic_0000001192915114.xml](en-us_topic_0000001192915114.xml). | - | repetition | string | Yes | "" | Repetition mode. The value can be **'repeat'**, **'repeat-x'**, **'repeat-y'**, or **'no-repeat'**. | + | image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | Yes | null | Source image. For details, see ImageBitmap. | + | repetition | string | Yes | "" | Repetition mode. The value can be **'repeat'**, **'repeat-x'**, **'repeat-y'**, or **'no-repeat'**. | - Example @@ -1239,14 +1239,14 @@ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, Draws a cubic bezier curve on the canvas. - Name - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | cp1x | number | Yes | 0 | X-coordinate of the first parameter of the bezier curve. | - | cp1y | number | Yes | 0 | Y-coordinate of the first parameter of the bezier curve. | - | cp2x | number | Yes | 0 | X-coordinate of the second parameter of the bezier curve. | - | cp2y | number | Yes | 0 | Y-coordinate of the second parameter of the bezier curve. | - | x | number | Yes | 0 | X-coordinate of the end point on the bezier curve. | - | y | number | Yes | 0 | Y-coordinate of the end point on the bezier curve. | + | cp1x | number | Yes | 0 | X-coordinate of the first parameter of the bezier curve. | + | cp1y | number | Yes | 0 | Y-coordinate of the first parameter of the bezier curve. | + | cp2x | number | Yes | 0 | X-coordinate of the second parameter of the bezier curve. | + | cp2y | number | Yes | 0 | Y-coordinate of the second parameter of the bezier curve. | + | x | number | Yes | 0 | X-coordinate of the end point on the bezier curve. | + | y | number | Yes | 0 | Y-coordinate of the end point on the bezier curve. | - Example @@ -1288,12 +1288,12 @@ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void Draws a quadratic curve on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | cpx | number | Yes | 0 | X-coordinate of the bezier curve parameter. | - | cpy | number | Yes | 0 | Y-coordinate of the bezier curve parameter. | - | x | number | Yes | 0 | X-coordinate of the end point on the bezier curve. | - | y | number | Yes | 0 | Y-coordinate of the end point on the bezier curve. | + | cpx | number | Yes | 0 | X-coordinate of the bezier curve parameter. | + | cpy | number | Yes | 0 | Y-coordinate of the bezier curve parameter. | + | x | number | Yes | 0 | X-coordinate of the end point on the bezier curve. | + | y | number | Yes | 0 | Y-coordinate of the end point on the bezier curve. | - Example @@ -1335,14 +1335,14 @@ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, Draws an arc on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the center point of the arc. | - | y | number | Yes | 0 | Y-coordinate of the center point of the arc. | - | radius | number | Yes | 0 | Radius of the arc. | - | startAngle | number | Yes | 0 | Start radian of the arc. | - | endAngle | number | Yes | 0 | End radian of the arc. | - | anticlockwise | boolean | No | false | Whether to draw the arc counterclockwise. | + | x | number | Yes | 0 | X-coordinate of the center point of the arc. | + | y | number | Yes | 0 | Y-coordinate of the center point of the arc. | + | radius | number | Yes | 0 | Radius of the arc. | + | startAngle | number | Yes | 0 | Start radian of the arc. | + | endAngle | number | Yes | 0 | End radian of the arc. | + | anticlockwise | boolean | No | false | Whether to draw the arc counterclockwise. | - Example @@ -1383,13 +1383,13 @@ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void Draws an arc based on the radius and points on the arc. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x1 | number | Yes | 0 | X-coordinate of the first point on the arc. | - | y1 | number | Yes | 0 | Y-coordinate of the first point on the arc. | - | x2 | number | Yes | 0 | X-coordinate of the second point on the arc. | - | y2 | number | Yes | 0 | Y-coordinate of the second point on the arc. | - | radius | number | Yes | 0 | Radius of the arc. | + | x1 | number | Yes | 0 | X-coordinate of the first point on the arc. | + | y1 | number | Yes | 0 | Y-coordinate of the first point on the arc. | + | x2 | number | Yes | 0 | X-coordinate of the second point on the arc. | + | y2 | number | Yes | 0 | Y-coordinate of the second point on the arc. | + | radius | number | Yes | 0 | Radius of the arc. | - Example @@ -1430,16 +1430,16 @@ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number Draws an ellipse in the specified rectangular region. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the ellipse center. | - | y | number | Yes | 0 | Y-coordinate of the ellipse center. | - | radiusX | number | Yes | 0 | Ellipse radius on the x-axis. | - | radiusY | number | Yes | 0 | Ellipse radius on the y-axis. | - | rotation | number | Yes | 0 | Rotation angle of the ellipse, in radians. | - | startAngle | number | Yes | 0 | Angle of the start point for drawing the ellipse, in radians. | - | endAngle | number | Yes | 0 | Angle of the end point for drawing the ellipse, in radians. | - | anticlockwise | boolean | No | false | Whether to draw the ellipse in the counterclockwise direction. | + | x | number | Yes | 0 | X-coordinate of the ellipse center. | + | y | number | Yes | 0 | Y-coordinate of the ellipse center. | + | radiusX | number | Yes | 0 | Ellipse radius on the x-axis. | + | radiusY | number | Yes | 0 | Ellipse radius on the y-axis. | + | rotation | number | Yes | 0 | Rotation angle of the ellipse, in radians. | + | startAngle | number | Yes | 0 | Angle of the start point for drawing the ellipse, in radians. | + | endAngle | number | Yes | 0 | Angle of the end point for drawing the ellipse, in radians. | + | anticlockwise | boolean | No | false | Whether to draw the ellipse in the counterclockwise direction. | - Example @@ -1481,12 +1481,12 @@ rect(x: number, y: number, width: number, height: number): void Creates a rectangle. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | - | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | - | width | number | Yes | 0 | Width of the rectangle. | - | height | number | Yes | 0 | Height of the rectangle. | + | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle. | + | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle. | + | width | number | Yes | 0 | Width of the rectangle. | + | height | number | Yes | 0 | Height of the rectangle. | - Example @@ -1603,9 +1603,9 @@ rotate(rotate: number): void Rotates a canvas clockwise around its coordinate axes. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | rotate | number | Yes | 0 | Clockwise rotation angle. You can use **Math.PI / 180** to convert the angle to a radian. | + | rotate | number | Yes | 0 | Clockwise rotation angle. You can use **Math.PI / 180** to convert the angle to a radian. | - Example @@ -1645,10 +1645,10 @@ scale(x: number, y: number): void Scales a canvas based on scale factors. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | Horizontal scale factor. | - | y | number | Yes | 0 | Vertical scale factor. | + | x | number | Yes | 0 | Horizontal scale factor. | + | y | number | Yes | 0 | Vertical scale factor. | - Example @@ -1696,14 +1696,14 @@ Defines a transformation matrix. To transform a graph, you only need to set para > - y' = skewX \* x + scaleY \* y + translateY - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | scaleX | number | Yes | 0 | X-axis scale. | - | skewX | number | Yes | 0 | X-axis skew. | - | skewY | number | Yes | 0 | Y-axis skew. | - | scaleY | number | Yes | 0 | Y-axis scale. | - | translateX | number | Yes | 0 | X-axis translation. | - | translateY | number | Yes | 0 | Y-axis translation. | + | scaleX | number | Yes | 0 | X-axis scale. | + | skewX | number | Yes | 0 | X-axis skew. | + | skewY | number | Yes | 0 | Y-axis skew. | + | scaleY | number | Yes | 0 | Y-axis scale. | + | translateX | number | Yes | 0 | X-axis translation. | + | translateY | number | Yes | 0 | Y-axis translation. | - Example @@ -1749,14 +1749,14 @@ setTransform(scaleX: number, skewX: number, skewY: number, scale: number, transl Resets the existing transformation matrix and creates a new transformation matrix by using the same parameters as the **transform()** function. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | scaleX | number | Yes | 0 | X-axis scale. | - | skewX | number | Yes | 0 | X-axis skew. | - | skewY | number | Yes | 0 | Y-axis skew. | - | scaleY | number | Yes | 0 | Y-axis scale. | - | translateX | number | Yes | 0 | X-axis translation. | - | translateY | number | Yes | 0 | Y-axis translation. | + | scaleX | number | Yes | 0 | X-axis scale. | + | skewX | number | Yes | 0 | X-axis skew. | + | skewY | number | Yes | 0 | Y-axis skew. | + | scaleY | number | Yes | 0 | Y-axis scale. | + | translateX | number | Yes | 0 | X-axis translation. | + | translateY | number | Yes | 0 | Y-axis translation. | - Example @@ -1799,10 +1799,10 @@ translate(x: number, y: number): void Moves the origin of the coordinate system. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | Yes | 0 | X-axis translation. | - | y | number | Yes | 0 | Y-axis translation. | + | x | number | Yes | 0 | X-axis translation. | + | y | number | Yes | 0 | Y-axis translation. | - Example @@ -1847,17 +1847,17 @@ drawImage(image: ImageBitmap, sx: number, sy: number, sWidth: number, sHeight: n Draws an image. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | image | [ERROR:Invalid link:en-us_topic_0000001212218420.xml#en-us_topic_0000001192595178_xref2365443135017,link:en-us_topic_0000001192915114.xml](en-us_topic_0000001192915114.xml) | Yes | null | Image resource. For details, see [ERROR:Invalid link:en-us_topic_0000001212218420.xml#xref10476113612499,link:en-us_topic_0000001192915114.xml](en-us_topic_0000001192915114.xml). | - | sx | number | No | 0 | X-coordinate of the upper left corner of the rectangle used to crop the source image. | - | sy | number | No | 0 | Y-coordinate of the upper left corner of the rectangle used to crop the source image. | - | sWidth | number | No | 0 | Target width to crop the source image. | - | sHeight | number | No | 0 | Target height to crop the source image. | - | dx | number | Yes | 0 | X-coordinate of the upper left corner of the drawing area on the canvas. | - | dy | number | Yes | 0 | Y-coordinate of the upper left corner of the drawing area on the canvas. | - | dWidth | number | No | 0 | Width of the drawing area. | - | dHeight | number | No | 0 | Height of the drawing area. | + | image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | Yes | null | Image resource. For details, see ImageBitmap. | + | sx | number | No | 0 | X-coordinate of the upper left corner of the rectangle used to crop the source image. | + | sy | number | No | 0 | Y-coordinate of the upper left corner of the rectangle used to crop the source image. | + | sWidth | number | No | 0 | Target width to crop the source image. | + | sHeight | number | No | 0 | Target height to crop the source image. | + | dx | number | Yes | 0 | X-coordinate of the upper left corner of the drawing area on the canvas. | + | dy | number | Yes | 0 | Y-coordinate of the upper left corner of the drawing area on the canvas. | + | dWidth | number | No | 0 | Width of the drawing area. | + | dHeight | number | No | 0 | Height of the drawing area. | - Example @@ -1898,10 +1898,10 @@ createImageData(width: number, height: number): Object Creates an **ImageData** object based on the specified width and height. For details, see [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md). - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | width | number | Yes | 0 | Width of the **ImageData** object. | - | height | number | Yes | 0 | Height of the **ImageData** object. | + | width | number | Yes | 0 | Width of the **ImageData** object. | + | height | number | Yes | 0 | Height of the **ImageData** object. | ### createImageData @@ -1911,9 +1911,9 @@ createImageData(imageData: ImageData): Object Creates an **ImageData** object by copying an existing **ImageData** object. For details, see [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md). - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | imagedata | [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md) | Yes | null | **ImageData** object to copy. | + | imagedata | [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md) | Yes | null | **ImageData** object to copy. | ### getImageData @@ -1923,12 +1923,12 @@ getImageData(sx: number, sy: number, sw: number, sh: number): Object Creates an [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md) object with pixels in the specified area on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area. | - | sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area. | - | sw | number | Yes | 0 | Width of the output area. | - | sh | number | Yes | 0 | Height of the output area. | + | sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area. | + | sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area. | + | sw | number | Yes | 0 | Width of the output area. | + | sh | number | Yes | 0 | Height of the output area. | ### putImageData @@ -1938,15 +1938,15 @@ putImageData(imageData: Object, dx: number, dy: number, dirtyX?: number, dirtyY? Puts the [ImageData](../reference/arkui-ts/ts-components-canvas-imagebitmap.md) onto a rectangular area on the canvas. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | imagedata | Object | Yes | null | **ImageData** object with pixels to put onto the canvas. | - | dx | number | Yes | 0 | X-axis offset of the rectangular area on the canvas. | - | dy | number | Yes | 0 | Y-axis offset of the rectangular area on the canvas. | - | dirtyX | number | No | 0 | X-axis offset of the upper left corner of the rectangular area relative to that of the source image. | - | dirtyY | number | No | 0 | Y-axis offset of the upper left corner of the rectangular area relative to that of the source image. | - | dirtyWidth | number | No | Width of the **ImageData** object | Width of the rectangular area to crop the source image. | - | dirtyHeight | number | No | Height of the **ImageData** object | Height of the rectangular area to crop the source image. | + | imagedata | Object | Yes | null | **ImageData** object with pixels to put onto the canvas. | + | dx | number | Yes | 0 | X-axis offset of the rectangular area on the canvas. | + | dy | number | Yes | 0 | Y-axis offset of the rectangular area on the canvas. | + | dirtyX | number | No | 0 | X-axis offset of the upper left corner of the rectangular area relative to that of the source image. | + | dirtyY | number | No | 0 | Y-axis offset of the upper left corner of the rectangular area relative to that of the source image. | + | dirtyWidth | number | No | Width of the **ImageData** object | Width of the rectangular area to crop the source image. | + | dirtyHeight | number | No | Height of the **ImageData** object | Height of the rectangular area to crop the source image. | - Example @@ -2060,12 +2060,12 @@ createLinearGradient(x0: number, y0: number, x1: number, y1: number): void Creates a linear gradient. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x0 | number | Yes | 0 | X-coordinate of the start point. | - | y0 | number | Yes | 0 | Y-coordinate of the start point. | - | x1 | number | Yes | 0 | X-coordinate of the end point. | - | y1 | number | Yes | 0 | Y-coordinate of the end point. | + | x0 | number | Yes | 0 | X-coordinate of the start point. | + | y0 | number | Yes | 0 | Y-coordinate of the start point. | + | x1 | number | Yes | 0 | X-coordinate of the end point. | + | y1 | number | Yes | 0 | Y-coordinate of the end point. | - Example @@ -2110,14 +2110,14 @@ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, Creates a linear gradient. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x0 | number | Yes | 0 | X-coordinate of the center of the start circle. | - | y0 | number | Yes | 0 | Y-coordinate of the center of the start circle. | - | r0 | number | Yes | 0 | Radius of the start circle, which must be a non-negative finite number. | - | x1 | number | Yes | 0 | X-coordinate of the center of the end circle. | - | y1 | number | Yes | 0 | Y-coordinate of the center of the end circle. | - | r1 | number | Yes | 0 | Radius of the end circle, which must be a non-negative finite number. | + | x0 | number | Yes | 0 | X-coordinate of the center of the start circle. | + | y0 | number | Yes | 0 | Y-coordinate of the center of the start circle. | + | r0 | number | Yes | 0 | Radius of the start circle, which must be a non-negative finite number. | + | x1 | number | Yes | 0 | X-coordinate of the center of the end circle. | + | y1 | number | Yes | 0 | Y-coordinate of the center of the end circle. | + | r1 | number | Yes | 0 | Radius of the end circle, which must be a non-negative finite number. | - Example -- GitLab