| 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="VH" author="OA" status="accepted" |
| 15 |
version="$Revision: 1.6 $" testname="$RCSfile: animate-elem-37-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 animation of the transform attribute shape elements. |
| 19 |
</p> |
| 20 |
<p> |
| 21 |
The test applies an <animateTransform> on various element |
| 22 |
types: <g>, <use>, <image>, <switch>, |
| 23 |
<a> and <text>. |
| 24 |
In all cases the animation should run for 3s, starting at the document's load time. |
| 25 |
The <circle> has a scale animation, and all the rest of the elements should rotate together about their centers. |
| 26 |
</p> |
| 27 |
</d:testDescription> |
| 28 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 29 |
<p>Run the test. No interaction required.</p> |
| 30 |
</d:operatorScript> |
| 31 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 32 |
<p>The test passes if:</p> |
| 33 |
<ul> |
| 34 |
<li>each of the seven shapes rotates clockwise, then anti-clockwise, then clockwise again,</li> |
| 35 |
<li>and the circle is scaled down, then up, then down again</li> |
| 36 |
</ul> |
| 37 |
<p>over the course of three seconds.</p> |
| 38 |
<p>The static reference image shows the final state of the animation.</p> |
| 39 |
</d:passCriteria> |
| 40 |
</d:SVGTestCase> |
| 41 |
<title id="test-title">$RCSfile: animate-elem-37-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 |
<text text-anchor="middle" x="240" y="25" font-size="16"><animateTransform> shape elements</text> |
| 51 |
<g transform="translate(0,0)"> |
| 52 |
<g transform="translate(60,90)"> |
| 53 |
<path id="pathID" fill="rgb(230,230,230)" stroke="rgb(255,180,0)" d="M 0 0 Q 30 0 30 -30 Q 0 -30 0 0 Q 0 -30 -30 -30 Q -30 0 0 0 Q -30 0 -30 30 Q 0 30 0 0 Q 0 30 30 30 Q30 0 0 0 Z"/> |
| 54 |
<animateTransform attributeName="transform" xlink:href="#pathID" type="rotate" values="0;360;180;360" dur="3s"/> |
| 55 |
<text y="60" text-anchor="middle"><path></text> |
| 56 |
</g> |
| 57 |
|
| 58 |
<g transform="translate(180,90)"> |
| 59 |
<rect id="rectID" fill="rgb(230,230,230)" stroke="rgb(255,180,0)" x="-30" y="-20" width="60" height="40"/> |
| 60 |
<animateTransform attributeName="transform" xlink:href="#rectID" type="rotate" values="0;360;180;360" dur="3s"/> |
| 61 |
<text y="60" text-anchor="middle"><rect></text> |
| 62 |
</g> |
| 63 |
|
| 64 |
<g transform="translate(300,90)"> |
| 65 |
<circle id="circleID" fill="rgb(230,230,230)" stroke="rgb(255,180,0)" r="30"/> |
| 66 |
<animateTransform attributeName="transform" xlink:href="#circleID" type="scale" values="1;0.2;1.5;1" dur="3s"/> |
| 67 |
<text y="60" text-anchor="middle"><circle></text> |
| 68 |
</g> |
| 69 |
|
| 70 |
<g transform="translate(420,90)"> |
| 71 |
<ellipse id="ellipseID" fill="rgb(230,230,230)" stroke="rgb(255,180,0)" rx="40" ry="20"/> |
| 72 |
<animateTransform attributeName="transform" xlink:href="#ellipseID" type="rotate" values="0;360;180;360" dur="3s"/> |
| 73 |
<text y="60" text-anchor="middle"><ellipse></text> |
| 74 |
</g> |
| 75 |
|
| 76 |
<g transform="translate(60,220)"> |
| 77 |
<line id="lineID" stroke="rgb(255,180,0)" stroke-width="10" stroke-linecap="round" x1="-30" y1="-20" x2="30" y2="20"/> |
| 78 |
<animateTransform attributeName="transform" xlink:href="#lineID" type="rotate" values="0;360;180;360" dur="3s"/> |
| 79 |
<text y="60" text-anchor="middle"><line></text> |
| 80 |
</g> |
| 81 |
|
| 82 |
<g transform="translate(180,220)"> |
| 83 |
<polyline id="polylineID" stroke="rgb(255,180,0)" stroke-width="10" stroke-linecap="round" fill="none" stroke-linejoin="round" points="-30 20 -30 -20 30 20 30 -20"/> |
| 84 |
<animateTransform attributeName="transform" xlink:href="#polylineID" type="rotate" values="0;360;180;360" dur="3s"/> |
| 85 |
<text y="60" text-anchor="middle"><polyline></text> |
| 86 |
</g> |
| 87 |
|
| 88 |
<g transform="translate(300,220)"> |
| 89 |
<polygon id="polygonID" fill="rgb(230,230,230)" stroke="rgb(255,180,0)" points="-30 20 -30 -20 30 20 30 -20"/> |
| 90 |
<animateTransform attributeName="transform" xlink:href="#polygonID" type="rotate" values="0;360;180;360" dur="3s"/> |
| 91 |
<text y="60" text-anchor="middle"><polygon></text> |
| 92 |
</g> |
| 93 |
</g> |
| 94 |
</g> |
| 95 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 96 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 97 |
</g> |
| 98 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 99 |
<!-- comment out this watermark once the test is approved --> |
| 100 |
<!--<g id="draft-watermark"> |
| 101 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 102 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 103 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 104 |
</g>--> |
| 105 |
</svg> |