| 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="SVGWG" author="Jon Ferraiolo" status="accepted" |
| 15 |
version="$Revision: 1.7 $" testname="$RCSfile: animate-elem-14-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 |
Test 'calcMode'=discrete. |
| 19 |
</p> |
| 20 |
<p> |
| 21 |
One animation has been defined to animate the height of a rectangle. Ruler lines and text are provided |
| 22 |
to help show what the correct behavior is. The headline text shows the values for the 'calcMode' and 'keyTimes' attributes. The |
| 23 |
black text and ruler lines help show the size and movement of the rectangle over time. |
| 24 |
</p> |
| 25 |
<p> |
| 26 |
This test shows an animation with calcMode="discrete" (i.e., a jumping animation). |
| 27 |
</p> |
| 28 |
</d:testDescription> |
| 29 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 30 |
<p> |
| 31 |
Run the test. No interaction required. |
| 32 |
</p> |
| 33 |
</d:operatorScript> |
| 34 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 35 |
<p> |
| 36 |
The right edge of the blue rectangle should line up with the ruler lines at the indicated times, and should jump directly to each position with no animation in between. |
| 37 |
</p> |
| 38 |
</d:passCriteria> |
| 39 |
</d:SVGTestCase> |
| 40 |
<title id="test-title">$RCSfile: animate-elem-14-t.svg,v $</title> |
| 41 |
<defs> |
| 42 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 43 |
<font-face-src> |
| 44 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 45 |
</font-face-src> |
| 46 |
</font-face> |
| 47 |
</defs> |
| 48 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 49 |
<text font-size="40" x="3" y="45">calcMode="discrete"</text> |
| 50 |
<text font-size="40" x="3" y="100">keyTimes="0;.2;.4;.6"</text> |
| 51 |
<g xml:space="preserve" font-size="13.5" stroke-width="3"> |
| 52 |
<g transform="translate(150,140)"> |
| 53 |
<text font-size="36" x="-140" y="140">Time (s):</text> |
| 54 |
<text font-size="36" x="290" y="140">0</text> |
| 55 |
<line x1="300" y1="0" x2="300" y2="100" fill="none" stroke="#880000"/> |
| 56 |
<text font-size="36" x="245" y="140">2</text> |
| 57 |
<line x1="255" y1="0" x2="255" y2="100" fill="none" stroke="#880000"/> |
| 58 |
<text font-size="36" x="170" y="140">4</text> |
| 59 |
<line x1="180" y1="0" x2="180" y2="100" fill="none" stroke="#880000"/> |
| 60 |
<text font-size="36" x="20" y="140">6</text> |
| 61 |
<line x1="30" y1="0" x2="30" y2="100" fill="none" stroke="#880000"/> |
| 62 |
<rect x="0" y="0" width="300" height="80" fill="#44AAFF" stroke="#880088" stroke-width="4"> |
| 63 |
<animate attributeName="width" calcMode="discrete" values="300;255;180;30" keyTimes="0;.2;.4;.6" begin="0s" dur="10s" fill="freeze"/> |
| 64 |
</rect> |
| 65 |
</g> |
| 66 |
</g> |
| 67 |
</g> |
| 68 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 69 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.7 $</text> |
| 70 |
</g> |
| 71 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 72 |
<!-- comment out this watermark once the test is approved --> |
| 73 |
<!--<g id="draft-watermark"> |
| 74 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 75 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 76 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 77 |
</g>--> |
| 78 |
</svg> |