Debian Codegraph @

test_non_regression/fail/filter/filters-conv-04-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="ED" owner="AG" status="created"
13 version="$Revision: 1.4 $" testname="$RCSfile: filters-conv-04-f.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feConvolveMatrixElementBiasAttribute">
15 <p>
16 Tests the 'bias' attribute on 'feConvolveMatrix'.
17 </p>
18 <p>
19 The test uses a raster image and a vector graphic to test the effect
20 that the 'bias' attribute on 'feConvolveMatrix' has.
21 </p>
22 <p>
23 The first row of images in the test are four identical raster images.
24 The first image is the original unfiltered image. The second has the
25 filter kernel applied with no bias value specified. The third and fourth
26 images both have a bias value specified for the filter.
27 </p>
28 <p>
29 The second row of images in the test are four rectangle objects with a
30 gradient fill. The gradient fill transitions from opaque green to
31 transparent green. The first image is the original unfiltered graphic. The
32 second graphic has a filter kernel applied with no bias value specified.
33 The third and forth images both have a bias value specified for the
34 filter.
35 </p>
36 <p>
37 Behind each filter result there's a checkerboard pattern placed, to help
38 verify that there's transparency in the lower row, but not in the upper.
39 </p>
40 </d:testDescription>
41 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
42 <p>
43 Run the test. No interaction required.
44 </p>
45 </d:operatorScript>
46 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
47 <p>
48 The test has passed if:
49 </p>
50 <ul>
51 <li>
52 The raster images in the top row appears more faded and coarse for each instance
53 further to the right.
54 <ul>
55 <li>The first image (left most) must be smooth and clear</li>
56 <li>
57 The second image (second from the left) must contain the same colours as
58 the first image but have course outlining around the objects.
59 </li>
60 <li>
61 The third image (second from the right) must contain colour that is very faded
62 but have course outlining around the faded objects.
63 </li>
64 <li>
65 The last image (right most) must be completed faded such that all the colour
66 in the first image appears to have gone to white. Some course outlining should
67 appear in the image.
68 </li>
69 </ul>
70 </li>
71 <li>
72 The top row has no checkerboard pattern visible where the filtered results are.
73 </li>
74 <li>
75 The rectangle with a green gradient going from left to right appears
76 more faded for each instance further to the right.
77 <ul>
78 <li>
79 The first image (left most) must be a rect filled with a linear gradient that
80 transitions from solid green to transparent green.
81 </li>
82 <li>The second image (second from the left) must be identical to the first image.</li>
83 <li>
84 The third image (second from the right) must contain a linear gradient that transitions
85 from a solid faded green to transparent faded green.
86 </li>
87 <li>
88 The last image (right most) must contain a linear gradient that transitions from
89 solid white to transparent white.
90 </li>
91 </ul>
92 </li>
93 <li>
94 The bottom row must show 95% of the checkerboard pattern where the filtered results are
95 since the gradients are transparent.
96 </li>
97 </ul>
98 </d:passCriteria>
99 </d:SVGTestCase>
100 <title id="test-title">$RCSfile: filters-conv-04-f.svg,v $</title>
101 <defs>
102 <font-face
103 font-family="SVGFreeSansASCII"
104 unicode-range="U+0-7F">
105 <font-face-src>
106 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
107 </font-face-src>
108 </font-face>
109 </defs>
110 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
111 <defs>
112 <filter id="convolve-without-bias" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
113 <feConvolveMatrix kernelMatrix="1 1 1 1 -7 1 1 1 1" preserveAlpha="false"/>
114 </filter>
115 <filter id="convolve-with-bias05" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
116 <feConvolveMatrix kernelMatrix="1 1 1 1 -7 1 1 1 1" preserveAlpha="false" bias="0.5"/>
117 </filter>
118 <filter id="convolve-with-bias1" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
119 <feConvolveMatrix kernelMatrix="1 1 1 1 -7 1 1 1 1" preserveAlpha="false" bias="1"/>
120 </filter>
121
122 <linearGradient id="test_linear_gradient" gradientUnits="objectBoundingBox" x1="0" x2="1" y1="0" y2="0">
123 <stop stop-color="#00FF00" stop-opacity="1" offset="0"/>
124 <stop stop-color="#00FF00" stop-opacity="0" offset="1"/>
125 </linearGradient>
126 </defs>
127
128 <g transform="translate(0, 20)">
129 <image x="12" y="1" width="97" height="98" xlink:href="../images/DisplaceChecker.png"/>
130 <image x="127" y="1" width="97" height="98" xlink:href="../images/DisplaceChecker.png"/>
131 <image x="242" y="1" width="97" height="98" xlink:href="../images/DisplaceChecker.png"/>
132 <image x="357" y="1" width="97" height="98" xlink:href="../images/DisplaceChecker.png"/>
133
134 <image x="10" y="0" width="100" height="100" xlink:href="../images/townsville.jpg" />
135 <image x="125" y="0" width="100" height="100" xlink:href="../images/townsville.jpg" filter="url(#convolve-without-bias)"/>
136 <image x="240" y="0" width="100" height="100" xlink:href="../images/townsville.jpg" filter="url(#convolve-with-bias05)"/>
137 <image x="355" y="0" width="100" height="100" xlink:href="../images/townsville.jpg" filter="url(#convolve-with-bias1)"/>
138 </g>
139
140 <g transform="translate(0, 110)">
141 <image x="11" y="51" width="98" height="98" xlink:href="../images/DisplaceChecker.png"/>
142 <image x="126" y="51" width="98" height="98" xlink:href="../images/DisplaceChecker.png"/>
143 <image x="241" y="51" width="98" height="98" xlink:href="../images/DisplaceChecker.png"/>
144 <image x="356" y="51" width="98" height="98" xlink:href="../images/DisplaceChecker.png"/>
145
146 <rect fill="url(#test_linear_gradient)" stroke="black" x="10" y="50" width="100" height="100"/>
147 <rect fill="url(#test_linear_gradient)" stroke="black" x="125" y="50" width="100" height="100" filter="url(#convolve-without-bias)"/>
148 <rect fill="url(#test_linear_gradient)" stroke="black" x="240" y="50" width="100" height="100" filter="url(#convolve-with-bias05)"/>
149 <rect fill="url(#test_linear_gradient)" stroke="black" x="355" y="50" width="100" height="100" filter="url(#convolve-with-bias1)"/>
150 </g>
151 </g>
152 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
153 <text id="revision" x="10" y="340" stroke="none"
154 fill="black">$Revision: 1.4 $</text>
155 </g>
156 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
157 <!-- comment out this watermark once the test is approved -->
158 <g id="draft-watermark">
159 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
160 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
161 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
162 </g>
163 </svg>