Firefox Canvas - 路径绘制中的伪影(可能存在剪切错误)
我使用一些“高级”图形功能编写了一个 Canvas 程序: http://pastebin.com/u5q0W876
它在 IE、Chrome 和 Opera 中运行良好。但在 FireFox 中,可能会出现奇怪的现象:
~点击右下角(空白处)
~旋转外环(点击它)
〜看起来像http://img535.imageshack.us/img535/9503/fferr.jpg< /a> (见右上角)
我确信问题与函数pencilStripes有关(它在整个屏幕上绘制条纹,然后将其剪切到某个特定的位置) 地区)。它位于第 162 行,并在第 77 行使用。但我不知道为什么当剪辑在所有其他浏览器上正常工作时 FireFox 会出现此错误。
I wrote a Canvas program using some "advanced" graphics features:
http://pastebin.com/u5q0W876
It works fine in IE, Chrome and Opera. But in FireFox, it is possible to make an odd artifact appear:
~click in lower right (empty space)
~rotate outer ring (click on it)
~looks like http://img535.imageshack.us/img535/9503/fferr.jpg (see upper right)
I am sure the problem has to do with the function pencilStripes (which draws stripes over the entire screen, which are then clipped to a certain region). It's on line 162 and is used on line 77. But I don't know why FireFox has this error when the clipping works fine on all other browsers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 c.moveTo(0,0) 添加到 PencilStripes 函数的末尾似乎可以解决这个问题。但请不要问为什么。
Adding c.moveTo(0,0) to the end of the pencilStripes function seems to fix it for me. But please don't ask why.