Hi Cameron, > Are you running this in Squiggle? Or your own application with a > JSVGCanvas? If you are building up a Document, then displaying it using > the canvas component's setDocument method, then you should use an > absolute URL to give the location of your defs.svg (perhaps a local file > URL such as file:///C:/somewhere/defs.svg on Windows or > file:/somewhere/defs.svg on Unix, or an http URL).
I have also tried with absolute URL. but it is not working properly. I am using my own application with JSVGCanvas to display SVG elements. When user presses the "create" button, it is supposed to display the rectangle element with gradient fill. But it is displaying rectangle with black fill. Element use2 = doc.createElementNS(svgNS, "rect"); use2.setAttributeNS(null, "x", "30"); use2.setAttributeNS(null, "y", "30"); use2.setAttributeNS(null, "id", "r2"); use2.setAttributeNS(null, "width", "13"); use2.setAttributeNS(null, "height", "13"); use2.setAttributeNS(null, "style", "fill:file:///C:/de.svg#MyGradient"); Thanks, Selva --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
