Bug 96826 - Implement Path objects for canvas
Summary: Implement Path objects for canvas
Status: RESOLVED DUPLICATE of bug 97333
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://dev.w3.org/html5/2dcontext/#pa...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-14 14:47 PDT by Dirk Schulze
Modified: 2013-01-15 08:45 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 2012-09-14 14:47:42 PDT
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.
Comment 1 Dirk Schulze 2012-09-14 15:35:00 PDT
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.
Comment 2 kangax 2013-01-15 07:10:34 PST
Dupe of #97333?
Comment 3 Dirk Schulze 2013-01-15 08:45:47 PST
(In reply to comment #2)
> Dupe of #97333?

Yes, it is a duplicate.

*** This bug has been marked as a duplicate of bug 97333 ***