This commit is contained in:
pplokijuhyg 2020-02-11 14:22:37 +08:00
parent 6678d2b8ce
commit 694d50651b

View File

@ -31,7 +31,7 @@ console.log(canvas2.style.width)
```
html2canvas与canvas参考文档
### 重点介绍
context.scale(x 倍数, y 倍数); //画板放大指定倍数
context.scale(x 倍数, y 倍数); //这个是画板放大指定倍数
canvas2.width = w * times * window.devicePixelRatio; //指定画板宽度
canvas2.height = h * times * window.devicePixelRatio; //指定画板宽度
为什么要再乘以window.devicePixelRatio