SVG, diagonal gradients not working
Posted: 2007-03-06T16:21:57-07:00
I've been working on converting svg's into several other formats using ImageMagick and so far, gradients have been pretty pig-headed.
Here's the SVG I created, with a diagonal gradient.
And here's the converted png, somehow with a vertical gradient:
Any help would be appreciated.
P.S., This is one of a growing number of problems I've had with converting SVG's with gradients, and I posted this in hopes of starting with the smallest problem first. I'm new to these forums, and to keep with good etiquette, when I post new (but related) problems, should I post them in separate posts? Or as replies to a previous topic I created on the subject?
Many thanks.
Here's the SVG I created, with a diagonal gradient.
And here's the converted png, somehow with a vertical gradient:
Code: Select all
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="150px" height="150px" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="awesome" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:rgb(255,255,0);
stop-opacity:1"/>
<stop offset="100%" style="stop-color:rgb(255,0,0);
stop-opacity:1"/>
</linearGradient>
</defs>
<rect x="15" y="15" width="120" height="120"
fill="url(#awesome)" />
</svg>
P.S., This is one of a growing number of problems I've had with converting SVG's with gradients, and I posted this in hopes of starting with the smallest problem first. I'm new to these forums, and to keep with good etiquette, when I post new (but related) problems, should I post them in separate posts? Or as replies to a previous topic I created on the subject?
Many thanks.