Debian Codegraph @

rsvg/tests/fixtures/reftests/svg1.1/coords-viewattr-04-f.svg

raw symbols SCIP
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 Viewport1 "<rect x='.5' y='.5' width='49' height='29' fill='none' stroke='blue'/>">
3 <!ENTITY Viewport2 "<rect x='.5' y='.5' width='29' height='59' fill='none' stroke='blue'/>">
4 ]>
5 <svg version="1.1" baseProfile="basic" id="svg-root"
6 width="100%" height="100%" viewBox="0 0 480 360"
7 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
8 <!-- Modified for librsvg:
9
10 * Change the href path of <image> elements to not to require a .. component,
11 to account for the way librsvg disallows walking up the filesystem.
12 -->
13 <!--======================================================================-->
14 <!--= SVG 1.1 2nd Edition Test Case =-->
15 <!--======================================================================-->
16 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
17 <!--= Institute of Technology, European Research Consortium for =-->
18 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
19 <!--= All Rights Reserved. =-->
20 <!--= See http://www.w3.org/Consortium/Legal/. =-->
21 <!--======================================================================-->
22 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
23 template-version="1.4" reviewer="[reviewer]" author="ED" status="created"
24 version="$Revision: 1.2 $" testname="$RCSfile: coords-viewattr-04-f.svg,v $">
25 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute">
26 <p>
27 This test verifies the implementation of the preserveAspectRatio attribute on &lt;image&gt;
28 referencing svg content.
29 </p>
30 </d:testDescription>
31 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
32 <p>
33 Run the test. No interaction required.
34 </p>
35 </d:operatorScript>
36 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
37 <p>
38 The rendered picture should match the reference image exactly except for variations in the labeling text.
39 </p>
40 </d:passCriteria>
41 </d:SVGTestCase>
42 <title id="test-title">$RCSfile: coords-viewattr-04-f.svg,v $</title>
43 <defs>
44 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
45 <font-face-src>
46 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
47 </font-face-src>
48 </font-face>
49 </defs>
50 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
51 <g font-size="9" transform="translate(0, 30)">
52 <desc>Example PreserveAspectRatio - demonstrate available options</desc>
53 <text text-anchor="middle" x="240" font-size="16">Test options of preserveAspectRatio on an image element</text>
54 <text x="40" y="30" text-anchor="middle">SVG to fit</text>
55 <g transform="translate(20,40)">
56 <image xlink:href="resources/happysmiley.svg" width="40" height="40" preserveAspectRatio="none" />
57 </g>
58 <text x="35.5" y="110" text-anchor="middle">Viewport 1</text>
59 <g transform="translate(10,120)">&Viewport1;</g>
60 <text x="35.5" y="180" text-anchor="middle">Viewport 2</text>
61 <g transform="translate(20,190)">&Viewport2;</g>
62 <g id="meet-group-1" transform="translate(120, 50)">
63 <text x="0" y="-20">---------- meet --------------------</text>
64 <g>
65 <text y="-5">xMin*</text>&Viewport1;
66 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMinYMin meet" width="50" height="30" />
67 </g>
68 <g transform="translate(70,0)">
69 <text y="-5">xMid*</text>&Viewport1;
70 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMidYMid meet" width="50" height="30" />
71 </g>
72 <g transform="translate(0,50)">
73 <text y="-5">xMax*</text>&Viewport1;
74 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMaxYMax meet" width="50" height="30" />
75 </g>
76 </g>
77 <g id="meet-group-2" transform="translate(300, 50)">
78 <text x="0" y="-20">---------- meet ------------------------</text>
79 <g>
80 <text y="-5">*YMin</text>&Viewport2;
81 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMinYMin meet" width="30" height="60" />
82 </g>
83 <g transform="translate(50, 0)">
84 <text y="-5">*YMid</text>&Viewport2;
85 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMidYMid meet" width="30" height="60" />
86 </g>
87 <g transform="translate(100, 0)">
88 <text y="-5">*YMax</text>&Viewport2;
89 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMaxYMax meet" width="30" height="60" />
90 </g>
91 </g>
92 <g id="slice-group-1" transform="translate(120, 185)">
93 <text x="0" y="-20">---------- slice -------------------------</text>
94 <g>
95 <text y="-5">xMin*</text>&Viewport2;
96 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMinYMin slice" width="30" height="60" />
97 </g>
98 <g transform="translate(50,0)">
99 <text y="-5">xMid*</text>&Viewport2;
100 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMidYMid slice" width="30" height="60" />
101 </g>
102 <g transform="translate(100,0)">
103 <text y="-5">xMax*</text>&Viewport2;
104 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMaxYMax slice" width="30" height="60" />
105 </g>
106 </g>
107 <g id="slide-group-2" transform="translate(300, 155) translate(0, 30)">
108 <text x="0" y="-20">---------- slice ---------------------</text>
109 <g>
110 <text y="-5">*YMin</text>&Viewport1;
111 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMinYMin slice" width="50" height="30" />
112 </g>
113 <g transform="translate(70,0)">
114 <text y="-5">*YMid</text>&Viewport1;
115 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMidYMid slice" width="50" height="30" />
116 </g>
117 <g transform="translate(0,50)">
118 <text y="-5">*YMax</text>&Viewport1;
119 <image xlink:href="resources/happysmiley.svg" preserveAspectRatio="xMaxYMax slice" width="50" height="30" />
120 </g>
121 </g>
122 </g>
123 </g>
124 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
125 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.2 $</text>
126 </g>
127 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
128 <!-- comment out this watermark once the test is approved -->
129 <g id="draft-watermark">
130 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
131 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
132 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
133 </g>
134 </svg>