Re: DOM vs GVT tree info

Zainab AlMeraj <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <CABFuBKbFrtR_vaRCfpjYzUKAYnsiCz=sK--7r5iKxp71AS_Agw@mail.gmail.com>
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 <[email protected]>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 <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.