Each of the methods defined for the canvas 2d context return null. I think it would be very convenient if instead they would return a reference to the 2d context for that canvas. This would allow writing such code as ctx.fill
().stroke() or ctx.moveTo(0,0).lineTo(10,10). This is how many of the native string and array methods work in _javascript_.
- [whatwg] Canvas 2d methods Benjamin Joffe
- Re: [whatwg] Canvas 2d methods Vladimir Vukicevic
- Re: [whatwg] Canvas 2d methods Andrew Fedoniouk
- Re: [whatwg] Canvas 2d methods Ian Hickson
- Re: [whatwg] Canvas 2d methods Stefan Gössner
- Re: [whatwg] Canvas 2d methods Ian Hickson
- Re: [whatwg] Canvas 2d method... Stefan Gössner
- Re: [whatwg] Canvas 2d me... Ian Hickson
- Re: [whatwg] Canvas 2d me... Stefan Gössner
- Re: [whatwg] Canvas 2d me... L. David Baron
- Re: [whatwg] Canvas 2d me... Andrew Fedoniouk