Debian Codegraph @

test_non_regression/svg/struct-frag-03-t.svg

raw
1 <svg version="1.1" baseProfile="tiny" preserveAspectRatio="xMidYMid meet" id="svg-root"
2 width="100%" height="100%" viewBox="100 100 100 100"
3 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= SVG 1.1 2nd Edition Test Case =-->
6 <!--======================================================================-->
7 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
8 <!--= Institute of Technology, European Research Consortium for =-->
9 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
10 <!--= All Rights Reserved. =-->
11 <!--= See http://www.w3.org/Consortium/Legal/. =-->
12 <!--======================================================================-->
13 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
14 template-version="1.4" reviewer="CN" author="VH" status="accepted"
15 version="$Revision: 1.5 $" testname="$RCSfile: struct-frag-03-t.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/struct.html#NewDocument">
17 <p>
18 This test validates the use of the preserveAspectRatio attribute on the
19 root svg element in an SVG Tiny document. In this document, preserveAspectRatio
20 is set to 'xMidYMid meet' and the width and height of the document set to 100%.
21 </p>
22 <p>
23 The document's viewBox is defined to be 100 by 100 with an origin
24 in (100, 100). The content is made of 2 red squares and 2
25 orange circles.
26 </p>
27 </d:testDescription>
28 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
29 <p>
30 Run the test. No interaction required.
31 </p>
32 </d:operatorScript>
33 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
34 <p>
35 Because preserveAspectRatio is set to 'xMidYMid meet', the content should
36 appear centered within the viewport: squares show as squares (and not
37 rectangles) and circles show as circles (and not ellipses).
38 </p>
39 </d:passCriteria>
40 </d:SVGTestCase>
41 <title id="test-title">$RCSfile: struct-frag-03-t.svg,v $</title>
42 <defs>
43 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
44 <font-face-src>
45 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
46 </font-face-src>
47 </font-face>
48 </defs>
49 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
50 <rect x="100" y="100" width="50" height="50" fill="rgb(220, 20, 60)"/>
51 <rect x="150" y="150" width="50" height="50" fill="rgb(220, 20, 60)"/>
52
53 <circle cx="125" cy="175" r="25" fill="rgb(255, 215, 0)"/>
54 <circle cx="175" cy="125" r="25" fill="rgb(255, 215, 0)"/>
55 </g>
56 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
57 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
58 </g>
59 <rect id="test-frame" x="100" y="100" width="100" height="100" fill="none" stroke="#000"/>
60 <!-- comment out this watermark once the test is approved -->
61 <!--<g id="draft-watermark">
62 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
63 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
64 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
65 </g>-->
66 </svg>