Hi e2mieluv.

e2mieluv:
> i do hope you guys could help me with this. Kevin's path parser is
> really useful in extracting multiple path.however,i'm finding
> difficulty to extract the path that has been retrieve by the path
> parser into 1 points.
> 
> in the example it uses tspan which to manipulate text and 1 more thing
> i forgot. but how to extract the path?
> 
> ex. path extracted M a,b L c,d
> would like to extract it as point a,b to be save in an array.
> anyone knows how the path parser could work that way? please help me,

Why don't you use the SVG DOM interfaces?  They provide access to the
individual path commands from an SVG path element.  Have a look at
http://www.w3.org/TR/SVG11/paths.html#DOMInterfaces, where you can see
that you can use the pathSegList attribute (which is of type
SVGAnimatedPathData).  Something like:

  var pathElement = ...;
  var pathSegList = pathElement.pathSegList;
  for (var i = 0; i < pathSegList.numberOfItems; i++) {
    var pathSeg = pathSegList.getItem(i);
    // do something with the pathSeg
  }

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922


-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to