canvas的一些参数设置在一些安卓机上无效
发布于 5 年前 作者 pengjun 2610 次浏览 来自 问答

// pass in the canvas’ context to this function
function disableAntiAliasing(context) {
 // note: you must factor this into any other context.translate calls in the future
 context.translate(0.5, 0.5);
 context.webkitImageSmoothingEnabled = false;
 context.mozImageSmoothingEnabled = false;
 context.imageSmoothingEnabled = false;
}网上搜到的这个,这么设置之后,用drawImage画tilemap, 正常情况下应该是:

但是有些安卓机上却出现了问题:

也就是参数设置无效游戏叫《小小勇者》各位有兴趣可以试一下,看看有没有问题

3 回复

你好,请问是更新了客户端版本后出现的问题吗?在6.6.7前的版本是正常显示的吗?

1、提供出现问题的机型和微信版本号

2、提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

你好,确认目前没有支持 imageSmoothingEnabled 这个特性。我们将会在后续版本支持。

好像安卓都有问题

回到顶部