Frantch <[EMAIL PROTECTED]> wrote on 03/27/2008 06:40:28 PM:
> I'am trying to convert a SVG <path...> in a GeneralPath
>
> I have found this methode
> shape = AWTPathProducer.createShape("the path balise id=..",
> GeneralPath.WIND_EVEN_ODD);
>
> but i don't know, how i can use it?? how i can have a GeneralPath for my
> shape?
Element e = document.getElementById("your-id");
Shape s = AWTPatProducer.createShape(StringReader(e.getAttributeNS(null,
"d"))),
GeneralPath.WIND_EVEN_ODD);
The returned shape is (I think) normally a GeneralPath, but all you
should really care about is being able to get the PathIterator from the
Shape.