From 9284e8988fde69586cf1dd09fd29b2e0eb8c9c25 Mon Sep 17 00:00:00 2001 From: wangjunman1 Date: Wed, 3 Sep 2025 11:50:40 +0800 Subject: [PATCH 1/2] change number to double,add enableTransparentLayer Signed-off-by: wangjunman1 --- api/@internal/component/ets/canvas.d.ts | 30 +- api/arkui/component/canvas.static.d.ets | 548 ++++++++++---------- api/arkui/component/common.static.d.ets | 16 +- api/arkui/component/matrix2d.static.d.ets | 68 +-- api/arkui/component/xcomponent.static.d.ets | 10 + api/common/full/viewmodel.d.ts | 16 +- 6 files changed, 351 insertions(+), 337 deletions(-) diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts index 7934396c9e..0fb1acf015 100644 --- a/api/@internal/component/ets/canvas.d.ts +++ b/api/@internal/component/ets/canvas.d.ts @@ -3547,7 +3547,7 @@ declare class CanvasRenderer extends CanvasPath { * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 @@ -3556,7 +3556,7 @@ declare class CanvasRenderer extends CanvasPath { * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -3566,7 +3566,7 @@ declare class CanvasRenderer extends CanvasPath { * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3577,7 +3577,7 @@ declare class CanvasRenderer extends CanvasPath { * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3585,7 +3585,7 @@ declare class CanvasRenderer extends CanvasPath { * @atomicservice * @since 11 */ - createImageData(imagedata: ImageData): ImageData; + createImageData(imageData: ImageData): ImageData; /** * Obtains the pixel data of a specified area on the current canvas. @@ -3680,7 +3680,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3689,7 +3689,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3699,7 +3699,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3710,7 +3710,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3719,12 +3719,12 @@ declare class CanvasRenderer extends CanvasPath { * @atomicservice * @since 11 */ - putImageData(imagedata: ImageData, dx: number | string, dy: number | string): void; + putImageData(imageData: ImageData, dx: number | string, dy: number | string): void; /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @param { number } dirtyX - Position of the upper left corner of the rectangular area in the source image data. @@ -3741,7 +3741,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @param { number } dirtyX - Position of the upper left corner of the rectangular area in the source image data. @@ -3759,7 +3759,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area in the source image data. @@ -3778,7 +3778,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area in the source image data. @@ -3796,7 +3796,7 @@ declare class CanvasRenderer extends CanvasPath { * @since 11 */ putImageData( - imagedata: ImageData, + imageData: ImageData, dx: number | string, dy: number | string, dirtyX: number | string, diff --git a/api/arkui/component/canvas.static.d.ets b/api/arkui/component/canvas.static.d.ets index 05e6d4e354..df66edaa52 100644 --- a/api/arkui/component/canvas.static.d.ets +++ b/api/arkui/component/canvas.static.d.ets @@ -25,6 +25,7 @@ import { VoidCallback, LengthMetricsUnit, LengthMetrics } from './units'; import { Size } from '../Graphics'; import { memo, ComponentBuilder } from './../stateManagement/runtime'; import { AttributeModifier, CommonMethod } from './common'; +import { Color } from './enums' /** * Filling style algorithm, which determines whether a point is within or outside the path. The following @@ -134,13 +135,13 @@ export declare class CanvasGradient { /** * Add a breakpoint defined by offset and color to the gradient * - * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error + * @param { double } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error * @param { string } color - Set the gradient color. * a SYNTAX_ERR error is thrown. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - addColorStop(offset: number, color: string): void; + addColorStop(offset: double, color: string): void; } /** @@ -153,43 +154,43 @@ export declare class CanvasPath { /** * Draw an arc path * - * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc. - * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc. - * @param { number } radius - Radius of the arc. - * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. + * @param { double } x - The x-axis coordinate of the center (center of the circle) of the arc. + * @param { double } y - The y-axis coordinate of the center (center of the circle) of the arc. + * @param { double } radius - Radius of the arc. + * @param { double } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. * The unit is radian. - * @param { number } endAngle - The end point of the arc, in radians. + * @param { double } endAngle - The end point of the arc, in radians. * @param { boolean } [counterclockwise] - If the value is true, the arc is drawn counterclockwise. Otherwise, * the arc is drawn clockwise. The default value is false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; + arc(x: double, y: double, radius: double, startAngle: double, endAngle: double, counterclockwise?: boolean): void; /** * Draw arc paths based on control points and radius * - * @param { number } x1 - The x-axis coordinate of the first control point. - * @param { number } y1 - The y-axis coordinate of the first control point. - * @param { number } x2 - The x-axis coordinate of the second control point. - * @param { number } y2 - The y-axis coordinate of the second control point. - * @param { number } radius - Radius of the arc. + * @param { double } x1 - The x-axis coordinate of the first control point. + * @param { double } y1 - The y-axis coordinate of the first control point. + * @param { double } x2 - The x-axis coordinate of the second control point. + * @param { double } y2 - The y-axis coordinate of the second control point. + * @param { double } radius - Radius of the arc. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; + arcTo(x1: double, y1: double, x2: double, y2: double, radius: double): void; /** * Drawing Cubic Bessel Curve Paths * - * @param { number } cp1x - The x-axis coordinate of the first control point. - * @param { number } cp1y - The y-axis coordinate of the first control point. - * @param { number } cp2x - The x-axis coordinate of the second control point. - * @param { number } cp2y - The y-axis coordinate of the second control point. - * @param { number } x - x-axis coordinate of the end point. - * @param { number } y - y-axis coordinate of the end point. + * @param { double } cp1x - The x-axis coordinate of the first control point. + * @param { double } cp1y - The y-axis coordinate of the first control point. + * @param { double } cp2x - The x-axis coordinate of the second control point. + * @param { double } cp2y - The y-axis coordinate of the second control point. + * @param { double } x - x-axis coordinate of the end point. + * @param { double } y - y-axis coordinate of the end point. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; + bezierCurveTo(cp1x: double, cp1y: double, cp2x: double, cp2y: double, x: double, y: double): void; /** * Returns the pen point to the start point of the current sub-path * @@ -200,61 +201,61 @@ export declare class CanvasPath { /** * Draw an Elliptic Path * - * @param { number } x - x-axis coordinate of the center of the ellipse. - * @param { number } y - y-axis coordinate of the center of the ellipse. - * @param { number } radiusX - Radius of the major axis of the ellipse. - * @param { number } radiusY - Radius of the minor axis of the ellipse. - * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees). - * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians + * @param { double } x - x-axis coordinate of the center of the ellipse. + * @param { double } y - y-axis coordinate of the center of the ellipse. + * @param { double } radiusX - Radius of the major axis of the ellipse. + * @param { double } radiusY - Radius of the minor axis of the ellipse. + * @param { double } rotation - The rotation angle of the ellipse, in radians (not angular degrees). + * @param { double } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians * (not angular degrees). - * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees). + * @param { double } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees). * @param { boolean } [counterclockwise] - If the value is true, the ellipse is drawn counterclockwise. Otherwise, * the ellipse is drawn clockwise. The default value is false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, - endAngle: number, counterclockwise?: boolean): void; + ellipse(x: double, y: double, radiusX: double, radiusY: double, rotation: double, startAngle: double, + endAngle: double, counterclockwise?: boolean): void; /** * Connect sub-path using straight lines * - * @param { number } x - The x-axis coordinate of the end point of the line. - * @param { number } y - The y-axis coordinate of the end point of the line. + * @param { double } x - The x-axis coordinate of the end point of the line. + * @param { double } y - The y-axis coordinate of the end point of the line. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - lineTo(x: number, y: number): void; + lineTo(x: double, y: double): void; /** * Moves the start point of a new sub-path to the (x, y) coordinate. * - * @param { number } x - The x-axis coordinate of the point. - * @param { number } y - The y-axis coordinate of the point. + * @param { double } x - The x-axis coordinate of the point. + * @param { double } y - The y-axis coordinate of the point. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - moveTo(x: number, y: number): void; + moveTo(x: double, y: double): void; /** * Draw quadratic Bezier curve paths * - * @param { number } cpx - The x-axis coordinate of the control point. - * @param { number } cpy - The y-axis coordinate of the control point. - * @param { number } x - x-axis coordinate of the end point. - * @param { number } y - y-axis coordinate of the end point. + * @param { double } cpx - The x-axis coordinate of the control point. + * @param { double } cpy - The y-axis coordinate of the control point. + * @param { double } x - x-axis coordinate of the end point. + * @param { double } y - y-axis coordinate of the end point. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; + quadraticCurveTo(cpx: double, cpy: double, x: double, y: double): void; /** * Draw Rectangular Paths * - * @param { number } x - The x-axis coordinate of the start point of the rectangle. - * @param { number } y - The y-axis coordinate of the start point of the rectangle. - * @param { number } w - Width of the rectangle. - * @param { number } h - Height of the rectangle. + * @param { double } x - The x-axis coordinate of the start point of the rectangle. + * @param { double } y - The y-axis coordinate of the start point of the rectangle. + * @param { double } w - Width of the rectangle. + * @param { double } h - Height of the rectangle. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - rect(x: number, y: number, w: number, h: number): void; + rect(x: double, y: double, w: double, h: double): void; } /** @@ -356,130 +357,130 @@ export declare interface TextMetrics { * Double, the distance from the horizontal line indicated by the textBaseline property to the top of * the rectangular boundary of the rendered text. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly actualBoundingBoxAscent: number; + readonly actualBoundingBoxAscent: double; /** * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of * the rectangular boundary of the rendered text. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly actualBoundingBoxDescent: number; + readonly actualBoundingBoxDescent: double; /** * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to * the left of the text rectangle boundary. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly actualBoundingBoxLeft: number; + readonly actualBoundingBoxLeft: double; /** * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to * the right of the text rectangle boundary. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly actualBoundingBoxRight: number; + readonly actualBoundingBoxRight: double; /** * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of * the wireframe. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly alphabeticBaseline: number; + readonly alphabeticBaseline: double; /** * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the * em square in the wireframe. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly emHeightAscent: number; + readonly emHeightAscent: double; /** * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the * em box in the wireframe. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly emHeightDescent: number; + readonly emHeightDescent: double; /** * Double, distance from the horizontal line indicated by the textBaseline property to the top of the * highest rectangle boundary of all fonts rendering text. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly fontBoundingBoxAscent: number; + readonly fontBoundingBoxAscent: double; /** * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the * rectangular boundary of all fonts rendering text. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly fontBoundingBoxDescent: number; + readonly fontBoundingBoxDescent: double; /** * Double, distance from the horizontal line indicated by the textBaseline property to * the hanging baseline of the wireframe. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly hangingBaseline: number; + readonly hangingBaseline: double; /** * Double, distance from the horizontal line indicated by the textBaseline property to * the ideographic baseline of the wireframe. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly ideographicBaseline: number; + readonly ideographicBaseline: double; /** * Indicates the width of a character string. The value is of the double type. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly width: number; + readonly width: double; /** * Indicates the height of a character string. The value is of the double type. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - readonly height: number; + readonly height: double; } /** @@ -492,19 +493,19 @@ export declare class ImageBitmap { /** * Indicates the height of the CSS pixel unit of ImageData. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get height(): number; + get height(): double; /** * Indicates the width of the CSS pixel unit of ImageData. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get width(): number; + get width(): double; /** * Releases all graphics resources associated with an ImageBitmap. * @@ -557,15 +558,15 @@ export declare class ImageData { /** * Create an ImageData object based on the input parameters. * - * @param { number } width - Width of the image. - * @param { number } height - Height of the image. + * @param { double } width - Width of the image. + * @param { double } height - Height of the image. * @param { Uint8ClampedArray } [data] - Data of the image. * If this parameter is not specified, the default value is a black rectangular image. * @param { LengthMetricsUnit } [unit] - the unit mode * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - constructor(width: number, height: number, data?: Uint8ClampedArray, unit?: LengthMetricsUnit); + constructor(width: double, height: double, data?: Uint8ClampedArray, unit?: LengthMetricsUnit); } /** @@ -629,20 +630,21 @@ export declare class CanvasRenderer extends CanvasPath { * Get transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). * If the value is out of range, the assignment is invalid. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get globalAlpha(): number; + get globalAlpha(): double; /** * Set transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). * If the value is out of range, the assignment is invalid. * - * @param { number } + * @param { double } globalAlpha - The alpha value that is applied to shapes and images + * before they are drawn onto the canvas. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set globalAlpha(globalAlpha: number); + set globalAlpha(globalAlpha: double); /** * Get the type of composition operation applied when drawing a new shape. The following types are supported: * source-over: (Default) Draws a new drawing on top of an existing canvas context. @@ -691,47 +693,47 @@ export declare class CanvasRenderer extends CanvasPath { * Draw an image on a canvas * * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. - * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. - * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. + * @param { double } dx - x-axis coordinate of the upper left corner of the image on the target canvas. + * @param { double } dy - y-axis coordinate of the upper left corner of the image on the target canvas. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number): void; + drawImage(image: ImageBitmap | PixelMap, dx: double, dy: double): void; /** * Draw an image on a canvas * * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. - * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. - * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. - * @param { number } dw - Specifies the drawing width of the image on the target canvas. + * @param { double } dx - x-axis coordinate of the upper left corner of the image on the target canvas. + * @param { double } dy - y-axis coordinate of the upper left corner of the image on the target canvas. + * @param { double } dw - Specifies the drawing width of the image on the target canvas. * The width of the drawn image will be scaled. - * @param { number } dh - Specifies the drawing height of the image on the target canvas. + * @param { double } dh - Specifies the drawing height of the image on the target canvas. * The height of the drawn image will be scaled. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number, dw: number, dh: number): void; + drawImage(image: ImageBitmap | PixelMap, dx: double, dy: double, dw: double, dh: double): void; /** *Draw an image on a canvas * * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. - * @param { number } sx - x coordinate of the upper left corner of + * @param { double } sx - x coordinate of the upper left corner of * the rectangle (cropping) selection box of the image. - * @param { number } sy - y coordinate of the upper left corner of + * @param { double } sy - y coordinate of the upper left corner of * the rectangle (cropping) selection box of the image. - * @param { number } sw - Width of the rectangle (cropping) selection box of the image. - * @param { number } sh - Height of the rectangle (cropping) selection box of the image. - * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. - * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. - * @param { number } dw - Specifies the drawing width of the image on the target canvas. + * @param { double } sw - Width of the rectangle (cropping) selection box of the image. + * @param { double } sh - Height of the rectangle (cropping) selection box of the image. + * @param { double } dx - x-axis coordinate of the upper left corner of the image on the target canvas. + * @param { double } dy - y-axis coordinate of the upper left corner of the image on the target canvas. + * @param { double } dw - Specifies the drawing width of the image on the target canvas. * The width of the drawn image will be scaled. - * @param { number } dh - Specifies the drawing height of the image on the target canvas. + * @param { double } dh - Specifies the drawing height of the image on the target canvas. * The height of the drawn image will be scaled. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - drawImage(image: ImageBitmap | PixelMap, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, - dw: number, dh: number): void; + drawImage(image: ImageBitmap | PixelMap, sx: double, sy: double, sw: double, sh: double, dx: double, dy: double, + dw: double, dh: double): void; /** * Clear the sub-path list and start a new path. * @@ -784,65 +786,69 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: * - * @return { string | int | CanvasGradient | CanvasPattern } - * string: Color String. - * int: Indicates the color with number. - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @return { string | Color | int | CanvasGradient | CanvasPattern } + * string: Color String. + * Color: Common enum of Color. + * int: Indicates the color with double. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get fillStyle(): string | int | CanvasGradient | CanvasPattern; + get fillStyle(): string | Color | int | CanvasGradient | CanvasPattern; /** * Set the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: * - * @param { string | int | CanvasGradient | CanvasPattern } - * string: Color String. - * int: Indicates the color with number. - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @param { string | Color | int | CanvasGradient | CanvasPattern } fillStyle + * string: Color String. + * Color: Common enum of Color. + * int: Indicates the color with double. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set fillStyle(fillStyle: string | int | CanvasGradient | CanvasPattern); + set fillStyle(fillStyle: string | Color | int | CanvasGradient | CanvasPattern); /** * Get the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. * The options are as follows: * - * @return { string | int | CanvasGradient | CanvasPattern } - * string: Color String. - * int: Indicates the color with number. - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @return { string | Color | int | CanvasGradient | CanvasPattern } + * string: Color String. + * Color: Common enum of Color. + * int: Indicates the color with double. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get strokeStyle(): string | int | CanvasGradient | CanvasPattern; + get strokeStyle(): string | Color | int | CanvasGradient | CanvasPattern; /** * Set the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. * The options are as follows: * - * @param { string | int | CanvasGradient | CanvasPattern } - * string: Color String. - * int: Indicates the color with number. - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @param { string | Color | int | CanvasGradient | CanvasPattern } strokeStyle + * string: Color String. + * Color: Common enum of Color. + * int: Indicates the color with double. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set strokeStyle(strokeStyle: string | int | CanvasGradient | CanvasPattern); + set strokeStyle(strokeStyle: string | Color | int | CanvasGradient | CanvasPattern); /** * Creates a linear gradient object that is specified along the parameter coordinates * - * @param { number } x0 - The x-axis coordinate of the start point. - * @param { number } y0 - The y-axis coordinate of the start point. - * @param { number } x1 - x-axis coordinate of the end point. - * @param { number } y1 - y-axis coordinate of the end point. + * @param { double } x0 - The x-axis coordinate of the start point. + * @param { double } y0 - The y-axis coordinate of the start point. + * @param { double } x1 - x-axis coordinate of the end point. + * @param { double } y1 - y-axis coordinate of the end point. * @returns { CanvasGradient } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; + createLinearGradient(x0: double, y0: double, x1: double, y1: double): CanvasGradient; /** * Creates a template object using the specified image * @@ -863,29 +869,29 @@ export declare class CanvasRenderer extends CanvasPath { /** * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles * - * @param { number } x0 - The x-axis coordinate of the start circle. - * @param { number } y0 - The y-axis coordinate of the start circle. - * @param { number } r0 - Radius of the starting circle. - * @param { number } x1 - The x-axis coordinate of the end circle. - * @param { number } y1 - The y-axis coordinate of the end circle. - * @param { number } r1 - Radius of the end circle. + * @param { double } x0 - The x-axis coordinate of the start circle. + * @param { double } y0 - The y-axis coordinate of the start circle. + * @param { double } r0 - Radius of the starting circle. + * @param { double } x1 - The x-axis coordinate of the end circle. + * @param { double } y1 - The y-axis coordinate of the end circle. + * @param { double } r1 - Radius of the end circle. * @returns { CanvasGradient } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; + createRadialGradient(x0: double, y0: double, r0: double, x1: double, y1: double, r1: double): CanvasGradient; /** * Creates a gradient around a point with given coordinates. * - * @param { number } startAngle - The angle at which to begin the gradient, in radians. + * @param { double } startAngle - The angle at which to begin the gradient, in radians. * Angle measurements start horizontally the right of the center and move around clockwise. - * @param { number } x - The x-axis coordinate of the center of the gradient. - * @param { number } y - The y-axis coordinate of the center of the gradient. + * @param { double } x - The x-axis coordinate of the center of the gradient. + * @param { double } y - The y-axis coordinate of the center of the gradient. * @returns { CanvasGradient } A CanvasGradient object that draws a conic gradient around the given coordinates. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - createConicGradient(startAngle: number, x: number, y: number): CanvasGradient; + createConicGradient(startAngle: double, x: double, y: double): CanvasGradient; /** * Provides filter effects such as blur and grayscale. You can get the following filter effects: * blur(): Adds a Gaussian blur effect to the drawing @@ -947,86 +953,86 @@ export declare class CanvasRenderer extends CanvasPath { /** * Creates a new, empty ImageData object of the specified size * - * @param { number } sw - Width of the ImageData object. - * @param { number } sh - Height of the ImageData object. + * @param { double } sw - Width of the ImageData object. + * @param { double } sh - Height of the ImageData object. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - createImageData(sw: number, sh: number): ImageData; + createImageData(sw: double, sh: double): ImageData; /** * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - createImageData(imagedata: ImageData): ImageData; + createImageData(imageData: ImageData): ImageData; /** * Obtains the pixel data of a specified area on the current canvas. * - * @param { number } sx - x coordinate of the upper left corner of the rectangular area + * @param { double } sx - x coordinate of the upper left corner of the rectangular area * of the image data to be extracted. - * @param { number } sy - y coordinate of the upper left corner of the rectangular area + * @param { double } sy - y coordinate of the upper left corner of the rectangular area * of the image data to be extracted. - * @param { number } sw - The width of the rectangular area of the image data to be extracted. - * @param { number } sh - The height of the rectangular area of the image data to be extracted. + * @param { double } sw - The width of the rectangular area of the image data to be extracted. + * @param { double } sh - The height of the rectangular area of the image data to be extracted. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; + getImageData(sx: double, sy: double, sw: double, sh: double): ImageData; /** * Obtains the PixelMap of a specified area on the current canvas. * - * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the PixelMap + * @param { double } sx - x coordinate of the upper left corner of the rectangular area of the PixelMap * to be extracted. - * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the PixelMap + * @param { double } sy - y coordinate of the upper left corner of the rectangular area of the PixelMap * to be extracted. - * @param { number } sw - The width of the rectangular area of the PixelMap to be extracted. - * @param { number } sh - The height of the rectangular area of the PixelMap to be extracted. + * @param { double } sw - The width of the rectangular area of the PixelMap to be extracted. + * @param { double } sh - The height of the rectangular area of the PixelMap to be extracted. * @returns { PixelMap } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap; + getPixelMap(sx: double, sy: double, sw: double, sh: double): PixelMap; /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. - * @param { number | string } dx - Position offset of the source image data + * @param { ImageData } imageData - ImageData object to be drawn. + * @param { double | string } dx - Position offset of the source image data * in the target canvas (the offset in the x-axis direction). - * @param { number | string } dy - Position offset of the source image data + * @param { double | string } dy - Position offset of the source image data * in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - putImageData(imagedata: ImageData, dx: number | string, dy: number | string): void; + putImageData(imageData: ImageData, dx: double | string, dy: double | string): void; /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. - * @param { number | string } dx - Position offset of the source image data + * @param { ImageData } imageData - ImageData object to be drawn. + * @param { double | string } dx - Position offset of the source image data * in the target canvas (the offset in the x-axis direction). - * @param { number | string } dy - Position offset of the source image data + * @param { double | string } dy - Position offset of the source image data * in the target canvas (the offset in the y-axis direction). - * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area + * @param { double | string } dirtyX - Position of the upper left corner of the rectangular area * in the source image data. * The default is the upper left corner (x coordinate) of the entire image data. - * @param { number | string } dirtyY - Position of the upper left corner of the rectangular area + * @param { double | string } dirtyY - Position of the upper left corner of the rectangular area * in the source image data. * The default is the upper left corner (y coordinate) of the entire image data. - * @param { number | string } dirtyWidth - Width of the rectangular area in the source image data. + * @param { double | string } dirtyWidth - Width of the rectangular area in the source image data. * The default is the width of the image data. - * @param { number | string } dirtyHeight - Height of the rectangular area in the source image data. + * @param { double | string } dirtyHeight - Height of the rectangular area in the source image data. * The default is the height of the image data. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - putImageData(imagedata: ImageData, dx: number | string, dy: number | string, dirtyX: number | string, - dirtyY: number | string, dirtyWidth: number | string, dirtyHeight: number | string): void; + putImageData(imageData: ImageData, dx: double | string, dy: double | string, dirtyX: double | string, + dirtyY: double | string, dirtyWidth: double | string, dirtyHeight: double | string): void; /** * Get the status whether to smooth the image. The value true indicates that the image is smooth. * The value false indicates that the image is not smooth. @@ -1080,19 +1086,19 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the dotted line offset attribute. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get lineDashOffset(): number; + get lineDashOffset(): double; /** * Set the dotted line offset attribute. * - * @param { number } + * @param { double } lineDashOffset - The line dash offset. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set lineDashOffset(lineDashOffset: number); + set lineDashOffset(lineDashOffset: double); /** * Get the line segment connection point attribute. For details, see {@link CanvasLineJoin}. * @@ -1110,103 +1116,103 @@ export declare class CanvasRenderer extends CanvasPath { */ set lineJoin(lineJoin: CanvasLineJoin); /** - * Get the line thickness attribute. The value cannot be 0 or a negative number. + * Get the line thickness attribute. The value cannot be 0 or a negative double. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get lineWidth(): number; + get lineWidth(): double; /** - * Set the line thickness attribute. The value cannot be 0 or a negative number. + * Set the line thickness attribute. The value cannot be 0 or a negative double. * - * @param { number } + * @param { double } lineWidth - The thickness of lines. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set lineWidth(lineWidth: number); + set lineWidth(lineWidth: double); /** - * Get the value of this parameter cannot be 0 or a negative number. + * Get the value of this parameter cannot be 0 or a negative double. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get miterLimit(): number; + get miterLimit(): double; /** - * Set the value of this parameter cannot be 0 or a negative number. + * Set the value of this parameter cannot be 0 or a negative double. * - * @param { number } + * @param { double } miterLimit - The miter limit ratio. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set miterLimit(miterLimit: number); + set miterLimit(miterLimit: double); /** * Gets the current segment style. * - * @returns { number[] } + * @returns { double[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getLineDash(): number[]; + getLineDash(): double[]; /** * Sets the dashed line mode for line drawing. * - * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and + * @param { double[] } segments - A set of doubles that describe the length of alternating drawn lines segments and * spacing (coordinate space units). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - setLineDash(segments: number[]): void; + setLineDash(segments: double[]): void; /** * Clears the drawing content of a rectangular area. * - * @param { number } x - The x-axis coordinate of the start point of the rectangle. - * @param { number } y - The y-axis coordinate of the start point of the rectangle. - * @param { number } w - Width of the rectangle. - * @param { number } h - Height of the rectangle. + * @param { double } x - The x-axis coordinate of the start point of the rectangle. + * @param { double } y - The y-axis coordinate of the start point of the rectangle. + * @param { double } w - Width of the rectangle. + * @param { double } h - Height of the rectangle. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - clearRect(x: number, y: number, w: number, h: number): void; + clearRect(x: double, y: double, w: double, h: double): void; /** * Fills a specified rectangular area * - * @param { number } x - The x-axis coordinate of the start point of the rectangle. - * @param { number } y - The y-axis coordinate of the start point of the rectangle. - * @param { number } w - Width of the rectangle. - * @param { number } h - Height of the rectangle. + * @param { double } x - The x-axis coordinate of the start point of the rectangle. + * @param { double } y - The y-axis coordinate of the start point of the rectangle. + * @param { double } w - Width of the rectangle. + * @param { double } h - Height of the rectangle. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - fillRect(x: number, y: number, w: number, h: number): void; + fillRect(x: double, y: double, w: double, h: double): void; /** * Stroke Specify Rectangular Area * - * @param { number } x - The x-axis coordinate of the start point of the rectangle. - * @param { number } y - The y-axis coordinate of the start point of the rectangle. - * @param { number } w - Width of the rectangle. - * @param { number } h - Height of the rectangle. + * @param { double } x - The x-axis coordinate of the start point of the rectangle. + * @param { double } y - The y-axis coordinate of the start point of the rectangle. + * @param { double } w - Width of the rectangle. + * @param { double } h - Height of the rectangle. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - strokeRect(x: number, y: number, w: number, h: number): void; + strokeRect(x: double, y: double, w: double, h: double): void; /** - * Get the shadow blur radius. The value cannot be a negative number. + * Get the shadow blur radius. The value cannot be a negative double. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get shadowBlur(): number; + get shadowBlur(): double; /** - * Set the shadow blur radius. The value cannot be a negative number. + * Set the shadow blur radius. The value cannot be a negative double. * - * @param { number } + * @param { double } shadowBlur - The amount of blur applied to shadows. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set shadowBlur(shadowBlur: number); + set shadowBlur(shadowBlur: double); /** * Get the shadow color. * @@ -1226,35 +1232,35 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the horizontal offset distance of the shadow. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get shadowOffsetX(): number; + get shadowOffsetX(): double; /** * Set the horizontal offset distance of the shadow. * - * @param { number } + * @param { double } shadowOffsetX - The distance that shadows will be offset horizontally. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set shadowOffsetX(shadowOffsetX: number); + set shadowOffsetX(shadowOffsetX: double); /** * Get the vertical offset distance of the shadow. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get shadowOffsetY(): number; + get shadowOffsetY(): double; /** * Set the vertical offset distance of the shadow. * - * @param { number } + * @param { double } shadowOffsetY - The distance that shadows will be offset vertically. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set shadowOffsetY(shadowOffsetY: number); + set shadowOffsetY(shadowOffsetY: double); /** * Top of the stack pop-up state in the drawing state stack * @@ -1273,13 +1279,13 @@ export declare class CanvasRenderer extends CanvasPath { * Fills the specified text at the specified location * * @param { string } text - Text string to be drawn. - * @param { number } x - The x-axis coordinate of the start point of the text. - * @param { number } y - The y-axis coordinate of the start point of the text. - * @param { number } [maxWidth] - Maximum width of the drawing. + * @param { double } x - The x-axis coordinate of the start point of the text. + * @param { double } y - The y-axis coordinate of the start point of the text. + * @param { double } [maxWidth] - Maximum width of the drawing. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - fillText(text: string, x: number, y: number, maxWidth?: number): void; + fillText(text: string, x: double, y: double, maxWidth?: double): void; /** * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}. * @@ -1293,13 +1299,13 @@ export declare class CanvasRenderer extends CanvasPath { * Stroke specified text at specified position * * @param { string } text - Text string to be stroked. - * @param { number } x - The x-axis coordinate of the start point of the text. - * @param { number } y - The y-axis-axis coordinate of the start point of the text. - * @param { number } [maxWidth] - Maximum width of the stroke. + * @param { double } x - The x-axis coordinate of the start point of the text. + * @param { double } y - The y-axis-axis coordinate of the start point of the text. + * @param { double } [maxWidth] - Maximum width of the stroke. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - strokeText(text: string, x: number, y: number, maxWidth?: number): void; + strokeText(text: string, x: double, y: double, maxWidth?: double): void; /** * Get the text drawing direction. For details, see {@link CanvasDirection}. * @@ -1382,35 +1388,35 @@ export declare class CanvasRenderer extends CanvasPath { /** * Adds the effect of a rotation * - * @param { number } angle - The radian of clockwise rotation, + * @param { double } angle - The radian of clockwise rotation, * which can be converted to an angle value using the formula: degree * Math.PI / 180. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - rotate(angle: number): void; + rotate(angle: double): void; /** * Increases the scaling effect of the X and Y axes. * - * @param { number } x - Horizontal scaling factor - * @param { number } y - Vertical scaling factor + * @param { double } x - Horizontal scaling factor + * @param { double } y - Vertical scaling factor * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - scale(x: number, y: number): void; + scale(x: double, y: double): void; /** * Adds 2D transformation effects, including rotation, translation, and scaling. * The current transformation matrix will not be overwritten. Multiple transformations will be superimposed. * - * @param { number } a - Horizontal Zoom - * @param { number } b - Vertical Tilt - * @param { number } c - Horizontal Tilt - * @param { number } d - Vertical Zoom - * @param { number } e - Horizontal movement - * @param { number } f - Vertical movement + * @param { double } a - Horizontal Zoom + * @param { double } b - Vertical Tilt + * @param { double } c - Horizontal Tilt + * @param { double } d - Vertical Zoom + * @param { double } e - Horizontal movement + * @param { double } f - Vertical movement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; + setTransform(a: double, b: double, c: double, d: double, e: double, f: double): void; /** * The 2D transformation effect is added. The current transformation matrix is not overwritten and * the transformations are superimposed for multiple times. @@ -1424,25 +1430,25 @@ export declare class CanvasRenderer extends CanvasPath { * Adds the 2D transformation effect, including rotation, translation, and scaling, * and overwrites the current transformation matrix. * - * @param { number } a - Horizontal Zoom - * @param { number } b - Vertical Tilt - * @param { number } c - Horizontal Tilt - * @param { number } d - Vertical Zoom - * @param { number } e - Horizontal movement - * @param { number } f - Vertical movement + * @param { double } a - Horizontal Zoom + * @param { double } b - Vertical Tilt + * @param { double } c - Horizontal Tilt + * @param { double } d - Vertical Zoom + * @param { double } e - Horizontal movement + * @param { double } f - Vertical movement * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - transform(a: number, b: number, c: number, d: number, e: number, f: number): void; + transform(a: double, b: double, c: double, d: double, e: double, f: double): void; /** * Increases the translation effect of the X and Y axes * - * @param { number } x - Horizontal movement distance - * @param { number } y - Vertical travel distance + * @param { double } x - Horizontal movement distance + * @param { double } y - Vertical travel distance * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - translate(x: number, y: number): void; + translate(x: double, y: double): void; /** * Set a PixelMap to the current context. The drawing content is synchronized to the PixelMap. * @@ -1493,21 +1499,19 @@ export declare class CanvasRenderingContext2D extends CanvasRenderer { /** * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. * - * @return { number } - * @readonly + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get height(): number; + get height(): double; /** * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. * - * @return { number } - * @readonly + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get width(): number; + get width(): double; /** * Frame node of the canvas. The default value is null. * @@ -1520,14 +1524,14 @@ export declare class CanvasRenderingContext2D extends CanvasRenderer { * Generate a character string in the data url format. * * @param { string } [type] - Image format. The default value is image/png. - * @param { number } [quality] - If the image format is image/jpeg or image/webp, + * @param { double } [quality] - If the image format is image/jpeg or image/webp, * you can select the image quality from 0 to 1. * If the value is out of the range, the default value 0.92 is used. * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - toDataURL(type?: string, quality?: number): string; + toDataURL(type?: string, quality?: double): string; /** * Start image analyzer. * @@ -1622,14 +1626,14 @@ export declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * Generate a character string in the data url format. * * @param { string } [type] - Image format. The default value is image/png. - * @param { number } [quality] - If the image format is image/jpeg or image/webp, + * @param { double } [quality] - If the image format is image/jpeg or image/webp, * you can select the image quality from 0 to 1. * If the value is out of the range, the default value 0.92 is used. * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - toDataURL(type?: string, quality?: number): string; + toDataURL(type?: string, quality?: double): string; /** * transfer the content to ImageBitmap * @@ -1641,15 +1645,15 @@ export declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { /** * Constructor of the canvas drawing context object, which is used to create a drawing context object. * - * @param { number } width - the width of the OffscreenCanvas - * @param { number } height - the height of the OffscreenCanvas + * @param { double } width - the width of the OffscreenCanvas + * @param { double } height - the height of the OffscreenCanvas * @param { RenderingContextSettings } [settings] - Drawing attribute. * For details, see {@link RenderingContextSettings}. * @param { LengthMetricsUnit } [unit] - the unit mode * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - constructor(width: number, height: number, settings?: RenderingContextSettings, unit?: LengthMetricsUnit); + constructor(width: double, height: double, settings?: RenderingContextSettings, unit?: LengthMetricsUnit); } /** * Draw an object off the screen. The drawing content is not directly displayed on the screen. @@ -1661,35 +1665,35 @@ export declare class OffscreenCanvas { /** * Get the height of the off-screen canvas. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get height(): number; + get height(): double; /** * Set the height of the off-screen canvas. * - * @param { number } + * @param { double } height - The height of an off-screen canvas object. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set height(height: number); + set height(height: double); /** * Get the width of the off-screen canvas. * - * @return { number } + * @return { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get width(): number; + get width(): double; /** * Set the width of the off-screen canvas. * - * @param { number } + * @param { double } width - The width of an off-screen canvas object. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set width(width: number); + set width(width: double); /** * Exports rendered content as an ImageBitmap object * @@ -1715,13 +1719,13 @@ export declare class OffscreenCanvas { /** * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. * - * @param { number } width - Width of the off-screen canvas. - * @param { number } height - Height of the off-screen canvas. + * @param { double } width - Width of the off-screen canvas. + * @param { double } height - Height of the off-screen canvas. * @param { LengthMetricsUnit } [unit] - the unit mode * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - constructor(width: number, height: number, unit?: LengthMetricsUnit); + constructor(width: double, height: double, unit?: LengthMetricsUnit); } /** diff --git a/api/arkui/component/common.static.d.ets b/api/arkui/component/common.static.d.ets index 991b5abaeb..93796ae777 100644 --- a/api/arkui/component/common.static.d.ets +++ b/api/arkui/component/common.static.d.ets @@ -11240,14 +11240,14 @@ export declare interface CommonShapeMethod extends CommonMethod { * Sets the offset of the start point for drawing the stroke. * An invalid value is handled as the default value. * - * @param { number | string | undefined } value - Offset of the start point for drawing the stroke. + * @param { double | string | undefined } value - Offset of the start point for drawing the stroke. * Default value: 0 * Default unit: vp * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default strokeDashOffset(value: number | string | undefined): this; + default strokeDashOffset(value: double | string | undefined): this; /** * Sets the cap style of the stroke. * @@ -11270,36 +11270,36 @@ export declare interface CommonShapeMethod extends CommonMethod { /** * Limits for drawing acute angles as bevels * - * @param { number | string | undefined } value + * @param { double | string | undefined } value * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default strokeMiterLimit(value: number | string | undefined): this; + default strokeMiterLimit(value: double | string | undefined): this; /** * Sets the stroke opacity. * The value range is [0.0, 1.0]. * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. * Any other value evaluates to the value 1.0. * - * @param { number | string | Resource | undefined } value - Stroke opacity. Default value: 1 + * @param { double | string | Resource | undefined } value - Stroke opacity. Default value: 1 * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default strokeOpacity(value: number | string | Resource | undefined): this; + default strokeOpacity(value: double | string | Resource | undefined): this; /** * Sets the opacity of the fill area. * The value range is [0.0, 1.0]. * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. * Any other value evaluates to the value 1.0. * - * @param { number | string | Resource | undefined } value - Opacity of the fill area. Default value: 1 + * @param { double | string | Resource | undefined } value - Opacity of the fill area. Default value: 1 * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - default fillOpacity(value: number | string | Resource | undefined): this; + default fillOpacity(value: double | string | Resource | undefined): this; /** * Sets the stroke width. * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. diff --git a/api/arkui/component/matrix2d.static.d.ets b/api/arkui/component/matrix2d.static.d.ets index be1cfe80cf..256054aad4 100644 --- a/api/arkui/component/matrix2d.static.d.ets +++ b/api/arkui/component/matrix2d.static.d.ets @@ -31,99 +31,99 @@ export declare class Matrix2D { /** * Get the horizontal zoom. * - * @return { number | undefined } + * @return { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get scaleX(): number | undefined; + get scaleX(): double | undefined; /** * Set the horizontal zoom. * - * @param { number | undefined } + * @param { double | undefined } scaleX - The horizontal zoom. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set scaleX(scaleX: number | undefined); + set scaleX(scaleX: double | undefined); /** * Get the vertical zoom. * - * @return { number | undefined } + * @return { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get scaleY(): number | undefined; + get scaleY(): double | undefined; /** * Set the vertical zoom. * - * @param { number | undefined } + * @param { double | undefined } scaleY - The vertical zoom. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set scaleY(scaleY: number | undefined); + set scaleY(scaleY: double | undefined); /** * Get the horizontal tilt. * - * @return { number | undefined } + * @return { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get rotateX(): number | undefined; + get rotateX(): double | undefined; /** * Set the horizontal tilt. * - * @param { number | undefined } + * @param { double | undefined } rotateX - The horizontal tilt. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set rotateX(rotateX: number | undefined); + set rotateX(rotateX: double | undefined); /** * Get the vertical tilt. * - * @return { number | undefined } + * @return { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get rotateY(): number | undefined; + get rotateY(): double | undefined; /** * Set the vertical tilt. * - * @param { number | undefined } + * @param { double | undefined } rotateY - The vertical tilt. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set rotateY(rotateY: number | undefined); + set rotateY(rotateY: double | undefined); /** * Get the horizontal movement. * - * @return { number | undefined } + * @return { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get translateX(): number | undefined; + get translateX(): double | undefined; /** * Set the horizontal movement. * - * @param { number | undefined } + * @param { double | undefined } translateX - The horizontal movement. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set translateX(translateX: number | undefined); + set translateX(translateX: double | undefined); /** * Get the vertical movement. * - * @return { number | undefined } + * @return { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get translateY(): number | undefined; + get translateY(): double | undefined; /** * Set the vertical movement. * - * @param { number | undefined } + * @param { double | undefined } translateY - The vertical movement. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set translateY(translateY: number | undefined); + set translateY(translateY: double | undefined); /** * Transforms the current 2D matrix back to the identity matrix (i.e., without any rotational * translation scaling effect) @@ -145,34 +145,34 @@ export declare class Matrix2D { /** * Adds the rotation effect of the X and Y axes to the current matrix. * - * @param { number } degree - The rotation angle, clockwise in radians. - * @param { number } [rx] - Rotation effect of the X-axis - * @param { number } [ry] - Rotation effect of the Y-axis + * @param { double } degree - The rotation angle, clockwise in radians. + * @param { double } [rx] - Rotation effect of the X-axis + * @param { double } [ry] - Rotation effect of the Y-axis * @returns { Matrix2D } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - rotate(degree: number, rx?: number, ry?: number): Matrix2D; + rotate(degree: double, rx?: double, ry?: double): Matrix2D; /** * Adds the translation effect of the X and Y axes to the current matrix. * - * @param { number } [tx] - X-axis translation effect - * @param { number } [ty] - Y-axis translation effect + * @param { double } [tx] - X-axis translation effect + * @param { double } [ty] - Y-axis translation effect * @returns { Matrix2D } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - translate(tx?: number, ty?: number): Matrix2D; + translate(tx?: double, ty?: double): Matrix2D; /** * Adds the scaling effect of the X and Y axes to the current matrix. * - * @param { number } [sx] - X-axis scaling effect - * @param { number } [sy] - Y-axis scaling effect + * @param { double } [sx] - X-axis scaling effect + * @param { double } [sy] - Y-axis scaling effect * @returns { Matrix2D } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - scale(sx?: number, sy?: number): Matrix2D; + scale(sx?: double, sy?: double): Matrix2D; /** * Constructs a 2D change matrix object. The default value is the unit matrix. * diff --git a/api/arkui/component/xcomponent.static.d.ets b/api/arkui/component/xcomponent.static.d.ets index 99703af1d8..fccba3e922 100644 --- a/api/arkui/component/xcomponent.static.d.ets +++ b/api/arkui/component/xcomponent.static.d.ets @@ -306,6 +306,16 @@ export declare interface XComponentAttribute extends CommonMethod { * @since 20 */ default enableSecure(isSecure: boolean | undefined): this; + /** + * Enable transparent layer for XComponent. + * + * @param { boolean | undefined } enabled - whether to enable transparent layer for XComponent. + * @returns { XComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + default enableTransparentLayer(enabled: boolean | undefined): this; /** * Set hdrBrightness for XComponent. * diff --git a/api/common/full/viewmodel.d.ts b/api/common/full/viewmodel.d.ts index abab451afe..42c5a77dd2 100644 --- a/api/common/full/viewmodel.d.ts +++ b/api/common/full/viewmodel.d.ts @@ -1750,13 +1750,13 @@ export interface OffscreenCanvasRenderingContext2D { /** * Create an ImageData object. * - * @param { ImageData } imagedata - Copy an object of the same width and height from an existing ImageData object + * @param { ImageData } imageData - Copy an object of the same width and height from an existing ImageData object * The image itself is not allowed to be copied. * @returns { ImageData } ImageData New ImageData object with width and height specified. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ - createImageData(imagedata: ImageData): ImageData; + createImageData(imageData: ImageData): ImageData; /** * Creates a path that is later used by the CanvasRenderingContext2D object. @@ -1807,18 +1807,18 @@ export interface OffscreenCanvasRenderingContext2D { /** * Draws the specified ImageData object to the canvas. * - * @param { ImageData } imagedata - An array object containing pixel values. + * @param { ImageData } imageData - An array object containing pixel values. * @param { number } dx - The offset of the position of the source image data in the target canvas (the offset in the X-axis direction). * @param { number } dy - The offset of the position of the source image data in the target canvas (the Y-axis offset). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ - putImageData(imagedata: ImageData, dx: number, dy: number): void; + putImageData(imageData: ImageData, dx: number, dy: number): void; /** * Draws the specified ImageData object to the canvas. * - * @param { ImageData } imagedata - An array object containing pixel values. + * @param { ImageData } imageData - An array object containing pixel values. * @param { number } dx - The offset of the position of the source image data in the target canvas (the offset in the X-axis direction). * @param { number } dy - he offset of the position of the source image data in the target canvas (the Y-axis offset). * @param { number } dirtyX - In the source image data, @@ -1831,7 +1831,7 @@ export interface OffscreenCanvasRenderingContext2D { * @since 7 */ putImageData( - imagedata: ImageData, + imageData: ImageData, dx: number, dy: number, dirtyX: number, @@ -2721,12 +2721,12 @@ export interface CanvasRenderingContext2D { /** * Creates an ImageData object. * - * @param { ImageData } imagedata - ImageData object with the same width and height copied from the original ImageData object. + * @param { ImageData } imageData - ImageData object with the same width and height copied from the original ImageData object. * @returns { ImageData } Returns the newly created FunctionCallable object. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 4 */ - createImageData(imagedata: ImageData): ImageData; + createImageData(imageData: ImageData): ImageData; /** * ImageData object created with pixels in the specified area on the canvas. -- Gitee From 135b1bc99de06777a145cfb1f952939d4879f457 Mon Sep 17 00:00:00 2001 From: wangjunman1 Date: Thu, 4 Sep 2025 10:19:32 +0800 Subject: [PATCH 2/2] fix return Signed-off-by: wangjunman1 --- api/arkui/component/canvas.static.d.ets | 62 +++++++++++------------ api/arkui/component/matrix2d.static.d.ets | 12 ++--- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/api/arkui/component/canvas.static.d.ets b/api/arkui/component/canvas.static.d.ets index df66edaa52..e9b96b4b48 100644 --- a/api/arkui/component/canvas.static.d.ets +++ b/api/arkui/component/canvas.static.d.ets @@ -493,7 +493,7 @@ export declare class ImageBitmap { /** * Indicates the height of the CSS pixel unit of ImageData. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -501,7 +501,7 @@ export declare class ImageBitmap { /** * Indicates the width of the CSS pixel unit of ImageData. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -534,7 +534,7 @@ export declare class ImageData { /** * Array containing image pixel data * - * @return { Uint8ClampedArray } + * @returns { Uint8ClampedArray } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -542,7 +542,7 @@ export declare class ImageData { /** * Height of the image. * - * @return { int } + * @returns { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -550,7 +550,7 @@ export declare class ImageData { /** * Width of the image. * - * @return { int } + * @returns { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -613,7 +613,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get spacing for letter. * - * @return { LengthMetrics | string } + * @returns { LengthMetrics | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -630,7 +630,7 @@ export declare class CanvasRenderer extends CanvasPath { * Get transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). * If the value is out of range, the assignment is invalid. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -662,7 +662,7 @@ export declare class CanvasRenderer extends CanvasPath { * copy: Only new graphics are displayed. * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. * - * @return { string } + * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -786,7 +786,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: * - * @return { string | Color | int | CanvasGradient | CanvasPattern } + * @returns { string | Color | int | CanvasGradient | CanvasPattern } * string: Color String. * Color: Common enum of Color. * int: Indicates the color with double. @@ -813,7 +813,7 @@ export declare class CanvasRenderer extends CanvasPath { * Get the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. * The options are as follows: * - * @return { string | Color | int | CanvasGradient | CanvasPattern } + * @returns { string | Color | int | CanvasGradient | CanvasPattern } * string: Color String. * Color: Common enum of Color. * int: Indicates the color with double. @@ -918,7 +918,7 @@ export declare class CanvasRenderer extends CanvasPath { * When the value is 0%, there is no change in the image. * none: Turn off filter effects. * - * @return { string } + * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1037,7 +1037,7 @@ export declare class CanvasRenderer extends CanvasPath { * Get the status whether to smooth the image. The value true indicates that the image is smooth. * The value false indicates that the image is not smooth. * - * @return { boolean } + * @returns { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1054,7 +1054,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. * - * @return { ImageSmoothingQuality } + * @returns { ImageSmoothingQuality } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1070,7 +1070,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the line segment endpoint attribute. For details, see {@link CanvasLineCap}. * - * @return { CanvasLineCap } + * @returns { CanvasLineCap } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1086,7 +1086,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the dotted line offset attribute. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1102,7 +1102,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the line segment connection point attribute. For details, see {@link CanvasLineJoin}. * - * @return { CanvasLineJoin } + * @returns { CanvasLineJoin } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1118,7 +1118,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the line thickness attribute. The value cannot be 0 or a negative double. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1134,7 +1134,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the value of this parameter cannot be 0 or a negative double. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1200,7 +1200,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the shadow blur radius. The value cannot be a negative double. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1216,7 +1216,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the shadow color. * - * @return { string } + * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1232,7 +1232,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the horizontal offset distance of the shadow. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1248,7 +1248,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the vertical offset distance of the shadow. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1309,7 +1309,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the text drawing direction. For details, see {@link CanvasDirection}. * - * @return { CanvasDirection } + * @returns { CanvasDirection } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1325,7 +1325,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the font style. * - * @return { string } + * @returns { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1341,7 +1341,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the text alignment mode. For details, see {@link CanvasTextAlign}. * - * @return { CanvasTextAlign } + * @returns { CanvasTextAlign } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1357,7 +1357,7 @@ export declare class CanvasRenderer extends CanvasPath { /** * Get the text baseline. For details, see {@link CanvasTextBaseline}. * - * @return { CanvasTextBaseline } + * @returns { CanvasTextBaseline } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1499,7 +1499,7 @@ export declare class CanvasRenderingContext2D extends CanvasRenderer { /** * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1507,7 +1507,7 @@ export declare class CanvasRenderingContext2D extends CanvasRenderer { /** * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1515,7 +1515,7 @@ export declare class CanvasRenderingContext2D extends CanvasRenderer { /** * Frame node of the canvas. The default value is null. * - * @return { FrameNode } + * @returns { FrameNode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1665,7 +1665,7 @@ export declare class OffscreenCanvas { /** * Get the height of the off-screen canvas. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -1681,7 +1681,7 @@ export declare class OffscreenCanvas { /** * Get the width of the off-screen canvas. * - * @return { double } + * @returns { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ diff --git a/api/arkui/component/matrix2d.static.d.ets b/api/arkui/component/matrix2d.static.d.ets index 256054aad4..ed9bb8cdd1 100644 --- a/api/arkui/component/matrix2d.static.d.ets +++ b/api/arkui/component/matrix2d.static.d.ets @@ -31,7 +31,7 @@ export declare class Matrix2D { /** * Get the horizontal zoom. * - * @return { double | undefined } + * @returns { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -47,7 +47,7 @@ export declare class Matrix2D { /** * Get the vertical zoom. * - * @return { double | undefined } + * @returns { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -63,7 +63,7 @@ export declare class Matrix2D { /** * Get the horizontal tilt. * - * @return { double | undefined } + * @returns { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -79,7 +79,7 @@ export declare class Matrix2D { /** * Get the vertical tilt. * - * @return { double | undefined } + * @returns { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -95,7 +95,7 @@ export declare class Matrix2D { /** * Get the horizontal movement. * - * @return { double | undefined } + * @returns { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ @@ -111,7 +111,7 @@ export declare class Matrix2D { /** * Get the vertical movement. * - * @return { double | undefined } + * @returns { double | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -- Gitee