Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / W3C-SVG-1.1 / coords-viewattr-01-b.svg
blob46a094670f195b4919f98d6efe750a64f58c38f7
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd" [
3 <!ENTITY Smile "
4 <rect x='.5' y='.5' width='29' height='39' fill='black' stroke='red'/>
5 <g transform='translate(0, 5)'>
6 <circle cx='15' cy='15' r='10' fill='yellow'/>
7 <circle cx='12' cy='12' r='1.5' fill='black'/>
8 <circle cx='17' cy='12' r='1.5' fill='black'/>
9 <path d='M 10 19 L 15 23 20 19' stroke='black' stroke-width='2'/>
10 </g>
12 <!ENTITY Viewport1 "<rect x='.5' y='.5' width='49' height='29'
13 fill='none' stroke='blue'/>">
14 <!ENTITY Viewport2 "<rect x='.5' y='.5' width='29' height='59'
15 fill='none' stroke='blue'/>">
17 <!--======================================================================-->
18 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
19 <!--= Institute of Technology, Institut National de Recherche en =-->
20 <!--= Informatique et en Automatique, Keio University). All Rights =-->
21 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
22 <!--======================================================================-->
23 <!-- ===================================================================== -->
24 <!-- The content of this test is taken from the SVG specification. The -->
25 <!-- original author is Jon Ferraiolo. -->
26 <!-- coords-viewBox-BE-03.svg -->
27 <!-- renamed for 1.1 suite to coords-viewattr-01-b.svg -->
28 <!-- Author : Vincent Hardy -->
29 <!-- Modified for svg 1.1 by Ola Andersson, 07-Mar-2002 -->
30 <!--======================================================================-->
31 <svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
32 <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
33 <OperatorScript version="$Revision: 1.6 $" testname="coords-viewattr-01-b.svg">
34 <Paragraph>
35 This test verifies the implementation of the viewBox and the preserveAspectRatio attribute.
36 This is a modified version of the sample file included in the SVG specification.
37 It exercises the various preserveAspectRatio values and uses a general entity definition
38 in order to make reading of the SVG source easier.
39 </Paragraph>
40 <Paragraph>
41 The rendered picture should match the reference image exactly except for variations in the labeling text.
42 </Paragraph>
43 </OperatorScript>
44 </SVGTestCase>
45 <title id="test-title">coords-viewattr-01-b</title>
46 <desc id="test-desc">Validates viewBox specification and the preserveAspectRatio attribute</desc>
47 <!--======================================================================-->
48 <!--Content of Test Case follows... =====================-->
49 <!--======================================================================-->
50 <g id="test-body-content" transform="translate(0, 30)">
51 <g font-size="9">
52 <desc>Example PreserveAspectRatio - demonstrate available options</desc>
53 <text x="10" y="30">SVG to fit</text>
54 <g transform="translate(20,40)">&Smile;</g>
55 <text x="10" y="110">Viewport 1</text>
56 <g transform="translate(10,120)">&Viewport1;</g>
57 <text x="10" y="180">Viewport 2</text>
58 <g transform="translate(20,190)">&Viewport2;</g>
59 <g id="meet-group-1" transform="translate(120, 50)">
60 <text x="0" y="-20">---------- meet --------------------</text>
61 <g>
62 <text y="-5">xMin*</text>&Viewport1;
63 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMinYMin meet" viewBox="0 0 30 40" width="50" height="30">&Smile;</svg>
64 </g>
65 <g transform="translate(70,0)">
66 <text y="-5">xMid*</text>&Viewport1;
67 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 30 40" width="50" height="30">&Smile;</svg>
68 </g>
69 <g transform="translate(0,50)">
70 <text y="-5">xMax*</text>&Viewport1;
71 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMaxYMax meet" viewBox="0 0 30 40" width="50" height="30">&Smile;</svg>
72 </g>
73 </g>
74 <g id="meet-group-2" transform="translate(300, 50)">
75 <text x="0" y="-20">---------- meet ------------------------</text>
76 <g>
77 <text y="-5">*YMin</text>&Viewport2;
78 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMinYMin meet" viewBox="0 0 30 40" width="30" height="60">&Smile;</svg>
79 </g>
80 <g transform="translate(50, 0)">
81 <text y="-5">*YMid</text>&Viewport2;
82 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet" viewBox="0 0 30 40" width="30" height="60">&Smile;</svg>
83 </g>
84 <g transform="translate(100, 0)">
85 <text y="-5">*YMax</text>&Viewport2;
86 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMaxYMax meet" viewBox="0 0 30 40" width="30" height="60">&Smile;</svg>
87 </g>
88 </g>
89 <g id="slice-group-1" transform="translate(120, 185)">
90 <text x="0" y="-20">---------- slice -------------------------</text>
91 <g>
92 <text y="-5">xMin*</text>&Viewport2;
93 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMinYMin slice" viewBox="0 0 30 40" width="30" height="60">&Smile;</svg>
94 </g>
95 <g transform="translate(50,0)">
96 <text y="-5">xMid*</text>&Viewport2;
97 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid slice" viewBox="0 0 30 40" width="30" height="60">&Smile;</svg>
98 </g>
99 <g transform="translate(100,0)">
100 <text y="-5">xMax*</text>&Viewport2;
101 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMaxYMax slice" viewBox="0 0 30 40" width="30" height="60">&Smile;</svg>
102 </g>
103 </g>
104 <g id="slide-group-2" transform="translate(300, 155) translate(0, 30)">
105 <text x="0" y="-20">---------- slice ---------------------</text>
107 <text y="-5">*YMin</text>&Viewport1;
108 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMinYMin slice" viewBox="0 0 30 40" width="50" height="30">&Smile;</svg>
109 </g>
110 <g transform="translate(70,0)">
111 <text y="-5">*YMid</text>&Viewport1;
112 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid slice" viewBox="0 0 30 40" width="50" height="30">&Smile;</svg>
113 </g>
114 <g transform="translate(0,50)">
115 <text y="-5">*YMax</text>&Viewport1;
116 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMaxYMax slice" viewBox="0 0 30 40" width="50" height="30">&Smile;</svg>
117 </g>
118 </g>
119 </g>
120 </g>
121 <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.6 $</text>
122 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
123 </svg>