canvas: safe ctx.arc against negative radius
This commit is contained in:
parent
5a2cc55108
commit
4a6b0faa93
1 changed files with 5 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue