[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-dev
Subject:    Re: How i can get all nodes when i have SVGDocument ?
From:       Legolas Woodland <legolas.w () gmail ! com>
Date:       2006-02-17 11:47:41
Message-ID: 43F5B50D.6050701 () gmail ! com
[Download RAW message or body]

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.
thomas.deweese@kodak.com wrote:
> Hi Legolas,
>
>     Please redirect further questions on using Batik to 'batik-user' (as 
> opposed to 
> developing Batik - 'batik-dev').
>
> Legolas Woodland <legolas.w@gmail.com> 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.





[Attachment #3 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi<br>
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.<br>
Thank you for your notification.<br>
<a class="moz-txt-link-abbreviated" \
href="mailto:thomas.deweese@kodak.com">thomas.deweese@kodak.com</a> wrote: \
<blockquote  cite="midOF59DF55E9.A3A45FA2-ON85257118.003D2CB8-85257118.003DAC4B@knotes.kodak.com"
  type="cite">
  <pre wrap="">Hi Legolas,

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

Legolas Woodland <a class="moz-txt-link-rfc2396E" \
href="mailto:legolas.w@gmail.com">&lt;legolas.w@gmail.com&gt;</a> wrote on 02/17/2006 \
04:46:53 AM:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Thank you for reading my post.
How i can get all elements of svg document when i have access to 
    </pre>
  </blockquote>
  <pre wrap=""><!---->SVGDocument object ?

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

  </pre>
  <blockquote type="cite">
    <pre wrap="">Does batik provide some facilities to get elements , convert them to \
  </pre>
  </blockquote>
  <pre wrap=""><!---->shape  
  </pre>
  <blockquote type="cite">
    <pre wrap="">and then convert them to path ?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
   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'?
  </pre>
</blockquote>
please correct me in case that Im wrong :<br>
A shape can be Any of SVG elements&nbsp; , but a path is an specific SVG
element which is created by using some other basic elements like Curve
, lines , arc ...<br>
<br>
<br>
Indeed i want to retrieve a sequence of straight lines from each shape.
more explanation :<br>
Imagine that i have a java.awt.Shape object , this object contain one
of SVG document elements (for example a text element)<br>
Now , i want to convert&nbsp; this text element to a Path ,&nbsp; and convert the
path to a sequence of straight lines.<br>
so far another member kindly answered this question , but i could not
find out how i should use his/her tip<br>
the other member said :<br>
<br>
<blockquote type="cite">
  <pre wrap="">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...</pre>
</blockquote>
I tried both of this classes but i can not find how i should use them.<br>
indeed&nbsp; i did not find a method that get a shape and return a sequence
of
lines.<br>
<br>
<br>
<br>
<br>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic