Debian Codegraph @

samples/tests/spec/filters/feConvolveMatrix.svg

raw
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
5 <!--
6
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21
22 -->
23 <!-- ========================================================================= -->
24 <!-- Test description here -->
25 <!-- -->
26 <!-- @author [email protected] -->
27 <!-- @version $Id $ -->
28 <!-- ========================================================================= -->
29
30 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
31
32 <svg xmlns="http://www.w3.org/2000/svg"
33 xmlns:xlink="http://www.w3.org/1999/xlink"
34 id="body" width="450" height="500" viewBox="0 0 450 500">
35
36 <title>feMerge Test</title>
37
38 <!-- ============================================================= -->
39 <!-- Test content -->
40 <!-- ============================================================= -->
41 <g id="testContent">
42
43 <text x="225" y="40" class="title">
44 feConvolveMatrix Text
45 </text>
46
47 <defs>
48
49
50 <filter id="conv-rep-tr" x="0" y="0" width="1" height="1">
51 <feConvolveMatrix order="11 11"
52 kernelMatrix="0 0 0 0 0 0 0 0 0 0 0
53 0 0 0 0 0 0 0 0 0 0 0
54 0 0 0 0 0 0 0 0 0 0 0
55 0 0 0 0 0 0 0 0 0 0 0
56 0 0 0 0 0 0 0 0 0 0 0
57 0 0 0 0 0 0 0 0 0 0 0
58 0 0 0 0 0 0 0 0 0 0 0
59 0 0 0 0 0 0 0 0 0 0 0
60 0 0 0 0 0 0 0 0 0 0 0
61 0 0 0 0 0 0 0 0 0 0 0
62 1 0 0 0 0 0 0 0 0 0 0"
63 edgeMode="duplicate" />
64 </filter>
65
66 <filter id="conv-centX" x="0" y="0" width="1" height="1">
67 <feConvolveMatrix order="11 11"
68 kernelMatrix="0 0 0 0 0 0 0 0 0 0 0
69 0 0 0 0 0 0 0 0 0 0 0
70 0 0 0 0 0 0 0 0 0 0 0
71 0 0 0 0 0 0 0 0 0 0 0
72 0 0 0 0 0 0 0 0 0 0 0
73 0 0 0 0 0 0 0 0 0 0 0
74 0 0 0 0 0 0 0 0 0 0 0
75 0 0 0 0 0 0 0 0 0 0 0
76 0 0 0 0 0 0 0 0 0 0 0
77 0 0 0 0 0 0 0 0 0 0 0
78 10 0 0 0 0 0 0 0 0 0 0"
79 targetX="10"
80 edgeMode="duplicate" />
81 </filter>
82
83 <filter id="conv-centY" x="0" y="0" width="1" height="1">
84 <feConvolveMatrix order="11 11"
85 kernelMatrix="0 0 0 0 0 0 0 0 0 0 0
86 0 0 0 0 0 0 0 0 0 0 0
87 0 0 0 0 0 0 0 0 0 0 0
88 0 0 0 0 0 0 0 0 0 0 0
89 0 0 0 0 0 0 0 0 0 0 0
90 0 0 0 0 0 0 0 0 0 0 0
91 0 0 0 0 0 0 0 0 0 0 0
92 0 0 0 0 0 0 0 0 0 0 0
93 0 0 0 0 0 0 0 0 0 0 0
94 0 0 0 0 0 0 0 0 0 0 0
95 10 0 0 0 0 0 0 0 0 0 0"
96 targetY="0"
97 edgeMode="duplicate" />
98 </filter>
99
100 <filter id="conv-rep-bl" x="0" y="0" width="1" height="1">
101 <feConvolveMatrix order="11 11"
102 kernelMatrix="0 0 0 0 0 0 0 0 0 0 1
103 0 0 0 0 0 0 0 0 0 0 0
104 0 0 0 0 0 0 0 0 0 0 0
105 0 0 0 0 0 0 0 0 0 0 0
106 0 0 0 0 0 0 0 0 0 0 0
107 0 0 0 0 0 0 0 0 0 0 0
108 0 0 0 0 0 0 0 0 0 0 0
109 0 0 0 0 0 0 0 0 0 0 0
110 0 0 0 0 0 0 0 0 0 0 0
111 0 0 0 0 0 0 0 0 0 0 0
112 0 0 0 0 0 0 0 0 0 0 0"
113 edgeMode="duplicate" />
114 </filter>
115
116 <filter id="conv-rep-br" x="0" y="0" width="1" height="1">
117 <feConvolveMatrix order="11 11"
118 kernelMatrix="1 0 0 0 0 0 0 0 0 0 0
119 0 0 0 0 0 0 0 0 0 0 0
120 0 0 0 0 0 0 0 0 0 0 0
121 0 0 0 0 0 0 0 0 0 0 0
122 0 0 0 0 0 0 0 0 0 0 0
123 0 0 0 0 0 0 0 0 0 0 0
124 0 0 0 0 0 0 0 0 0 0 0
125 0 0 0 0 0 0 0 0 0 0 0
126 0 0 0 0 0 0 0 0 0 0 0
127 0 0 0 0 0 0 0 0 0 0 0
128 0 0 0 0 0 0 0 0 0 0 0"
129 edgeMode="duplicate" />
130 </filter>
131
132 <filter id="conv-rep-tl" x="0" y="0" width="1" height="1">
133 <feConvolveMatrix order="11 11"
134 kernelMatrix="0 0 0 0 0 0 0 0 0 0 0
135 0 0 0 0 0 0 0 0 0 0 0
136 0 0 0 0 0 0 0 0 0 0 0
137 0 0 0 0 0 0 0 0 0 0 0
138 0 0 0 0 0 0 0 0 0 0 0
139 0 0 0 0 0 0 0 0 0 0 0
140 0 0 0 0 0 0 0 0 0 0 0
141 0 0 0 0 0 0 0 0 0 0 0
142 0 0 0 0 0 0 0 0 0 0 0
143 0 0 0 0 0 0 0 0 0 0 0
144 0 0 0 0 0 0 0 0 0 0 1"
145 edgeMode="duplicate" />
146 </filter>
147
148 <filter id="conv-none-tr" x="0" y="0" width="1" height="1">
149 <feConvolveMatrix order="11 11"
150 kernelMatrix="0 0 0 0 0 0 0 0 0 0 0
151 0 0 0 0 0 0 0 0 0 0 0
152 0 0 0 0 0 0 0 0 0 0 0
153 0 0 0 0 0 0 0 0 0 0 0
154 0 0 0 0 0 0 0 0 0 0 0
155 0 0 0 0 0 0 0 0 0 0 0
156 0 0 0 0 0 0 0 0 0 0 0
157 0 0 0 0 0 0 0 0 0 0 0
158 0 0 0 0 0 0 0 0 0 0 0
159 0 0 0 0 0 0 0 0 0 0 0
160 1 0 0 0 0 0 0 0 0 0 0"
161 edgeMode="none" />
162 </filter>
163
164 <filter id="conv-none-bl" x="0" y="0" width="1" height="1">
165 <feConvolveMatrix order="11 11"
166 kernelMatrix="0 0 0 0 0 0 0 0 0 0 1
167 0 0 0 0 0 0 0 0 0 0 0
168 0 0 0 0 0 0 0 0 0 0 0
169 0 0 0 0 0 0 0 0 0 0 0
170 0 0 0 0 0 0 0 0 0 0 0
171 0 0 0 0 0 0 0 0 0 0 0
172 0 0 0 0 0 0 0 0 0 0 0
173 0 0 0 0 0 0 0 0 0 0 0
174 0 0 0 0 0 0 0 0 0 0 0
175 0 0 0 0 0 0 0 0 0 0 0
176 0 0 0 0 0 0 0 0 0 0 0"
177 kernelUnitLength="4"
178 edgeMode="none" />
179 </filter>
180
181 <filter id="conv-alpha" x="0" y="0" width="1" height="1">
182 <feConvolveMatrix order="11 11"
183 kernelMatrix="0 0 0 0 0 0 0 0 0 0 1
184 0 0 0 0 0 0 0 0 0 0 0
185 0 0 0 0 0 0 0 0 0 0 0
186 0 0 0 0 0 0 0 0 0 0 0
187 0 0 0 0 0 0 0 0 0 0 0
188 0 0 0 0 0 0 0 0 0 0 0
189 0 0 0 0 0 0 0 0 0 0 0
190 0 0 0 0 0 0 0 0 0 0 0
191 0 0 0 0 0 0 0 0 0 0 0
192 0 0 0 0 0 0 0 0 0 0 0
193 0 0 0 0 0 0 0 0 0 0 0"
194 edgeMode="none"
195 preserveAlpha="true"/>
196 </filter>
197
198 <linearGradient id="grad" y2="100%">
199 <stop offset="0%" style="stop-color:#FF0" />
200 <stop offset="100%" style="stop-color:#F00" />
201 </linearGradient>
202
203 <g id="simple_content">
204 <circle id="Circle1" cx="40" cy="65" r="25"
205 style="fill:yellowGreen" />
206
207 <circle id="Circle2" cx="80" cy="55" r="25" style="fill:darkBlue" />
208
209 <rect id="Rect1" x="40" y="35" width="30" height="70"
210 rx="15" ry="15"
211 style="fill:dodgerBlue" />
212
213 <rect id="Rect2" x="60" y="15" width="30" height="70"
214 rx="10" ry="10"
215 style="fill:Green" />
216 </g>
217
218 <g id="content">
219 <rect x="15" y="15" width="90" height="90"
220 style="fill:url(#grad)" />
221 <use xlink:href="#simple_content" />
222 </g>
223
224 </defs>
225
226 <g transform="translate(0 40)" class="legend">
227
228 <!-- ============================================== -->
229 <!-- Convolve_Matrix_1_* -->
230 <!-- ============================================== -->
231 <g transform="translate(0 20)" class="row1" >
232 <g transform="translate(20,0)" >
233 <g style="filter:url(#conv-rep-tr)">
234 <use xlink:href="#content" />
235 </g>
236
237 <text transform="translate(60, 130)"
238 x="0" y="0" style="text-anchor:middle">
239 1.1 Replicate Top &amp; Right
240 </text>
241 </g>
242
243 <g transform="translate(160,0)" >
244 <g style="filter:url(#conv-centX)">
245 <use xlink:href="#content" />
246 </g>
247
248 <text transform="translate(60, 118)"
249 x="0" y="0" style="text-anchor:middle">
250 1.2 Replicate Top, targetX
251 </text>
252 </g>
253
254 <g transform="translate(300,0)" >
255 <g style="filter:url(#conv-centY)">
256 <use xlink:href="#content" />
257 </g>
258
259 <text transform="translate(60, 130)"
260 x="0" y="0" style="text-anchor:middle">
261 1.3 Replicate Right, targetY, norm
262 </text>
263 </g>
264 </g> <!-- end row1 -->
265
266 <!-- ============================================== -->
267 <!-- Convolve_Matrix_2_* -->
268 <!-- ============================================== -->
269 <g transform="translate(0 160)" class="row2" >
270 <g transform="translate(20,0)" >
271 <g style="filter:url(#conv-rep-bl)">
272 <use xlink:href="#content" />
273 </g>
274
275 <text transform="translate(60, 130)"
276 x="0" y="0" style="text-anchor:middle">
277 3.1 Rep Bottom &amp; Left
278 </text>
279 </g>
280
281 <g transform="translate(160,0)" >
282 <g style="filter:url(#conv-rep-br)">
283 <use xlink:href="#content" />
284 </g>
285
286 <text transform="translate(60, 130)"
287 x="0" y="0" style="text-anchor:middle">
288 3.2 Rep Bottom &amp; Right
289 </text>
290 </g>
291
292 <g transform="translate(300,0)" >
293 <g style="filter:url(#conv-rep-tl)">
294 <use xlink:href="#content" />
295 </g>
296
297 <text transform="translate(60, 130)"
298 x="0" y="0" style="text-anchor:middle">
299 3.3 Rep Top &amp; Left
300 </text>
301 </g>
302 </g> <!-- end row2 -->
303
304 <!-- ============================================== -->
305 <!-- Convolve_Matrix_3_* -->
306 <!-- ============================================== -->
307 <g transform="translate(0 300)" class="row3" >
308 <g transform="translate(20,0)" >
309 <g style="filter:url(#conv-alpha)">
310 <use xlink:href="#simple_content" />
311 </g>
312
313 <text transform="translate(60, 130)"
314 x="0" y="0" style="text-anchor:middle">
315 3.2 None PreserveAlpha B&amp;L
316 </text>
317 </g>
318 <g transform="translate(160,0)" >
319 <g style="filter:url(#conv-none-tr)">
320 <use xlink:href="#content" />
321 </g>
322
323 <text transform="translate(60, 130)"
324 x="0" y="0" style="text-anchor:middle">
325 3.2 None Top &amp; Right
326 </text>
327 </g>
328
329 <g transform="translate(300,0)" >
330 <g style="filter:url(#conv-none-bl)">
331 <use xlink:href="#content" />
332 </g>
333
334 <text transform="translate(60, 130)"
335 x="0" y="0" style="text-anchor:middle">
336 3.3 None Bottom &amp; Left
337 </text>
338 </g>
339
340 </g> <!-- end row3-->
341
342 </g> <!-- end legend -->
343
344 </g> <!-- end test content -->
345
346 <!-- ============================================================= -->
347 <!-- Batik sample mark -->
348 <!-- ============================================================= -->
349 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
350
351 </svg>