update api/@ohos.graphics.drawing.d.ts.

Signed-off-by: wxt <wangxutao5@huawei.com>
This commit is contained in:
wxt 2024-07-19 06:16:56 +00:00 committed by Gitee
parent 30c8152732
commit 2182ff7f68
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -650,23 +650,6 @@ declare namespace drawing {
addRoundRect(roundRect: RoundRect, pathDirection?: PathDirection): void;
/**
* Fills clip with the specified ARGB color of hexadecimal format.
* @param { number } color - Number must be ARGB color of hexadecimal format.
* @param { BlendMode } blendMode - Used to combine source color and destination. The default value is SRC_OVER.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
drawColor(color: number, blendMode?: BlendMode): void;
/**
* Fills the clipped rectangle with the specified ARGB color.
* @param { number } alpha - Alpha channel of color. The range of alpha must be [0, 255].
* @param { number } red - Red channel of color. The range of red must be [0, 255].
* @param { number } green - Green channel of color. The range of green must be [0, 255].
* @param { number } blue - Blue channel of color. The range of blue must be [0, 255].
* @param { BlendMode } blendMode - Used to combine source color and destination. The default value is SRC_OVER.
* Appends src path to path, transformed by matrix.
* @param { Path } path - Indicates the Path object.
* @param { Matrix | null } matrix - Indicates transform applied to path. The default value is null.
@ -1078,6 +1061,17 @@ declare namespace drawing {
*/
drawColor(color: common2D.Color, blendMode?: BlendMode): void;
/**
* Fills clip with the specified ARGB color of hexadecimal format.
* @param { number } color - Number must be ARGB color of hexadecimal format.
* @param { BlendMode } blendMode - Used to combine source color and destination. The default value is SRC_OVER.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
drawColor(color: number, blendMode?: BlendMode): void;
/**
* Fills the clipped rectangle with the specified ARGB color.
* @param { number } alpha - Alpha channel of color. The range of alpha must be [0, 255].
@ -2436,6 +2430,22 @@ declare namespace drawing {
* @since 12
*/
static create(blurRadius: number, x: number, y: number, color: common2D.Color): ShadowLayer;
/**
* Makes a new ShadowLayer with the specified ARGB color of hexadecimal format.
*
* @param { number } blurRadius - The blur radius of the shadow. The blur radius must be greater than 0.
* @param { number } x - The offset point on x-axis.
* @param { number } y - The offset point on y-axis.
* @param { number } color - The shadow color. Number must be ARGB color of hexadecimal format.
* @returns { ShadowLayer } ShadowLayer object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @static
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
static create(blurRadius: number, x: number, y: number, color: number): ShadowLayer;
}
/**
@ -2457,6 +2467,20 @@ declare namespace drawing {
* @since 11
*/
static createBlendModeColorFilter(color: common2D.Color, mode: BlendMode): ColorFilter;
/**
* Makes a color filter with the given ARGB color of hexadecimal format and blend mode.
* @param { number } color - Number must be ARGB color of hexadecimal format.
* @param { BlendMode } mode - BlendMode.
* @returns { ColorFilter } Colorfilter object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @static
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
static createBlendModeColorFilter(color: number, mode: BlendMode): ColorFilter;
/**
* Create a color filter consisting of two filters.
* @param { ColorFilter } outer - The filter is used next.
@ -2703,6 +2727,16 @@ declare namespace drawing {
*/
setColor(color: common2D.Color): void;
/**
* Set the specified ARGB color of hexadecimal format to the pen.
* @param { number } color - Number must be ARGB color of hexadecimal format.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
setColor(color: number): void;
/**
* Set the AGRB color of the pen.
* @param { number } alpha - Alpha channel of color. The range of alpha must be [0, 255].
@ -2919,23 +2953,6 @@ declare namespace drawing {
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
static create(blurRadius: number, x: number, y: number, color: common2D.Color): ShadowLayer;
/**
* Makes a new ShadowLayer with the specified ARGB color of hexadecimal format.
*
* @param { number } blurRadius - The blur radius of the shadow. The blur radius must be greater than 0.
* @param { number } x - The offset point on x-axis.
* @param { number } y - The offset point on y-axis.
* @param { number } color - The shadow color. Number must be ARGB color of hexadecimal format.
* @returns { ShadowLayer } ShadowLayer object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @static
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
static create(blurRadius: number, x: number, y: number, color: number): ShadowLayer;
getFillPath(src: Path, dst: Path): boolean;
}
@ -2973,22 +2990,16 @@ declare namespace drawing {
setColor(color: common2D.Color): void;
/**
* Makes a color filter with the given ARGB color of hexadecimal format and blend mode.
* Set the specified ARGB color of hexadecimal format to the brush.
* @param { number } color - Number must be ARGB color of hexadecimal format.
* @param { BlendMode } mode - BlendMode.
* @returns { ColorFilter } Colorfilter object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @static
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
static createBlendModeColorFilter(color: number, mode: BlendMode): ColorFilter;
setColor(color: number): void;
/**
* Create a color filter consisting of two filters.
* @param { ColorFilter } outer - The filter is used next.
* @param { ColorFilter } inner - The filter is used first.
* @returns { ColorFilter } Colorfilter object.
* Set the ARGB color of the brush.
* @param { number } alpha - Alpha channel of color. The range of alpha must be [0, 255].
* @param { number } red - Red channel of color. The range of red must be [0, 255].
@ -3211,42 +3222,6 @@ declare namespace drawing {
*/
isEqual(matrix: Matrix): Boolean;
/**
* Provides settings for strokes during drawing.
* @syscap SystemCapability.Graphics.Drawing
* @since 11
*/
class Pen {
/**
* Set the color of the pen.
* @param { common2D.Color } color - The range of color channels must be [0, 255].
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @syscap SystemCapability.Graphics.Drawing
* @since 11
*/
setColor(color: common2D.Color): void;
/**
* Set the specified ARGB color of hexadecimal format to the pen.
* @param { number } color - Number must be ARGB color of hexadecimal format.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
setColor(color: number): void;
/**
* Set the AGRB color of the pen.
* @param { number } alpha - Alpha channel of color. The range of alpha must be [0, 255].
* @param { number } red - Red channel of color. The range of red must be [0, 255].
* @param { number } green - Green channel of color. The range of green must be [0, 255].
* @param { number } blue - Blue channel of color. The range of blue must be [0, 255].
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
setColor(alpha: number, red: number, green: number, blue: number): void;
/**
* Sets inverse to reciprocal matrix, returning true if matrix can be inverted.
* @param { Matrix } matrix - Indicates the Matrix object.
@ -3366,22 +3341,6 @@ declare namespace drawing {
*/
mapPoints(src: Array<common2D.Point>): Array<common2D.Point>;
/**
* Set the specified ARGB color of hexadecimal format to the brush.
* @param { number } color - Number must be ARGB color of hexadecimal format.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
setColor(color: number): void;
/**
* Set the ARGB color of the brush.
* @param { number } alpha - Alpha channel of color. The range of alpha must be [0, 255].
* @param { number } red - Red channel of color. The range of red must be [0, 255].
* @param { number } green - Green channel of color. The range of green must be [0, 255].
* @param { number } blue - Blue channel of color. The range of blue must be [0, 255].
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* Return nine scalar values contained by Matrix.
* @returns { Array<number> } nine scalar values contained by Matrix.
* @syscap SystemCapability.Graphics.Drawing