Debian Codegraph @

test_non_regression/fail/filter/filters-light-05-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" author="AG" status="reviewed"
13 version="$Revision: 1.3 $" testname="$RCSfile: filters-light-05-f.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feDistantLightElevationAttribute">
15 <p>
16 This test verifies that the <a>'elevation'</a> attribute is interpreted as a
17 complementary value to the z-axis in degrees.
18 </p>
19 <p>
20 The test shows four different elevation angles that can be used for feDistantLight source.
21 The four different feDistantLight light sources are used in three different filter cases; feDiffuseLight, feSpecularLight
22 and feMerge which merges both feDiffuseLight and feSpecularLight to form a single filter. Using four different elevation values
23 in three different filter cases gives twelve different filters. All twelve filter cases are applied to a vector graphic and
24 then to a raster graphic. The vector graphic results are shown to the left and the raster graphic results are shown to the right.
25 </p>
26 </d:testDescription>
27 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
28 <p>
29 Run the test. No interaction required.
30 </p>
31 </d:operatorScript>
32 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
33 <p>
34 The test has passed if
35 </p>
36 <ul>
37 <li>The top row has from left to right for a single graphic set:
38 <ul>
39 <li>A green square with a black circle inside of it</li>
40 <li>A black square</li>
41 <li>A black square with a green semicircle inside the lefthand side of the rect</li>
42 <li>A black square with a green semicircle inside the righthand side of the rect</li>
43 </ul>
44 </li>
45 <li>The middle row has from left to right for a single graphic set:
46 <ul>
47 <li>A green square with a white circle inside of it</li>
48 <li>A green semicircle pointing to the right on top of a white background</li>
49 <li>A green square with a white crest inside pointing to the right</li>
50 <li>A green square with a white crest inside pointing to the left</li>
51 </ul>
52 </li>
53 <li>The bottom row has from left to right for a single graphic set:
54 <ul>
55 <li>A green square with a black circle inside of it</li>
56 <li>A black square with a green semicircle inside pointing to the right</li>
57 <li>A green square with a circle inside that has a shadow on the righthand side and a reflection on the lefthand side</li>
58 <li>A green square with a circle inside that has a shadow on the lefthand side and a reflection on the righthand side</li>
59 </ul>
60 </li>
61 </ul>
62 <p>
63 If the test shows any red, the test has failed.
64 </p>
65 </d:passCriteria>
66 </d:SVGTestCase>
67 <title id="test-title">$RCSfile: filters-light-05-f.svg,v $</title>
68 <defs>
69 <font-face
70 font-family="SVGFreeSansASCII"
71 unicode-range="U+0-7F">
72 <font-face-src>
73 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
74 </font-face-src>
75 </font-face>
76 </defs>
77 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
78 <defs color="#00FF00">
79 <filter id="distantLightUp">
80 <feDiffuseLighting in="SourceGraphic" surfaceScale="10" diffuseConstant="1" lighting-color="currentColor">
81 <feDistantLight azimuth="0" elevation="90"/>
82 </feDiffuseLighting>
83 </filter>
84 <filter id="distantLightDown">
85 <feDiffuseLighting in="SourceGraphic" surfaceScale="10" diffuseConstant="1" lighting-color="currentColor">
86 <feDistantLight azimuth="0" elevation="270"/>
87 </feDiffuseLighting>
88 </filter>
89 <filter id="distantLightLeft">
90 <feDiffuseLighting in="SourceGraphic" surfaceScale="10" diffuseConstant="1" lighting-color="currentColor">
91 <feDistantLight azimuth="0" elevation="180"/>
92 </feDiffuseLighting>
93 </filter>
94 <filter id="distantLightRight">
95 <feDiffuseLighting in="SourceGraphic" surfaceScale="10" diffuseConstant="1" lighting-color="currentColor">
96 <feDistantLight azimuth="0" elevation="0"/>
97 </feDiffuseLighting>
98 </filter>
99
100 <filter id="specularLightUp">
101 <feSpecularLighting in="SourceGraphic" surfaceScale="10" specularConstant="1" specularExponent="1" lighting-color="currentColor">
102 <feDistantLight azimuth="0" elevation="90"/>
103 </feSpecularLighting>
104 </filter>
105 <filter id="specularLightDown">
106 <feSpecularLighting in="SourceGraphic" surfaceScale="10" specularConstant="1" specularExponent="1" lighting-color="currentColor">
107 <feDistantLight azimuth="0" elevation="270"/>
108 </feSpecularLighting>
109 </filter>
110 <filter id="specularLightLeft">
111 <feSpecularLighting in="SourceGraphic" surfaceScale="10" specularConstant="1" specularExponent="1" lighting-color="currentColor">
112 <feDistantLight azimuth="0" elevation="180"/>
113 </feSpecularLighting>
114 </filter>
115 <filter id="specularLightRight">
116 <feSpecularLighting in="SourceGraphic" surfaceScale="10" specularConstant="1" specularExponent="1" lighting-color="currentColor">
117 <feDistantLight azimuth="0" elevation="0"/>
118 </feSpecularLighting>
119 </filter>
120
121 <filter id="combinedUp">
122 <feDiffuseLighting in="SourceGraphic" surfaceScale="10" diffuseConstant="1" lighting-color="currentColor" result="res_a">
123 <feDistantLight azimuth="0" elevation="90"/>
124 </feDiffuseLighting>
125 <feSpecularLighting in="SourceGraphic" surfaceScale="10" specularConstant="1" specularExponent="1" lighting-color="currentColor" result="res_b">
126 <feDistantLight azimuth="0" elevation="90"/>
127 </feSpecularLighting>
128 <feMerge>
129 <feMergeNode in="res_a"/>
130 <feMergeNode in="res_b"/>
131 </feMerge>
132 </filter>
133 <filter id="combinedDown">
134 <feDiffuseLighting in="SourceGraphic" surfaceScale="10" diffuseConstant="1" lighting-color="currentColor" result="res_a">
135 <feDistantLight azimuth="0" elevation="270"/>
136 </feDiffuseLighting>
137 <feSpecularLighting in="SourceGraphic" surfaceScale="10" specularConstant="1" specularExponent="1" lighting-color="currentColor" result="res_b">
138 <feDistantLight azimuth="0" elevation="270"/>
139 </feSpecularLighting>
140 <feMerge>
141 <feMergeNode in="res_a"/>
142 <feMergeNode in="res_b"/>
143 </feMerge>
144 </filter>
145 <filter id="combinedLeft">
146 <feDiffuseLighting in="SourceGraphic" surfaceScale="10" diffuseConstant="1" lighting-color="currentColor" result="res_a">
147 <feDistantLight azimuth="0" elevation="180"/>
148 </feDiffuseLighting>
149 <feSpecularLighting in="SourceGraphic" surfaceScale="10" specularConstant="1" specularExponent="1" lighting-color="currentColor" result="res_b">
150 <feDistantLight azimuth="0" elevation="180"/>
151 </feSpecularLighting>
152 <feMerge>
153 <feMergeNode in="res_a"/>
154 <feMergeNode in="res_b"/>
155 </feMerge>
156 </filter>
157 <filter id="combinedRight">
158 <feDiffuseLighting in="SourceGraphic" surfaceScale="10" diffuseConstant="1" lighting-color="currentColor" result="res_a">
159 <feDistantLight azimuth="0" elevation="0"/>
160 </feDiffuseLighting>
161 <feSpecularLighting in="SourceGraphic" surfaceScale="10" specularConstant="1" specularExponent="1" lighting-color="currentColor" result="res_b">
162 <feDistantLight azimuth="0" elevation="0"/>
163 </feSpecularLighting>
164 <feMerge>
165 <feMergeNode in="res_a"/>
166 <feMergeNode in="res_b"/>
167 </feMerge>
168 </filter>
169 </defs>
170
171 <text x="70" y="40" stroke="none" fill="black">feDiffuseLight using feDistantLight source</text>
172 <g transform="scale(1.5) translate(5 45)">
173 <circle id="c1" r="10" fill="red" filter="url(#distantLightUp)" transform="translate(20 0)"/>
174 <circle id="c2" r="10" fill="red" filter="url(#distantLightDown)" transform="translate(50 0)"/>
175 <circle id="c3" r="10" fill="red" filter="url(#distantLightLeft)" transform="translate(80 0)"/>
176 <circle id="c4" r="10" fill="red" filter="url(#distantLightRight)" transform="translate(110 0)"/>
177 </g>
178 <text x="20" y="100" font-size="10" stroke="none" fill="black">90 deg</text>
179 <text x="65" y="100" font-size="10" stroke="none" fill="black">270 deg</text>
180 <text x="110" y="100" font-size="10" stroke="none" fill="black">180 deg</text>
181 <text x="160" y="100" font-size="10" stroke="none" fill="black">0 deg</text>
182
183 <text x="70" y="135" stroke="none" fill="black">feSpecularLight using feDistantLight source</text>
184 <g transform="scale(1.5) translate(5 110)">
185 <circle id="c1" r="10" fill="red" filter="url(#specularLightUp)" transform="translate(20 0)"/>
186 <circle id="c2" r="10" fill="red" filter="url(#specularLightDown)" transform="translate(50 0)"/>
187 <circle id="c3" r="10" fill="red" filter="url(#specularLightLeft)" transform="translate(80 0)"/>
188 <circle id="c4" r="10" fill="red" filter="url(#specularLightRight)" transform="translate(110 0)"/>
189 </g>
190 <text x="20" y="195" font-size="10" stroke="none" fill="black">90 deg</text>
191 <text x="65" y="195" font-size="10" stroke="none" fill="black">270 deg</text>
192 <text x="110" y="195" font-size="10" stroke="none" fill="black">180 deg</text>
193 <text x="160" y="195" font-size="10" stroke="none" fill="black">0 deg</text>
194
195 <text x="30" y="230" stroke="none" fill="black">feDiffuseLight and feSpecularLight using feDistantLight</text>
196 <g transform="scale(1.5) translate(5 170)">
197 <circle id="c1" r="10" fill="red" filter="url(#combinedUp)" transform="translate(20 0)"/>
198 <circle id="c2" r="10" fill="red" filter="url(#combinedDown)" transform="translate(50 0)"/>
199 <circle id="c3" r="10" fill="red" filter="url(#combinedLeft)" transform="translate(80 0)"/>
200 <circle id="c4" r="10" fill="red" filter="url(#combinedRight)" transform="translate(110 0)"/>
201 </g>
202 <text x="20" y="290" font-size="10" stroke="none" fill="black">90 deg</text>
203 <text x="65" y="290" font-size="10" stroke="none" fill="black">270 deg</text>
204 <text x="110" y="290" font-size="10" stroke="none" fill="black">180 deg</text>
205 <text x="160" y="290" font-size="10" stroke="none" fill="black">0 deg</text>
206
207 <g transform="translate(0, 55)">
208 <image xlink:href="../images/bumpMap3.png" x="240" y="0" width="40" height="30" filter="url(#distantLightUp)"/>
209 <image xlink:href="../images/bumpMap3.png" x="300" y="0" width="40" height="30" filter="url(#distantLightDown)"/>
210 <image xlink:href="../images/bumpMap3.png" x="360" y="0" width="40" height="30" filter="url(#distantLightLeft)"/>
211 <image xlink:href="../images/bumpMap3.png" x="420" y="0" width="40" height="30" filter="url(#distantLightRight)"/>
212 </g>
213 <text x="245" y="100" font-size="10" stroke="none" fill="black">90 deg</text>
214 <text x="305" y="100" font-size="10" stroke="none" fill="black">270 deg</text>
215 <text x="365" y="100" font-size="10" stroke="none" fill="black">180 deg</text>
216 <text x="430" y="100" font-size="10" stroke="none" fill="black">0 deg</text>
217
218 <g transform="translate(0, 150)">
219 <image xlink:href="../images/bumpMap3.png" x="240" y="0" width="40" height="30" filter="url(#specularLightUp)"/>
220 <image xlink:href="../images/bumpMap3.png" x="300" y="0" width="40" height="30" filter="url(#specularLightDown)"/>
221 <image xlink:href="../images/bumpMap3.png" x="360" y="0" width="40" height="30" filter="url(#specularLightLeft)"/>
222 <image xlink:href="../images/bumpMap3.png" x="420" y="0" width="40" height="30" filter="url(#specularLightRight)"/>
223 </g>
224 <text x="245" y="195" font-size="10" stroke="none" fill="black">90 deg</text>
225 <text x="305" y="195" font-size="10" stroke="none" fill="black">270 deg</text>
226 <text x="365" y="195" font-size="10" stroke="none" fill="black">180 deg</text>
227 <text x="430" y="195" font-size="10" stroke="none" fill="black">0 deg</text>
228
229 <g transform="translate(0, 240)">
230 <image xlink:href="../images/bumpMap3.png" x="240" y="0" width="40" height="30" filter="url(#combinedUp)"/>
231 <image xlink:href="../images/bumpMap3.png" x="300" y="0" width="40" height="30" filter="url(#combinedDown)"/>
232 <image xlink:href="../images/bumpMap3.png" x="360" y="0" width="40" height="30" filter="url(#combinedLeft)"/>
233 <image xlink:href="../images/bumpMap3.png" x="420" y="0" width="40" height="30" filter="url(#combinedRight)"/>
234 </g>
235 <text x="245" y="290" font-size="10" stroke="none" fill="black">90 deg</text>
236 <text x="305" y="290" font-size="10" stroke="none" fill="black">270 deg</text>
237 <text x="365" y="290" font-size="10" stroke="none" fill="black">180 deg</text>
238 <text x="430" y="290" font-size="10" stroke="none" fill="black">0 deg</text>
239
240 </g>
241 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
242 <text id="revision" x="10" y="340" stroke="none"
243 fill="black">$Revision: 1.3 $</text>
244 </g>
245 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
246 <!-- comment out this watermark once the test is approved -->
247 <g id="draft-watermark">
248 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
249 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
250 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
251 </g>
252 </svg>