- From: Cameron McCormack <cam@mcc.id.au>
- Date: Fri, 24 Jun 2011 15:18:02 +1200
- To: Charles Pritchard <chuck@jumis.com>
- Cc: Frank Olivier <Frank.Olivier@microsoft.com>, Richard Schwerdtfeger <schwer@us.ibm.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Cynthia Shelly <cyns@microsoft.com>, david.bolter@gmail.com, Mike@w3.org, public-canvas-api@w3.org, public-html@w3.org, public-html-a11y@w3.org
Charles Pritchard: > > > They in no way "step on" the propriety of SVG -- they in fact > > > enhance interoperability, Cameron McCormack: > > (Not sure how they enhance interoperability if nobody implements > > them yet…) Charles Pritchard: > Some vendors do implement normalized strings. Sorry, I thought you meant enhance interoperability of your proposal. > I've personally implemented SVG, and I've worked with other > developer's implementations of SVG which worked atop canvas. I've also > worked with issues where method calls had unfortunate overhead. In all > cases, it's a big help to have the Canvas implementation recognize > normalized SVG strings. And it's relatively inexpensive to add to > Canvas implementations. (Sorry to belabour this point.) I should think it would be easy enough for the implementation to support full SVG strings. After all, if getCurrentPath returns a normalised string, and the current path your create on the canvas context included any arc commands, then your implementation will need to have code to flatten them down to Béziers or straight line segments. On the other hand, if you perform no normalisation, the mapping from the path as built up using lineTo/arcTo/etc. to the path data string that you return is simple. > > I think the whole point of SVG exposing path data as either > > normalised or un-normalised is that user script may find it easier > > not to have to deal with both relative and absolute commands, arcs, > > etc. > > And the implementation. It's a lot of extra work, and it's not really > necessary, as it can be handled at other points in the pipeline. This is only the case if you somehow disallow authors from calling arcTo. Authors can construct paths with canvas now that include arc commands. If you want to return normalised path data, the implementation needs to do work to flatten this. If you return unnormalised path data, you don’t have to do any work. -- Cameron McCormack ≝ http://mcc.id.au/
Received on Friday, 24 June 2011 03:18:45 UTC