From 31bdeee35a3793dfad21525f50b123a9e9bea749 Mon Sep 17 00:00:00 2001 From: limeng Date: Mon, 29 May 2023 03:36:12 +0000 Subject: [PATCH] fix the problem of example. Signed-off-by: limeng --- .../reference/arkui-ts/ts-components-offscreencanvas.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md b/zh-cn/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md index b8ff815c0b..aac5a3287f 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md @@ -55,7 +55,7 @@ struct OffscreenCanvasPage { .onReady(() => { var offContext = this.offCanvas.getContext("2d", this.settings) offContext.fillStyle = '#CDCDCD' - offContext.fillRect(0, 0, offCanvas.width, 150) + offContext.fillRect(0, 0, this.offCanvas.width, 150) var image = this.offCanvas.transferToImageBitmap() this.context.setTransform(1, 0, 0, 1, 50, 200) this.context.transferFromImageBitmap(image) @@ -89,7 +89,7 @@ struct OffscreenCanvasPage { .onReady(() => { var offContext = this.offCanvas.getContext("2d", this.settings) offContext.fillStyle = '#CDCDCD' - offContext.fillRect(0, 0, 100, offCanvas.height) + offContext.fillRect(0, 0, 100, this.offCanvas.height) var image = this.offCanvas.transferToImageBitmap() this.context.setTransform(1, 0, 0, 1, 50, 200) this.context.transferFromImageBitmap(image) -- GitLab