Is there a limit for the width of a canvas

最后都变了- 提交于 2019-12-05 18:21:20

Things get a bit funky if you make them larger than 32,000 (strictly 32767, the limit of a signed C short) particularly at the rendering layer (and definitely don't make the canvas viewport that size!). However, the underlying canvas model uses IEEE doubles to store the coordinates, so there's no reason why you couldn't have things go off that far. You just must keep the size of individual objects down.

This is all a legacy of X11, which uses 16-bit values for coordinates and dimensions in quite a few key structures. Changing this is both logically easy and a lot of work in practice (the assumptions are all over the place).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!