Commit 48985c29 by 李伟康

提交代码

1 parent 6cc9f739
......@@ -7,7 +7,7 @@ class Draw {
[_pixelRatio_] = null;
[_canvasObject_] = null;
[_canvas_] = null
constructor(canvasObject) {
constructor(canvasObject, isCompInst) {
this[_canvasObject_] = canvasObject
this[_pixelRatio_] = canvasObject.pixelRatio || 2
const height = this.toRpx(canvasObject.height),
......@@ -15,7 +15,8 @@ class Draw {
canvas = wx.createOffscreenCanvas({
type: '2d',
width,
height
height,
isCompInst
}),
ctx = canvas.getContext('2d')
this[_canvas_] = canvas
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!