W3C home > Mailing lists > Public > www-svg@w3.org > October 2011

Re: renaming SVGPathSegList

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 21 Oct 2011 14:42:35 -0400
Message-ID: <4EA1BD1B.6080703@mcc.id.au>
To: Rick <graham.rick@gmail.com>
CC: www-svg <www-svg@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:49 GMT