You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Marek Błaszczyk <ma...@mw.mil.pl> on 2001/07/05 13:48:06 UTC

Modification of DOM Tree

Hi,
I try to implement layers displaying in SVG. Each layer is located in
separate SVG file. First I parse all specified svg files to the diferent DOM
hierarchies and load primary document (foreground layer) to the JSVGCanvas.
To try display some layer I modify existing DOM hierarchy (add node, remove
node, ...). But I don't now how refresh GVT tree. Methods like
"setSVGDocumet()" or "startGVTBuilder()" resets current transformation (e.g
scale) but I want to keep current transfomation.
How should I refresh GVT tree ? or I have to use another method to
manipulate DOM hierarchy ?

Marek




Modification of DOM Tree

Posted by Thomas E Deweese <th...@kodak.com>.
MB> I try to implement layers displaying in SVG. Each layer is located
MB> in separate SVG file. First I parse all specified svg files to the
MB> diferent = DOM hierarchies and load primary document (foreground
MB> layer) to the = JSVGCanvas.  To try display some layer I modify
MB> existing DOM hierarchy (add node, = remove node, ...). But I don't now
MB> how refresh GVT tree. 

    As we have said many times before on this list, we do not support
the update of the display based on changes in the DOM.  This is all
part of Dynamic SVG which we do not yet support.  We are actively
making plans on how to add Dynamic SVG support, but currently we do
not.

MB> Methods like "setSVGDocumet()" or "startGVTBuilder()" resets
MB> current transformation = (e.g scale) but I want to keep current
MB> transfomation.  How should I refresh GVT tree ?  or I have to use
MB> another method to manipulate DOM hierarchy ?

    It is possible to hack the current Batik to do this, but you will
have to get your hands much dirtier than you probably want to.  As a
start you might consider construct your own subclass of JSVGCanvas
that copies the transform before rebuilding the GVT tree and restores
it afterword.

    I'm sure there are lots of other things that will need to be done
as well, so go in with your eyes open.  At this point, Use the Source,
by and large the javadocs aren't horrible (much better than most, not
as good as some).

    Good luck.

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