canvas: safe ctx.arc against negative radius

This commit is contained in:
jean-emmanuel 2016-12-12 12:04:45 +01:00
parent 5a2cc55108
commit 4a6b0faa93

View file

@ -18,6 +18,11 @@ var _canvas_base = module.exports = function() {
this.canvas.resize(this.resizeHandleProxy.bind(this))
this.ctx.arc = (x, y, r, s, e, c)=>{
CanvasRenderingContext2D.prototype.arc.call(this.ctx, x, y, Math.max(0,r), s, e, c)
}
}