[whatwg] Canvas 2d: proposal to add path(DOMString)

Having spoken to several developers, I think that we're clear to add a 
new method to the canvas 2d api;
though there is some question about how it should be added.

The method would take a DOMString using SVG path semantics.

I'm not certain which route is better:
ctx.path('M....z')
or
ctx.fillPath('M ..z'), ctx.strokePath('M...z');

This usually takes ~80 lines of JavaScript to support,
we're eager to see it added to native implementations.

All browser vendors have SVG support now, and could easily re-use
code from their SVG implementations to implement this canvas 2d 
supplemental.


-Charles

Received on Friday, 29 July 2011 13:44:07 UTC