Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / batik / paints / patternPreserveAspectRatioA.svg
blobd85017c305da205724ef27d0af6b20978e58006e
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">
5 <!--
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.
22 -->
23 <!-- ========================================================================= -->
24 <!-- -->
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
36 </text>
38 <!-- ============================================================= -->
39 <!-- Test content -->
40 <!-- ============================================================= -->
41 <g id="testContent" >
42 <defs>
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" />
48 </g>
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" />
56 </g>
58 <rect id="testShape" transform="translate(45, 5)" width="90" height="30" />
60 <!-- ============================================== -->
61 <!-- For all the following patterns: -->
62 <!-- -->
63 <!-- patternUnits : userSpaceOnUse -->
64 <!-- patternContentUnits : default (userSpaceOnUse) -->
65 <!-- patternTransform: default (identity) -->
66 <!-- preserveAspectRatio: variable for each test -->
67 <!-- overflow : default (hidden) -->
68 <!-- -->
69 <!-- ============================================== -->
71 <!-- ============ -->
72 <!-- meetXxxxYyyy -->
73 <!-- ============ -->
75 <pattern id="meetXminYmin"
76 patternUnits="userSpaceOnUse"
77 x="0" y="0"
78 width="32" height="16"
79 viewBox="0 0 24 24"
80 preserveAspectRatio="xMinYMin meet">
81 <use xlink:href="#patternContent" />
82 </pattern>
84 <pattern id="meetXminYmid"
85 patternUnits="userSpaceOnUse"
86 x="0" y="0"
87 width="32" height="16"
88 viewBox="0 0 24 24"
89 preserveAspectRatio="xMinYMid meet">
90 <use xlink:href="#patternContent" />
91 </pattern>
93 <pattern id="meetXminYmax"
94 patternUnits="userSpaceOnUse"
95 x="0" y="0"
96 width="32" height="16"
97 viewBox="0 0 24 24"
98 preserveAspectRatio="xMinYMax meet">
99 <use xlink:href="#patternContent" />
100 </pattern>
102 <pattern id="meetXmidYmin"
103 patternUnits="userSpaceOnUse"
104 x="0" y="0"
105 width="32" height="16"
106 viewBox="0 0 24 24"
107 preserveAspectRatio="xMidYMin meet">
108 <use xlink:href="#patternContent" />
109 </pattern>
111 <pattern id="meetXmidYmid"
112 patternUnits="userSpaceOnUse"
113 x="0" y="0"
114 width="32" height="16"
115 viewBox="0 0 24 24"
116 preserveAspectRatio="xMidYMid meet">
117 <use xlink:href="#patternContent" />
118 </pattern>
120 <pattern id="meetXmidYmax"
121 patternUnits="userSpaceOnUse"
122 x="0" y="0"
123 width="32" height="16"
124 viewBox="0 0 24 24"
125 preserveAspectRatio="xMidYMax meet">
126 <use xlink:href="#patternContent" />
127 </pattern>
129 <pattern id="meetXmaxYmin"
130 patternUnits="userSpaceOnUse"
131 x="0" y="0"
132 width="32" height="16"
133 viewBox="0 0 24 24"
134 preserveAspectRatio="xMaxYMin meet">
135 <use xlink:href="#patternContent" />
136 </pattern>
138 <pattern id="meetXmaxYmid"
139 patternUnits="userSpaceOnUse"
140 x="0" y="0"
141 width="32" height="16"
142 viewBox="0 0 24 24"
143 preserveAspectRatio="xMaxYMid meet">
144 <use xlink:href="#patternContent" />
145 </pattern>
147 <pattern id="meetXmaxYmax"
148 patternUnits="userSpaceOnUse"
149 x="0" y="0"
150 width="32" height="16"
151 viewBox="0 0 24 24"
152 preserveAspectRatio="xMaxYMax meet">
153 <use xlink:href="#patternContent" />
154 </pattern>
157 <!-- ============ -->
158 <!-- sliceXxxxYyyy -->
159 <!-- ============ -->
161 <pattern id="sliceXminYmin"
162 patternUnits="userSpaceOnUse"
163 x="0" y="0"
164 width="32" height="16"
165 viewBox="0 0 24 24"
166 preserveAspectRatio="xMinYMin slice">
167 <use xlink:href="#patternContent" />
168 </pattern>
170 <pattern id="sliceXminYmid"
171 patternUnits="userSpaceOnUse"
172 x="0" y="0"
173 width="32" height="16"
174 viewBox="0 0 24 24"
175 preserveAspectRatio="xMinYMid slice">
176 <use xlink:href="#patternContent" />
177 </pattern>
179 <pattern id="sliceXminYmax"
180 patternUnits="userSpaceOnUse"
181 x="0" y="0"
182 width="32" height="16"
183 viewBox="0 0 24 24"
184 preserveAspectRatio="xMinYMax slice">
185 <use xlink:href="#patternContent" />
186 </pattern>
188 <pattern id="sliceXmidYmin"
189 patternUnits="userSpaceOnUse"
190 x="0" y="0"
191 width="32" height="16"
192 viewBox="0 0 24 24"
193 preserveAspectRatio="xMidYMin slice">
194 <use xlink:href="#patternContent" />
195 </pattern>
197 <pattern id="sliceXmidYmid"
198 patternUnits="userSpaceOnUse"
199 x="0" y="0"
200 width="32" height="16"
201 viewBox="0 0 24 24"
202 preserveAspectRatio="xMidYMid slice">
203 <use xlink:href="#patternContent" />
204 </pattern>
206 <pattern id="sliceXmidYmax"
207 patternUnits="userSpaceOnUse"
208 x="0" y="0"
209 width="32" height="16"
210 viewBox="0 0 24 24"
211 preserveAspectRatio="xMidYMax slice">
212 <use xlink:href="#patternContent" />
213 </pattern>
215 <pattern id="sliceXmaxYmin"
216 patternUnits="userSpaceOnUse"
217 x="0" y="0"
218 width="32" height="16"
219 viewBox="0 0 24 24"
220 preserveAspectRatio="xMaxYMin slice">
221 <use xlink:href="#patternContent" />
222 </pattern>
224 <pattern id="sliceXmaxYmid"
225 patternUnits="userSpaceOnUse"
226 x="0" y="0"
227 width="32" height="16"
228 viewBox="0 0 24 24"
229 preserveAspectRatio="xMaxYMid slice">
230 <use xlink:href="#patternContent" />
231 </pattern>
233 <pattern id="sliceXmaxYmax"
234 patternUnits="userSpaceOnUse"
235 x="0" y="0"
236 width="32" height="16"
237 viewBox="0 0 24 24"
238 preserveAspectRatio="xMaxYMax slice">
239 <use xlink:href="#patternContent" />
240 </pattern>
242 <!-- ============ -->
243 <!-- noneXxxxYyyy -->
244 <!-- ============ -->
246 <pattern id="noneXminYmin"
247 patternUnits="userSpaceOnUse"
248 x="0" y="0"
249 width="32" height="16"
250 viewBox="0 0 24 24"
251 preserveAspectRatio="xMinYMin">
252 <use xlink:href="#patternContent" />
253 </pattern>
255 <pattern id="noneXminYmid"
256 patternUnits="userSpaceOnUse"
257 x="0" y="0"
258 width="32" height="16"
259 viewBox="0 0 24 24"
260 preserveAspectRatio="xMinYMid">
261 <use xlink:href="#patternContent" />
262 </pattern>
264 <pattern id="noneXminYmax"
265 patternUnits="userSpaceOnUse"
266 x="0" y="0"
267 width="32" height="16"
268 viewBox="0 0 24 24"
269 preserveAspectRatio="xMinYMax">
270 <use xlink:href="#patternContent" />
271 </pattern>
273 <pattern id="noneXmidYmin"
274 patternUnits="userSpaceOnUse"
275 x="0" y="0"
276 width="32" height="16"
277 viewBox="0 0 24 24"
278 preserveAspectRatio="xMidYMin">
279 <use xlink:href="#patternContent" />
280 </pattern>
282 <pattern id="noneXmidYmid"
283 patternUnits="userSpaceOnUse"
284 x="0" y="0"
285 width="32" height="16"
286 viewBox="0 0 24 24"
287 preserveAspectRatio="xMidYMid">
288 <use xlink:href="#patternContent" />
289 </pattern>
291 <pattern id="noneXmidYmax"
292 patternUnits="userSpaceOnUse"
293 x="0" y="0"
294 width="32" height="16"
295 viewBox="0 0 24 24"
296 preserveAspectRatio="xMidYMax">
297 <use xlink:href="#patternContent" />
298 </pattern>
300 <pattern id="noneXmaxYmin"
301 patternUnits="userSpaceOnUse"
302 x="0" y="0"
303 width="32" height="16"
304 viewBox="0 0 24 24"
305 preserveAspectRatio="xMaxYMin">
306 <use xlink:href="#patternContent" />
307 </pattern>
309 <pattern id="noneXmaxYmid"
310 patternUnits="userSpaceOnUse"
311 x="0" y="0"
312 width="32" height="16"
313 viewBox="0 0 24 24"
314 preserveAspectRatio="xMaxYMid">
315 <use xlink:href="#patternContent" />
316 </pattern>
318 <pattern id="noneXmaxYmax"
319 patternUnits="userSpaceOnUse"
320 x="0" y="0"
321 width="32" height="16"
322 viewBox="0 0 24 24"
323 preserveAspectRatio="xMaxYMax">
324 <use xlink:href="#patternContent" />
325 </pattern>
327 <!-- ==================== -->
328 <!-- align = none -->
329 <!-- ==================== -->
330 <pattern id="meetNone"
331 patternUnits="userSpaceOnUse"
332 x="0" y="0"
333 width="32" height="16"
334 viewBox="0 0 24 24"
335 preserveAspectRatio="none meet">
336 <use xlink:href="#patternContent" />
337 </pattern>
339 <pattern id="sliceNone"
340 patternUnits="userSpaceOnUse"
341 x="0" y="0"
342 width="32" height="16"
343 viewBox="0 0 24 24"
344 preserveAspectRatio="none slice">
345 <use xlink:href="#patternContent" />
346 </pattern>
348 <pattern id="noneNone"
349 patternUnits="userSpaceOnUse"
350 x="0" y="0"
351 width="32" height="16"
352 viewBox="0 0 24 24"
353 preserveAspectRatio="none">
354 <use xlink:href="#patternContent" />
355 </pattern>
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)">
367 yMin
368 </text>
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)">
373 yMid
374 </text>
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)">
379 yMax
380 </text>
381 </g>
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"/>
394 </g>
396 <rect id="columnHeader" x="40" y="-20" width="100" height="20" stroke="black"/>
398 </defs>
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)">
405 xMin
406 </text>
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)">
412 xMid
413 </text>
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)">
419 xMax
420 </text>
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">
432 meet
433 </text>
435 <text class="label" stroke="none" fill="black"
436 text-anchor="middle" x="190" y="-5">
437 slice
438 </text>
440 <text class="label" stroke="none" fill="black"
441 text-anchor="middle" x="290" y="-5">
442 none
443 </text>
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)">
449 none
450 </text>
452 <!-- ============================================ -->
453 <!-- Various pattern settings here -->
454 <!-- ============================================ -->
456 <!-- =============================== -->
457 <!-- meetOrSlice = meet -->
458 <!-- =============================== -->
461 <!-- xMxx = xMin -->
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"/>
466 <!-- xMxx = xMid -->
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"/>
471 </g>
473 <!-- xMxx = xMax -->
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"/>
478 </g>
480 </g>
482 <!-- =============================== -->
483 <!-- meetOrSlice = slice -->
484 <!-- =============================== -->
485 <g marker-start="url(#startEndMarker)" transform="translate(100, 0)"
486 marker-end="url(#startEndMarker)" stroke="black">
488 <!-- xMxx = xMin -->
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"/>
493 <!-- xMxx = xMid -->
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"/>
498 </g>
500 <!-- xMxx = xMax -->
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"/>
505 </g>
507 </g>
509 <!-- =============================== -->
510 <!-- meetOrSlice = none -->
511 <!-- =============================== -->
512 <g marker-start="url(#startEndMarker)" transform="translate(200, 0)"
513 marker-end="url(#startEndMarker)" stroke="black">
515 <!-- xMxx = xMin -->
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"/>
520 <!-- xMxx = xMid -->
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"/>
525 </g>
527 <!-- xMxx = xMax -->
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"/>
532 </g>
534 </g>
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"/>
546 </g>
547 </g>
548 </g>
551 <!-- ============================================================= -->
552 <!-- Batik sample mark -->
553 <!-- ============================================================= -->
554 <use xlink:href="../resources/batikLogo.svg#Batik_Tag_Box" />
556 </svg>