Re: SVGCanvas.setDocument(svgDoc) rendering does not perform each time

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: SVGCanvas.setDocument(svgDoc) rendering does not perform each time

Glenn Adams
Please file a JIRA issue here.


On Tue, Apr 4, 2017 at 11:56 AM, mosndup <[hidden email]> wrote:
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. <nabble_embed> 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; } </nabble_embed>

View this message in context: SVGCanvas.setDocument(svgDoc) rendering does not perform each time
Sent from the Batik - Dev mailing list archive at Nabble.com.