From b22fb3a0159909cedd4b23f6ab6adb5353d73e36 Mon Sep 17 00:00:00 2001 From: wanyanglan Date: Sat, 13 Sep 2025 19:59:15 +0800 Subject: [PATCH] drawing static type overloading. Signed-off-by: wanyanglan Change-Id: I2f64ed3887d087cb0a78f5eef34215329bfdc3f1 --- api/@ohos.graphics.drawing.d.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/api/@ohos.graphics.drawing.d.ts b/api/@ohos.graphics.drawing.d.ts index ca561dbfbe..5c2bfabf4f 100644 --- a/api/@ohos.graphics.drawing.d.ts +++ b/api/@ohos.graphics.drawing.d.ts @@ -4594,6 +4594,35 @@ declare namespace drawing { */ static createImageLattice(xDivs: Array, yDivs: Array, fXCount: int, fYCount: int, fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; + + /** + * Divides the image into lattices. The lattices on both even columns and even rows are fixed, + * and they are drawn at their original size if the target is large enough. + * If the target is too small to hold the fixed lattices, all the fixed lattices are scaled down to fit the target, + * and the lattices that are not on even columns and even rows are scaled to accommodate the remaining space. + * @param { Array } xDivs - Array of X coordinates used to divide the image. The value is an integer. + * @param { Array } yDivs - Array of Y coordinates used to divide the image. The value is an integer. + * @param { int } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5]. + * @param { int } fYCount - Size of the array that holds the Y coordinates. The value range is [0, 5]. + * @param { common2D.Rect | null } [fBounds] - Source bounds to draw. The rectangle parameter must be an integer. + * The default value is the rectangle size of the original image. If the rectangle parameter is a decimal, + * the decimal part is discarded and converted into an integer. + * @param { Array | null } [fRectTypes] - Array that holds the rectangle types. The default value is null. + * If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1). + * @param { Array | null } [fColors] - Array that holds the colors used to fill the lattices. + * Each color is represented by a 32-bit unsigned integer in hexadecimal ARGB format. + * The default value is null. + * If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1). + * @returns { Lattice } Lattice object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 22 static + */ + static createImageLatticeWithArrayInt(xDivs: Array, yDivs: Array, fXCount: int, fYCount: int, + fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; } /** -- Gitee