提交 e684e724 编写于 作者: Anne_LXM's avatar Anne_LXM

Merge branch 'dev' of https://gitcode.net/dcloud/hello-uni-app-x into dev

...@@ -371,7 +371,7 @@ ...@@ -371,7 +371,7 @@
pattern() { pattern() {
const context = this.renderingContext! const context = this.renderingContext!
const image = new Image(100, 100) const image = this.canvasContext!.createImage()
image.src = '../../../static/api.png'; image.src = '../../../static/api.png';
image.onload = () => { image.onload = () => {
context.save() context.save()
...@@ -556,7 +556,7 @@ ...@@ -556,7 +556,7 @@
context.fillText("Circle!", 265, 100) context.fillText("Circle!", 265, 100)
// context.reset() // context.reset()
hidpi(uni.getElementById("canvas") as UniCanvasElement) hidpi(this.canvas!)
}, },
translate() { translate() {
const context = this.renderingContext! const context = this.renderingContext!
...@@ -602,7 +602,7 @@ ...@@ -602,7 +602,7 @@
}, },
drawImageLocal() { drawImageLocal() {
const context = this.renderingContext! const context = this.renderingContext!
const image = new Image(100, 100) const image = this.canvasContext!.createImage();
image.src = '../../../static/uni.png' image.src = '../../../static/uni.png'
image.onload = () => { image.onload = () => {
context.drawImage(image, 0, 0, 100, 100) context.drawImage(image, 0, 0, 100, 100)
...@@ -610,7 +610,7 @@ ...@@ -610,7 +610,7 @@
}, },
drawImage() { drawImage() {
const context = this.renderingContext! const context = this.renderingContext!
const image = new Image(100, 100); const image = this.canvasContext!.createImage();
image.src = 'https://web-ext-storage.dcloud.net.cn/uni-app-x/hello-uniappx-qrcode.png' image.src = 'https://web-ext-storage.dcloud.net.cn/uni-app-x/hello-uniappx-qrcode.png'
image.onload = () => { image.onload = () => {
context.drawImage(image, 0, 0, 100, 100) context.drawImage(image, 0, 0, 100, 100)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册