Fix bug 702423, "Scour corrupts icons with gradients when --disable-style-to-xml is used". Add 2 more full tests gathered from the bug reports, as well as 1 more unit test.

This commit is contained in:
Louis Simard 2011-03-12 03:22:03 -05:00
parent fcbb2b0332
commit 437dbf991c
5 changed files with 489 additions and 0 deletions

207
fulltests/deja-dup.svg Normal file
View file

@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:export-ydpi="90.000000" inkscape:export-xdpi="90.000000" inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png" width="48px" height="48px" id="svg11300" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/actions" sodipodi:docname="deja-dup.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs id="defs3">
<radialGradient inkscape:collect="always" xlink:href="#linearGradient5060" id="radialGradient5031" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-2.77439, 0, 0, 1.96971, 112.762, -872.885)" cx="605.71429" cy="486.64789" fx="605.71429" fy="486.64789" r="117.14286"/>
<linearGradient inkscape:collect="always" id="linearGradient5060">
<stop style="stop-color: black; stop-opacity: 1;" offset="0" id="stop5062"/>
<stop style="stop-color: black; stop-opacity: 0;" offset="1" id="stop5064"/>
</linearGradient>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient5060" id="radialGradient5029" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.77439, 0, 0, 1.96971, -1891.63, -872.885)" cx="605.71429" cy="486.64789" fx="605.71429" fy="486.64789" r="117.14286"/>
<linearGradient id="linearGradient5048">
<stop style="stop-color: black; stop-opacity: 0;" offset="0" id="stop5050"/>
<stop id="stop5056" offset="0.5" style="stop-color: black; stop-opacity: 1;"/>
<stop style="stop-color: black; stop-opacity: 0;" offset="1" id="stop5052"/>
</linearGradient>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient5048" id="linearGradient5027" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.77439, 0, 0, 1.96971, -1892.18, -872.885)" x1="302.85715" y1="366.64789" x2="302.85715" y2="609.50507"/>
<linearGradient id="linearGradient4228">
<stop id="stop4230" offset="0.0000000" style="stop-color: rgb(187, 187, 187); stop-opacity: 1;"/>
<stop id="stop4232" offset="1.0000000" style="stop-color: rgb(159, 159, 159); stop-opacity: 1;"/>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" y2="40.943935" x2="36.183067" y1="28.481176" x1="7.6046205" id="linearGradient4234" xlink:href="#linearGradient4228" inkscape:collect="always" gradientTransform="translate(0, 5.125)"/>
<linearGradient id="linearGradient4244">
<stop id="stop4246" offset="0.0000000" style="stop-color: rgb(228, 228, 228); stop-opacity: 1;"/>
<stop id="stop4248" offset="1.0000000" style="stop-color: rgb(211, 211, 211); stop-opacity: 1;"/>
</linearGradient>
<radialGradient gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.28624, 0.781698, -0.710782, 1.16955, -2.35435, 0.24814)" r="20.935817" fy="2.9585190" fx="15.571491" cy="2.9585190" cx="15.571491" id="radialGradient4250" xlink:href="#linearGradient4244" inkscape:collect="always"/>
<linearGradient id="linearGradient4184">
<stop id="stop4186" offset="0.0000000" style="stop-color: rgb(131, 131, 131); stop-opacity: 1;"/>
<stop id="stop4188" offset="1.0000000" style="stop-color: rgb(187, 187, 187); stop-opacity: 0;"/>
</linearGradient>
<linearGradient gradientTransform="translate(0.795493, 3.79918)" y2="35.281250" x2="24.687500" y1="35.281250" x1="7.0625000" gradientUnits="userSpaceOnUse" id="linearGradient4209" xlink:href="#linearGradient4184" inkscape:collect="always"/>
<linearGradient id="linearGradient4236" inkscape:collect="always">
<stop id="stop4238" offset="0" style="stop-color: rgb(238, 238, 238); stop-opacity: 1;"/>
<stop id="stop4240" offset="1" style="stop-color: rgb(238, 238, 238); stop-opacity: 0;"/>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" y2="33.758667" x2="12.221823" y1="37.205811" x1="12.277412" id="linearGradient4242" xlink:href="#linearGradient4236" inkscape:collect="always" gradientTransform="translate(0, 5.125)"/>
<linearGradient id="linearGradient4274">
<stop style="stop-color: rgb(255, 255, 255); stop-opacity: 0.254902;" offset="0.0000000" id="stop4276"/>
<stop style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" offset="1.0000000" id="stop4278"/>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" y2="26.357183" x2="23.688078" y1="11.318835" x1="23.688078" id="linearGradient4272" xlink:href="#linearGradient4274" inkscape:collect="always" gradientTransform="translate(0, 5.125)"/>
<linearGradient id="linearGradient4254" inkscape:collect="always">
<stop id="stop4256" offset="0" style="stop-color: rgb(255, 255, 255); stop-opacity: 1;"/>
<stop id="stop4258" offset="1" style="stop-color: rgb(255, 255, 255); stop-opacity: 0;"/>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" y2="47.620636" x2="44.096100" y1="4.4331360" x1="12.378357" id="linearGradient4260" xlink:href="#linearGradient4254" inkscape:collect="always" gradientTransform="translate(0, 5.125)"/>
<linearGradient id="linearGradient2555">
<stop id="stop2557" offset="0" style="stop-color: rgb(255, 255, 255); stop-opacity: 1;"/>
<stop style="stop-color: rgb(230, 230, 230); stop-opacity: 1;" offset="0.50000000" id="stop2561"/>
<stop id="stop2563" offset="0.75000000" style="stop-color: rgb(255, 255, 255); stop-opacity: 1;"/>
<stop style="stop-color: rgb(225, 225, 225); stop-opacity: 1;" offset="0.84166664" id="stop2565"/>
<stop id="stop2559" offset="1.0000000" style="stop-color: rgb(255, 255, 255); stop-opacity: 1;"/>
</linearGradient>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2555" id="linearGradient2553" x1="33.431175" y1="31.964777" x2="21.747974" y2="11.780679" gradientUnits="userSpaceOnUse"/>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient8668" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737" gradientTransform="matrix(1, -7.81647e-32, -1.13241e-32, 0.536723, -5.89796e-14, 16.8731)" gradientUnits="userSpaceOnUse"/>
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 24 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="48 : 24 : 1" inkscape:persp3d-origin="24 : 16 : 1" id="perspective58"/>
<linearGradient inkscape:collect="always" id="linearGradient2690">
<stop style="stop-color: rgb(196, 215, 235); stop-opacity: 1;" offset="0" id="stop2692"/>
<stop style="stop-color: rgb(196, 215, 235); stop-opacity: 0;" offset="1" id="stop2694"/>
</linearGradient>
<linearGradient id="linearGradient2682">
<stop style="stop-color: rgb(57, 119, 195); stop-opacity: 1;" offset="0" id="stop2684"/>
<stop style="stop-color: rgb(137, 174, 220); stop-opacity: 0;" offset="1" id="stop2686"/>
</linearGradient>
<linearGradient id="linearGradient2402">
<stop style="stop-color: rgb(114, 159, 207); stop-opacity: 1;" offset="0" id="stop2404"/>
<stop style="stop-color: rgb(82, 138, 197); stop-opacity: 1;" offset="1" id="stop2406"/>
</linearGradient>
<linearGradient id="linearGradient2380">
<stop style="stop-color: rgb(185, 207, 231); stop-opacity: 1;" offset="0" id="stop2382"/>
<stop style="stop-color: rgb(114, 159, 207); stop-opacity: 1;" offset="1" id="stop2384"/>
</linearGradient>
<linearGradient inkscape:collect="always" id="linearGradient2871">
<stop style="stop-color: rgb(52, 101, 164); stop-opacity: 1;" offset="0" id="stop2873"/>
<stop style="stop-color: rgb(52, 101, 164); stop-opacity: 1;" offset="1" id="stop2875"/>
</linearGradient>
<linearGradient inkscape:collect="always" id="linearGradient2847">
<stop style="stop-color: rgb(52, 101, 164); stop-opacity: 1;" offset="0" id="stop2849"/>
<stop style="stop-color: rgb(52, 101, 164); stop-opacity: 0;" offset="1" id="stop2851"/>
</linearGradient>
<linearGradient id="linearGradient2831">
<stop style="stop-color: rgb(52, 101, 164); stop-opacity: 1;" offset="0" id="stop2833"/>
<stop id="stop2855" offset="0.33333334" style="stop-color: rgb(91, 134, 190); stop-opacity: 1;"/>
<stop style="stop-color: rgb(131, 168, 216); stop-opacity: 0;" offset="1" id="stop2835"/>
</linearGradient>
<linearGradient inkscape:collect="always" id="linearGradient2797">
<stop style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" offset="0" id="stop2799"/>
<stop style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" offset="1" id="stop2801"/>
</linearGradient>
<linearGradient inkscape:collect="always" id="linearGradient8662">
<stop style="stop-color: rgb(0, 0, 0); stop-opacity: 1;" offset="0" id="stop8664"/>
<stop style="stop-color: rgb(0, 0, 0); stop-opacity: 0;" offset="1" id="stop8666"/>
</linearGradient>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2831" id="linearGradient1486" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.465413, -0.277593)" x1="13.478554" y1="10.612206" x2="15.419417" y2="19.115122"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2847" id="linearGradient1488" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-1, 0, 0, -1, 47.5279, 45.8474)" x1="37.128052" y1="29.729605" x2="37.065414" y2="26.194071"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2797" id="linearGradient1491" gradientUnits="userSpaceOnUse" x1="5.9649176" y1="26.048164" x2="52.854097" y2="26.048164"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2797" id="linearGradient1493" gradientUnits="userSpaceOnUse" x1="5.9649176" y1="26.048164" x2="52.854097" y2="26.048164"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2871" id="linearGradient1501" gradientUnits="userSpaceOnUse" x1="46.834816" y1="45.264122" x2="45.380436" y2="50.939667"/>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient1503" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1, 0, 0, 0.536723, -9.68093e-14, 16.8731)" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2380" id="linearGradient2386" x1="62.513836" y1="36.061237" x2="15.984863" y2="20.60858" gradientUnits="userSpaceOnUse"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2402" id="linearGradient2408" x1="18.935766" y1="23.667896" x2="53.588622" y2="26.649362" gradientUnits="userSpaceOnUse"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2682" id="linearGradient2688" x1="36.713837" y1="31.455952" x2="37.124462" y2="24.842253" gradientUnits="userSpaceOnUse"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2690" id="linearGradient2696" x1="32.647972" y1="30.748846" x2="37.124462" y2="24.842253" gradientUnits="userSpaceOnUse"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient5048" id="linearGradient2995" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.77439, 0, 0, 1.96971, -1892.18, -872.885)" x1="302.85715" y1="366.64789" x2="302.85715" y2="609.50507"/>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient5060" id="radialGradient2997" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.77439, 0, 0, 1.96971, -1891.63, -872.885)" cx="605.71429" cy="486.64789" fx="605.71429" fy="486.64789" r="117.14286"/>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient5060" id="radialGradient2999" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-2.77439, 0, 0, 1.96971, 112.762, -872.885)" cx="605.71429" cy="486.64789" fx="605.71429" fy="486.64789" r="117.14286"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4228" id="linearGradient3001" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.000355618, 5.12549)" x1="7.6046205" y1="28.481176" x2="36.183067" y2="40.943935"/>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient4244" id="radialGradient3003" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.28624, 0.781698, -0.710782, 1.16955, -2.35399, 0.248631)" cx="15.571491" cy="2.9585190" fx="15.571491" fy="2.9585190" r="20.935817"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4184" id="linearGradient3005" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.795849, 3.79967)" x1="7.0625000" y1="35.281250" x2="24.687500" y2="35.281250"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4236" id="linearGradient3007" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.000355618, 5.12549)" x1="12.277412" y1="37.205811" x2="12.221823" y2="33.758667"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4274" id="linearGradient3009" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.000355618, 5.12549)" x1="23.688078" y1="11.318835" x2="23.688078" y2="26.357183"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4254" id="linearGradient3011" gradientUnits="userSpaceOnUse" gradientTransform="translate(0.000355618, 5.12549)" x1="12.378357" y1="4.4331360" x2="44.096100" y2="47.620636"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2555" id="linearGradient3013" gradientUnits="userSpaceOnUse" x1="33.431175" y1="31.964777" x2="21.747974" y2="11.780679"/>
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient3015" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1, 0, 0, 0.536723, 0, 16.8731)" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2380" id="linearGradient2513" gradientUnits="userSpaceOnUse" x1="62.513836" y1="36.061237" x2="15.984863" y2="20.60858"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2871" id="linearGradient2515" gradientUnits="userSpaceOnUse" x1="46.834816" y1="45.264122" x2="45.380436" y2="50.939667"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2402" id="linearGradient2517" gradientUnits="userSpaceOnUse" x1="18.935766" y1="23.667896" x2="53.588622" y2="26.649362"/>
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2871" id="linearGradient2519" gradientUnits="userSpaceOnUse" x1="46.834816" y1="45.264122" x2="45.380436" y2="50.939667"/>
</defs>
<sodipodi:namedview stroke="#3465a4" fill="#729fcf" id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="0.25490196" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6568542" inkscape:cx="3.1038458" inkscape:cy="32.820073" inkscape:current-layer="layer1" showgrid="false" inkscape:grid-bbox="true" inkscape:document-units="px" inkscape:showpageshadow="false" inkscape:window-width="891" inkscape:window-height="721" inkscape:window-x="262" inkscape:window-y="25"/>
<metadata id="metadata4">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://jimmac.musichall.cz</dc:source>
<cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/>
<dc:title>Déjà Dup</dc:title>
<dc:subject>
<rdf:Bag>
<rdf:li>reload</rdf:li>
<rdf:li>refresh</rdf:li>
<rdf:li>view</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:contributor>
<cc:Agent>
<dc:title>Michael Terry</dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
</cc:License>
</rdf:RDF>
</metadata>
<g inkscape:groupmode="layer" id="layer2" inkscape:label="Disk" sodipodi:insensitive="true">
<g id="g3017">
<g transform="matrix(0.024114, 0, 0, 0.019292, 45.4899, 41.7528)" id="g5022" style="display: inline;">
<rect style="opacity: 0.402062; fill: url(&quot;#linearGradient2995&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" id="rect4173" width="1339.6335" height="478.35718" x="-1559.2523" y="-150.69685"/>
<path style="opacity: 0.402062; fill: url(&quot;#radialGradient2997&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z" id="path5058" sodipodi:nodetypes="cccc"/>
<path sodipodi:nodetypes="cccc" id="path5018" d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z" style="opacity: 0.402062; fill: url(&quot;#radialGradient2999&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;"/>
</g>
<path style="fill: none; fill-opacity: 1; fill-rule: evenodd; stroke: rgb(83, 83, 83); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 1;" d="M 11.286046,13.088118 C 10.661046,13.088118 10.254797,13.378298 10.004798,13.931871 C 10.004797,13.931871 3.5360466,31.035428 3.5360466,31.035428 C 3.5360466,31.035428 3.2860466,31.706987 3.2860466,32.816678 C 3.2860466,32.816678 3.2860466,42.466646 3.2860466,42.466646 C 3.2860466,43.549259 3.9438326,44.091648 4.9422966,44.091646 L 43.504796,44.091646 C 44.489649,44.091646 45.098546,43.373466 45.098546,42.247896 L 45.098546,32.597928 C 45.098546,32.597928 45.204509,31.827505 45.004796,31.285428 L 38.286046,14.088121 C 38.101521,13.576215 37.649141,13.100023 37.161046,13.088118 L 11.286046,13.088118 z" id="path4196" sodipodi:nodetypes="cccsccccccccc"/>
<path style="fill: url(&quot;#linearGradient3001&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1.02044px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 3.2739466,32.122302 L 4.0385486,31.430087 L 41.648239,31.492587 L 45.110646,31.809885 L 45.110646,42.248417 C 45.110646,43.373986 44.503628,44.091748 43.518775,44.091748 L 4.9357866,44.091748 C 3.9373216,44.091748 3.2739466,43.549697 3.2739466,42.467084 L 3.2739466,32.122302 z" id="path4170" sodipodi:nodetypes="ccccccccc"/>
<path style="fill: url(&quot;#radialGradient3003&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 3.5494396,31.039894 C 2.8351536,32.50418 3.5488236,33.432751 4.5851536,33.432751 C 4.5851536,33.432751 43.585153,33.432751 43.585153,33.432751 C 44.7042,33.408941 45.430391,32.420846 45.013724,31.289893 L 38.299438,14.079194 C 38.114914,13.567288 37.644676,13.091096 37.156581,13.079191 L 11.299439,13.079191 C 10.674439,13.079191 10.263725,13.382764 10.013726,13.936337 C 10.013726,13.936337 3.5494396,31.039894 3.5494396,31.039894 z" id="path3093" sodipodi:nodetypes="csccccccs"/>
<rect style="opacity: 1; fill: url(&quot;#linearGradient3005&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 2.409; stroke-linecap: round; stroke-linejoin: round; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" id="rect4174" width="17.625" height="5.5625" x="7.8583512" y="36.299671"/>
<path style="opacity: 0.811429; fill: url(&quot;#linearGradient3007&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 7.8583496,41.86217 C 7.8583496,41.86217 7.8583496,37.850685 7.8583496,37.850685 C 9.6938776,41.029911 16.154841,41.86217 20.795848,41.86217 C 20.795848,41.86217 7.8583496,41.86217 7.8583496,41.86217 z" id="path4194" sodipodi:nodetypes="cscc"/>
<path style="fill: rgb(255, 255, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 44.796518,30.754178 C 44.86004,32.004152 44.382515,33.070018 43.474402,33.097928 C 43.474402,33.097928 5.3556846,33.097927 5.3556846,33.097928 C 4.0664536,33.097928 3.4879486,32.772981 3.2716346,32.229872 C 3.3633956,33.174204 4.0974516,33.879178 5.3556846,33.879178 C 5.3556846,33.879177 43.474402,33.879178 43.474402,33.879178 C 44.550409,33.846107 45.227207,32.455154 44.826566,30.884387 L 44.796518,30.754178 z" id="path4201" sodipodi:nodetypes="cccccccc"/>
<path style="opacity: 0.691429; fill: url(&quot;#linearGradient3009&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" d="M 10.969106,15.28174 C 10.923031,15.482061 10.781606,15.668537 10.781606,15.87549 C 10.781606,16.824095 11.372586,17.664964 12.125356,18.46924 C 12.365624,18.315165 12.490473,18.114832 12.750356,17.96924 C 11.810047,17.153236 11.19696,16.252658 10.969106,15.28174 z M 37.625356,15.28174 C 37.396629,16.251356 36.783344,17.154166 35.844106,17.96924 C 36.11825,18.122822 36.248094,18.33748 36.500356,18.50049 C 37.257618,17.693834 37.812856,16.827446 37.812856,15.87549 C 37.812856,15.668537 37.671262,15.482061 37.625356,15.28174 z M 39.812856,23.71924 C 39.199065,27.759351 32.514243,30.96924 24.281606,30.96924 C 16.069352,30.969241 9.4214556,27.776454 8.7816056,23.75049 C 8.7492486,23.947622 8.6566056,24.142372 8.6566056,24.34424 C 8.6566056,28.662187 15.64571,32.187991 24.281606,32.18799 C 32.917502,32.18799 39.937855,28.662188 39.937856,24.34424 C 39.937856,24.131316 39.848805,23.926884 39.812856,23.71924 z" id="path4211"/>
<path sodipodi:type="arc" style="opacity: 1; fill: rgb(255, 255, 255); fill-opacity: 0.457627; fill-rule: evenodd; stroke: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" id="path4224" sodipodi:cx="7.2036505" sodipodi:cy="25.593554" sodipodi:rx="1.3700194" sodipodi:ry="1.016466" d="M 8.5736699,25.593554 A 1.3700194,1.016466 0 1 1 5.833631,25.593554 A 1.3700194,1.016466 0 1 1 8.5736699,25.593554 z" transform="translate(0.0887436, 5.30227)"/>
<path transform="translate(33.9674, 5.21388)" d="M 8.5736699,25.593554 A 1.3700194,1.016466 0 1 1 5.833631,25.593554 A 1.3700194,1.016466 0 1 1 8.5736699,25.593554 z" sodipodi:ry="1.016466" sodipodi:rx="1.3700194" sodipodi:cy="25.593554" sodipodi:cx="7.2036505" id="path4226" style="opacity: 1; fill: rgb(255, 255, 255); fill-opacity: 0.457627; fill-rule: evenodd; stroke: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" sodipodi:type="arc"/>
<path sodipodi:nodetypes="cccsccccccccc" id="path4252" d="M 11.642871,13.541213 C 11.041179,13.541213 10.65008,13.820571 10.409405,14.3535 C 10.409404,14.3535 3.9943896,30.944222 3.9943896,30.944222 C 3.9943896,30.944222 3.7537126,31.590737 3.7537126,32.659045 C 3.7537126,32.659045 3.7537126,41.949141 3.7537126,41.949141 C 3.7537126,43.303881 4.1977686,43.57604 5.3481966,43.57604 L 43.035102,43.57604 C 44.358228,43.57604 44.569418,43.259643 44.569418,41.738548 L 44.569418,32.448452 C 44.569418,32.448452 44.671428,31.706761 44.479163,31.184899 L 37.885972,14.378924 C 37.708329,13.886107 37.33532,13.552674 36.865427,13.541213 L 11.642871,13.541213 z" style="fill: none; fill-opacity: 1; fill-rule: evenodd; stroke: url(&quot;#linearGradient3011&quot;) rgb(0, 0, 0); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 1;"/>
<path id="path4282" d="M 40.500356,36.554656 L 40.500356,41.575591" style="fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(255, 255, 255); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 0.423729;"/>
<path style="fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(255, 255, 255); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 0.423729;" d="M 38.500356,36.614433 L 38.500356,41.635368" id="path4284"/>
<path id="path4286" d="M 36.500356,36.614433 L 36.500356,41.635368" style="fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(255, 255, 255); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 0.423729;"/>
<path style="fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(255, 255, 255); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 0.423729;" d="M 34.500356,36.614433 L 34.500356,41.635368" id="path4288"/>
<path id="path4290" d="M 32.500356,36.614433 L 32.500356,41.635368" style="fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(255, 255, 255); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 0.423729;"/>
<path style="fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(255, 255, 255); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 0.423729;" d="M 30.500356,36.614433 L 30.500356,41.635368" id="path4292"/>
<path style="opacity: 0.0971428; fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(0, 0, 0); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 1;" d="M 39.500356,36.604555 L 39.500356,41.62549" id="path4294"/>
<path id="path4296" d="M 37.500356,36.664332 L 37.500356,41.685267" style="opacity: 0.0971428; fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(0, 0, 0); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 1;"/>
<path style="opacity: 0.0971428; fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(0, 0, 0); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 1;" d="M 35.500356,36.664332 L 35.500356,41.685267" id="path4298"/>
<path id="path4300" d="M 33.500356,36.664332 L 33.500356,41.685267" style="opacity: 0.0971428; fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(0, 0, 0); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 1;"/>
<path style="opacity: 0.0971428; fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: rgb(0, 0, 0); stroke-width: 1px; stroke-linecap: square; stroke-linejoin: miter; stroke-opacity: 1;" d="M 31.500356,36.664332 L 31.500356,41.685267" id="path4302"/>
<path style="opacity: 0.44; fill: rgb(255, 255, 255); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" d="M 7.8753556,36.31299 L 7.8753556,41.84424 L 20.437856,41.84424 L 8.2191056,41.50049 L 7.8753556,36.31299 z" id="path4572"/>
<path transform="matrix(1.03781, 0, 0, 1.06075, -1.63252, 3.03086)" d="M 39.875,19.5625 A 14.875,6.6875 0 1 1 10.125,19.5625 A 14.875,6.6875 0 1 1 39.875,19.5625 z" sodipodi:ry="6.6875" sodipodi:rx="14.875" sodipodi:cy="19.5625" sodipodi:cx="25" id="path2545" style="opacity: 0.205714; fill: url(&quot;#linearGradient3013&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 0.933652; stroke-linecap: square; stroke-linejoin: round; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 0.423729; visibility: visible; display: inline; overflow: visible;" sodipodi:type="arc"/>
<path sodipodi:type="arc" style="opacity: 0.141176; fill: url(&quot;#radialGradient3015&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: evenodd; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 10; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" id="path8660" sodipodi:cx="24.837126" sodipodi:cy="36.421127" sodipodi:rx="15.644737" sodipodi:ry="8.3968935" d="M 40.481863,36.421127 A 15.644737,8.3968935 0 1 1 9.1923885,36.421127 A 15.644737,8.3968935 0 1 1 40.481863,36.421127 z" transform="matrix(1.13019, 0, 0, -0.759601, -3.90937, 53.666)"/>
</g>
</g>
<g id="layer1" inkscape:label="Arrows" inkscape:groupmode="layer">
<g id="g3077" transform="matrix(0.7, 0, 0, 0.7, 6.85181, -0.0314703)">
<path sodipodi:nodetypes="cccc" inkscape:r_cy="true" inkscape:r_cx="true" id="path2865" d="M 20.152913,10.409904 C 20.152913,10.409904 11.215413,9.784904 13.965413,20.284904 L 6.2779132,20.284904 C 6.2779132,20.284904 6.7779132,8.409904 20.152913,10.409904 z" style="fill: url(&quot;#linearGradient1486&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: url(&quot;#linearGradient1488&quot;) rgb(0, 0, 0); stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: block; overflow: visible;"/>
<g style="fill: url(&quot;#linearGradient2386&quot;) rgb(0, 0, 0); fill-opacity: 1; stroke: rgb(52, 101, 164); stroke-opacity: 1;" inkscape:r_cy="true" inkscape:r_cx="true" transform="matrix(-0.579051, -0.489228, -0.489228, 0.579051, 56.9159, 13.3714)" id="g1878">
<path inkscape:r_cy="true" inkscape:r_cx="true" style="opacity: 1; fill: url(&quot;#linearGradient2513&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: url(&quot;#linearGradient2515&quot;) rgb(0, 0, 0); stroke-width: 1.31917; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: block; overflow: visible;" d="M 44.306783,50.229694 C 62.821497,35.818859 49.664587,13.411704 22.462411,12.49765 L 22.113843,3.1515478 L 7.6245439,20.496754 L 22.714328,33.219189 C 22.714328,33.219189 22.462411,23.337969 22.462411,23.337969 C 41.292171,24.336946 55.444038,37.409698 44.306783,50.229694 z" id="path1880" sodipodi:nodetypes="ccccccc"/>
</g>
<path style="fill: url(&quot;#linearGradient2696&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: url(&quot;#linearGradient2688&quot;) rgb(0, 0, 0); stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: block; overflow: visible;" d="M 28.375,33.4375 C 28.375,33.4375 37.3125,34.0625 34.5625,23.5625 L 42.338388,23.5625 C 42.338388,25.065102 41.75,35.4375 28.375,33.4375 z" id="path2839" inkscape:r_cx="true" inkscape:r_cy="true" sodipodi:nodetypes="cccc"/>
<g id="g2779" transform="matrix(0.579051, 0.489228, 0.489228, -0.579051, -7.92102, 30.536)" inkscape:r_cx="true" inkscape:r_cy="true" style="opacity: 1; fill: url(&quot;#linearGradient2408&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: url(&quot;#linearGradient1501&quot;) rgb(0, 0, 0); stroke-width: 1.31917; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: block; overflow: visible;">
<path sodipodi:nodetypes="ccccccc" id="path2781" d="M 44.306783,50.229694 C 62.821497,35.818859 49.664587,13.411704 22.462411,12.49765 L 22.399432,3.0690297 L 7.793943,20.424005 L 22.462411,33.006349 C 22.462411,33.006349 22.462411,23.337969 22.462411,23.337969 C 41.292171,24.336946 55.444038,37.409698 44.306783,50.229694 z" style="opacity: 1; fill: url(&quot;#linearGradient2517&quot;) rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: url(&quot;#linearGradient2519&quot;) rgb(0, 0, 0); stroke-width: 1.31917; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: block; overflow: visible;" inkscape:r_cx="true" inkscape:r_cy="true"/>
</g>
<path sodipodi:nodetypes="cccccccc" inkscape:r_cy="true" inkscape:r_cx="true" id="path2791" d="M 7.0625,38.1875 L 7.125,23.3125 L 20.0625,22.9375 L 15.673627,28.116317 L 19.540852,30.489516 C 16.540852,32.739516 14.991304,32.911644 13.991304,35.474144 L 11.174446,33.363872 L 7.0625,38.1875 z" style="opacity: 0.272222; fill: rgb(255, 255, 255); fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;"/>
<g style="opacity: 0.5; fill: none; fill-opacity: 1; stroke: rgb(255, 255, 255); stroke-opacity: 1;" inkscape:r_cy="true" inkscape:r_cx="true" transform="matrix(0.508536, 0.429651, 0.429651, -0.508536, -3.97319, 30.5412)" id="g2793">
<path inkscape:r_cy="true" inkscape:r_cx="true" style="opacity: 1; fill: none; fill-opacity: 1; fill-rule: nonzero; stroke: url(&quot;#linearGradient1493&quot;) rgb(0, 0, 0); stroke-width: 1.50209; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: block; overflow: visible;" d="M 51.090265,45.943705 C 60.210465,30.723955 46.631614,12.20113 19.485058,11.948579 L 19.513464,3.7032834 L 6.5341979,19.296639 L 19.367661,30.26876 C 19.367661,30.26876 19.423281,21.261882 19.423281,21.261882 C 36.951096,21.037973 54.618466,31.365254 51.090265,45.943705 z" id="path2795" sodipodi:nodetypes="ccccccc"/>
</g>
<g id="g2805" transform="matrix(-0.508536, -0.429651, -0.429651, 0.508536, 53.049, 13.3655)" inkscape:r_cx="true" inkscape:r_cy="true" style="opacity: 0.5; fill: none; fill-opacity: 1; stroke: rgb(255, 255, 255); stroke-opacity: 1;">
<path sodipodi:nodetypes="ccccccc" id="path2807" d="M 51.389927,46.505946 C 60.510127,31.286196 47.050763,12.432359 19.628482,12.069755 L 19.342824,4.0507204 L 6.3413093,19.379475 L 19.809059,30.764589 C 19.809059,30.764589 19.627294,21.311346 19.627294,21.311346 C 37.872231,21.693318 54.411175,32.236592 51.389927,46.505946 z" style="opacity: 1; fill: none; fill-opacity: 1; fill-rule: nonzero; stroke: url(&quot;#linearGradient1491&quot;) rgb(0, 0, 0); stroke-width: 1.50209; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: block; overflow: visible;" inkscape:r_cx="true" inkscape:r_cy="true"/>
</g>
<path sodipodi:nodetypes="cccc" inkscape:r_cy="true" inkscape:r_cx="true" id="path2811" d="M 6.8125,16.5 C 10.405935,6.0587275 23.256282,10.355393 27,12 C 31.175307,12.211475 32.674736,9.164996 36,9 C 21.950264,-0.7899963 7.1875,2.5 6.8125,16.5 z" style="opacity: 0.272222; fill: rgb(255, 255, 255); fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 37 KiB

249
fulltests/go-bottom.svg Normal file
View file

@ -0,0 +1,249 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="24"
height="24"
id="svg3734">
<metadata
id="metadata29">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3736">
<linearGradient
id="linearGradient4456">
<stop
id="stop4458"
style="stop-color:#f6daae;stop-opacity:1"
offset="0" />
<stop
id="stop4460"
style="stop-color:#f0c178;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3390-178-986-453-4-5">
<stop
id="stop3624-8-6"
style="stop-color:#bb2b12;stop-opacity:1"
offset="0" />
<stop
id="stop3626-1-1"
style="stop-color:#cd7233;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="-55.189419"
y1="191.51634"
x2="-31.522509"
y2="182.47969"
id="linearGradient3732"
xlink:href="#linearGradient3390-178-986-453-4-5"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.92956783,0,0,0.99594396,51.30231,-181.73954)" />
<linearGradient
id="linearGradient7012-661-145-733-759-865-745-661-970-94-1-0">
<stop
id="stop3618-1-9"
style="stop-color:#f0c178;stop-opacity:1"
offset="0" />
<stop
id="stop3270-5-6"
style="stop-color:#e18941;stop-opacity:1"
offset="0.5" />
<stop
id="stop3620-9-3"
style="stop-color:#ec4f18;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="-31.522509"
y1="182.47969"
x2="-55.189419"
y2="191.51634"
id="linearGradient4322"
xlink:href="#linearGradient7012-661-145-733-759-865-745-661-970-94-1-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.92956783,0,0,0.99594396,51.30231,-181.73954)" />
<linearGradient
x1="-31.522509"
y1="182.47969"
x2="-55.189419"
y2="191.51634"
id="linearGradient4324"
xlink:href="#linearGradient7012-661-145-733-759-865-745-661-970-94-1-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.92956783,0,0,0.99594396,51.30231,-181.73954)" />
<linearGradient
x1="-55.189419"
y1="191.51634"
x2="-31.522509"
y2="182.47969"
id="linearGradient4452"
xlink:href="#linearGradient3390-178-986-453-4-5"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.92956783,0,0,0.99594396,51.30231,-181.73954)" />
<linearGradient
x1="22"
y1="-8.8817842e-16"
x2="0"
y2="9"
id="linearGradient4462"
xlink:href="#linearGradient4456"
gradientUnits="userSpaceOnUse" />
<linearGradient
x1="22"
y1="-8.8817842e-16"
x2="0"
y2="9"
id="linearGradient3026"
xlink:href="#linearGradient4456"
gradientUnits="userSpaceOnUse" />
<linearGradient
x1="-86.552246"
y1="185.439"
x2="-83.37072"
y2="197.31261"
id="linearGradient4040-8-9-7-4-2"
xlink:href="#linearGradient4034-59-4-2-2-6"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,-1,1,0,-272,102)" />
<linearGradient
id="linearGradient4034-59-4-2-2-6">
<stop
id="stop4036-9-1-5-2-5"
style="stop-color:#eeeeec;stop-opacity:1"
offset="0" />
<stop
id="stop4038-0-5-5-6-2"
style="stop-color:#babdb6;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="-88"
y1="159"
x2="-82"
y2="181"
id="linearGradient2979"
xlink:href="#linearGradient7012-661-145-733-759-865-745-661-970-94-1-0-7-1-5"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,-1,1,0,-272.57692,80)" />
<linearGradient
id="linearGradient7012-661-145-733-759-865-745-661-970-94-1-0-7-1-5">
<stop
id="stop3618-1-9-8-2-8"
style="stop-color:#f0c178;stop-opacity:1"
offset="0" />
<stop
id="stop3270-5-6-3-8-7"
style="stop-color:#e18941;stop-opacity:1"
offset="0.5" />
<stop
id="stop3620-9-3-0-8-9"
style="stop-color:#ec4f18;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3390-178-986-453-4-5-1">
<stop
id="stop3624-8-6-8"
style="stop-color:#bb2b12;stop-opacity:1"
offset="0" />
<stop
id="stop3626-1-1-9"
style="stop-color:#cd7233;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="-51.576923"
y1="162"
x2="-73.576927"
y2="168"
id="linearGradient2908"
xlink:href="#linearGradient3390-178-986-453-4-5-1"
gradientUnits="userSpaceOnUse" />
<linearGradient
x1="-33.576923"
y1="162"
x2="-55.576923"
y2="167"
id="linearGradient3072"
xlink:href="#linearGradient3390-178-986-453-4-5-1"
gradientUnits="userSpaceOnUse" />
</defs>
<g
transform="matrix(0,1,-1,0,177,75.576924)"
id="g6115-7"
style="display:inline;enable-background:new">
<g
transform="translate(-1,0)"
id="g4018-8"
style="stroke:url(#linearGradient3072);stroke-opacity:1">
<path
d="m -53.576924,158 0,14"
id="path3395-1"
style="fill:none;stroke:url(#linearGradient2908);stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
</g>
</g>
<g
transform="matrix(0,-1,1,0,7,22)"
id="layer1">
<path
d="M 7.65,-0.525 2.5,4.99993 7.65,10.525"
id="path3169-2-3"
style="fill:none;stroke:url(#linearGradient3732);stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
<path
d="M 18,5 6.5,4.99993"
id="path3765"
style="fill:none;stroke:url(#linearGradient4452);stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
<path
d="M 7.75009,-0.6251675 2.5,4.99993 7.750153,10.624983"
id="path4277"
style="fill:none;stroke:url(#linearGradient4322);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
<path
d="M 18,5 6.5,4.99993"
id="path4279"
style="fill:none;stroke:url(#linearGradient4324);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
<path
d="M 8.28125,9.64375 6.5,8 C 5.4606912,7.0409186 6.5,6.5 8,6.5 l 9.4,0 c 3,0 2.5,-3 0,-3 l -8.9,0 C 7,3.5 5.5,3.5 6.5,2 L 8.14375,0.76875 c 1.5,-2 -0.5,-2.5 -1.5,-1.5 L 2,4 C 1.5,4.5 1.4724356,5.3333333 2,6 l 4.78125,5.14375 c 1,1 3.0589632,-0.06138 1.5,-1.5 z"
id="path4454"
style="opacity:0.4;fill:none;stroke:url(#linearGradient3026);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
<path
d="M 6.5,2 8.35,0.49375 c 1.5,-2 -0.5,-2.5 -1.5,-1.5 L 2,4 m 0,2 4.7125,5.28125 c 1,1 2.9701984,0.02922 1.5,-1.5 L 6.5,8"
id="path4464"
style="opacity:0.4;fill:none;stroke:url(#linearGradient4462);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
<path
d="M 8.7264239,-0.09337158 6.3063674,2.3669234"
id="path4466"
style="opacity:0.51000001;fill:none;stroke:#f6daae;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
</g>
<g
transform="matrix(0,1,-1,0,177,114.57692)"
id="g4030-5"
style="stroke:url(#linearGradient4040-8-9-7-4-2);display:inline;enable-background:new">
<path
d="m -93.57692,158 0,14"
id="path3397-3"
style="fill:none;stroke:url(#linearGradient2979);stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" />
</g>
<path
d="M 14.2,20.500004 19,20.5 M 4.5,20.906 C 4.5437,20.676799 4.7667,20.495888 5,20.5 l 4.630769,4e-6"
id="path3397-6-7"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;opacity:0.4;color:#000000;fill:none;stroke:#f6daae;stroke-width:1;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Abandoned Bitplane;-inkscape-font-specification:Abandoned Bitplane" />
</svg>

