[webkit-dev] Enable CANVAS_PATH by default
dschulze at adobe.com
Thu Feb 14 09:55:00 PST 2013
Hi WebKit folks,
I worked on the Path interface defined by the Canvas spec of W3C and WHATWG  for the last couple of weeks.
Canvas supports a new DOM interface called Path. The Path interface takes a series of very well known path methods like moveTo, lineTo, cubicCurveTo, rect and allows to create and keep a path independent of a Canvas context. Additionally, I added the attribute 'currentPath' to the Canvas context to provide read and write access to the current path created on the Canvas context. Code snippet:
var path = new Path();
var ctx = canvas.getContext('2d');
ctx.currentPath = path;
var path2 = ctx.currentPath; // path2 != path
Not implemented are addText, addPath, addPathByStrokingText. Another proposal from Rik Cabanier seems to address the idea behind these methods better.
I would like to ask to enable CANVAS_PATH by default on trunk. Ports can opt-out the flag again. More information about some implementation details in a short article. If there are any concerns, suggestions or questions, I am happy to answer them.
More information about the webkit-dev