Handle stop offsets in percentages. Convert stop offsets into floating point (or integer if possible)
This commit is contained in:
parent
efbdd3a027
commit
321f16c46d
3 changed files with 117 additions and 86 deletions
11
unittests/duplicate-gradient-stops-pct.svg
Normal file
11
unittests/duplicate-gradient-stops-pct.svg
Normal 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 |
Loading…
Add table
Add a link
Reference in a new issue