Debian Codegraph @

test_non_regression/fail/filter/filters-conv-03-f.svg

raw
1 <svg id="svg-root" width="100%" height="100%"
2 viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
3 xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, European Research Consortium for =-->
7 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
8 <!--= All Rights Reserved. =-->
9 <!--= See http://www.w3.org/Consortium/Legal/. =-->
10 <!--======================================================================-->
11 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
12 template-version="1.3" reviewer="CM" owner="ED" status="accepted"
13 version="$Revision: 1.8 $" testname="$RCSfile: filters-conv-03-f.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/#feConvolveMatrixElementOrderAttribute">
15 <p>
16 Tests the 'in1' DOM attribute on 'feConvolveMatrix'.
17 </p>
18 <p>
19 Load the testcase, you should see three nearly identical images that say "FAIL".
20 After 3 seconds all three images should be replaced by the same image of a bird.
21 The two images to the right have filters applied, while the one on the left is always unfiltered.
22 </p>
23 </d:testDescription>
24 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
25 <p>
26 Run the test. No interaction required.
27 </p>
28 </d:operatorScript>
29 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
30 <p>
31 The test has passed if:
32 </p>
33 <ul>
34 <li>the two images inside the blue rects look exactly the same</li>
35 <li>the same base image is used in all three rects</li>
36 <li>the purple image that says "FAIL" is replaced after 3 seconds by an image of a bird</li>
37 </ul>
38 </d:passCriteria>
39 </d:SVGTestCase>
40 <title id="test-title">$RCSfile: filters-conv-03-f.svg,v $</title>
41 <defs>
42 <font-face
43 font-family="SVGFreeSansASCII"
44 unicode-range="U+0-7F">
45 <font-face-src>
46 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
47 </font-face-src>
48 </font-face>
49 </defs>
50 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
51 <defs>
52 <filter id="sharpenAnim" x="0" y="0" width="100%" height="100%">
53 <feImage xlink:href="../images/stefan_252_tRNS_opti.png" result="passimg"/>
54 <feConvolveMatrix in="SourceGraphic" order="3" kernelMatrix="0 -1 0
55 -1 5 -1
56 0 -1 0" preserveAlpha="true">
57 <set attributeName="in" to="passimg" begin="3s" fill="freeze" onbegin="runtest()"/>
58 </feConvolveMatrix>
59 </filter>
60 <filter id="sharpenScript" x="0" y="0" width="100%" height="100%">
61 <feImage xlink:href="../images/stefan_252_tRNS_opti.png" result="passimg"/>
62 <feConvolveMatrix id="prim" in="SourceGraphic" order="3" kernelMatrix="0 -1 0
63 -1 5 -1
64 0 -1 0" preserveAlpha="true"/>
65 </filter>
66
67 <text id="pass" x="240" y="150" text-anchor="middle" font-size="30px">PASS</text>
68 </defs>
69
70 <script type="application/ecmascript">
71 function runtest()
72 {
73 var img = document.getElementById("img");
74 img.href.baseVal = "../images/stefan_252_tRNS_opti.png";
75 var prim = document.getElementById("prim");
76 prim.in1.baseVal = "passimg";
77 }
78 </script>
79
80 <text x="50%" y="3em" style="font-size:18px; text-anchor:middle">feConvolveMatrix 'in1' DOM</text>
81 <image id="img" xlink:href="../images/purplesquidj.png" x="80" y="100" width="100" height="100"/>
82 <image xlink:href="../images/purplesquidj.png" x="190" y="100" width="100" height="100" filter="url(#sharpenAnim)"/>
83 <image xlink:href="../images/purplesquidj.png" x="300" y="100" width="100" height="100" filter="url(#sharpenScript)"/>
84 <rect x="80" y="100" width="100" height="100" stroke="black" fill="none"/>
85 <rect x="190" y="100" width="100" height="100" stroke="blue" fill="none"/>
86 <rect x="300" y="100" width="100" height="100" stroke="blue" fill="none"/>
87 <text x="130" y="220" style="font-size:9px; text-anchor:middle">Original image</text>
88 <text x="240" y="220" style="font-size:9px; text-anchor:middle">Animated filter</text>
89 <text x="350" y="220" style="font-size:9px; text-anchor:middle">Scripted filter</text>
90 </g>
91 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
92 <text id="revision" x="10" y="340" stroke="none"
93 fill="black">$Revision: 1.8 $</text>
94 </g>
95 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
96 <!-- comment out this watermark once the test is approved --><!--
97 <g id="draft-watermark">
98 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
99 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
100 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
101 </g>-->
102 </svg>