Debian Codegraph @

test_non_regression/svg/coords-viewattr-01-b.svg

raw
1 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd" [
2 <!ENTITY Smile "
3 <rect x='.5' y='.5' width='29' height='39' fill='black' stroke='orange' stroke-width='2'/>
4 <g transform='translate(0, 5)'>
5 <circle cx='15' cy='15' r='10' fill='yellow'/>
6 <circle cx='12' cy='12' r='1.5' fill='black'/>
7 <circle cx='17' cy='12' r='1.5' fill='black'/>
8 <path d='M 10 19 L 15 23 20 19' stroke='black' stroke-width='2'/>
9 </g>
10 ">
11 <!ENTITY Viewport1 "<rect x='.5' y='.5' width='49' height='29' fill='none' stroke='blue'/>">
12 <!ENTITY Viewport2 "<rect x='.5' y='.5' width='29' height='59' fill='none' stroke='blue'/>">
13 ]>
14 <svg version="1.1" baseProfile="basic" id="svg-root"
15 width="100%" height="100%" viewBox="0 0 480 360"
16 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
17 <!--======================================================================-->
18 <!--= SVG 1.1 2nd Edition Test Case =-->
19 <!--======================================================================-->
20 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
21 <!--= Institute of Technology, European Research Consortium for =-->
22 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
23 <!--= All Rights Reserved. =-->
24 <!--= See http://www.w3.org/Consortium/Legal/. =-->
25 <!--======================================================================-->
26 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
27 template-version="1.4" reviewer="SVGWG" author="Vincent Hardy" status="accepted"
28 version="$Revision: 1.8 $" testname="$RCSfile: coords-viewattr-01-b.svg,v $">
29 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute">
30 <p>
31 This test verifies the implementation of the viewBox and the
32 preserveAspectRatio attribute. This is a modified version of the sample
33 file included in the SVG specification. It exercises the various
34 preserveAspectRatio values and uses a general entity definition in order
35 to make reading of the SVG source easier.
36 </p>
37 </d:testDescription>
38 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
39 <p>
40 Load the document in the user agent.
41 </p>
42 </d:operatorScript>
43 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
44 <p>
45 The rendered picture should match the reference image exactly except for
46 variations in the labeling text.
47 </p>
48 </d:passCriteria>
49 </d:SVGTestCase>
50 <title id="test-title">$RCSfile: coords-viewattr-01-b.svg,v $</title>
51 <defs>
52 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
53 <font-face-src>
54 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
55 </font-face-src>
56 </font-face>
57 </defs>
58 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
59 <g font-size="9" transform="translate(0, 30)">
60 <desc>Example PreserveAspectRatio - demonstrate available options</desc>
61 <text text-anchor="middle" x="240" font-size="16">Test available options of preserveAspectRatio</text>
62 <text x="35.5" y="30" text-anchor="middle">SVG to fit</text>
63 <g transform="translate(20,40)">&Smile;</g>
64 <text x="35.5" y="110" text-anchor="middle">Viewport 1</text>
65 <g transform="translate(10,120)">&Viewport1;</g>
66 <text x="35.5" y="180" text-anchor="middle">Viewport 2</text>
67 <g transform="translate(20,190)">&Viewport2;</g>
68 <g id="meet-group-1" transform="translate(120, 50)">
69 <text x="0" y="-20">---------- meet --------------------</text>
70 <g>
71 <text y="-5">xMin*</text>&Viewport1;
72 <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>
73 </g>
74 <g transform="translate(70,0)">
75 <text y="-5">xMid*</text>&Viewport1;
76 <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>
77 </g>
78 <g transform="translate(0,50)">
79 <text y="-5">xMax*</text>&Viewport1;
80 <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>
81 </g>
82 </g>
83 <g id="meet-group-2" transform="translate(300, 50)">
84 <text x="0" y="-20">---------- meet ------------------------</text>
85 <g>
86 <text y="-5">*YMin</text>&Viewport2;
87 <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>
88 </g>
89 <g transform="translate(50, 0)">
90 <text y="-5">*YMid</text>&Viewport2;
91 <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>
92 </g>
93 <g transform="translate(100, 0)">
94 <text y="-5">*YMax</text>&Viewport2;
95 <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>
96 </g>
97 </g>
98 <g id="slice-group-1" transform="translate(120, 185)">
99 <text x="0" y="-20">---------- slice -------------------------</text>
100 <g>
101 <text y="-5">xMin*</text>&Viewport2;
102 <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>
103 </g>
104 <g transform="translate(50,0)">
105 <text y="-5">xMid*</text>&Viewport2;
106 <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>
107 </g>
108 <g transform="translate(100,0)">
109 <text y="-5">xMax*</text>&Viewport2;
110 <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>
111 </g>
112 </g>
113 <g id="slide-group-2" transform="translate(300, 155) translate(0, 30)">
114 <text x="0" y="-20">---------- slice ---------------------</text>
115 <g>
116 <text y="-5">*YMin</text>&Viewport1;
117 <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>
118 </g>
119 <g transform="translate(70,0)">
120 <text y="-5">*YMid</text>&Viewport1;
121 <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>
122 </g>
123 <g transform="translate(0,50)">
124 <text y="-5">*YMax</text>&Viewport1;
125 <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>
126 </g>
127 </g>
128 </g>
129 </g>
130 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
131 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
132 </g>
133 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
134 <!-- comment out this watermark once the test is approved -->
135 <!--<g id="draft-watermark">
136 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
137 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
138 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
139 </g>-->
140 </svg>