Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 48:19:28 |
Calls: | 422 |
Files: | 1,024 |
Messages: | 90,422 |
Hello all,
I've encountered what looks like a rendering problem in SVG photo images
with radial gradients. For example, with the following SVG specification:
<?xml version="1.0" encoding="UTF-8"?>
<svg width="600" height="300" xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs>
<radialGradient id="g" gradientUnits="objectBoundingBox"
cx="50%" cy="50%" r="50%">
<stop offset="0" stop-color="#0000FF"/>
<stop offset="1" stop-color="#FF0000"/>
</radialGradient>
</defs>
<rect x="0" y="0" width="600" height="300" stroke="none" fill="url(#g)"/> </svg>
all the tools supporting SVG I could try render the gradient based on an ellipse enclosed in the 600x300 rectangle.
But that's not what appears in a SVG photo image in tk 9: the gradient is based on a circle with a diameter set to the maximum size of the object's bounding box (here 600 points).
In the man page for photo images, it is explicitly specified that setting gradientUnits to "objectBoundingBox" is supported, so it looks like a rendering issue. Or maybe there is a limitation on radial gradients in
this case?
Thanks!