normalizedPathSegList in SVGPathElement

Hi www-svg,

I am working on an implementation for normalizedPathSegList for WebKit.

The normalizedPathSegList should represent the normalized segments of  
a path, transformed from relative to absolute coordinates only
consisting of M, C, L or z path segment types. All other segment types
have to be decomposited to a set of the allowed types.

The specification does not define how a SVGPathSeg should get
transformed to these types. For instance Opera and our version of the
normalized path transforms an arc into a set of cubic curves. That makes
sense, because the deviation to the arc is minimal.

But a hint in the Spec says:
"Thus, if the ‘d’attribute has an "absolute moveto (M)" and an "absolute
arcto (A)" command, then pathSegList will have one
SVG_PATHSEG_MOVETO_ABS entry followed by a series of
SVG_PATHSEG_LINETO_ABS entries which approximate the arc"
(http://www.w3.org/TR/SVG/paths.html#__svg__SVGAnimatedPathData__normalizedPathSegList)

I think normalizedPathSegList is much more useful, if all
implementations create the same normalizedPathSegList, because
pathSegList and normalizedPathSegList need to be synchronized. That
means, if a segment is changed in the normalizedPathSegList, only its
corresponding segment should get replaced by the normalized segments in
the pathSegList.
Spec:
"Modifications to normalizedPathSegList might cause entries in
pathSegList to be broken into a set of normalized path segments."

Can the specification provide a more detailed algorithm how to
flatten/normalize a path, and how to synchronize both types of segment
lists?

Cheers,
Dirk

Received on Friday, 3 September 2010 18:38:41 UTC