Bug 96826
Summary: | Implement Path objects for canvas | ||
---|---|---|---|
Product: | WebKit | Reporter: | Dirk Schulze <krit> |
Component: | Canvas | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | cabanier, kangax, pdr, simon.fraser |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://dev.w3.org/html5/2dcontext/#path-objects |
Dirk Schulze
The Path object from Canvas is basically a web adaption from our Path object in WebKit and would be extremely easy to implement.
However, the SVG WG would like to use the Path() object as well and make it possible to append such a path object to a <path> element. Like we know from the different DRT texts from different platforms, graphics libraries flatten the path in different way or don't give access to the data at all. This would mean that we need to be aware of all path data all the time.
In SVG we have a very efficient bytestream that is optimal for this use case (since new data get added, but existing segments not removed or modified). On drawing, it is very easy to produce the WebKit Path object. SVG paths and Canvas paths are very similar. SVG is missing support for arc and arcTo. The former one gets added to SVG2, the later one needs to be flattened.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Dirk Schulze
After talking with Philip and Rik, it might be ok to let the platform flatten the path. This would also make the transformation functionality easier. No extra bytestream would be needed, but an implementation of Path::apply() would be required. All platforms but OpenVG support returning path data. And OpenVG seems to be irrelevant now, since RIM doesn't use the code anymore.
kangax
Dupe of #97333?
Dirk Schulze
(In reply to comment #2)
> Dupe of #97333?
Yes, it is a duplicate.
*** This bug has been marked as a duplicate of bug 97333 ***