admin管理员组文章数量:1415467
I have a canvas of the size 320*200 pixels. Now I want to double the size of the pixels, resulting in a 640*400 display. I don't want it to have a higher pixel resolution, just everything doubled (bigger visible pixels).
Any idea on how to do that?
I have a canvas of the size 320*200 pixels. Now I want to double the size of the pixels, resulting in a 640*400 display. I don't want it to have a higher pixel resolution, just everything doubled (bigger visible pixels).
Any idea on how to do that?
Share Improve this question asked Apr 15, 2013 at 14:23 EsshahnEsshahn 4405 silver badges17 bronze badges 2- It may be better to explain why a question should be down-voted. This is a legit question. Probably down-voted because its been asked before. But still its not poorly asked. – Brenwell Commented Nov 23, 2015 at 10:56
- Thank you for explaining that Brenwell, I was a bit puzzled about this as well. I'll make sure to double check for any question already asked before. – Esshahn Commented Nov 23, 2015 at 10:59
1 Answer
Reset to default 7You can adjust the resolution with the height and width properties, while adjusting the size's display trough the style.
<canvas width="320" height="200" style="width:640px;height:400px;"></canvas>
本文标签: javascriptHow to double the pixel size of a canvasStack Overflow
版权声明:本文标题:javascript - How to double the pixel size of a canvas? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745230643a2648808.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论