| 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="NR" status="accepted" |
| 15 |
version="$Revision: 1.8 $" testname="$RCSfile: animate-elem-77-t.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/animate.html#Animation"> |
| 17 |
<p> |
| 18 |
Tests the inheritance of animated values on text. |
| 19 |
</p> |
| 20 |
<p> |
| 21 |
This test demonstrates how <set> elements change |
| 22 |
text properties on a <text> element. For |
| 23 |
each of the text properties being tested, 3 |
| 24 |
<set> elements are set. The first <set> |
| 25 |
element acts directly on the <text> element. The |
| 26 |
second <set> element acts on a <g> containing |
| 27 |
children. The third <set> element acts on an <a> |
| 28 |
containing children. In each case the test validates that |
| 29 |
the animated value set on the <g> and <a> |
| 30 |
elements is inherited by the <text> element. |
| 31 |
All the <set> elements have a begin attribute |
| 32 |
set to 0s with an offset of 1s after end. |
| 33 |
So, the animation will apply 1s after the document is loaded |
| 34 |
and will repeat every 1s after the animation ends. |
| 35 |
</p> |
| 36 |
<p> |
| 37 |
The first <set> validates the transform property. When |
| 38 |
applied to the <text> element, the letter A will be |
| 39 |
translated to the right every 1s, in the <text> column. |
| 40 |
When applied to the <g> element, the letter A inherits the |
| 41 |
transform value and is translated to the right every 1s, as |
| 42 |
seen in the <g> column. When applied to the <a> |
| 43 |
element, the letter A inherits the transform value and is |
| 44 |
translated to the right every 1s, as seen in <a> column. |
| 45 |
</p> |
| 46 |
<p> |
| 47 |
The second <set> validates the text-anchor attribute. |
| 48 |
When applied to the <text> element, the anchor position |
| 49 |
of letter A is moved from start to end. When applied to the |
| 50 |
<g> and <a> element, the property is inherited |
| 51 |
and hence the anchor position of letter A is moved from start |
| 52 |
to end in the second row. |
| 53 |
</p> |
| 54 |
<p> |
| 55 |
The third <set> validates the font-size attribute. |
| 56 |
The font size of letter A is changed from 20 to 30. |
| 57 |
When applied to <g> and <a> elements, the letter |
| 58 |
A inherits the font-size and hence in row 3, letter A has a |
| 59 |
font-size of 30 in all 3 right columns of row 3. |
| 60 |
</p> |
| 61 |
<p> |
| 62 |
The fourth <set> validates the font-family attribute. |
| 63 |
The font-family is changed from default to serif. |
| 64 |
When applied to <g> and <a> elements, the letter |
| 65 |
A inherits the font-family attribute and hence in row 4, |
| 66 |
letter A has serif font-family in all 3 columns. |
| 67 |
</p> |
| 68 |
<p> |
| 69 |
The fifth <set> validates the font-style attribute. |
| 70 |
The font-style is changed from normal to italic. |
| 71 |
When applied to <g> and <a> elements, the letter |
| 72 |
A inherits the font-style attribute and hence in row 5, |
| 73 |
letter A is animated to italic in all 3 columns. |
| 74 |
</p> |
| 75 |
<p> |
| 76 |
The sixth <set> validates the font-weight attribute. |
| 77 |
The font-weight is changed from normal to bold. |
| 78 |
When applied to <g> and <a> elements, the letter |
| 79 |
A inherits the font-weight attribute and hence in row 6, |
| 80 |
letter A is changed to bold on the right. |
| 81 |
</p> |
| 82 |
</d:testDescription> |
| 83 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 84 |
<p>Run the test. No interaction required.</p> |
| 85 |
</d:operatorScript> |
| 86 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 87 |
<p> |
| 88 |
The document is animated such that it alternates between two states, an alternation occurring every second. |
| 89 |
For the test to pass each row must show a colored letter A that alternates between the two exact shapes and positions shown |
| 90 |
by the gray silhouettes. |
| 91 |
</p> |
| 92 |
</d:passCriteria> |
| 93 |
</d:SVGTestCase> |
| 94 |
<title id="test-title">$RCSfile: animate-elem-77-t.svg,v $</title> |
| 95 |
<defs> |
| 96 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 97 |
<font-face-src> |
| 98 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 99 |
</font-face-src> |
| 100 |
</font-face> |
| 101 |
<font-face font-family="FreeSerif" unicode-range="U+0-7F" font-weight="400"> |
| 102 |
<font-face-src> |
| 103 |
<font-face-uri xlink:href="../resources/FreeSerif.svg#FreeSerif"/> |
| 104 |
</font-face-src> |
| 105 |
</font-face> |
| 106 |
<font-face font-family="FreeSerif" unicode-range="U+0-7F" font-weight="700"> |
| 107 |
<font-face-src> |
| 108 |
<font-face-uri xlink:href="../resources/FreeSerifBold.svg#FreeSerifBold"/> |
| 109 |
</font-face-src> |
| 110 |
</font-face> |
| 111 |
<font-face font-family="FreeSerif" unicode-range="U+0-7F" font-weight="400" font-style="italic"> |
| 112 |
<font-face-src> |
| 113 |
<font-face-uri xlink:href="../resources/FreeSerifItalic.svg#FreeSerifItalic"/> |
| 114 |
</font-face-src> |
| 115 |
</font-face> |
| 116 |
<font-face font-family="FreeSerif" unicode-range="U+0-7F" font-weight="700" font-style="italic"> |
| 117 |
<font-face-src> |
| 118 |
<font-face-uri xlink:href="../resources/FreeSerifBoldItalic.svg#FreeSerifBoldItalic"/> |
| 119 |
</font-face-src> |
| 120 |
</font-face> |
| 121 |
</defs> |
| 122 |
<g id="test-body-content" font-family="FreeSerif, serif" font-size="18"> |
| 123 |
<text text-anchor="middle" x="240" y="30" font-size="20">text</text> |
| 124 |
<g transform="translate(80, 80)"> |
| 125 |
<g transform="translate(20,10)" text-anchor="end" font-size="14"> |
| 126 |
<text x="5" y="15">transform</text> |
| 127 |
<text x="5" y="50">text-anchor</text> |
| 128 |
<text x="5" y="85">font-size</text> |
| 129 |
<text x="5" y="120">font-family</text> |
| 130 |
<text x="5" y="155">font-style</text> |
| 131 |
<text x="5" y="190">font-weight</text> |
| 132 |
</g> |
| 133 |
|
| 134 |
<g id="type" transform="translate(90, -10)" text-anchor="middle" font-size="14"> |
| 135 |
<text x="20" y="3"><text></text> |
| 136 |
<text x="135" y="3"><g></text> |
| 137 |
<text x="250" y="3"><a></text> |
| 138 |
</g> |
| 139 |
|
| 140 |
<g transform="translate(80,5)" text-anchor="start" font-size="20" fill="rgb(204,0,102)"> |
| 141 |
<text id="one" x="10" y="20" fill="#aaa">A </text> |
| 142 |
|
| 143 |
<g id="setOne"> |
| 144 |
<defs> |
| 145 |
<g id="setOneRef"> |
| 146 |
<text x="10" y="20" fill="#aaa">A </text> |
| 147 |
<text x="10" y="20" fill="#aaa" transform="translate(30,0)">A </text> |
| 148 |
</g> |
| 149 |
</defs> |
| 150 |
|
| 151 |
<use xlink:href="#setOneRef"/> |
| 152 |
<use xlink:href="#setOneRef" x="110"/> |
| 153 |
<use xlink:href="#setOneRef" x="220"/> |
| 154 |
|
| 155 |
<text x="10" y="20"> |
| 156 |
A |
| 157 |
<animateTransform attributeName="transform" id="firstSet" type="translate" from="30,0" to="30,0" begin="0s; firstSet.end + 1s" dur="1s"/> |
| 158 |
</text> |
| 159 |
|
| 160 |
<g transform="translate(110, 0)"> |
| 161 |
<animateTransform attributeName="transform" id="secondSet" type="translate" from="140,0" to="140,0" begin="0s; secondSet.end + 1s" dur="1s"/> |
| 162 |
<text x="10" y="20">A</text> |
| 163 |
</g> |
| 164 |
|
| 165 |
<a xlink:href="" transform="translate(220, 0)"> |
| 166 |
<animateTransform attributeName="transform" id="thirdSet" type="translate" from="250,0" to="250,0" begin="0s; thirdSet.end + 1s" dur="1s"/> |
| 167 |
<text x="10" y="20">A</text> |
| 168 |
</a> |
| 169 |
</g> |
| 170 |
|
| 171 |
<g id="setTwo" transform="translate(0,35)"> |
| 172 |
<defs> |
| 173 |
<g id="setTwoRef"> |
| 174 |
<text x="10" y="20" fill="#aaa">A </text> |
| 175 |
<text x="10" y="20" fill="#aaa" transform="translate(40,0)" text-anchor="end">A</text> |
| 176 |
</g> |
| 177 |
</defs> |
| 178 |
|
| 179 |
<use xlink:href="#setTwoRef"/> |
| 180 |
<use xlink:href="#setTwoRef" x="110"/> |
| 181 |
<use xlink:href="#setTwoRef" x="220"/> |
| 182 |
|
| 183 |
<text x="10" y="20"> |
| 184 |
A |
| 185 |
<set id="secondSet1" attributeName="text-anchor" to="end" begin="0s; secondSet1.end + 1s" dur="1s"/> |
| 186 |
<animateTransform attributeName="transform" id="secondSet1_1" type="translate" from="40,0" to="40,0" begin="0s; secondSet1_1.end + 1s" dur="1s"/> |
| 187 |
</text> |
| 188 |
|
| 189 |
<g> |
| 190 |
<set id="secondSet2" attributeName="text-anchor" to="end" begin="0s; secondSet2.end + 1s" dur="1s"/> |
| 191 |
<text x="120" y="20"> |
| 192 |
A |
| 193 |
<animateTransform attributeName="transform" id="secondSet2_1" type="translate" from="40,0" to="40,0" begin="0s; secondSet2_1.end + 1s" dur="1s"/> |
| 194 |
</text> |
| 195 |
</g> |
| 196 |
|
| 197 |
<a> |
| 198 |
<set id="secondSet3" attributeName="text-anchor" to="end" begin="0s; secondSet3.end + 1s" dur="1s"/> |
| 199 |
<text x="230" y="20"> |
| 200 |
A |
| 201 |
<animateTransform attributeName="transform" id="secondSet3_1" type="translate" from="40,0" to="40,0" begin="0s; secondSet3_1.end + 1s" dur="1s"/> |
| 202 |
</text> |
| 203 |
</a> |
| 204 |
</g> |
| 205 |
|
| 206 |
<g id="setThree" transform="translate(0,70)"> |
| 207 |
<defs> |
| 208 |
<g id="setThreeRef"> |
| 209 |
<text x="10" y="20" fill="#aaa">A </text> |
| 210 |
<text x="40" y="20" font-size="30" fill="#aaa">A</text> |
| 211 |
</g> |
| 212 |
</defs> |
| 213 |
<use xlink:href="#setThreeRef"/> |
| 214 |
<use xlink:href="#setThreeRef" x="110"/> |
| 215 |
<use xlink:href="#setThreeRef" x="220"/> |
| 216 |
|
| 217 |
<text x="10" y="20"> |
| 218 |
A |
| 219 |
<set id="thirdSet1" attributeName="font-size" to="30" begin="0s; thirdSet1.end + 1s" dur="1s"/> |
| 220 |
<animateTransform attributeName="transform" id="thirdSet1_1" type="translate" from="30,0" to="30,0" begin="0s; thirdSet1_1.end + 1s" dur="1s"/> |
| 221 |
</text> |
| 222 |
|
| 223 |
<g> |
| 224 |
<set id="thirdSet2" attributeName="font-size" to="30" begin="0s; thirdSet2.end + 1s" dur="1s"/> |
| 225 |
<text x="120" y="20"> |
| 226 |
A |
| 227 |
<animateTransform attributeName="transform" id="thirdSet2_1" type="translate" from="30,0" to="30,0" begin="0s; thirdSet2_1.end + 1s" dur="1s"/> |
| 228 |
</text> |
| 229 |
</g> |
| 230 |
|
| 231 |
<a> |
| 232 |
<set id="thirdSet3" attributeName="font-size" to="30" begin="0s; thirdSet3.end + 1s" dur="1s"/> |
| 233 |
<text x="230" y="20"> |
| 234 |
A |
| 235 |
<animateTransform attributeName="transform" id="thirdSet3_1" type="translate" from="30, 0" to="30,0" begin="0s; thirdSet3_1.end + 1s" dur="1s"/> |
| 236 |
</text> |
| 237 |
</a> |
| 238 |
</g> |
| 239 |
|
| 240 |
<g id="setFour" transform="translate(0,105)"> |
| 241 |
<defs> |
| 242 |
<g id="setFourRef"> |
| 243 |
<text x="10" y="20" font-size="30" fill="#aaa" font-family="sans-serif">A</text> |
| 244 |
<text x="40" y="20" font-size="30" fill="#aaa" font-family="serif">A</text> |
| 245 |
</g> |
| 246 |
</defs> |
| 247 |
<use xlink:href="#setFourRef"/> |
| 248 |
<use xlink:href="#setFourRef" x="110"/> |
| 249 |
<use xlink:href="#setFourRef" x="220"/> |
| 250 |
|
| 251 |
<text x="10" y="20" font-size="30" font-family="sans-serif"> |
| 252 |
A |
| 253 |
<set id="fourthSet1" attributeName="font-family" to="serif" begin="0s; fourthSet1.end + 1s" dur="1s"/> |
| 254 |
<animateTransform attributeName="transform" id="fourthSet1_1" type="translate" from="30,0" to="30,0" begin="0s; fourthSet1_1.end + 1s" dur="1s"/> |
| 255 |
</text> |
| 256 |
|
| 257 |
<g transform="translate(110,0)" font-family="sans-serif"> |
| 258 |
<set id="fourthSet2" attributeName="font-family" to="serif" begin="0s; fourthSet2.end + 1s" dur="1s"/> |
| 259 |
<text x="10" y="20" font-size="30"> |
| 260 |
A |
| 261 |
<animateTransform attributeName="transform" id="fourthSet2_1" type="translate" from="30,0" to="30,0" begin="0s; fourthSet2_1.end + 1s" dur="1s"/> |
| 262 |
</text> |
| 263 |
</g> |
| 264 |
|
| 265 |
<a xlink:href="" transform="translate(220,0)" font-family="sans-serif"> |
| 266 |
<set id="fourthSet3" attributeName="font-family" to="serif" begin="0s; fourthSet3.end + 1s" dur="1s"/> |
| 267 |
<text x="10" y="20" font-size="30"> |
| 268 |
A |
| 269 |
<animateTransform attributeName="transform" id="fourthSet3_1" type="translate" from="30,0" to="30,0" begin="0s; fourthSet2_1.end + 1s" dur="1s"/> |
| 270 |
</text> |
| 271 |
</a> |
| 272 |
|
| 273 |
</g> |
| 274 |
|
| 275 |
<g id="setFive" transform="translate(0,140)"> |
| 276 |
<defs> |
| 277 |
<g id="setFiveRef"> |
| 278 |
<text x="10" y="20" fill="#aaa">A</text> |
| 279 |
<text x="40" y="20" fill="#aaa" font-style="italic">A</text> |
| 280 |
</g> |
| 281 |
</defs> |
| 282 |
|
| 283 |
<use xlink:href="#setFiveRef"/> |
| 284 |
<use xlink:href="#setFiveRef" x="110"/> |
| 285 |
<use xlink:href="#setFiveRef" x="220"/> |
| 286 |
|
| 287 |
<text x="10" y="20"> |
| 288 |
A |
| 289 |
<set id="fifthSet1" attributeName="font-style" to="italic" begin="0s; fifthSet1.end + 1s" dur="1s"/> |
| 290 |
<animateTransform attributeName="transform" id="fifthSet1_1" type="translate" from="30,0" to="30,0" begin="0s; fifthSet1_1.end + 1s" dur="1s"/> |
| 291 |
</text> |
| 292 |
|
| 293 |
<g transform="translate(110,0)"> |
| 294 |
<set id="fifthSet2" attributeName="font-style" to="italic" begin="0s; fifthSet2.end + 1s" dur="1s"/> |
| 295 |
<text x="10" y="20"> |
| 296 |
A |
| 297 |
<animateTransform attributeName="transform" id="fifthSet2_1" type="translate" from="30,0" to="30,0" begin="0s; fifthSet2_1.end + 1s" dur="1s"/> |
| 298 |
</text> |
| 299 |
</g> |
| 300 |
|
| 301 |
<a xlink:href="" transform="translate(220,0)"> |
| 302 |
<set id="fifthSet3" attributeName="font-style" to="italic" begin="0s; fifthSet3.end + 1s" dur="1s"/> |
| 303 |
<text x="10" y="20"> |
| 304 |
A |
| 305 |
<animateTransform attributeName="transform" id="fifthSet3_1" type="translate" from="30,0" to="30,0" begin="0s; fifthSet3_1.end + 1s" dur="1s"/> |
| 306 |
</text> |
| 307 |
</a> |
| 308 |
</g> |
| 309 |
|
| 310 |
<g id="setSix" transform="translate(0,175)"> |
| 311 |
<defs> |
| 312 |
<g id="setSixRef"> |
| 313 |
<text x="10" y="20" fill="#aaa">A</text> |
| 314 |
<text x="40" y="20" fill="#aaa" font-weight="bold">A</text> |
| 315 |
</g> |
| 316 |
</defs> |
| 317 |
|
| 318 |
<use xlink:href="#setSixRef"/> |
| 319 |
<use xlink:href="#setSixRef" x="110"/> |
| 320 |
<use xlink:href="#setSixRef" x="220"/> |
| 321 |
|
| 322 |
<text x="10" y="20"> |
| 323 |
A |
| 324 |
<set id="sixthSet1" attributeName="font-weight" to="bold" begin="0s; sixthSet1.end + 1s" dur="1s"/> |
| 325 |
<animateTransform attributeName="transform" id="sixthSet1_1" type="translate" from="30,0" to="30,0" begin="0s; sixthSet1_1.end + 1s" dur="1s"/> |
| 326 |
</text> |
| 327 |
|
| 328 |
<g transform="translate(110,0)"> |
| 329 |
<set id="sixthSet2" attributeName="font-weight" to="bold" begin="0s; sixthSet2.end + 1s" dur="1s"/> |
| 330 |
<text x="10" y="20"> |
| 331 |
A |
| 332 |
<animateTransform attributeName="transform" id="sixthSet2_1" type="translate" from="30,0" to="30,0" begin="0s; sixthSet2_1.end + 1s" dur="1s"/> |
| 333 |
</text> |
| 334 |
</g> |
| 335 |
|
| 336 |
<a xlink:href="" transform="translate(220,0)"> |
| 337 |
<set id="sixthSet3" attributeName="font-weight" to="bold" begin="0s; sixthSet3.end + 1s" dur="1s"/> |
| 338 |
<text x="10" y="20"> |
| 339 |
A |
| 340 |
<animateTransform attributeName="transform" id="sixthSet3_1" type="translate" from="30,0" to="30,0" begin="0s; sixthSet3_1.end + 1s" dur="1s"/> |
| 341 |
</text> |
| 342 |
</a> |
| 343 |
</g> |
| 344 |
</g> |
| 345 |
</g> |
| 346 |
</g> |
| 347 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 348 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text> |
| 349 |
</g> |
| 350 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 351 |
<!-- comment out this watermark once the test is approved --> |
| 352 |
<!--<g id="draft-watermark"> |
| 353 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 354 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 355 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 356 |
</g>--> |
| 357 |
</svg> |