I have a Java Batik program which modifies a Document and renders the
modifications in a JSVGCanvas. Modifications are made by changing colours of
a Node item. The first rendering occurs and svgCanvas.setDocument(svgDoc)
renders the change. Subsequent renderings do not show in the SVGCanvas.
Nevertheless GVTTreeRendererAdapter() tells that the rendering starts and
then completes each time. I have checked the SVG Document, the modifications
are made each time.     DocumentState is set to ALWAYS_DYNAMIC.Also did run in
UpdateManager um = svgCanvas.getUpdateManager(); Same issue. private String
modifySVG(String fromString, String toString) { NodeList nList =
svgDoc.getElementsByTagName("defs"); String defs; for (int temp = 0; temp <
nList.getLength(); temp++) {    Node nNode = nList.item(temp);    if
(nNode.getNodeType() == Node.ELEMENT_NODE) {        eElement = (Element)
nNode;        defs =
eElement.getElementsByTagName("style").item(0).getTextContent();        defs
= defs.replace(fromString, toString);       
eElement.getElementsByTagName("style").item(0).setTextContent(defs);   }
}svgCanvas.setDocument(svgDoc);return defs;}



--
View this message in context: 
http://batik.2283329.n4.nabble.com/SVGCanvas-setDocument-svgDoc-rendering-does-not-perform-each-time-tp4656855.html
Sent from the Batik - Dev mailing list archive at Nabble.com.

Reply via email to