[webkit-dev] New Feature: Canvas Path object

Dirk Schulze dschulze at adobe.com
Fri Sep 21 06:34:34 PDT 2012


Hi WebKit,

I would like to ask if there are objections to implement the canvas Path object.

The HTML Canvas specification and the WHAT WG HTML specification define the Path object [1][2]. The Path object and the CanvasRenderingContext2D share some graphics operations[3]: 

- closePath
- lineTo
- moveTo
- arc
- arcTo
- ellipse (not implemented yet)
- quadraticCurveTo
- cubicCurveTo
- rect

But instead of drawing onto a Canvas, the operations get applied to a Path object. Furthermore the object allows adding other Paths with transforms. A Path object can then be drawn onto a Canvas.

I opened https://bugs.webkit.org/show_bug.cgi?id=97333 for a patch and detailed discussions.

Greetings,
Dirk

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#path-objects
[2] http://dev.w3.org/html5/2dcontext/#path-objects
[3] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#2dcontext


More information about the webkit-dev mailing list