[EMAIL PROTECTED] wrote:
Hi Legolas,

Legolas Woodland <[EMAIL PROTECTED]> wrote on 02/14/2006 02:13:47 PM:

  
how i can convert a path (SVG path element) into its corresponding 
    
points ?
  
I mean points that i can use to draw the path on a raster canvas.
    

   Well Batik will draw the path on a raster canvas for you... It's sort
of it's purpose in life ;)

   Anyway if you have the 'd' data you can use the 
batik.parser.AWTPathProducer with the batik.parser.PathParser
to create an AWT GeneralPath which you can either query for
the real 'curve' segments (quadradic and cubic beziers, lines, etc)
or you can call flatten on that path and get a sequence of straight
lines that approximate the original path...
  
Hi
Can you please explain more ,
I have an java.awt.shape object   , now i want to have a sequence of straight lines that create that shape , can you give me more details on , how i can achieve this ?
I should say that , indeed i have SVGDocument and i build the above shape by using the document node.
so if it is require i have the SVGdocument too.

I tried both
AWTPathProducer , PathParser
but i did not find a method that get a shape and return a sequence of lines.

Thanks

Reply via email to