0

I have redendered an SVG document with several symbols. In the Java application I modify an attribute in the DOM changing a stop-color attribute using setAttributeNS.

I can see that the attribute is modified and changes to the new value, however the SVG document render does not reflect the change.

If I do the same in a browser using JavaScript, the DOM updates and the change is visible. Is there anything I need to do to get the BATIK render to reflect the changes in the DOM?

Edit: In addition to being able to modify the attributes in Java and see the updates. I have seen other behaviour which works in a Browser with the same SVG file but doesn't in the Java application. For example using a browser with a DOM debugger, I can modify the stop-color attribute of a lineargradient and see the change in the browser, however using script or Java in the Batik application this doesn't work, no change is seen.

Edit2: I have found that if I change the fill attribute of the element using the lineargradient, then modify the stop-color attribute of the linergradient, then change the fill attribute back to the lineargradient that it works, but not if I leave the fill attribute unmodified. This behaviour is only in Batik.

SPlatten
  • 5,334
  • 11
  • 57
  • 128

0 Answers0