let sysInfo = wx.getSystemInfoSync(),width =sysInfo.windowWidth,height =sysInfo.windowHeight;
canvas.style.width = width + "px";
canvas.style.height = height + "px";
canvas.height = height * window.devicePixelRatio;
canvas.width = width * window.devicePixelRatio;
ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
微信小游戏canvas抗锯齿
最新推荐文章于 2024-04-20 19:06:28 发布