Debian Codegraph @

test_non_regression/svg/struct-use-01-t.svg

raw
1 <svg version="1.1" baseProfile="tiny" id="svg-root"
2 width="100%" height="100%" viewBox="0 0 480 360"
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-use-01-t.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/struct.html#UseElement">
17 <p>
18 The purpose of this test is to validate proper handling of
19 the use element. In particular, the test checks the proper inheritance
20 of properties through the shadow tree (rather than through the document
21 tree).
22 </p>
23 </d:testDescription>
24 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
25 <p>
26 Run the test. No interaction required.
27 </p>
28 </d:operatorScript>
29 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
30 <p>
31 The test should display various elements in different shades of green.
32 If an element is not displayed in green, but in red fill and/or yellow
33 stroke, then it is in error.
34 </p>
35 </d:passCriteria>
36 </d:SVGTestCase>
37 <title id="test-title">$RCSfile: struct-use-01-t.svg,v $</title>
38 <defs>
39 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
40 <font-face-src>
41 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
42 </font-face-src>
43 </font-face>
44 </defs>
45 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
46 <defs>
47 <font-face font-family="FreeSerif" unicode-range="U+0020-U+00FF">
48 <font-face-src>
49 <font-face-uri xlink:href="../resources/FreeSerifBoldItalic.svg#FreeSerifBoldItalic"/>
50 </font-face-src>
51 </font-face>
52 <g fill="red" stroke="yellow" stroke-width="3">
53 <rect id="usedRect" width="20" height="20"/>
54 <circle id="usedCircle" cx="10" cy="10" r="10"/>
55 <ellipse id="usedEllipse" cx="10" cy="10" rx="10" ry="10"/>
56 <line id="usedLine" x1="0" y1="10" x2="20" y2="10"/>
57 <path id="usedPath" d="M 0 0 L 20 0 L 20 20 L 0 20 Z"/>
58 <polygon id="usedPolygon" points="0,0 20,0 20,20 0,20 0 0"/>
59 <polyline id="usedPolyline" points="0,0 20,0 20,20"/>
60 <g id="usedG">
61 <rect width="10" height="20"/>
62 <rect x="10" width="10" height="20" fill="rgb(0,128,0)"/>
63 </g>
64 <use id="usedUse" xlink:href="#usedRect"/>
65 <image id="usedImage" xlink:href="../images/20x20.png" width="20" height="20"/>
66 <text id="usedText">Text</text>
67 </g>
68 </defs>
69
70
71 <g>
72 <g id="labels" transform="translate(130, 40)" font-size="20" text-anchor="end">
73 <text>&lt;rect&gt;</text>
74 <text y="30">&lt;circle&gt;</text>
75 <text y="60">&lt;ellipse&gt;</text>
76 <text y="90">&lt;line&gt;</text>
77 <text y="120">&lt;polyline&gt;</text>
78 <text y="150">&lt;polygon&gt;</text>
79 <text y="180">&lt;path&gt;</text>
80 <text y="210">&lt;image&gt;</text>
81 <text y="240">&lt;text&gt;</text>
82 </g>
83 <g id="labelsColumn2" transform="translate(310, 40)" font-size="20" text-anchor="end">
84 <text>&lt;g&gt;</text>
85 <text y="30">&lt;use&gt;</text>
86 </g>
87 </g>
88 <g transform="translate(150, 25)">
89 <use xlink:href="#usedRect" fill="#0F0"/>
90 <use y="30" xlink:href="#usedCircle" fill="#0F0"/>
91 <use y="60" xlink:href="#usedEllipse" fill="#0F0"/>
92 <use y="90" xlink:href="#usedLine" stroke="#0F0" stroke-width="2"/>
93 <use y="120" xlink:href="#usedPolyline" stroke="#0F0" stroke-width="2" fill="none"/>
94 <use y="150" xlink:href="#usedPolygon" fill="#0F0"/>
95 <use y="180" xlink:href="#usedPath" fill="#0F0"/>
96 <use y="210" xlink:href="#usedImage" fill="#FF0"/>
97 <use y="260" xlink:href="#usedText" fill="#0F0" font-weight="bold" font-size="25" font-style="italic" font-family="FreeSerif,serif"/>
98 <use x="180" y="0" xlink:href="#usedG" fill="#0F0"/>
99 <use x="180" y="30" xlink:href="#usedUse" fill="#0c0"/>
100 </g>
101 </g>
102 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
103 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
104 </g>
105 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
106 <!-- comment out this watermark once the test is approved -->
107 <!--<g id="draft-watermark">
108 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
109 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
110 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
111 </g>-->
112 </svg>