After

Width:  |  Height:  |  Size: 9.7 KiB

View file

@ -1291,6 +1291,12 @@ def removeDuplicateGradients(doc):
elem.setAttribute(attr, 'url(#'+master_id+')') elem.setAttribute(attr, 'url(#'+master_id+')')
if elem.getAttributeNS(NS['XLINK'], 'href') == '#'+dup_id: if elem.getAttributeNS(NS['XLINK'], 'href') == '#'+dup_id:
elem.setAttributeNS(NS['XLINK'], 'href', '#'+master_id) elem.setAttributeNS(NS['XLINK'], 'href', '#'+master_id)
styles = _getStyle(elem)
for style in styles:
v = styles[style]
if v == 'url(#'+dup_id+')' or v == 'url("#'+dup_id+'")' or v == "url('#"+dup_id+"')":
styles[style] = 'url(#'+master_id+')'
_setStyle(elem, styles)
# now that all referencing elements have been re-mapped to the master # now that all referencing elements have been re-mapped to the master
# it is safe to remove this gradient from the document # it is safe to remove this gradient from the document

View file

@ -1217,6 +1217,18 @@ class RemoveDefsWithWhitespace(unittest.TestCase):
self.assertEquals(doc.getElementsByTagName('defs').length, 0, self.assertEquals(doc.getElementsByTagName('defs').length, 0,
'Kept defs, although it contains only whitespace or is <defs/>') 'Kept defs, although it contains only whitespace or is <defs/>')
class DuplicateGradientsUpdateStyle(unittest.TestCase):
def runTest(self):
doc = scour.scourXmlFile('unittests/duplicate-gradients-update-style.svg',
scour.parse_args(['--disable-style-to-xml'])[0])
gradientTag = doc.getElementsByTagName('linearGradient')[0]
rectTag0 = doc.getElementsByTagName('rect')[0]
rectTag1 = doc.getElementsByTagName('rect')[1]
self.assertEquals('fill:url(#' + gradientTag.getAttribute('id') + ')', rectTag0.getAttribute('style'),
'Either of #duplicate-one or #duplicate-two was removed, but style="fill:" was not updated to reflect this')
self.assertEquals('fill:url(#' + gradientTag.getAttribute('id') + ')', rectTag1.getAttribute('style'),
'Either of #duplicate-one or #duplicate-two was removed, but style="fill:" was not updated to reflect this')
# TODO: write tests for --enable-viewboxing # TODO: write tests for --enable-viewboxing
# TODO; write a test for embedding rasters # TODO; write a test for embedding rasters
# TODO: write a test for --disable-embed-rasters # TODO: write a test for --disable-embed-rasters

View file

@ -0,0 +1,15 @@
<?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>
<linearGradient id="duplicate-one" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="blue" />
<stop offset="1" stop-color="yellow" />
</linearGradient>
<linearGradient id="duplicate-two" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="blue" />
<stop offset="1" stop-color="yellow" />
</linearGradient>
</defs>
<rect style="fill: url(#duplicate-one)" width="200" height="200"/>
<rect style="fill: url(#duplicate-two)" width="200" height="200" y="200"/>
</svg>

After

Width:  |  Height:  |  Size: 708 B