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 Pop Calin <po...@yahoo.com> on 2002/01/16 13:49:29 UTC
Java applet with SVG layer visualization
Hi !
I made an Java applet for vizualization of SVG
files.This applet has the posibility to turn on\off
certainely SVG layers.The applet has also zoom and pan
property.
Now the problem appear when I want to turn off\on
some layer because the image in the JSVGCanvas is
repainting but to the initial zoom&pan level.
The code for visualization of layer is :
svgDocument = svgCanvas.getSVGDocument();
Element element1 =
svgDocument.getElementById("layer");
element1.setAttributeNS(null,"visibility","visible");
svgCanvas.setSVGDocument(documentSVG);
How can I preserve the level of zoom&pan and the
layer to be visible.
Thanks in advance!
Regards
Pop Calin
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org
Java applet with SVG layer visualization
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "PC" == Pop Calin <po...@yahoo.com> writes:
PC> I made an Java applet for vizualization of SVG files.This applet
PC> has the posibility to turn on\off certainely SVG layers.The applet
PC> has also zoom and pan property. Now the problem appear when I
PC> want to turn off\on some layer because the image in the JSVGCanvas
PC> is repainting but to the initial zoom&pan level. The code for
PC> visualization of layer is :
PC> svgDocument = svgCanvas.getSVGDocument(); Element element1 =
PC> svgDocument.getElementById("layer");
PC> element1.setAttributeNS(null,"visibility","visible");
PC> svgCanvas.setSVGDocument(documentSVG);
You probably want to get the rendering transform before you reset
the document and set it back after the GVT tree is rebuilt. This
involves adding a GVTTreeBuilderListener so you get notified when the
GVT tree is done being built and the rendering is about to start.
PC> How can I preserve the level of zoom&pan and the layer to be
PC> visible.
You might also be able to use the fragment identifier to do what
you want.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org