Hi,
> i have a little problem and i hope u help me !!
> 
> i'm rendering a path in a simple svgcanvas, and i wanna to retrieve
> the 
> its points.
> 
> for example - <path d="M 10 15 L 100 150 L 40 50 Z"/>, i wanna to 
> retrieve and to record each pair of coordinates, like "10 15", "100
> 150" and "40 50".

You could you SVG DOM API to achive that. especially SVGPathSegList
eg:

SVGPathSegList segList = svgPathElement.getSVGPathSegList();
for (int i=0; i<segList.getItemCount(); i++) {
        SVGPathSeg seg = segList.getItem(i);
        // check out for the type: eg: SVGPathSeg.PATHSEG_MOVETO_ABS, etc and
do casting where appropriate
        short type = seg.getPathSegType();
        // do whatever you want with the point
}

note: I just type the sample code above, maybe some method call is
wrong, just check the SVG DOM Api documentation for correct method call

Regards
Tonny Kohar
-- 
Sketsa 
SVG Graphics Editor
http://www.kiyut.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to