You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Stuart McMahon <sm...@zandar.com> on 2003/03/20 17:57:45 UTC
referencing external fragments....
hi,
Can someone tell me how to reference external fragments with Batik? We are
displaying graphics on JSVGCanvas.
Below shows an svg file which uses "gradient_1" definition to define the
rect stroke.
What we need is to have the definition in another file but still reference
it.
can anyone help?
<svg>
<defs>
<radialGradient id="gradient_1" cx="50%" cy="50%" r="60%" fx="50%"
fy="50%"
spreadMethod="pad" gradientUnits="objectBoundingBox">
<stop offset="0%" style="stop-color:rgb(0,0,0);stop-opacity:1"/>
<stop offset="0%" style="stop-color:rgb(0,0,0);stop-opacity:1"/>
<stop offset="85.0575%"
style="stop-color:rgb(45,47,83);stop-opacity:1"/>
<stop offset="99%"
style="stop-color:rgb(135,141,255);stop-opacity:1"/>
</radialGradient>
</defs>
<rect id="RECT_1" fill="rgb(200,200,200)" x="0" y="0"
width="630" height="502"
style="stroke-width:8;stroke:url(#gradient_1)"
rx="4" ry="4"/>
</svg>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
RE: referencing external fragments....
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "SM" == Stuart McMahon <sm...@zandar.com> writes:
SM> Can someone tell me how to reference external fragments with
SM> Batik? We are displaying graphics on JSVGCanvas. Below shows an
SM> svg file which uses "gradient_1" definition to define the rect
SM> stroke. What we need is to have the definition in another file
SM> but still reference it. can anyone help?
Assuming the gradient is in file 'foo.svg' in the same directory
as the given document:
'stroke:url(foo.svg#gradient_1)'.
Just use any normal URL (the above is a relative URL) with
#'id' on the end.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org