W3C home > Mailing lists > Public > public-svg-wg@w3.org > April to June 2008

Normalizing a 'z' or 'Z' command

From: Erik Dahlström <ed@opera.com>
Date: Wed, 07 May 2008 13:06:59 +0200
To: "public-svg-wg@w3.org" <public-svg-wg@w3.org>
Message-ID: <op.uar6hxtrgqiacl@gnorps.palace.opera.no>

Hello public-svg-wg,

A question regarding path normalization:

- When closing a subpath with the SVGPath.close() method, does it add a  
LINE_TO if the coordinate of the start doesn't match the end coordinate?  
The path normalization list doesn't mention this case. It has implications  
for both the SVGPath interface and path animation/interpolation[4].

The testcase udom-svgpath-201-t.svg[2] assumes that a lineto is not added.

SVG 1.1 [3] doesn't disallow normalizing a close command as lineto+close,  
it only states the set of allowed normalized commands (so even if you  
wanted to normalize close as curveto+lineto+close you'd be free to do so).

The following two paths are not interpolable[4] if the lineto isn't added  
as a normalization step:

   <path d="M0 0l10 10z"/>
   <path d="M0 0l10 10l-10 -10z"/>

I would like the 1.2T spec to define how close commands should be  


[3] http://www.w3.org/TR/SVG11/paths.html#InterfaceSVGAnimatedPathData

Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Wednesday, 7 May 2008 11:09:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:08 UTC