标签:idt canvas 如何 height 解决 scale cep cal 画圆
let width = canvas.width,height=canvas.height;
if (window.devicePixelRatio) {
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的画圆弧时的锯齿感以及如何让canvas的图更清晰?
标签:idt canvas 如何 height 解决 scale cep cal 画圆
原文地址:http://www.cnblogs.com/lyls/p/7857400.html