ZMYaro/paintz

Switch to using ctx.reset()

Closed this issue · 2 comments

Switch to using CanvasRenderingContext2D.prototype.reset, and move the existing Utils.clearCanvas to a lazy polyfill for it.

https://github.com/fserb/canvas2D/blob/master/spec/reset.md

Done in daddc16.

This is actually not ideal, as most of the times Utils.clearCanvas was used, only the contents of the canvas needed to be removed, and the other properties that context.reset reset did not need to be or were expected to remain untouched.