[librsvg: 14/30] reftests: add reftest for feConvolveMatrix divisor attribute
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 14/30] reftests: add reftest for feConvolveMatrix divisor attribute
- Date: Mon, 28 Dec 2020 20:06:29 +0000 (UTC)
commit 914b2e5e1166562dbe533057b5726cb70cd89942
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Dec 27 11:03:00 2020 +0100
reftests: add reftest for feConvolveMatrix divisor attribute
.../fixtures/reftests/filter-conv-divisor-ref.png | Bin 0 -> 1410 bytes
tests/fixtures/reftests/filter-conv-divisor.svg | 70 +++++++++++++++++++++
2 files changed, 70 insertions(+)
---
diff --git a/tests/fixtures/reftests/filter-conv-divisor-ref.png
b/tests/fixtures/reftests/filter-conv-divisor-ref.png
new file mode 100644
index 00000000..1a581f98
Binary files /dev/null and b/tests/fixtures/reftests/filter-conv-divisor-ref.png differ
diff --git a/tests/fixtures/reftests/filter-conv-divisor.svg b/tests/fixtures/reftests/filter-conv-divisor.svg
new file mode 100644
index 00000000..9f2d729e
--- /dev/null
+++ b/tests/fixtures/reftests/filter-conv-divisor.svg
@@ -0,0 +1,70 @@
+<svg id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <!-- no divisor specified, sum of matrix elements is 0: divisor is 1 -->
+ <filter id="conv1">
+ <feConvolveMatrix kernelMatrix="1 0 0
+ 0 0 0
+ 0 0 -1"/>
+ </filter>
+
+ <!-- divisor set to 0, sum of matrix elements is 0: divisor is 1 -->
+ <filter id="conv2">
+ <feConvolveMatrix kernelMatrix="1 0 0
+ 0 0 0
+ 0 0 -1" divisor="0"/>
+ </filter>
+
+ <!-- no divisor specified, sum of matrix elements is 2: divisor is 2 -->
+ <filter id="conv3">
+ <feConvolveMatrix kernelMatrix="1 0 0
+ 0 0 0
+ 0 0 1"/>
+ </filter>
+
+ <!-- divisor set to 0, sum of matrix elements is 2: divisor is 2 -->
+ <filter id="conv4">
+ <feConvolveMatrix kernelMatrix="1 0 0
+ 0 0 0
+ 0 0 1" divisor="0"/>
+ </filter>
+
+ <!-- divisor set to 1, sum of matrix elements is 2: divisor is 1 -->
+ <filter id="conv5">
+ <feConvolveMatrix kernelMatrix="1 0 0
+ 0 0 0
+ 0 0 1" divisor="1"/>
+ </filter>
+
+ <g transform="translate(20 20)">
+ <rect fill="blue" x="1" y="1" width="100" height="100"/>
+ <rect fill="blue" stroke="white" stroke-width="2" x="25" y="25" width="50" height="50"/>
+ </g>
+
+ <g transform="translate(140 20)">
+ <rect fill="blue" x="1" y="1" width="100" height="100"/>
+ <rect fill="blue" stroke="white" stroke-width="2" x="25" y="25" width="50" height="50"
filter="url(#conv1)"/>
+ </g>
+
+ <g transform="translate(260 20)">
+ <rect fill="blue" x="1" y="1" width="100" height="100"/>
+ <rect fill="blue" stroke="white" stroke-width="2" x="25" y="25" width="50" height="50"
filter="url(#conv2)"/>
+ </g>
+
+ <g transform="translate(20 140)">
+ <rect fill="blue" x="1" y="1" width="100" height="100"/>
+ <rect fill="blue" stroke="white" stroke-width="2" x="25" y="25" width="50" height="50"
filter="url(#conv3)"/>
+ </g>
+
+ <g transform="translate(140 140)">
+ <rect fill="blue" x="1" y="1" width="100" height="100"/>
+ <rect fill="blue" stroke="white" stroke-width="2" x="25" y="25" width="50" height="50"
filter="url(#conv4)"/>
+ </g>
+
+ <g transform="translate(260 140)">
+ <rect fill="blue" x="1" y="1" width="100" height="100"/>
+ <rect fill="blue" stroke="white" stroke-width="2" x="25" y="25" width="50" height="50"
filter="url(#conv5)"/>
+ </g>
+
+</svg>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]