I hit a weird edge case building something with canvas at work. clearRect does not clear the canvas when drawing vertical lines that go from the top to the bottom of the canvas. When rendering other stuff, clearRect works fine.
I'm not sure if I am missing something obvious, if this is intentional behavior, or a browser bug (unlikely since the behavior is identical in chrome, safari, firefox and opera on mac).
If it is intentional behavior, does anybody know the rationale behind it and/or can perhaps point to some documentation?
I made a small test case that shows the behavior clearly, only the combination clearRect/vertical lines does not clear the canvas:
http://jsfiddle.net/kZj6F/
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…