Remove unreferenced patterns and gradients outside of a defs
This commit is contained in:
parent
2cc9c00ef7
commit
066c627833
7 changed files with 640 additions and 7 deletions
11
unittests/duplicate-gradient-stops.svg
Normal file
11
unittests/duplicate-gradient-stops.svg
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient id="grad" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="red" />
|
||||
<stop offset="0.5" stop-color="blue" />
|
||||
<stop offset="0.5" stop-color="blue" />
|
||||
<stop offset="1.0" stop-color="green" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="300" height="300" fill="url(#grad)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 384 B |
|
|
@ -1,4 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="dihttp://www.inkscape.org/namespaces/inkscape"
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="0.46" version="1.0">
|
||||
<inkscape:perspective inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective3104"/>
|
||||
<rect width="300" height="200" fill="green" inkscape:collect="always"/>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 421 B |
5
unittests/unreferenced-pattern.svg
Normal file
5
unittests/unreferenced-pattern.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<pattern id="Polka_Dot_Pattern">
|
||||
<polygon fill="none" points="71.125,-1.896 2.125,-1.896 2.125,-70.896 71.125,-70.896" />
|
||||
</pattern>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 182 B |
Loading…
Add table
Add a link
Reference in a new issue