Handle stop offsets in percentages. Convert stop offsets into floating point (or integer if possible)

This commit is contained in:
JSCHILL1 2009-04-27 19:19:05 -05:00
parent efbdd3a027
commit 321f16c46d
3 changed files with 117 additions and 86 deletions

View file

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<linearGradient id="sea-gradient" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="lightgrey"/>
<stop offset="0.5" stop-color="darkgrey"/>
<stop offset="50%" stop-color="darkgrey"/>
<stop offset="100%" stop-color="white"/>
</linearGradient>
</defs>
<rect style="fill: url(#sea-gradient) rgb(0, 0, 0);" y="0" x="0" height="100" width="100"/>
</svg>

After

Width:  |  Height:  |  Size: 441 B