Hi Cameron, > Element rect = doc.createElementNS(svgNS, "rect"); > rect.setAttributeNS(null, "x", "30"); > rect.setAttributeNS(null, "y", "30"); > rect.setAttributeNS(null, "id", "r2"); > rect.setAttributeNS(null, "width", "13"); > rect.setAttributeNS(null, "height", "13"); > rect.setAttributeNS(null, "style", "fill:defs.svg#gradient_1");
> This sholud be: > rect.setAttributeNS(null, "style", "fill: url(defs.svg#gradient_1)"); if I use fill with url(defs.svg#gradient_1), it is throwing following exception. org.apache.batik.bridge.BridgeException: null:0 An I/O error occured while processing the URI: "//defs.svg#extGrad2" specified on the element <rect> at org.apache.batik.bridge.BridgeContext.getReferencedElement (BridgeContext.java:612) at org.apache.batik.bridge.PaintServer.convertURIPaint(PaintServer.java:348) at org.apache.batik.bridge.PaintServer.convertPaint(PaintServer.java:259) . . . But if i use fill without url like defs.svg#gradient_1, it is not giving any error. but instead of gradient, rectangle is filled with black color. I also tried with physical path. but still it is not showing proper gradient. Please let me know whether where i am doing mistake. Thanks, Selva --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
