You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by ananth balasubramanyam <ab...@cs.odu.edu> on 2004/02/20 22:48:56 UTC

SVG DOM and GVT

hi,
I have a SVG DOM and a GVT created by loading a sample.svg.

here is my code
.......
ctx = new BridgeContext(userAgent, loader);
builder   = new GVTBuilder();
ctx.setDynamic(true);
...
...

SVGLocatable locate = (SVGLocatable) textElement;
SVGMatrix matrix = locate.getCTM();
....
....

I am trying to update the values of a matrix

matrix.setE(matrix.getE() + offset) ;

and i save the SVG DOM to a file. But the changes dont seem to
show up in my SVG. Am i doing something wrong or am i missing
something important.

kindly help,
thanks
Ananth




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: SVG DOM and GVT

Posted by Thomas DeWeese <Th...@Kodak.com>.
ananth balasubramanyam wrote:

> SVGMatrix matrix = locate.getCTM();
> ....
> I am trying to update the values of a matrix
> 
> matrix.setE(matrix.getE() + offset) ;
> 
> and i save the SVG DOM to a file. But the changes dont seem to
> show up in my SVG. Am i doing something wrong or am i missing
> something important.

    Your missing something important, getCTM returns the combination
of transforms from the element it is called on to the nearest
viewport.  So when you update it there is no way to know which
Transform you really want updated.

    I believe that if you modify the stuff returned by 'getTransform()'
then your changes will be reflected in the DOM.

something like:

      SVGTransform t=locate.getTransform().getBaseVal().consolidate();

    Then any changes to t will be reflected in 'locate'.



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org