diff --git a/en/application-dev/reference/arkui-ts/ts-container-scroll.md b/en/application-dev/reference/arkui-ts/ts-container-scroll.md index 076505a2951dac1b2e3a729768f56f8d52692775..fcb3dbc0af7c3213b3e25f5b2fce53719cac5b3e 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-scroll.md +++ b/en/application-dev/reference/arkui-ts/ts-container-scroll.md @@ -103,7 +103,7 @@ scroller.currentOffset(): Object Obtains the scrolling offset. -- Return values +- Return value | Type | Description | | -------- | -------- | | {
xOffset: number,
yOffset: number
} | **xOffset**: horizontal scrolling offset.
**yOffset**: vertical scrolling offset. | diff --git a/en/application-dev/reference/arkui-ts/ts-interpolation-calculation.md b/en/application-dev/reference/arkui-ts/ts-interpolation-calculation.md index de18fea31cc344b2e25091cbb442df29ad87fda9..b6b5ebc69a05d41ae6e797336cde734ca8462760 100644 --- a/en/application-dev/reference/arkui-ts/ts-interpolation-calculation.md +++ b/en/application-dev/reference/arkui-ts/ts-interpolation-calculation.md @@ -1,13 +1,13 @@ # Interpolation Calculation -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> This animation is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. ## Modules to Import - + ``` import curves from '@ohos.curves' ``` @@ -27,11 +27,11 @@ Implements initialization for the interpolation curve, which is used to create a - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | curve | Curve | No | Linear | Curve object. | + | curve | Curve | No | Linear | Curve object. | -- Return values +- Return value
Curve object. @@ -44,12 +44,12 @@ Constructs a step curve object. - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | count | number | Yes | - | Number of steps. Must be a positive integer. | - | end | boolean | No | true | Step change at the start or end point of each interval. Defaults to **true**, indicating that the step change occurs at the end point. | + | count | number | Yes | - | Number of steps. Must be a positive integer. | + | end | boolean | No | true | Step change at the start or end point of each interval. Defaults to **true**, indicating that the step change occurs at the end point. | -- Return values +- Return value
Curve object. @@ -62,14 +62,14 @@ Constructs a third-order Bezier curve object. The curve value must be between 0 - Parameters - | Name | Type | Mandatory | Description | + | Name | Type | Mandatory | Description | | -------- | -------- | -------- | -------- | - | x1 | number | Yes | Horizontal coordinate of the first point on the Bezier curve. | - | y1 | number | Yes | Vertical coordinate of the first point on the Bezier curve. | - | x2 | number | Yes | Horizontal coordinate of the second point on the Bezier curve. | - | y2 | number | Yes | Vertical coordinate of the second point on the Bezier curve. | + | x1 | number | Yes | Horizontal coordinate of the first point on the Bezier curve. | + | y1 | number | Yes | Vertical coordinate of the first point on the Bezier curve. | + | x2 | number | Yes | Horizontal coordinate of the second point on the Bezier curve. | + | y2 | number | Yes | Vertical coordinate of the second point on the Bezier curve. | -- Return values +- Return value
Curve object. @@ -82,20 +82,20 @@ Constructs a spring curve object. - Parameters - | Name | Type | Mandatory | Description | + | Name | Type | Mandatory | Description | | -------- | -------- | -------- | -------- | - | velocity | number | Yes | Initial velocity. | - | mass | number | Yes | Mass. | - | stiffness | number | Yes | Stiffness. | - | damping | number | Yes | Damping. | + | velocity | number | Yes | Initial velocity. | + | mass | number | Yes | Mass. | + | stiffness | number | Yes | Stiffness. | + | damping | number | Yes | Damping. | -- Return values +- Return value
Curve object. ## Example - + ``` import Curves from '@ohos.curves' let curve1 = Curves.init() // Create a default linear interpolation curve. @@ -106,13 +106,13 @@ let curve3 = Curves.cubicBezier(0.1, 0.0, 0.1, 1.0) // Create a third-order Bezi Curve objects can be created only by the preceding APIs. - | API | Description | +| API | Description | | -------- | -------- | -| interpolate(time: number): number | Calculation function of the interpolation curve. Passing a normalized time parameter to this function returns the current interpolation.
**time**: indicates the current normalized time. The value ranges from 0 to 1.
The curve interpolation corresponding to the normalized time point is returned. | +| interpolate(time: number): number | Calculation function of the interpolation curve. Passing a normalized time parameter to this function returns the current interpolation.
**time**: indicates the current normalized time. The value ranges from 0 to 1.
The curve interpolation corresponding to the normalized time point is returned. | - Example - + ``` import Curves from '@ohos.curves' let curve = Curves.init(Curve.EaseIn) // Create an interpolation curve which is slow and then fast by default. @@ -122,7 +122,7 @@ let curve3 = Curves.cubicBezier(0.1, 0.0, 0.1, 1.0) // Create a third-order Bezi ## Example - + ``` import Curves from '@ohos.curves' @Entry diff --git a/en/application-dev/reference/arkui-ts/ts-matrix-transformation.md b/en/application-dev/reference/arkui-ts/ts-matrix-transformation.md index a6f5c1c5d0e300331f5b927fdfd1c69473938a9d..0eded3f87db1c32ab188901e7d9f68e62ef17ddc 100644 --- a/en/application-dev/reference/arkui-ts/ts-matrix-transformation.md +++ b/en/application-dev/reference/arkui-ts/ts-matrix-transformation.md @@ -1,7 +1,7 @@ # Matrix Transformation -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE**
> This animation is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. @@ -31,30 +31,30 @@ Matrix constructor, which is used to create a 4x4 matrix by using the input para | -------- | -------- | -------- | -------- | -------- | | array | Array<number> | Yes | [1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1] | A number array whose length is 16 (4 x 4). For details, see the parameter description. | -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Object | 4x4 matrix object created based on the input parameter. | + | Object | 4x4 matrix object created based on the input parameter. | - Parameter description - | Name | Type | Mandatory | Description | + | Name | Type | Mandatory | Description | | -------- | -------- | -------- | -------- | - | m00 | number | Yes | Scaling value of the x-axis. Defaults to **1** for the unit matrix. | - | m01 | number | Yes | The second value, which is affected by the rotation of the x, y, and z axes. | - | m02 | number | Yes | The third value, which is affected by the rotation of the x, y, and z axes. | - | m03 | number | Yes | Meaningless. | - | m10 | number | Yes | The fifth value, which is affected by the rotation of the x, y, and z axes. | - | m11 | number | Yes | Scaling value of the y-axis. Defaults to **1** for the unit matrix. | - | m12 | number | Yes | The seventh value, which is affected by the rotation of the x, y, and z axes. | - | m13 | number | Yes | Meaningless. | - | m20 | number | Yes | The ninth value, which is affected by the rotation of the x, y, and z axes. | - | m21 | number | Yes | The tenth value, which is affected by the rotation of the x, y, and z axes. | - | m22 | number | Yes | Scaling value of the z-axis. Defaults to **1** for the unit matrix. | - | m23 | number | Yes | Meaningless. | - | m30 | number | Yes | Translation value of the x-axis, in px. Defaults to **0** for the unit matrix. | - | m31 | number | Yes | Translation value of the y-axis, in px. Defaults to **0** for the unit matrix. | - | m32 | number | Yes | Translation value of the z-axis, in px. Defaults to **0** for the unit matrix. | - | m33 | number | Yes | Valid in homogeneous coordinates, presenting the perspective projection effect. | + | m00 | number | Yes | Scaling value of the x-axis. Defaults to **1** for the unit matrix. | + | m01 | number | Yes | The second value, which is affected by the rotation of the x, y, and z axes. | + | m02 | number | Yes | The third value, which is affected by the rotation of the x, y, and z axes. | + | m03 | number | Yes | Meaningless. | + | m10 | number | Yes | The fifth value, which is affected by the rotation of the x, y, and z axes. | + | m11 | number | Yes | Scaling value of the y-axis. Defaults to **1** for the unit matrix. | + | m12 | number | Yes | The seventh value, which is affected by the rotation of the x, y, and z axes. | + | m13 | number | Yes | Meaningless. | + | m20 | number | Yes | The ninth value, which is affected by the rotation of the x, y, and z axes. | + | m21 | number | Yes | The tenth value, which is affected by the rotation of the x, y, and z axes. | + | m22 | number | Yes | Scaling value of the z-axis. Defaults to **1** for the unit matrix. | + | m23 | number | Yes | Meaningless. | + | m30 | number | Yes | Translation value of the x-axis, in px. Defaults to **0** for the unit matrix. | + | m31 | number | Yes | Translation value of the y-axis, in px. Defaults to **0** for the unit matrix. | + | m32 | number | Yes | Translation value of the z-axis, in px. Defaults to **0** for the unit matrix. | + | m33 | number | Yes | Valid in homogeneous coordinates, presenting the perspective projection effect. | - Example @@ -76,10 +76,10 @@ identity(): Object Matrix initialization function. Can return a unit matrix object. -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Object | Unit matrix object. | + | Object | Unit matrix object. | - Example @@ -102,10 +102,10 @@ copy(): Object Matrix copy function, which is used to copy the current matrix object. -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Object | Copy object of the current matrix. | + | Object | Copy object of the current matrix. | - Example @@ -147,14 +147,14 @@ Matrix overlay function, which is used to overlay the effects of two matrices to - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | matrix | Matrix4 | Yes | - | Matrix object to be overlaid. | + | matrix | Matrix4 | Yes | - | Matrix object to be overlaid. | -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Object | Object after matrix overlay. | + | Object | Object after matrix overlay. | - Example @@ -188,10 +188,10 @@ invert(): Object Matrix inverse function. Can return an inverse matrix of the current matrix object, that is, get an opposite effect. -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Object | Inverse matrix object of the current matrix. | + | Object | Inverse matrix object of the current matrix. | - Example @@ -212,17 +212,17 @@ Matrix translation function, which is used to add the translation effect to the - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | No | 0 | Translation distance of the x-axis, in px. | - | y | number | No | 0 | Translation distance of the y-axis, in px. | - | z | number | No | 0 | Translation distance of the z-axis, in px. | + | x | number | No | 0 | Translation distance of the x-axis, in px. | + | y | number | No | 0 | Translation distance of the y-axis, in px. | + | z | number | No | 0 | Translation distance of the z-axis, in px. | -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Object | Matrix object after the translation effect is added. | + | Object | Matrix object after the translation effect is added. | - Example @@ -254,19 +254,19 @@ Matrix scaling function, which is used to add the scaling effect to the x, y, an - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | No | 1 | Scaling multiple of the x-axis. | - | y | number | No | 1 | Scaling multiple of the y-axis. | - | z | number | No | 1 | Scaling multiple of the z-axis. | - | centerX | number | No | 0 | X coordinate of the center point. | - | centerY | number | No | 0 | Y coordinate of the center point. | + | x | number | No | 1 | Scaling multiple of the x-axis. | + | y | number | No | 1 | Scaling multiple of the y-axis. | + | z | number | No | 1 | Scaling multiple of the z-axis. | + | centerX | number | No | 0 | X coordinate of the center point. | + | centerY | number | No | 0 | Y coordinate of the center point. | -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Object | Matrix object after the scaling effect is added. | + | Object | Matrix object after the scaling effect is added. | - Example @@ -298,20 +298,20 @@ Matrix rotation function, which is used to add the rotation effect to the x, y, - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | x | number | No | 1 | X coordinate of the rotation axis vector. | - | y | number | No | 1 | Y coordinate of the rotation axis vector. | - | z | number | No | 1 | Z coordinate of the rotation axis vector. | - | angle | number | No | 0 | Rotation angle. | - | centerX | number | No | 0 | X coordinate of the center point. | - | centerY | number | No | 0 | Y coordinate of the center point. | + | x | number | No | 1 | X coordinate of the rotation axis vector. | + | y | number | No | 1 | Y coordinate of the rotation axis vector. | + | z | number | No | 1 | Z coordinate of the rotation axis vector. | + | angle | number | No | 0 | Rotation angle. | + | centerX | number | No | 0 | X coordinate of the center point. | + | centerY | number | No | 0 | Y coordinate of the center point. | -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Object | Matrix object after the rotation effect is added. | + | Object | Matrix object after the rotation effect is added. | - Example @@ -343,15 +343,15 @@ Matrix point transformation function, which is used to apply the current transfo - Parameters - | Name | Type | Mandatory | Default Value | Description | + | Name | Type | Mandatory | Default Value | Description | | -------- | -------- | -------- | -------- | -------- | - | point | Point | Yes | - | Point to be transformed. | + | point | Point | Yes | - | Point to be transformed. | -- Return values - | Type | Description | +- Return value + | Type | Description | | -------- | -------- | - | Point | Point object after matrix transformation | + | Point | Point object after matrix transformation | - Example