Debian Codegraph @

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

raw
1 <svg version="1.1" baseProfile="basic" 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="SVGWG" author="Vincent Hardy" status="accepted"
15 version="$Revision: 1.6 $" testname="$RCSfile: coords-trans-01-b.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#EstablishingANewUserSpace">
17 <p>
18 This test verifies the implementation of transforms. It tests elementary transforms
19 and transform nesting.
20 Note that for layout purposes, this test uses nesting of translation with the elementary transforms.
21 </p>
22 <p>
23 The test uses the rect element, the fill color (solid primary colors) and transforms.
24 </p>
25 </d:testDescription>
26 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
27 <p>
28 Run the test. No interaction required.
29 </p>
30 </d:operatorScript>
31 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
32 <p>
33 The rendered picture should match the reference image exactly except for variations in the labeling text.
34 </p>
35 </d:passCriteria>
36 </d:SVGTestCase>
37 <title id="test-title">$RCSfile: coords-trans-01-b.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 <g transform="translate(0, 30)" font-size="13">
47 <!-- ====================================================================== -->
48 <!-- First, draw a test grid ============================================== -->
49 <!-- ====================================================================== -->
50 <g id="test-grid" stroke="#cccccc" stroke-width="1">
51 <line x1="10" y1="10.5" x2="470" y2="10.5"/>
52 <line x1="10" y1="20.5" x2="470" y2="20.5"/>
53 <line x1="10" y1="30.5" x2="470" y2="30.5"/>
54 <line x1="10" y1="40.5" x2="470" y2="40.5"/>
55 <line x1="10" y1="50.5" x2="470" y2="50.5"/>
56 <line x1="10" y1="60.5" x2="470" y2="60.5"/>
57 <line x1="10" y1="70.5" x2="470" y2="70.5"/>
58 <line x1="10" y1="80.5" x2="470" y2="80.5"/>
59 <line x1="10" y1="90.5" x2="470" y2="90.5"/>
60 <line x1="10" y1="100.5" x2="470" y2="100.5"/>
61 <line x1="10" y1="110.5" x2="470" y2="110.5"/>
62 <line x1="10" y1="120.5" x2="470" y2="120.5"/>
63 <line x1="10" y1="130.5" x2="470" y2="130.5"/>
64 <line x1="10" y1="140.5" x2="470" y2="140.5"/>
65 <line x1="10" y1="150.5" x2="470" y2="150.5"/>
66 <line x1="10" y1="160.5" x2="470" y2="160.5"/>
67 <line x1="10" y1="170.5" x2="470" y2="170.5"/>
68 <line x1="10" y1="180.5" x2="470" y2="180.5"/>
69 <line x1="10" y1="190.5" x2="470" y2="190.5"/>
70 <line x1="10" y1="200.5" x2="470" y2="200.5"/>
71 <line x1="10" y1="210.5" x2="470" y2="210.5"/>
72 <line x1="10" y1="220.5" x2="470" y2="220.5"/>
73 <line x1="10" y1="230.5" x2="470" y2="230.5"/>
74 <line x1="10" y1="240.5" x2="470" y2="240.5"/>
75 <line x1="10" y1="250.5" x2="470" y2="250.5"/>
76 <line x1="10" y1="260.5" x2="470" y2="260.5"/>
77 <line y1="10" x1="10.5" y2="260.5" x2="10.5"/>
78 <line y1="10" x1="20.5" y2="260.5" x2="20.5"/>
79 <line y1="10" x1="30.5" y2="260.5" x2="30.5"/>
80 <line y1="10" x1="40.5" y2="260.5" x2="40.5"/>
81 <line y1="10" x1="50.5" y2="260.5" x2="50.5"/>
82 <line y1="10" x1="60.5" y2="260.5" x2="60.5"/>
83 <line y1="10" x1="70.5" y2="260.5" x2="70.5"/>
84 <line y1="10" x1="80.5" y2="260.5" x2="80.5"/>
85 <line y1="10" x1="90.5" y2="260.5" x2="90.5"/>
86 <line y1="10" x1="100.5" y2="260.5" x2="100.5"/>
87 <line y1="10" x1="110.5" y2="260.5" x2="110.5"/>
88 <line y1="10" x1="120.5" y2="260.5" x2="120.5"/>
89 <line y1="10" x1="130.5" y2="260.5" x2="130.5"/>
90 <line y1="10" x1="140.5" y2="260.5" x2="140.5"/>
91 <line y1="10" x1="150.5" y2="260.5" x2="150.5"/>
92 <line y1="10" x1="160.5" y2="260.5" x2="160.5"/>
93 <line y1="10" x1="170.5" y2="260.5" x2="170.5"/>
94 <line y1="10" x1="180.5" y2="260.5" x2="180.5"/>
95 <line y1="10" x1="190.5" y2="260.5" x2="190.5"/>
96 <line y1="10" x1="200.5" y2="260.5" x2="200.5"/>
97 <line y1="10" x1="210.5" y2="260.5" x2="210.5"/>
98 <line y1="10" x1="220.5" y2="260.5" x2="220.5"/>
99 <line y1="10" x1="230.5" y2="260.5" x2="230.5"/>
100 <line y1="10" x1="240.5" y2="260.5" x2="240.5"/>
101 <line y1="10" x1="250.5" y2="260.5" x2="250.5"/>
102 <line y1="10" x1="260.5" y2="260.5" x2="260.5"/>
103 <line y1="10" x1="270.5" y2="260.5" x2="270.5"/>
104 <line y1="10" x1="280.5" y2="260.5" x2="280.5"/>
105 <line y1="10" x1="290.5" y2="260.5" x2="290.5"/>
106 <line y1="10" x1="300.5" y2="260.5" x2="300.5"/>
107 <line y1="10" x1="310.5" y2="260.5" x2="310.5"/>
108 <line y1="10" x1="320.5" y2="260.5" x2="320.5"/>
109 <line y1="10" x1="330.5" y2="260.5" x2="330.5"/>
110 <line y1="10" x1="340.5" y2="260.5" x2="340.5"/>
111 <line y1="10" x1="350.5" y2="260.5" x2="350.5"/>
112 <line y1="10" x1="360.5" y2="260.5" x2="360.5"/>
113 <line y1="10" x1="370.5" y2="260.5" x2="370.5"/>
114 <line y1="10" x1="380.5" y2="260.5" x2="380.5"/>
115 <line y1="10" x1="390.5" y2="260.5" x2="390.5"/>
116 <line y1="10" x1="400.5" y2="260.5" x2="400.5"/>
117 <line y1="10" x1="410.5" y2="260.5" x2="410.5"/>
118 <line y1="10" x1="420.5" y2="260.5" x2="420.5"/>
119 <line y1="10" x1="430.5" y2="260.5" x2="430.5"/>
120 <line y1="10" x1="440.5" y2="260.5" x2="440.5"/>
121 <line y1="10" x1="450.5" y2="260.5" x2="450.5"/>
122 <line y1="10" x1="460.5" y2="260.5" x2="460.5"/>
123 <line y1="10" x1="470.5" y2="260.5" x2="470.5"/>
124 </g>
125 <!-- ====================================================================== -->
126 <!-- Now, test elementary transforms. For each transform, 3 markers are -->
127 <!-- placed where the user space is expected after transformations for the -->
128 <!-- origin (black) and the points in (20, 0) (blue) and (0, 20) (red). -->
129 <!-- Then, a blue line going from (0, 0) to (20, 0) is drawn and a red line -->
130 <!-- going from (0, 0) to (0, 20), after applying the elementary -->
131 <!-- transformation. If the test succeeds, the red line should join the -->
132 <!-- black marker to the red marker and the blue line the black marker to -->
133 <!-- the blue marker. -->
134 <!-- ====================================================================== -->
135 <g id="elementary-transforms-test" transform="translate(0, 10)">
136 <g id="elementary-transforms">
137 <!-- Translate -->
138 <g transform="translate(50, 50)">
139 <rect x="0" y="0" width="20" height="2" fill="blue"/>
140 <rect x="0" y="0" width="2" height="20" fill="red"/>
141 </g>
142 <!-- Rotate -90 deg about (150, 70) -->
143 <g transform="translate(150, 70) rotate(-90)">
144 <rect x="0" y="0" width="20" height="2" fill="blue"/>
145 <rect x="0" y="0" width="2" height="20" fill="red"/>
146 </g>
147 <!-- Skew X -->
148 <g transform="translate(250, 50) skewX(45)">
149 <rect x="0" y="0" width="20" height="2" fill="blue"/>
150 <rect x="0" y="0" width="2" height="20" fill="red"/>
151 </g>
152 <!-- Skew Y -->
153 <g transform="translate(350, 50) skewY(45)">
154 <rect x="0" y="0" width="20" height="2" fill="blue"/>
155 <rect x="0" y="0" width="2" height="20" fill="red"/>
156 </g>
157 <!-- Scale 2 -->
158 <g transform="translate(210, 120) scale(2)">
159 <rect x="0" y="0" width="20" height="1" fill="blue"/>
160 <rect x="0" y="0" width="1" height="20" fill="red"/>
161 </g>
162 </g>
163 <!-- elementary-transforms -->
164 <!-- Draw all the markers -->
165 <g id="elementary-transforms-test-markers">
166 <!-- Translate -->
167 <text x="40" y="40">translate (50, 50)</text>
168 <rect x="48" y="48" width="5" height="5" fill="black"/>
169 <rect x="68" y="48" width="5" height="5" fill="blue"/>
170 <rect x="48" y="68" width="5" height="5" fill="red"/>
171 <!-- Rotate -90 deg about (150, 70) -->
172 <text x="140" y="40">rotate(-90)</text>
173 <rect x="148" y="68" width="5" height="5" fill="black"/>
174 <rect x="148" y="48" width="5" height="5" fill="blue"/>
175 <rect x="168" y="68" width="5" height="5" fill="red"/>
176 <!-- Skew X -->
177 <text x="240" y="40">skew x (45)</text>
178 <rect x="248" y="48" width="5" height="5" fill="black"/>
179 <rect x="268" y="48" width="5" height="5" fill="blue"/>
180 <rect x="268" y="68" width="5" height="5" fill="red"/>
181 <!-- Skew Y -->
182 <text x="340" y="40">skew y (45)</text>
183 <rect x="348" y="48" width="5" height="5" fill="black"/>
184 <rect x="368" y="68" width="5" height="5" fill="blue"/>
185 <rect x="348" y="68" width="5" height="5" fill="red"/>
186 <!-- Scale 2 -->
187 <text x="200" y="110">scale (2)</text>
188 <rect x="208" y="118" width="5" height="5" fill="black"/>
189 <rect x="248" y="118" width="5" height="5" fill="blue"/>
190 <rect x="208" y="158" width="5" height="5" fill="red"/>
191 </g>
192 <!-- elementary-transforms-test-markers -->
193 </g>
194 <g id="nested-transforms-test">
195 <g id="nested-transforms">
196 <!-- scale/translate in transform attribute -->
197 <g transform="scale(3, 2) translate(16.666667, 105)">
198 <rect x="0" y="0" width="20" height="1" fill="blue"/>
199 <rect x="0" y="0" width="0.67" height="20" fill="red"/>
200 </g>
201 <!-- scale/translate in successive elements -->
202 <g transform="translate(200, 0)">
203 <g transform="scale(3, 2)">
204 <g transform="translate(16.666667, 105)">
205 <rect x="0" y="0" width="20" height="1" fill="blue"/>
206 <rect x="0" y="0" width="0.67" height="20" fill="red"/>
207 </g>
208 </g>
209 </g>
210 </g>
211 <!-- nested-transforms -->
212 <g id="nested-transforms-test-markers">
213 <!-- scale and translate -->
214 <text x="40" y="200">scale(25, 95) and translate(2, 2)</text>
215 <rect x="48" y="208" width="5" height="5" fill="black"/>
216 <rect x="108" y="208" width="5" height="5" fill="blue"/>
217 <rect x="48" y="248" width="5" height="5" fill="red"/>
218 <!-- scale then translate -->
219 <text x="240" y="200">scale(25, 95) then translate(2, 2)</text>
220 <rect x="248" y="208" width="5" height="5" fill="black"/>
221 <rect x="308" y="208" width="5" height="5" fill="blue"/>
222 <rect x="248" y="248" width="5" height="5" fill="red"/>
223 </g>
224 <!-- nested-transforms-test-markers -->
225 </g>
226 <!-- nested-transforms test -->
227 </g>
228 </g>
229 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
230 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
231 </g>
232 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
233 <!-- comment out this watermark once the test is approved -->
234 <!--<g id="draft-watermark">
235 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
236 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
237 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
238 </g>-->
239 </svg>