windowToCanvas(canvas, x, y) {
// 将坐标转为相对canvas的坐标
var cvsbox = canvas.getBoundingClientRect();
return { x: Math.round(x - cvsbox.left), y: Math.round(y - cvsbox.top) };
},
11-18
2995
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-08