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">
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
14 http://www.apache.org/licenses/LICENSE-2.0
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.
23 <!-- ========================================================================= -->
25 <!-- @author vhardy@eng.sun.com -->
26 <!-- @version $Id: patternPreserveAspectRatioA.svg 475477 2006-11-15 22:44:28Z cam $ -->
27 <!-- ========================================================================= -->
29 <?xml-stylesheet type=
"text/css" href=
"../resources/test.css" ?>
31 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" id=
"body" width=
"450" height=
"500" viewBox=
"0 0 450 500">
32 <title>Pattern Region Test, B
</title>
34 <text x=
"225" y=
"30" class=
"title">
35 patterns, preserveAspectRatio
38 <!-- ============================================================= -->
40 <!-- ============================================================= -->
44 <g id=
"patternColumn">
45 <circle cx=
".5" cy=
".5" r=
".5" />
46 <rect x=
"0" y=
"1" width=
"1" height=
"1" />
47 <path d=
"M 0 3 l 1 0 l -0.5 -1 z" />
50 <!-- Pattern content is 24 by 24 -->
51 <g id=
"patternContent" transform=
"scale(8, 8)" >
52 <rect x=
"0" y=
"0" width=
"3" height=
"3" fill=
"black" />
53 <use xlink:
href=
"#patternColumn" fill=
"crimson" />
54 <use xlink:
href=
"#patternColumn" x=
"1" fill=
"gold" />
55 <use xlink:
href=
"#patternColumn" x=
"2" fill=
"orange" />
58 <rect id=
"testShape" transform=
"translate(45, 5)" width=
"90" height=
"30" />
60 <!-- ============================================== -->
61 <!-- For all the following patterns: -->
63 <!-- patternUnits : userSpaceOnUse -->
64 <!-- patternContentUnits : default (userSpaceOnUse) -->
65 <!-- patternTransform: default (identity) -->
66 <!-- preserveAspectRatio: variable for each test -->
67 <!-- overflow : default (hidden) -->
69 <!-- ============================================== -->
75 <pattern id=
"meetXminYmin"
76 patternUnits=
"userSpaceOnUse"
78 width=
"32" height=
"16"
80 preserveAspectRatio=
"xMinYMin meet">
81 <use xlink:
href=
"#patternContent" />
84 <pattern id=
"meetXminYmid"
85 patternUnits=
"userSpaceOnUse"
87 width=
"32" height=
"16"
89 preserveAspectRatio=
"xMinYMid meet">
90 <use xlink:
href=
"#patternContent" />
93 <pattern id=
"meetXminYmax"
94 patternUnits=
"userSpaceOnUse"
96 width=
"32" height=
"16"
98 preserveAspectRatio=
"xMinYMax meet">
99 <use xlink:
href=
"#patternContent" />
102 <pattern id=
"meetXmidYmin"
103 patternUnits=
"userSpaceOnUse"
105 width=
"32" height=
"16"
107 preserveAspectRatio=
"xMidYMin meet">
108 <use xlink:
href=
"#patternContent" />
111 <pattern id=
"meetXmidYmid"
112 patternUnits=
"userSpaceOnUse"
114 width=
"32" height=
"16"
116 preserveAspectRatio=
"xMidYMid meet">
117 <use xlink:
href=
"#patternContent" />
120 <pattern id=
"meetXmidYmax"
121 patternUnits=
"userSpaceOnUse"
123 width=
"32" height=
"16"
125 preserveAspectRatio=
"xMidYMax meet">
126 <use xlink:
href=
"#patternContent" />
129 <pattern id=
"meetXmaxYmin"
130 patternUnits=
"userSpaceOnUse"
132 width=
"32" height=
"16"
134 preserveAspectRatio=
"xMaxYMin meet">
135 <use xlink:
href=
"#patternContent" />
138 <pattern id=
"meetXmaxYmid"
139 patternUnits=
"userSpaceOnUse"
141 width=
"32" height=
"16"
143 preserveAspectRatio=
"xMaxYMid meet">
144 <use xlink:
href=
"#patternContent" />
147 <pattern id=
"meetXmaxYmax"
148 patternUnits=
"userSpaceOnUse"
150 width=
"32" height=
"16"
152 preserveAspectRatio=
"xMaxYMax meet">
153 <use xlink:
href=
"#patternContent" />
157 <!-- ============ -->
158 <!-- sliceXxxxYyyy -->
159 <!-- ============ -->
161 <pattern id=
"sliceXminYmin"
162 patternUnits=
"userSpaceOnUse"
164 width=
"32" height=
"16"
166 preserveAspectRatio=
"xMinYMin slice">
167 <use xlink:
href=
"#patternContent" />
170 <pattern id=
"sliceXminYmid"
171 patternUnits=
"userSpaceOnUse"
173 width=
"32" height=
"16"
175 preserveAspectRatio=
"xMinYMid slice">
176 <use xlink:
href=
"#patternContent" />
179 <pattern id=
"sliceXminYmax"
180 patternUnits=
"userSpaceOnUse"
182 width=
"32" height=
"16"
184 preserveAspectRatio=
"xMinYMax slice">
185 <use xlink:
href=
"#patternContent" />
188 <pattern id=
"sliceXmidYmin"
189 patternUnits=
"userSpaceOnUse"
191 width=
"32" height=
"16"
193 preserveAspectRatio=
"xMidYMin slice">
194 <use xlink:
href=
"#patternContent" />
197 <pattern id=
"sliceXmidYmid"
198 patternUnits=
"userSpaceOnUse"
200 width=
"32" height=
"16"
202 preserveAspectRatio=
"xMidYMid slice">
203 <use xlink:
href=
"#patternContent" />
206 <pattern id=
"sliceXmidYmax"
207 patternUnits=
"userSpaceOnUse"
209 width=
"32" height=
"16"
211 preserveAspectRatio=
"xMidYMax slice">
212 <use xlink:
href=
"#patternContent" />
215 <pattern id=
"sliceXmaxYmin"
216 patternUnits=
"userSpaceOnUse"
218 width=
"32" height=
"16"
220 preserveAspectRatio=
"xMaxYMin slice">
221 <use xlink:
href=
"#patternContent" />
224 <pattern id=
"sliceXmaxYmid"
225 patternUnits=
"userSpaceOnUse"
227 width=
"32" height=
"16"
229 preserveAspectRatio=
"xMaxYMid slice">
230 <use xlink:
href=
"#patternContent" />
233 <pattern id=
"sliceXmaxYmax"
234 patternUnits=
"userSpaceOnUse"
236 width=
"32" height=
"16"
238 preserveAspectRatio=
"xMaxYMax slice">
239 <use xlink:
href=
"#patternContent" />
242 <!-- ============ -->
243 <!-- noneXxxxYyyy -->
244 <!-- ============ -->
246 <pattern id=
"noneXminYmin"
247 patternUnits=
"userSpaceOnUse"
249 width=
"32" height=
"16"
251 preserveAspectRatio=
"xMinYMin">
252 <use xlink:
href=
"#patternContent" />
255 <pattern id=
"noneXminYmid"
256 patternUnits=
"userSpaceOnUse"
258 width=
"32" height=
"16"
260 preserveAspectRatio=
"xMinYMid">
261 <use xlink:
href=
"#patternContent" />
264 <pattern id=
"noneXminYmax"
265 patternUnits=
"userSpaceOnUse"
267 width=
"32" height=
"16"
269 preserveAspectRatio=
"xMinYMax">
270 <use xlink:
href=
"#patternContent" />
273 <pattern id=
"noneXmidYmin"
274 patternUnits=
"userSpaceOnUse"
276 width=
"32" height=
"16"
278 preserveAspectRatio=
"xMidYMin">
279 <use xlink:
href=
"#patternContent" />
282 <pattern id=
"noneXmidYmid"
283 patternUnits=
"userSpaceOnUse"
285 width=
"32" height=
"16"
287 preserveAspectRatio=
"xMidYMid">
288 <use xlink:
href=
"#patternContent" />
291 <pattern id=
"noneXmidYmax"
292 patternUnits=
"userSpaceOnUse"
294 width=
"32" height=
"16"
296 preserveAspectRatio=
"xMidYMax">
297 <use xlink:
href=
"#patternContent" />
300 <pattern id=
"noneXmaxYmin"
301 patternUnits=
"userSpaceOnUse"
303 width=
"32" height=
"16"
305 preserveAspectRatio=
"xMaxYMin">
306 <use xlink:
href=
"#patternContent" />
309 <pattern id=
"noneXmaxYmid"
310 patternUnits=
"userSpaceOnUse"
312 width=
"32" height=
"16"
314 preserveAspectRatio=
"xMaxYMid">
315 <use xlink:
href=
"#patternContent" />
318 <pattern id=
"noneXmaxYmax"
319 patternUnits=
"userSpaceOnUse"
321 width=
"32" height=
"16"
323 preserveAspectRatio=
"xMaxYMax">
324 <use xlink:
href=
"#patternContent" />
327 <!-- ==================== -->
328 <!-- align = none -->
329 <!-- ==================== -->
330 <pattern id=
"meetNone"
331 patternUnits=
"userSpaceOnUse"
333 width=
"32" height=
"16"
335 preserveAspectRatio=
"none meet">
336 <use xlink:
href=
"#patternContent" />
339 <pattern id=
"sliceNone"
340 patternUnits=
"userSpaceOnUse"
342 width=
"32" height=
"16"
344 preserveAspectRatio=
"none slice">
345 <use xlink:
href=
"#patternContent" />
348 <pattern id=
"noneNone"
349 patternUnits=
"userSpaceOnUse"
351 width=
"32" height=
"16"
353 preserveAspectRatio=
"none">
354 <use xlink:
href=
"#patternContent" />
357 <rect id=
"xMxx" x=
"0" y=
"0" width=
"20" height=
"120" />
358 <rect id=
"yMxx" x=
"20" y=
"0" width=
"20" height=
"40" />
359 <rect id=
"sampleCell" x=
"40" y=
"0" width=
"100" height=
"40" />
361 <g id=
"xMxxBlock" stroke=
"black">
362 <use xlink:
href=
"#xMxx" />
363 <use xlink:
href=
"#yMxx" fill=
"rgb(255, 250, 210)"/>
364 <text class=
"label" stroke=
"none" fill=
"black"
365 text-anchor=
"middle" x=
"35" y=
"20"
366 transform=
"rotate(-90, 35, 20)">
369 <use xlink:
href=
"#yMxx" y=
"40" fill=
"rgb(255, 240, 150)"/>
370 <text class=
"label" stroke=
"none" fill=
"black"
371 text-anchor=
"middle" x=
"35" y=
"60"
372 transform=
"rotate(-90, 35, 60)">
375 <use xlink:
href=
"#yMxx" y=
"80" fill=
"rgb(255, 235, 120)"/>
376 <text class=
"label" stroke=
"none" fill=
"black"
377 text-anchor=
"middle" x=
"35" y=
"100"
378 transform=
"rotate(-90, 35, 100)">
383 <g id=
"sampleColumn" stroke=
"black" fill=
"none">
384 <use xlink:
href=
"#sampleCell" fill=
"rgb(255, 250, 210)"/>
385 <use xlink:
href=
"#sampleCell" y=
"40" fill=
"rgb(255, 240, 150)"/>
386 <use xlink:
href=
"#sampleCell" y=
"80" fill=
"rgb(255, 235, 120)"/>
387 <use xlink:
href=
"#sampleCell" y=
"120" fill=
"rgb(255, 250, 210)"/>
388 <use xlink:
href=
"#sampleCell" y=
"160" fill=
"rgb(255, 240, 150)"/>
389 <use xlink:
href=
"#sampleCell" y=
"200" fill=
"rgb(255, 235, 120)"/>
390 <use xlink:
href=
"#sampleCell" y=
"240" fill=
"rgb(255, 250, 210)"/>
391 <use xlink:
href=
"#sampleCell" y=
"280" fill=
"rgb(255, 240, 150)"/>
392 <use xlink:
href=
"#sampleCell" y=
"320" fill=
"rgb(255, 235, 120)"/>
393 <use xlink:
href=
"#sampleCell" y=
"360"/>
396 <rect id=
"columnHeader" x=
"40" y=
"-20" width=
"100" height=
"20" stroke=
"black"/>
400 <g transform=
"translate(50, 80)">
401 <use xlink:
href=
"#xMxxBlock" fill=
"rgb(255, 250, 210)"/>
402 <text class=
"label" stroke=
"none" fill=
"black"
403 text-anchor=
"middle" x=
"15" y=
"60"
404 transform=
"rotate(-90, 15, 60)">
408 <use xlink:
href=
"#xMxxBlock" y=
"120" fill=
"rgb(255, 240, 150)"/>
409 <text class=
"label" stroke=
"none" fill=
"black"
410 text-anchor=
"middle" x=
"15" y=
"180"
411 transform=
"rotate(-90, 15, 180)">
415 <use xlink:
href=
"#xMxxBlock" y=
"240" fill=
"rgb(255, 235, 120)"/>
416 <text class=
"label" stroke=
"none" fill=
"black"
417 text-anchor=
"middle" x=
"15" y=
"300"
418 transform=
"rotate(-90, 15, 300)">
422 <use xlink:
href=
"#sampleColumn" />
423 <use xlink:
href=
"#sampleColumn" x=
"100" />
424 <use xlink:
href=
"#sampleColumn" x=
"200" />
426 <use xlink:
href=
"#columnHeader" fill=
"none"/>
427 <use xlink:
href=
"#columnHeader" x=
"100" fill=
"none"/>
428 <use xlink:
href=
"#columnHeader" x=
"200" fill=
"none"/>
430 <text class=
"label" stroke=
"none" fill=
"black"
431 text-anchor=
"middle" x=
"90" y=
"-5">
435 <text class=
"label" stroke=
"none" fill=
"black"
436 text-anchor=
"middle" x=
"190" y=
"-5">
440 <text class=
"label" stroke=
"none" fill=
"black"
441 text-anchor=
"middle" x=
"290" y=
"-5">
445 <rect x=
"0" y=
"360" width=
"40" height=
"40" stroke=
"black" fill=
"none" />
446 <text class=
"label" stroke=
"none" fill=
"black"
447 text-anchor=
"middle" x=
"25" y=
"380"
448 transform=
"rotate(-90, 25, 380)">
452 <!-- ============================================ -->
453 <!-- Various pattern settings here -->
454 <!-- ============================================ -->
456 <!-- =============================== -->
457 <!-- meetOrSlice = meet -->
458 <!-- =============================== -->
462 <use xlink:
href=
"#testShape" fill=
"url(#meetXminYmin)" />
463 <use xlink:
href=
"#testShape" fill=
"url(#meetXminYmid)" y=
"40"/>
464 <use xlink:
href=
"#testShape" fill=
"url(#meetXminYmax)" y=
"80"/>
467 <g transform=
"translate(0, 120)">
468 <use xlink:
href=
"#testShape" fill=
"url(#meetXmidYmin)" />
469 <use xlink:
href=
"#testShape" fill=
"url(#meetXmidYmid)" y=
"40"/>
470 <use xlink:
href=
"#testShape" fill=
"url(#meetXmidYmax)" y=
"80"/>
474 <g transform=
"translate(0, 240)">
475 <use xlink:
href=
"#testShape" fill=
"url(#meetXmaxYmin)" />
476 <use xlink:
href=
"#testShape" fill=
"url(#meetXmaxYmid)" y=
"40"/>
477 <use xlink:
href=
"#testShape" fill=
"url(#meetXmaxYmax)" y=
"80"/>
482 <!-- =============================== -->
483 <!-- meetOrSlice = slice -->
484 <!-- =============================== -->
485 <g marker-start=
"url(#startEndMarker)" transform=
"translate(100, 0)"
486 marker-end=
"url(#startEndMarker)" stroke=
"black">
489 <use xlink:
href=
"#testShape" fill=
"url(#sliceXminYmin)" />
490 <use xlink:
href=
"#testShape" fill=
"url(#sliceXminYmid)" y=
"40"/>
491 <use xlink:
href=
"#testShape" fill=
"url(#sliceXminYmax)" y=
"80"/>
494 <g transform=
"translate(0, 120)">
495 <use xlink:
href=
"#testShape" fill=
"url(#sliceXmidYmin)" />
496 <use xlink:
href=
"#testShape" fill=
"url(#sliceXmidYmid)" y=
"40"/>
497 <use xlink:
href=
"#testShape" fill=
"url(#sliceXmidYmax)" y=
"80"/>
501 <g transform=
"translate(0, 240)">
502 <use xlink:
href=
"#testShape" fill=
"url(#sliceXmaxYmin)" />
503 <use xlink:
href=
"#testShape" fill=
"url(#sliceXmaxYmid)" y=
"40"/>
504 <use xlink:
href=
"#testShape" fill=
"url(#sliceXmaxYmax)" y=
"80"/>
509 <!-- =============================== -->
510 <!-- meetOrSlice = none -->
511 <!-- =============================== -->
512 <g marker-start=
"url(#startEndMarker)" transform=
"translate(200, 0)"
513 marker-end=
"url(#startEndMarker)" stroke=
"black">
516 <use xlink:
href=
"#testShape" fill=
"url(#noneXminYmin)" />
517 <use xlink:
href=
"#testShape" fill=
"url(#noneXminYmid)" y=
"40"/>
518 <use xlink:
href=
"#testShape" fill=
"url(#noneXminYmax)" y=
"80"/>
521 <g transform=
"translate(0, 120)">
522 <use xlink:
href=
"#testShape" fill=
"url(#noneXmidYmin)" />
523 <use xlink:
href=
"#testShape" fill=
"url(#noneXmidYmid)" y=
"40"/>
524 <use xlink:
href=
"#testShape" fill=
"url(#noneXmidYmax)" y=
"80"/>
528 <g transform=
"translate(0, 240)">
529 <use xlink:
href=
"#testShape" fill=
"url(#noneXmaxYmin)" />
530 <use xlink:
href=
"#testShape" fill=
"url(#noneXmaxYmid)" y=
"40"/>
531 <use xlink:
href=
"#testShape" fill=
"url(#noneXmaxYmax)" y=
"80"/>
536 <!-- =============================== -->
537 <!-- align = none -->
538 <!-- =============================== -->
539 <g marker-start=
"url(#startEndMarker)" transform=
"translate(0, 360)"
540 marker-end=
"url(#startEndMarker)" stroke=
"black">
542 <use xlink:
href=
"#testShape" fill=
"url(#meetNone)" />
543 <use xlink:
href=
"#testShape" fill=
"url(#sliceNone)" x=
"100"/>
544 <use xlink:
href=
"#testShape" fill=
"url(#noneNone)" x=
"200"/>
551 <!-- ============================================================= -->
552 <!-- Batik sample mark -->
553 <!-- ============================================================= -->
554 <use xlink:
href=
"../resources/batikLogo.svg#Batik_Tag_Box" />