[librsvg: 1/3] tests: add test cases for pattern fill (issue #510)



commit 36e640b9053be6c02538bf8d3bb6ed03b9e90c8c
Author: Sven Neumann <sven svenfoo org>
Date:   Wed Jan 29 18:55:40 2020 +0100

    tests: add test cases for pattern fill (issue #510)

 .../reftests/bugs/510-pattern-fill-opacity-ref.png | Bin 0 -> 1512 bytes
 .../reftests/bugs/510-pattern-fill-opacity.svg     |  21 +++++++++++++++++++++
 .../reftests/bugs/510-pattern-fill-ref.png         | Bin 0 -> 1053 bytes
 tests/fixtures/reftests/bugs/510-pattern-fill.svg  |  21 +++++++++++++++++++++
 4 files changed, 42 insertions(+)
---
diff --git a/tests/fixtures/reftests/bugs/510-pattern-fill-opacity-ref.png 
b/tests/fixtures/reftests/bugs/510-pattern-fill-opacity-ref.png
new file mode 100644
index 00000000..cad2c3e7
Binary files /dev/null and b/tests/fixtures/reftests/bugs/510-pattern-fill-opacity-ref.png differ
diff --git a/tests/fixtures/reftests/bugs/510-pattern-fill-opacity.svg 
b/tests/fixtures/reftests/bugs/510-pattern-fill-opacity.svg
new file mode 100644
index 00000000..569d8ba4
--- /dev/null
+++ b/tests/fixtures/reftests/bugs/510-pattern-fill-opacity.svg
@@ -0,0 +1,21 @@
+<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg";>
+  <defs>
+    <linearGradient id="Gradient1">
+      <stop offset="5%" stop-color="white"/>
+      <stop offset="95%" stop-color="blue"/>
+    </linearGradient>
+    <linearGradient id="Gradient2" x1="0" x2="0" y1="0" y2="1">
+      <stop offset="5%" stop-color="red"/>
+      <stop offset="95%" stop-color="orange"/>
+    </linearGradient>
+
+    <pattern id="Pattern" x="0" y="0" width=".25" height=".25">
+      <rect x="0" y="0" width="50" height="50" fill="skyblue"/>
+      <rect x="0" y="0" width="25" height="25" fill="url(#Gradient2)"/>
+    </pattern>
+  </defs>
+
+  <rect fill="url(#Gradient1)" width="200" height="200"/>
+  <rect fill="url(#Pattern)" stroke="black" width="200" height="200" fill-opacity=".2"/>
+</svg>
+
diff --git a/tests/fixtures/reftests/bugs/510-pattern-fill-ref.png 
b/tests/fixtures/reftests/bugs/510-pattern-fill-ref.png
new file mode 100644
index 00000000..6fdae2c4
Binary files /dev/null and b/tests/fixtures/reftests/bugs/510-pattern-fill-ref.png differ
diff --git a/tests/fixtures/reftests/bugs/510-pattern-fill.svg 
b/tests/fixtures/reftests/bugs/510-pattern-fill.svg
new file mode 100644
index 00000000..9698a03a
--- /dev/null
+++ b/tests/fixtures/reftests/bugs/510-pattern-fill.svg
@@ -0,0 +1,21 @@
+<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg";>
+  <defs>
+    <linearGradient id="Gradient1">
+      <stop offset="5%" stop-color="white"/>
+      <stop offset="95%" stop-color="blue"/>
+    </linearGradient>
+    <linearGradient id="Gradient2" x1="0" x2="0" y1="0" y2="1">
+      <stop offset="5%" stop-color="red"/>
+      <stop offset="95%" stop-color="orange"/>
+    </linearGradient>
+
+    <pattern id="Pattern" x="0" y="0" width=".25" height=".25">
+      <rect x="0" y="0" width="50" height="50" fill="skyblue"/>
+      <rect x="0" y="0" width="25" height="25" fill="url(#Gradient2)"/>
+    </pattern>
+  </defs>
+
+  <rect fill="url(#Gradient1)" width="200" height="200"/>
+  <rect fill="url(#Pattern)" stroke="black" width="200" height="200"/>
+</svg>
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]