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

Re: Normalizing a 'z' or 'Z' command

From: Alex Danilo <alex@abbra.com>
Date: Wed, 07 May 2008 21:45:08 +1000
Message-Id: <8ZXH0K.BEBIW8XF14DF@abbra.com>
To: ?= <ed@opera.com>
Cc: "public-svg-wg@w3.org" <public-svg-wg@w3.org>

Hello Erik,

--Original Message--:
>
>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].

It would be wrong to imply a LINE_TO. The LINE_TO does not imply a line
join to be formed at the intersection of the starting point and the end
of the LINE_TO so they are semantically different. The join will be
formed by a close path.

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

Then it's a good test.

>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 wouldn't expect those to be interpolable.

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

Yes that would be good, but the number of commands in each path
syntax element should remain equal, the implementation should
not synthesize extra ones IMO.

Alex
Received on Wednesday, 7 May 2008 11:46:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 May 2008 11:46:10 GMT