html5 canvas 线太粗的解决方法

开发技术 2015/8/14

<script>
mycanvas=document.getElementById("mycanvas");
ctx = mycanvas.getContext("2d");
ctx.translate(0.5,0.5); //html5 canvas 线太粗的解决方法
//画矩形
ctx.beginPath();   //这行必须有,不然看不到效果
ctx.lineWidth = 1;
ctx.strokeRect(100,100,200,200);
ctx.closePath();
</script>

中国· 重庆

安菲二维码
添加微信咨询

CopyRight©2009-2019 重庆安菲科技有限公司 All Rights Reserved. 渝ICP备15001722号-43  

关于我们 | 联系我们