librsvg source for verification 2026-05-22

This commit is contained in:
2026-05-22 16:45:08 +08:00
commit 75af7ac721
2138 changed files with 161177 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<filter id="foo">
<feImage xlink:href="embedded.svg"/>
</filter>
<rect width="100%" height="100%" fill="white"/>
<rect x="10" y="10" width="5" height="5" fill="#000000"/>
<rect x="15" y="15" width="5" height="5" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 360 B

View File

@@ -0,0 +1,12 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- We set the filter's bounds to exactly match the filtered
object, as the default is to extend a bit past its edges. This
lets the embedded.svg image match the reference results
exactly.-->
<filter id="foo" filterUnits="objectBoundingBox" x="0" y="0" width="100%" height="100%">
<feImage xlink:href="embedded.svg"/>
</filter>
<rect width="100%" height="100%" fill="white"/>
<rect x="10" y="10" width="10" height="10" filter="url(#foo)"/>
</svg>

After

Width:  |  Height:  |  Size: 594 B

View File

@@ -0,0 +1,4 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect fill="none" stroke="green" stroke-width="5" width="100%" height="100%"/>
<rect x="45%" y="45%" width="10%" height="10%" fill="red"/>
</svg>

After

Width:  |  Height:  |  Size: 259 B

View File

@@ -0,0 +1,9 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<svg id="a">
<rect width="100%" height="100%" fill="red"/>
</svg>
</defs>
<rect fill="none" stroke="green" stroke-width="5" width="100%" height="100%"/>
<use xlink:href="#a" x="45%" y="45%" width="10%" height="10%"/>
</svg>

After

Width:  |  Height:  |  Size: 362 B

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400">
<rect x="0" y="0" width="400" height="400" fill="lime"/>
</svg>

After

Width:  |  Height:  |  Size: 171 B

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400">
<!-- Two lines, one horizontal and one vertical, that have an empty objectBoundingBox.
However, they have a stroke with a userSpaceOnUse pattern, which *should* be drawn.
-->
<pattern id="pat" x="0" y="0" width="400" height="400" patternUnits="userSpaceOnUse">
<rect x="0" y="0" width="400" height="400" fill="lime"/>
</pattern>
<line x1="0" y1="100" x2="400" y2="100" stroke="url(#pat)" stroke-width="200"/>
<line x1="200" y1="200" x2="200" y2="400" stroke="url(#pat)" stroke-width="400"/>
</svg>

After

Width:  |  Height:  |  Size: 628 B

View File

@@ -0,0 +1,4 @@
<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg">
<rect fill="none" stroke="green" stroke-width="25" width="100%" height="100%"/>
<rect x="0" y="25%" width="100%" height="50%" fill="red" stroke-width="25" stroke="blue"/>
</svg>

After

Width:  |  Height:  |  Size: 248 B

View File

@@ -0,0 +1,4 @@
<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg">
<rect fill="none" stroke="green" stroke-width="25" width="100%" height="100%"/>
<rect x="0" y="250%" width="100%" height="500%" transform="scale(1 0.1)" fill="red" vector-effect="non-scaling-stroke" stroke-width="25" stroke="blue"/>
</svg>

After

Width:  |  Height:  |  Size: 310 B

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="100" height="100" viewBox="0 0 100 100">
<rect x="0" y="0" width="40" height="40" fill="lime"/>
</svg>

After

Width:  |  Height:  |  Size: 239 B

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="100" height="100" viewBox="0 0 100 100">
<defs>
<symbol id="foo" viewBox="0 0 50 50">
<rect x="0" y="0" width="40" height="40" fill="lime"/>
<rect x="50" y="0" width="40" height="40" fill="red"/>
</symbol>
</defs>
<use x="0" y="0" width="50" height="50" xlink:href="#foo"/>
</svg>

After

Width:  |  Height:  |  Size: 442 B

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
<!-- Nothing; the test file should render nothing, so this is empty -->
</svg>

After

Width:  |  Height:  |  Size: 186 B

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
<!-- This clipPath has an invalid transform. We should just not render the circle below,
but not exit with an error. -->
<clipPath id="clip" transform="scale(0)">
<rect x="100" y="0" width="100" height="100"/>
</clipPath>
<circle cx="100" cy="100" r="50" fill="green" clip-path="url(#clip)"/>
</svg>

After

Width:  |  Height:  |  Size: 424 B

View File

@@ -0,0 +1,4 @@
<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="5" height="5" fill="#000000"/>
<rect x="5" y="5" width="5" height="5" fill="#00ff00"/>
</svg>

After

Width:  |  Height:  |  Size: 187 B