| 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.6 $" testname="$RCSfile: animate-elem-09-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 possible values for 'calcMode="discrete"'. |
| 19 |
</p> |
| 20 |
<p> |
| 21 |
Two animations have been defined. For each animation, ruler lines and text are provided to help show what the correct behavior is. |
| 22 |
The black text and ruler lines help show the sizes and movement of the rectangles over time. |
| 23 |
</p> |
| 24 |
<p> |
| 25 |
The discrete animations should show stair-stepping animations, with quantum-level jumps every two seconds in these tests. The linear |
| 26 |
animations change constantly with each keyframe to keyframe section, with the result that the change is faster when there is a larger |
| 27 |
change within a given amount of time. The paced animations change constantly over the entire animation, regardless of the values at |
| 28 |
particular keyframes. For calcMode='spline' in this test case, the initial rate of change is defined to be the same as linear, but the |
| 29 |
last jump has an ease-in/ease-out effect where the change is slower at the start and end but faster in the middle. |
| 30 |
</p> |
| 31 |
</d:testDescription> |
| 32 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 33 |
<p> |
| 34 |
Run the test. No interaction required. |
| 35 |
</p> |
| 36 |
</d:operatorScript> |
| 37 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 38 |
<p> |
| 39 |
The test is passed if the two orange rects are animated so that the bottom part of each rectangle is at the position |
| 40 |
indicated by the ruler lines at the particular time noted next to each ruler line. |
| 41 |
</p> |
| 42 |
</d:passCriteria> |
| 43 |
</d:SVGTestCase> |
| 44 |
<title id="test-title">$RCSfile: animate-elem-09-t.svg,v $</title> |
| 45 |
<defs> |
| 46 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 47 |
<font-face-src> |
| 48 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 49 |
</font-face-src> |
| 50 |
</font-face> |
| 51 |
</defs> |
| 52 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 53 |
<g xml:space="preserve" font-family="Arial" font-size="30"> |
| 54 |
<g transform="translate(20,50)"> |
| 55 |
<text x="0" y="203">0-2 sec.</text> |
| 56 |
<text x="0" y="170">2-4 sec. </text> |
| 57 |
<text x="0" y="114">4-6 sec. </text> |
| 58 |
<text x="3" y="3">6+ sec. </text> |
| 59 |
<g stroke="#800" stroke-width="4"> |
| 60 |
<line x1="120" y1="200" x2="170" y2="200"/> |
| 61 |
<line x1="120" y1="167" x2="170" y2="167"/> |
| 62 |
<line x1="120" y1="111" x2="170" y2="111"/> |
| 63 |
<line x1="120" y1="0" x2="170" y2="0"/> |
| 64 |
</g> |
| 65 |
<rect x="140" y="-10" width="60" height="210" fill="#FFAA44" stroke="#FF00FF" stroke-width="4"> |
| 66 |
<animate attributeName="height" calcMode="discrete" values="210;177;121;10" begin="0s" dur="8s" fill="freeze"/> |
| 67 |
</rect> |
| 68 |
</g> |
| 69 |
|
| 70 |
<g transform="translate(250,50)"> |
| 71 |
<text x="0" y="203">0-2 sec.</text> |
| 72 |
<text x="0" y="170">2-4 sec. </text> |
| 73 |
<text x="0" y="114">4-6 sec. </text> |
| 74 |
<text x="3" y="3">6+ sec. </text> |
| 75 |
<g stroke="#800" stroke-width="4"> |
| 76 |
<line x1="120" y1="200" x2="170" y2="200"/> |
| 77 |
<line x1="120" y1="167" x2="170" y2="167"/> |
| 78 |
<line x1="120" y1="111" x2="170" y2="111"/> |
| 79 |
<line x1="120" y1="0" x2="170" y2="0"/> |
| 80 |
</g> |
| 81 |
<rect x="140" y="-10" width="60" height="10" fill="#FFAA44" stroke="#FF00FF" stroke-width="4"> |
| 82 |
<animateMotion calcMode="discrete" values="0,200; 0,167; 0,111; 0,0" begin="0s" dur="8s" fill="freeze"/> |
| 83 |
</rect> |
| 84 |
</g> |
| 85 |
</g> |
| 86 |
</g> |
| 87 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 88 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 89 |
</g> |
| 90 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 91 |
<!-- comment out this watermark once the test is approved --> |
| 92 |
<!--<g id="draft-watermark"> |
| 93 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 94 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 95 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 96 |
</g>--> |
| 97 |
</svg> |