| 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.9 $" testname="$RCSfile: animate-elem-46-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 |
This test validates the operation of the animate element on the various |
| 19 |
text and font properties. This test is very similar to animate-elem-77-t.svg |
| 20 |
which uses the set element instead of the animate element to modify graphics |
| 21 |
properties. |
| 22 |
</p> |
| 23 |
<p> |
| 24 |
For each text or font properties, there are three tests. One animates the text or font |
| 25 |
property directly on a text element which uses the |
| 26 |
property. The other two tests apply the animation on a container element (g and |
| 27 |
a), and validate that the animated property is inherited by children text elements. |
| 28 |
</p> |
| 29 |
<p> |
| 30 |
For each animation test, the element on which the animation is applied is also |
| 31 |
translated by an animation so that the various states of the animation can |
| 32 |
be checked more easily. There is a gray reference marker which shows |
| 33 |
the expected animation state at the begining of the animation, mid-way, or at the |
| 34 |
end of the animation. |
| 35 |
</p> |
| 36 |
</d:testDescription> |
| 37 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 38 |
<p>Run the test. No interaction required.</p> |
| 39 |
</d:operatorScript> |
| 40 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 41 |
<p> |
| 42 |
There are 5 text properties that are animated, and for each of these, |
| 43 |
they are animated in one of three different ways (the three columns). The |
| 44 |
three animations in each row must be the same. |
| 45 |
</p> |
| 46 |
<p> |
| 47 |
For each animation test, the element on which the animation is applied is also |
| 48 |
translated by an animation so that the various states of the animation can |
| 49 |
be checked more easily. Each test has three gray silhouettes, showing the size |
| 50 |
and shape that the "A" must have at the start, middle and end of the animation. |
| 51 |
</p> |
| 52 |
<p> |
| 53 |
The animation of font-size must show a continuous change of the font size. |
| 54 |
</p> |
| 55 |
<p> |
| 56 |
The following animations must animate discretely: text-anchor, font-family, |
| 57 |
font-style, font-weight. |
| 58 |
</p> |
| 59 |
<p> |
| 60 |
The test passes if all of the above conditions are met. |
| 61 |
</p> |
| 62 |
</d:passCriteria> |
| 63 |
</d:SVGTestCase> |
| 64 |
<title id="test-title">$RCSfile: animate-elem-46-t.svg,v $</title> |
| 65 |
<defs> |
| 66 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 67 |
<font-face-src> |
| 68 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 69 |
</font-face-src> |
| 70 |
</font-face> |
| 71 |
</defs> |
| 72 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 73 |
<defs> |
| 74 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F" font-weight="700"> |
| 75 |
<font-face-src> |
| 76 |
<font-face-uri xlink:href="../resources/SVGFreeSansBold.svg#ascii"/> |
| 77 |
</font-face-src> |
| 78 |
</font-face> |
| 79 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F" font-style="italic"> |
| 80 |
<font-face-src> |
| 81 |
<font-face-uri xlink:href="../resources/SVGFreeSansItalic.svg#ascii"/> |
| 82 |
</font-face-src> |
| 83 |
</font-face> |
| 84 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F" font-weight="700" font-style="italic"> |
| 85 |
<font-face-src> |
| 86 |
<font-face-uri xlink:href="../resources/SVGFreeSansBoldItalic.svg#ascii"/> |
| 87 |
</font-face-src> |
| 88 |
</font-face> |
| 89 |
<font-face font-family="FreeSerif" unicode-range="U+0-7F" font-weight="bold"> |
| 90 |
<font-face-src> |
| 91 |
<font-face-uri xlink:href="../resources/FreeSerifBold.svg#FreeSerifBold"/> |
| 92 |
</font-face-src> |
| 93 |
</font-face> |
| 94 |
</defs> |
| 95 |
<g transform="translate(80, 80)"> |
| 96 |
<g transform="translate(20,10)" text-anchor="end" font-size="14"> |
| 97 |
<text x="5" y="15">text-anchor</text> |
| 98 |
<text x="5" y="50">font-size</text> |
| 99 |
<text x="5" y="85">font-family</text> |
| 100 |
<text x="5" y="120">font-style</text> |
| 101 |
<text x="5" y="155">font-weight</text> |
| 102 |
</g> |
| 103 |
|
| 104 |
<g id="type" transform="translate(90, -10)" text-anchor="middle" font-size="14"> |
| 105 |
<text x="20" y="3"><text></text> |
| 106 |
<text x="135" y="3"><g></text> |
| 107 |
<text x="250" y="3"><a></text> |
| 108 |
</g> |
| 109 |
|
| 110 |
<g transform="translate(80,5)" text-anchor="start" font-size="20" fill="rgb(204,0,102)"> |
| 111 |
<g id="animateZero"> |
| 112 |
<defs> |
| 113 |
<g id="animateZeroRef" font-size="30" font-weight="bold"> |
| 114 |
<text x="0" y="20" fill="#aaa" text-anchor="end">A</text> |
| 115 |
<rect x="-2" y="18" width="4" height="4" fill="#aaa"/> |
| 116 |
<text x="0" y="20" fill="#aaa" text-anchor="middle" transform="translate(30,0)">A</text> |
| 117 |
<rect x="-2" y="18" width="4" height="4" fill="#aaa" transform="translate(30,0)"/> |
| 118 |
<text x="0" y="20" fill="#aaa" text-anchor="start" transform="translate(60,0)">A</text> |
| 119 |
<rect x="-2" y="18" width="4" height="4" fill="#aaa" transform="translate(60,0)"/> |
| 120 |
<rect x="-2" y="18" width="4" height="4"> |
| 121 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" dur="3s" fill="freeze" calcMode="discrete"/> |
| 122 |
</rect> |
| 123 |
</g> |
| 124 |
</defs> |
| 125 |
|
| 126 |
<use xlink:href="#animateZeroRef"/> |
| 127 |
<use xlink:href="#animateZeroRef" x="110"/> |
| 128 |
<use xlink:href="#animateZeroRef" x="220"/> |
| 129 |
|
| 130 |
<text id="textID_0" x="0" y="20" text-anchor="end" font-size="30" font-weight="bold">A</text> |
| 131 |
<animate xlink:href="#textID_0" attributeName="text-anchor" values="end;middle;start" dur="3s" fill="freeze"/> |
| 132 |
<animateTransform xlink:href="#textID_0" attributeName="transform" type="translate" values="0;30;60" dur="3s" fill="freeze" calcMode="discrete"/> |
| 133 |
|
| 134 |
|
| 135 |
<g transform="translate(110, 0)" text-anchor="end" font-size="30" font-weight="bold"> |
| 136 |
<animate attributeName="text-anchor" values="end;middle;start" dur="3s" fill="freeze"/> |
| 137 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/> |
| 138 |
<text x="0" y="20">A</text> |
| 139 |
</g> |
| 140 |
|
| 141 |
<a xlink:href="" transform="translate(220, 0)" text-anchor="end" font-size="30" font-weight="bold"> |
| 142 |
<animate attributeName="text-anchor" values="end;middle;start" dur="3s" fill="freeze"/> |
| 143 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/> |
| 144 |
<text x="0" y="20">A</text> |
| 145 |
</a> |
| 146 |
</g> |
| 147 |
|
| 148 |
<g id="animateOne" transform="translate(0,35)"> |
| 149 |
<defs> |
| 150 |
<g id="animateOneRef" font-weight="bold" text-anchor="start"> |
| 151 |
<text x="0" y="20" fill="#aaa" font-size="30">A</text> |
| 152 |
<text x="0" y="20" fill="#aaa" font-size="12" transform="translate(30,0)">A</text> |
| 153 |
<text x="0" y="20" fill="#aaa" font-size="30" transform="translate(60,0)">A</text> |
| 154 |
</g> |
| 155 |
</defs> |
| 156 |
|
| 157 |
<use xlink:href="#animateOneRef"/> |
| 158 |
<use xlink:href="#animateOneRef" x="110"/> |
| 159 |
<use xlink:href="#animateOneRef" x="220"/> |
| 160 |
|
| 161 |
<text id="textID_1" x="0" y="20" font-size="12" font-weight="bold">A</text> |
| 162 |
<animate xlink:href="#textID_1" attributeName="font-size" values="30;12;30" dur="3s" fill="freeze"/> |
| 163 |
<animateTransform xlink:href="#textID_1" attributeName="transform" type="translate" from="0" to="60" dur="3s" fill="freeze"/> |
| 164 |
|
| 165 |
<g transform="translate(110, 0)" font-size="12" font-weight="bold"> |
| 166 |
<animate attributeName="font-size" values="30;12;30" dur="3s" fill="freeze"/> |
| 167 |
<animateTransform attributeName="transform" type="translate" from="0" to="60" dur="3s" fill="freeze" additive="sum"/> |
| 168 |
<text x="0" y="20">A</text> |
| 169 |
</g> |
| 170 |
|
| 171 |
<a xlink:href="" transform="translate(220,0)" font-size="12" font-weight="bold"> |
| 172 |
<animate attributeName="font-size" values="30;12;30" dur="3s" fill="freeze"/> |
| 173 |
<animateTransform attributeName="transform" type="translate" from="0" to="60" dur="3s" fill="freeze" additive="sum"/> |
| 174 |
<text x="0" y="20">A</text> |
| 175 |
</a> |
| 176 |
</g> |
| 177 |
|
| 178 |
<g id="animateTwo" transform="translate(0,70)"> |
| 179 |
<defs> |
| 180 |
<g id="animateTwoRef" font-weight="bold" font-size="30"> |
| 181 |
<text x="0" y="20" fill="#aaa" font-family="SVGFreeSansASCII,sans-serif">A </text> |
| 182 |
<text x="30" y="20" fill="#aaa" font-family="FreeSerif,serif">A</text> |
| 183 |
<text x="60" y="20" font-size="30" fill="#aaa" font-family="SVGFreeSansASCII,sans-serif">A</text> |
| 184 |
</g> |
| 185 |
</defs> |
| 186 |
<use xlink:href="#animateTwoRef"/> |
| 187 |
<use xlink:href="#animateTwoRef" x="110"/> |
| 188 |
<use xlink:href="#animateTwoRef" x="220"/> |
| 189 |
|
| 190 |
<text id="textID_2" x="0" y="20" font-weight="bold" font-size="30">A</text> |
| 191 |
<animate xlink:href="#textID_2" attributeName="font-family" values="SVGFreeSansASCII,sans-serif;FreeSerif,serif;SVGFreeSansASCII,sans-serif" dur="3s" fill="freeze"/> |
| 192 |
<animateTransform xlink:href="#textID_2" attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze"/> |
| 193 |
|
| 194 |
<g font-weight="bold" font-size="30" transform="translate(110,0)"> |
| 195 |
<animate attributeName="font-family" values="SVGFreeSansASCII,sans-serif;FreeSerif,serif;SVGFreeSansASCII,sans-serif" dur="3s" fill="freeze"/> |
| 196 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/> |
| 197 |
<text x="0" y="20">A</text> |
| 198 |
</g> |
| 199 |
|
| 200 |
<a xlink:href="" font-weight="bold" font-size="30" transform="translate(220,0)"> |
| 201 |
<animate attributeName="font-family" values="SVGFreeSansASCII,sans-serif;FreeSerif,serif;SVGFreeSansASCII,sans-serif" dur="3s" fill="freeze"/> |
| 202 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/> |
| 203 |
<text x="0" y="20">A</text> |
| 204 |
</a> |
| 205 |
</g> |
| 206 |
|
| 207 |
<g id="animateThree" transform="translate(0,105)"> |
| 208 |
<defs> |
| 209 |
<g id="animateThreeRef" font-size="30" font-weight="bold"> |
| 210 |
<text x="0" y="20" font-size="30" fill="#aaa" font-style="normal">A</text> |
| 211 |
<text x="30" y="20" font-size="30" fill="#aaa" font-style="italic">A</text> |
| 212 |
<text x="60" y="20" font-size="30" fill="#aaa" font-style="normal">A</text> |
| 213 |
</g> |
| 214 |
</defs> |
| 215 |
<use xlink:href="#animateThreeRef"/> |
| 216 |
<use xlink:href="#animateThreeRef" x="110"/> |
| 217 |
<use xlink:href="#animateThreeRef" x="220"/> |
| 218 |
|
| 219 |
<text id="textID_3" x="0" y="20" font-size="30" font-weight="bold">A</text> |
| 220 |
<animate xlink:href="#textID_3" attributeName="font-style" values="normal;italic;normal" dur="3s" fill="freeze"/> |
| 221 |
<animateTransform xlink:href="#textID_3" attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze"/> |
| 222 |
|
| 223 |
<g transform="translate(110,0)" font-size="30" font-weight="bold"> |
| 224 |
<animate attributeName="font-style" values="normal;italic;normal" dur="3s" fill="freeze"/> |
| 225 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/> |
| 226 |
<text x="0" y="20" font-size="30">A</text> |
| 227 |
</g> |
| 228 |
|
| 229 |
<a xlink:href="" transform="translate(220,0)" font-size="30" font-weight="bold"> |
| 230 |
<animate attributeName="font-style" values="normal;italic;normal" dur="3s" fill="freeze"/> |
| 231 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/> |
| 232 |
<text x="0" y="20" font-size="30">A</text> |
| 233 |
</a> |
| 234 |
|
| 235 |
</g> |
| 236 |
|
| 237 |
<g id="animateFour" transform="translate(0,140)"> |
| 238 |
<defs> |
| 239 |
<g id="animateFourRef" font-size="30"> |
| 240 |
<text x="0" y="20" fill="#aaa" font-weight="bold">A</text> |
| 241 |
<text x="30" y="20" fill="#aaa" font-weight="normal">A</text> |
| 242 |
<text x="60" y="20" fill="#aaa" font-weight="bold">A</text> |
| 243 |
</g> |
| 244 |
</defs> |
| 245 |
|
| 246 |
<use xlink:href="#animateFourRef"/> |
| 247 |
<use xlink:href="#animateFourRef" x="110"/> |
| 248 |
<use xlink:href="#animateFourRef" x="220"/> |
| 249 |
|
| 250 |
<text id="textID_4" x="0" y="20" font-size="30">A</text> |
| 251 |
<animate xlink:href="#textID_4" attributeName="font-weight" values="bold;normal;bold" calcMode="discrete" dur="3s" fill="freeze"/> |
| 252 |
<animateTransform xlink:href="#textID_4" attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze"/> |
| 253 |
|
| 254 |
<g transform="translate(110,0)" font-size="30"> |
| 255 |
<animate attributeName="font-weight" values="bold;normal;bold" calcMode="discrete" dur="3s" fill="freeze"/> |
| 256 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/> |
| 257 |
<text x="0" y="20">A</text> |
| 258 |
</g> |
| 259 |
|
| 260 |
<a xlink:href="" transform="translate(220,0)" font-size="30"> |
| 261 |
<animate attributeName="font-weight" values="bold;normal;bold" calcMode="discrete" dur="3s" fill="freeze"/> |
| 262 |
<animateTransform attributeName="transform" type="translate" values="0;30;60" calcMode="discrete" dur="3s" fill="freeze" additive="sum"/> |
| 263 |
<text x="0" y="20">A</text> |
| 264 |
</a> |
| 265 |
</g> |
| 266 |
</g> |
| 267 |
</g> |
| 268 |
</g> |
| 269 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 270 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text> |
| 271 |
</g> |
| 272 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 273 |
<!-- comment out this watermark once the test is approved --> |
| 274 |
<!--<g id="draft-watermark"> |
| 275 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 276 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 277 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 278 |
</g>--> |
| 279 |
</svg> |