Hi
I will send next topics in batik-users , indeed at first look i did not find batik users mailing list so , i subscribed to this list.
Thank you for your notification.
[EMAIL PROTECTED] wrote:
Hi Legolas,

    Please redirect further questions on using Batik to 'batik-user' (as 
opposed to 
developing Batik - 'batik-dev').

Legolas Woodland <[EMAIL PROTECTED]> wrote on 02/17/2006 04:46:53 AM:

  
Thank you for reading my post.
How i can get all elements of svg document when i have access to 
    
SVGDocument object ?

   Use the W3C DOM to traverse the Elements of the Document 
(getFirstChild(),
getNextSibling(), ...) or getNodesByTagNameNS (also part of W3C DOM).

  
Does batik provide some facilities to get elements , convert them to 
    
shape  
  
and then convert them to path ?
    

   This is what Batik does internally.  However your question is too
vague to provide a real answer too.  What elements? Quite a number in
SVG can't be converted to shapes.  Also what is the difference between
a 'shape' and 'path'?
  
please correct me in case that Im wrong :
A shape can be Any of SVG elements  , but a path is an specific SVG element which is created by using some other basic elements like Curve , lines , arc ...


Indeed i want to retrieve a sequence of straight lines from each shape. more explanation :
Imagine that i have a java.awt.Shape object , this object contain one of SVG document elements (for example a text element)
Now , i want to convert  this text element to a Path ,  and convert the path to a sequence of straight lines.
so far another member kindly answered this question , but i could not find out how i should use his/her tip
the other member said :

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...
I tried both of this classes but i can not find how i should use them.
indeed  i did not find a method that get a shape and return a sequence of lines.




Reply via email to