From 3a4834ebe62f625222e7f0bedd17913e91b1070d Mon Sep 17 00:00:00 2001 From: yaoyuchi Date: Fri, 11 Feb 2022 11:29:58 +0800 Subject: [PATCH 1/2] support mesh auto prompt Signed-off-by: yaoyuchi --- api/phone/@internal/viewmodel.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/phone/@internal/viewmodel.d.ts b/api/phone/@internal/viewmodel.d.ts index 0710455c8e..1a9a57fc54 100644 --- a/api/phone/@internal/viewmodel.d.ts +++ b/api/phone/@internal/viewmodel.d.ts @@ -1756,6 +1756,15 @@ export interface CanvasRenderingContext2D { * @devices tv, phone, tablet, wearable */ transferFromImageBitmap(bitmap: ImageBitmap): void; + + /** + * Bitmap Mesh + * @param bitmap Image resource. + * @param mesh Array of verts coordinates after image distortion. + * @param column the column of Mesh array. + * @param row the row of Mesh array. + */ + drawBitmapMesh(bitmap: object, mesh: Array, column: number, row: number): void; } /** -- Gitee From bdf02c78965b5613066323509bb17d31274c8bc1 Mon Sep 17 00:00:00 2001 From: yaoyuchi Date: Fri, 11 Feb 2022 11:43:13 +0800 Subject: [PATCH 2/2] add 2.0 shape mesh function Signed-off-by: yaoyuchi --- api/@internal/component/ets/shape.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/@internal/component/ets/shape.d.ts b/api/@internal/component/ets/shape.d.ts index 3f8b7ce7b1..ccd6134b6a 100644 --- a/api/@internal/component/ets/shape.d.ts +++ b/api/@internal/component/ets/shape.d.ts @@ -124,6 +124,12 @@ declare class ShapeAttribute extends CommonMethod { * @since 7 */ antiAlias(value: boolean): ShapeAttribute; + + /** + * Called when shape mesh. + * @since 8 + */ + mesh(value: Array, column: number, row: number): ShapeAttribute; } declare const Shape: ShapeInterface; -- Gitee