Thanks Martin for your idea. I don't think that's enough in my case. What if the symbols were made up of multiple objects? I want to be able to recognize later on after processing the GVT whether the element was called through a <use> so as to keep the geometric representation of the objects rather than just the raw data I would get reading the DOM. I would also use this information to re-write a manipulated result containing the elements to a .svg similar to the input .svg.
I hope this helps, Zainab On Sun, Sep 25, 2011 at 10:39 AM, Martin J <jacobson.mar...@gmail.com>wrote: > Hi Zainab, > > I'm guessing that you want to do what I needed to do: find the > bounding box of each symbol as rendered. My code traversed the DOM, > and when it found an element that was a <use>, it stored the bounding > box, as follows: > > Element el; > // ... > String elementTag = el.getNodeName(); > SVGRect bb = null; > if (elementTag.equals("use")) > { > bb = ((SVGOMUseElement) el).getBBox(); > // ... > } > > Does this help? > > Martin > > On 25 September 2011 16:33, Zainab AlMeraj <z.alme...@gmail.com> wrote: > > Hi, > > > > I am a newbie to Batik. I came to it with an task in mind and thought it > > would solve my problems. But it turns out it might be more complicated to > do > > than I expect. > > > > I want to read in a .svg that extensively uses <symbol> and <use> tags. > > This information is fairly accessible from the DOM but I loose all the > > geometry > > that exists. > > Using GVT on the other hand gives me all the geometry but without the > > original > > tag information. > > > > So it goes one step too far for what I am in need off. > > > > > > My pitch is to ask whether anyone has worked on this before, or suggested > > that > > it be implemented but wasn't. > > In the archives I have not come across any as of yet (still looking > through > > them). > > > > If there is no way to grab this info I may be willing to code it and > submit > > my > > stuff. > > > > Any guidance or help is appreciated. > > > > Also forgive me for being too explicit or not explicit enough. > > > > Thanks, > > > > Zainab > > > > > > -- > From my MacBook Pro > > --------------------------------------------------------------------- > To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org > >