未验证 提交 ce7be442 编写于 作者: O openharmony_ci 提交者: Gitee

!15574 canvas fill示例图片修改

Merge pull request !15574 from lanyi/lanyi_canvas
...@@ -683,7 +683,7 @@ fillRect(x: number, y: number, w: number, h: number): void ...@@ -683,7 +683,7 @@ fillRect(x: number, y: number, w: number, h: number): void
.height('100%') .height('100%')
.backgroundColor('#ffff00') .backgroundColor('#ffff00')
.onReady(() =>{ .onReady(() =>{
this.context.fillRect(0,30,100,100) this.context.fillRect(30,30,100,100)
}) })
} }
.width('100%') .width('100%')
......
...@@ -727,7 +727,7 @@ fillRect(x: number, y: number, w: number, h: number): void ...@@ -727,7 +727,7 @@ fillRect(x: number, y: number, w: number, h: number): void
.height('100%') .height('100%')
.backgroundColor('#ffff00') .backgroundColor('#ffff00')
.onReady(() =>{ .onReady(() =>{
this.offContext.fillRect(0,30,100,100) this.offContext.fillRect(30,30,100,100)
var image = this.offContext.transferToImageBitmap() var image = this.offContext.transferToImageBitmap()
this.context.transferFromImageBitmap(image) this.context.transferFromImageBitmap(image)
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册