Mr Thomas :
thank you so much for the explanation. Being totally new to batik, I was
not sure of how the system worked. I did go through the website and read
about all the features batik has to offer. I have also downloaded batik
and am getting to know more about it, so that i can use it in a class
project of mine.
I was not sure of what i was doing and your explanation clarifies a lot of
things that i had in mind. I did look up the slide show application and i
used the initialization code in my program. I am trying to make it work.
thanks again for your timely help,
I really appreciate it
Ananth
On Thu, 19 Feb 2004, Thomas DeWeese wrote:
> ananth balasubramanyam wrote:
>
> > I have an SVG DOM with no corressponding GVT tree and i am trying to
> > access the transform attribute of all the SVG text nodes in the DOM
>
> As a general rule if you want to use any of the SVG DOM you will
> need to build the graphics tree. If you just want to use DOM Core
> (i.e. the stuff any old XML/DOM impl will give you) then you don't
> need the graphics tree.
>
> For getCTM you need to build the graphics tree.
> If _all_ you wanted to do was parse the DOM and manipulate it
> with 'setAttribute' etc then you do not need to build the graphics
> tree, but if you want to make calls like 'getBBox', 'getCTM', etc
> (which apparently you do) then you must build the graphics tree.
>
> The Graphics tree (GVT) is built from the DOM tree. The DOM
> tree uses the graphics tree for essentially all of the SVG DOM calls
> (which not surprisingly tend to be graphics related). There are
> a number of examples on how to build the graphics tree lying around
> you might want to look at the 'slideshow' application as it is
> fairly simple and does this. There is a bunch of setup in the
> constructor and then the RenderThread builds the rendering tree:
>
> Document svgDoc = loader.loadDocument
> (files[i].toURL().toString());
> gvtRoot = builder.build(ctx, svgDoc);
>
> You would want to tell the BridgeContext to always be dynamic.
>
>
> > NodeList textElements =
> > doc.getElementsByTagNameNS("http://www.w3.org/2000/svg","text");
> > for (int i=0 ; i < textElements.getLength() ; ++i) {
> > SVGOMTextElement textElement = (SVGOMTextElement) textElements.item(i);
> > .....
> > here is the problem. I have been trying for long to access the
> > text element's attributes, but keep getting a null. Am i supposed to
> > have a GVT to access the getCTM() and other methods in SVGOMTextElement
> > class. I am sorry i might sound like a fool, but i need to understand
> > the relation between the SVGDOM and the GVT. could somebody please
> > explain this a little bit. When do i need a GVT and when can i just
> > have an SVG DOM and access every node and its properties.
> > All that i am tring to do is parse the SVG DOM and may be manipulate
> > it for eg: change the x and y values or add a new attribute.
> > .......
> > }
> >
> > thanks in advance. please help
> > Ananth
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]