Merge pull request #192 from nthykier/gh-189-order-vs-SVGLength
Work around an exception in removeDefaultAttributeValue() caused by some rarely used filter attributes that allow an optional second value which SVGLength does not handle properly
This commit is contained in:
commit
8c95d950af
4 changed files with 49 additions and 3 deletions
11
unittests/remove-default-attr-order.svg
Normal file
11
unittests/remove-default-attr-order.svg
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink= "http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<filter id="filter" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
|
||||
<feConvolveMatrix order="3 1" kernelMatrix="0.3333 0.3333 0.3333" kernelUnitLength="3 1" edgeMode="none"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<!-- Use the filter (otherwise, scour discards it before it trips over it) -->
|
||||
<image id="png" x="10" y="30" width="150" height="50" xlink:href="raster.png"
|
||||
filter="url(#filter)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 585 B |
11
unittests/remove-default-attr-std-deviation.svg
Normal file
11
unittests/remove-default-attr-std-deviation.svg
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink= "http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<filter id="filter" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
|
||||
<feGaussianBlur stdDeviation="0 0" x="10" y="10" dx="20" dy="20" />
|
||||
</filter>
|
||||
</defs>
|
||||
<!-- Use the filter (otherwise, scour discards it before it trips over it) -->
|
||||
<image id="png" x="10" y="30" width="150" height="50" xlink:href="raster.png"
|
||||
filter="url(#filter)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 546 B |
Loading…
Add table
Add a link
Reference in a new issue