Re: renaming SVGPathSegList

On 21/10/11 2:35 PM, Rick wrote:
> Don't you mean SVGPathElement?

No, SVGPathSegList is the data type that holds path data, while <path> 
elements are SVGPathElement objects in the DOM.

> If you dropped the SVG prefix, all  SVG objects would be prefixed 'SVG'
> except Path.  Bad, Bad idea!

Indeed, this would have to considered as part of an overall name 
simplification for the SVG datatype interfaces.  (See public-webapps for 
someone proposing to replace SVGMatrix and CSSMatrix with a Matrix 
interface, too.)

> var p = new SVGPathElement( string );

I think this is worth supporting too, but is different from my proposal.

> or
>
> var list = new SVGPathSegList( string );
> var p = new SVGPathElement( list );

That'd also work.

> or
>
> construct individual segments (using constructors like --->
> SVGPathSegCurveToQuadraticAbs() <---!!! )

Yeah, shame about those names! :)  Moving away from the constructor 
functions that you currently have to use would be good too, especially 
since they take their arguments in a different order from how they 
appear in path data strings!

Another possibility is `new SVGPathSeg("s 10,20")`.

Received on Friday, 21 October 2011 18:43:32 UTC