Debian Codegraph @

samples/tests/resources/svg/defs.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="../style/subdir/useStylesheet.css" ?>
31
32 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="450" height="500" viewBox="0 0 450 500">
33
34 <text x="225" y="50" class="title">Not a test - only contains definitions</text>
35
36 <defs>
37
38 <!-- ###################################################################### -->
39 <!-- used by externalPaints.svg -->
40 <!-- ###################################################################### -->
41 <linearGradient id="linearSimpleReference" x1=".5" y1="0" x2=".5" y2="1">
42 <stop style="stop-color:blue" offset="0" />
43 <stop style="stop-color:white" offset=".5" />
44 <stop style="stop-color:gold" offset=".51" />
45 <stop style="stop-color:crimson" offset="1" />
46 </linearGradient>
47
48 <radialGradient id="radialSimpleReference" fx=".2" fy=".2">
49 <stop style="stop-color:white" offset="0" />
50 <stop style="stop-color:gold" offset=".2" />
51 <stop style="stop-color:orange" offset="1" />
52 </radialGradient>
53
54 <pattern id="patternSimpleReference"
55 x="0" y="0" width="10" height="10" viewBox="0 0 10 10"
56 patternContentUnits="userSpaceOnUse" patternUnits="userSpaceOnUse">
57 <rect x="0" y="0" width="5" height="5" style="fill:crimson" />
58 <rect x="5" y="0" width="5" height="5" style="fill:orange" />
59 <rect x="0" y="5" width="5" height="5" style="fill:gold" />
60 <rect x="5" y="5" width="5" height="5" style="fill:white" />
61 </pattern>
62
63 <!-- ###################################################################### -->
64 <linearGradient id="linearDoubleReference" x1="0" y1=".5" x2="1" y2=".5"
65 xlink:href="#linearSimpleReference" />
66
67 <radialGradient id="radialDoubleReference" fx=".8" fy=".8"
68 xlink:href="#radialSimpleReference" />
69
70 <pattern id="patternDoubleReference"
71 x="0" y="0" width="10" height="10" viewBox="0 0 20 20"
72 patternContentUnits="userSpaceOnUse" patternUnits="userSpaceOnUse"
73 xlink:href="#patternSimpleReference" />
74
75 <!-- ###################################################################### -->
76 <linearGradient id="linearExtReference" x1="0" y1="0" x2="1" y2="1"
77 xlink:href="defs2.svg#linear" />
78
79 <radialGradient id="radialExtReference" fx=".2" fy=".8"
80 xlink:href="defs2.svg#radial" />
81
82 <pattern id="patternExtReference"
83 x="0" y="0" width="10" height="10" viewBox="0 0 10 10"
84 patternContentUnits="userSpaceOnUse" patternUnits="userSpaceOnUse"
85 patternTransform="rotate(45)"
86 xlink:href="defs2.svg#pattern" />
87
88 <!-- ###################################################################### -->
89 <!-- useStyling.svg -->
90 <!-- ###################################################################### -->
91
92 <radialGradient id="extGrad1">
93 <stop style="stop-color:gold" offset="0" />
94 <stop style="stop-color:crimson" offset="1" />
95 </radialGradient>
96
97 <radialGradient id="extGrad2">
98 <stop style="stop-color:white" offset="0" />
99 <stop style="stop-color:black" offset="1" />
100 </radialGradient>
101
102 <radialGradient id="extGrad3">
103 <stop style="stop-color:gold" offset="0" />
104 <stop style="stop-color:green" offset="1" />
105 </radialGradient>
106
107 <g>
108 <circle id="extE" cx="25" cy="25" r="20" />
109
110 <circle id="extE1" cx="25" cy="25" r="20" style="fill:url(#extGrad1)" />
111
112 <circle id="extE2" cx="25" cy="25" r="20" style="fill:url(../../spec/structure/useStylingURI.svg#grad1)" />
113 </g>
114
115
116 <!-- ###################################################################### -->
117 <!-- externalUseCascading.svg -->
118 <!-- ###################################################################### -->
119
120 <g id="tree1">
121 <!-- ### decoration ### -->
122 <line x1="100" y1="0" x2="0" y2="75" style="stroke:black; fill:none" />
123 <line x1="100" y1="0" x2="100" y2="75" style="stroke:black; fill:none" />
124 <line x1="100" y1="0" x2="200" y2="75" style="stroke:black; fill:none" />
125 <circle cx="100" cy="0" r="25" style="fill:#eee;" />
126 <text x="100" y="6" style="fill:black; text-anchor:middle; font-size:18">&lt;g></text>
127
128 <!-- ### color inherited inside this document ###-->
129 <g style="fill:orange">
130 <circle cx="0" cy="75" r="25" />
131 <text x="0" y="115" style="text-anchor:middle; fill:black; stroke:none;">local</text>
132 </g>
133
134 <!-- ### color inherited from the use element ###-->
135 <g>
136 <circle cx="100" cy="75" r="25" />
137 <text x="100" y="115" style="text-anchor:middle; fill:black; stroke:none;">inherited</text>
138 </g>
139
140 <!-- ### color defined on the circle ###-->
141 <g>
142 <circle cx="200" cy="75" r="25" style="fill:gold"/>
143 <text x="200" y="115" style="text-anchor:middle; fill:black; stroke:none;">explicit</text>
144 </g>
145 </g>
146
147 <g id="tree2">
148 <!-- ### decoration ### -->
149 <line x1="100" y1="0" x2="0" y2="75" style="stroke:black; fill:none" />
150 <line x1="100" y1="0" x2="100" y2="75" style="stroke:black; fill:none" />
151 <line x1="100" y1="0" x2="200" y2="75" style="stroke:black; fill:none" />
152 <circle cx="100" cy="0" r="25" style="fill:#eee;" />
153 <text x="100" y="6" style="fill:black; text-anchor:middle; font-size:18">&lt;g></text>
154
155 <!-- ### gradient inherited inside this document ###-->
156 <g style="fill:url(#extGrad3)">
157 <circle cx="0" cy="75" r="25" />
158 <text x="0" y="115" style="text-anchor:middle; fill:black; stroke:none;">local</text>
159 </g>
160
161 <!-- ### gradient inherited from the use element ###-->
162 <g>
163 <circle cx="100" cy="75" r="25" />
164 <text x="100" y="115" style="text-anchor:middle; fill:black; stroke:none;">inherited</text>
165 </g>
166
167 <!-- ### pattern defined on the circle ###-->
168 <g>
169 <circle cx="200" cy="75" r="25" style="fill:url(#patternExtReference)"/>
170 <text x="200" y="115" style="text-anchor:middle; fill:black; stroke:none;">explicit</text>
171 </g>
172 </g>
173
174 <!-- ###################################################################### -->
175 <!-- useTargets.svg -->
176 <!-- ###################################################################### -->
177
178 <symbol id="extSymbol" viewBox="-50 -50 100 100" style="stroke:crimson; stroke-width:4">
179 <rect x="-50" y="-50" width="100%" height="100%" style="fill:gold; stroke:none"/>
180 <circle cx="0" cy="0" r="25%"/>
181 </symbol>
182
183 <svg id="extSvg" width="50" height="50" viewBox="-50 -50 100 100" style="stroke:crimson; stroke-width:4">
184 <rect x="-50" y="-50" width="100%" height="100%" style="fill:gold; stroke:none"/>
185 <circle cx="0" cy="0" r="25%"/>
186 </svg>
187
188 <g id="extOther" style="stroke:crimson; stroke-width:4">
189 <rect x="-50" y="-50" width="100" height="100" style="fill:gold; stroke:none"/>
190 <circle cx="0" cy="0" r="25"/>
191 </g>
192
193
194 <!-- ###################################################################### -->
195 <!-- useMultiple.svg -->
196 <!-- ###################################################################### -->
197
198 <rect id="extR1" x="0" y="0" width="80" height="80" />
199
200 <g id="u21" style="fill:orange">
201 <rect x="0" y="0" width="80" height="80" fill="crimson" />
202 <use xlink:href="#extR1" x="20" y="20" width="80" height="80" />
203 <use xlink:href="#extR1" x="40" y="40" width="80" height="80" style="fill:gold" />
204 </g>
205
206 <g id="u22" style="fill:orange">
207 <rect x="0" y="0" width="80" height="80" fill="crimson" />
208 <use xlink:href="../../spec/structure/useMultiple.svg#r1" x="20" y="20" width="80" height="80" />
209 <use xlink:href="../../spec/structure/useMultiple.svg#r1" x="40" y="40" width="80" height="80" style="fill:gold" />
210 </g>
211
212 <!-- ###################################################################### -->
213 <!-- useMultipleURI.svg -->
214 <!-- ###################################################################### -->
215
216 <linearGradient id="extOrange">
217 <stop style="stop-color:orange" offset="0" />
218 <stop style="stop-color:white" offset="1" />
219 </linearGradient>
220
221 <linearGradient id="extCrimson">
222 <stop style="stop-color:crimson" offset="0" />
223 <stop style="stop-color:white" offset="1" />
224 </linearGradient>
225
226 <linearGradient id="extGold">
227 <stop style="stop-color:gold" offset="0" />
228 <stop style="stop-color:white" offset="1" />
229 </linearGradient>
230
231 <rect id="extRR1" x="0" y="0" width="80" height="80" />
232
233 <g id="uu21" style="fill:url(#extOrange)">
234 <rect x="0" y="0" width="80" height="80" fill="url(#extCrimson)" />
235 <use xlink:href="#extRR1" x="20" y="20" width="80" height="80" />
236 <use xlink:href="#extRR1" x="40" y="40" width="80" height="80"
237 style="fill:url(../../spec/structure/useMultipleURI.svg#gold)" />
238 </g>
239
240 <g id="uu22" style="fill:url(#extOrange)">
241 <rect x="0" y="0" width="80" height="80" fill="url(#extCrimson)" />
242 <use xlink:href="../../spec/structure/useMultipleURI.svg#r1" x="20" y="20" width="80" height="80" />
243 <use xlink:href="../../spec/structure/useMultipleURI.svg#r1" x="40" y="40" width="80" height="80"
244 style="fill:url(../../spec/structure/useMultipleURI.svg#gold)" />
245 </g>
246
247 <!-- ###################################################################### -->
248 <!-- useStyling.svg -->
249 <!-- ###################################################################### -->
250
251 <style type="text/css"><![CDATA[
252
253 .gradClass {
254 fill: url(#extGrad3);
255 }
256
257 .pattClass {
258 fill: url(#patternExtReference);
259 }
260
261 .colorClass {
262 fill: gold;
263 }
264
265 .colorOrange {
266 fill: orange;
267 }
268
269 ]]></style>
270
271 <g id="tree3">
272 <!-- ### decoration ### -->
273 <line x1="100" y1="0" x2="0" y2="75" style="stroke:black; fill:none" />
274 <line x1="100" y1="0" x2="100" y2="75" style="stroke:black; fill:none" />
275 <line x1="100" y1="0" x2="200" y2="75" style="stroke:black; fill:none" />
276 <circle cx="100" cy="0" r="25" style="fill:#eee;" />
277 <text x="100" y="6" style="fill:black; text-anchor:middle; font-size:18">&lt;g></text>
278
279 <!-- ### color inherited inside this document ###-->
280 <g class="colorOrange">
281 <circle cx="0" cy="75" r="25" />
282 <text x="0" y="115" style="text-anchor:middle; fill:black; stroke:none;">local</text>
283 </g>
284
285 <!-- ### color inherited from the use element ###-->
286 <g>
287 <circle cx="100" cy="75" r="25" />
288 <text x="100" y="115" style="text-anchor:middle; fill:black; stroke:none;">inherited</text>
289 </g>
290
291 <!-- ### color defined on the circle ###-->
292 <g>
293 <circle cx="200" cy="75" r="25" class="colorClass"/>
294 <text x="200" y="115" style="text-anchor:middle; fill:black; stroke:none;">explicit</text>
295 </g>
296 </g>
297
298 <g id="tree4">
299 <!-- ### decoration ### -->
300 <line x1="100" y1="0" x2="0" y2="75" style="stroke:black; fill:none" />
301 <line x1="100" y1="0" x2="100" y2="75" style="stroke:black; fill:none" />
302 <line x1="100" y1="0" x2="200" y2="75" style="stroke:black; fill:none" />
303 <circle cx="100" cy="0" r="25" style="fill:#eee;" />
304 <text x="100" y="6" style="fill:black; text-anchor:middle; font-size:18">&lt;g></text>
305
306 <!-- ### gradient inherited inside this document ###-->
307 <g class="gradClass">
308 <circle cx="0" cy="75" r="25" />
309 <text x="0" y="115" style="text-anchor:middle; fill:black; stroke:none;">local</text>
310 </g>
311
312 <!-- ### gradient inherited from the use element ###-->
313 <g>
314 <circle cx="100" cy="75" r="25" />
315 <text x="100" y="115" style="text-anchor:middle; fill:black; stroke:none;">inherited</text>
316 </g>
317
318 <!-- ### pattern defined on the circle ###-->
319 <g>
320 <circle cx="200" cy="75" r="25" class="pattClass" />
321 <text x="200" y="115" style="text-anchor:middle; fill:black; stroke:none;">explicit</text>
322 </g>
323 </g>
324
325
326 <!-- ###################################################################### -->
327 <!-- useStylesheet.svg -->
328 <!-- ###################################################################### -->
329
330 <g id="tree5">
331 <!-- ### decoration ### -->
332 <line x1="100" y1="0" x2="0" y2="75" style="stroke:black; fill:none" />
333 <line x1="100" y1="0" x2="100" y2="75" style="stroke:black; fill:none" />
334 <line x1="100" y1="0" x2="200" y2="75" style="stroke:black; fill:none" />
335 <circle cx="100" cy="0" r="25" style="fill:#eee;" />
336 <text x="100" y="6" style="fill:black; text-anchor:middle; font-size:18">&lt;g></text>
337
338 <!-- ### color inherited inside this document ###-->
339 <g class="colorOrangeStylesheet">
340 <circle cx="0" cy="75" r="25" />
341 <text x="0" y="115" style="text-anchor:middle; fill:black; stroke:none;">local</text>
342 </g>
343
344 <!-- ### color inherited from the use element ###-->
345 <g>
346 <circle cx="100" cy="75" r="25" />
347 <text x="100" y="115" style="text-anchor:middle; fill:black; stroke:none;">inherited</text>
348 </g>
349
350 <!-- ### color defined on the circle ###-->
351 <g>
352 <circle cx="200" cy="75" r="25" class="colorClassStylesheet"/>
353 <text x="200" y="115" style="text-anchor:middle; fill:black; stroke:none;">explicit</text>
354 </g>
355 </g>
356
357 <g id="tree6">
358 <!-- ### decoration ### -->
359 <line x1="100" y1="0" x2="0" y2="75" style="stroke:black; fill:none" />
360 <line x1="100" y1="0" x2="100" y2="75" style="stroke:black; fill:none" />
361 <line x1="100" y1="0" x2="200" y2="75" style="stroke:black; fill:none" />
362 <circle cx="100" cy="0" r="25" style="fill:#eee;" />
363 <text x="100" y="6" style="fill:black; text-anchor:middle; font-size:18">&lt;g></text>
364
365 <!-- ### gradient inherited inside this document ###-->
366 <g class="gradClassStylesheet">
367 <circle cx="0" cy="75" r="25" />
368 <text x="0" y="115" style="text-anchor:middle; fill:black; stroke:none;">local</text>
369 </g>
370
371 <!-- ### gradient inherited from the use element ###-->
372 <g>
373 <circle cx="100" cy="75" r="25" />
374 <text x="100" y="115" style="text-anchor:middle; fill:black; stroke:none;">inherited</text>
375 </g>
376
377 <!-- ### pattern defined on the circle ###-->
378 <g>
379 <circle cx="200" cy="75" r="25" class="pattClassStylesheet" />
380 <text x="200" y="115" style="text-anchor:middle; fill:black; stroke:none;">explicit</text>
381 </g>
382 </g>
383
384
385 <!-- ###################################################################### -->
386 <!-- xmlBaseStyling.svg -->
387 <!-- ###################################################################### -->
388
389 <g id="xmlBaseStylingElement">
390 <circle cx="0" cy="0" r="30" />
391 </g>
392
393
394 </defs>
395
396 </svg>