| 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.8 $" testname="$RCSfile: animate-elem-02-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 'additive' and 'accumulate' attributes. |
| 19 |
</p> |
| 20 |
<p> |
| 21 |
The four pictures show the effect with the four possible combinations of |
| 22 |
'additive' (either 'replace' or 'sum') and 'accumulate' (either 'none' or 'sum'). |
| 23 |
Because two animations are animating the height, the effects of 'additive' and |
| 24 |
'accumulate' are sometimes different than when there is only a single animation. |
| 25 |
</p> |
| 26 |
</d:testDescription> |
| 27 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 28 |
<p> |
| 29 |
Run the test. No interaction required. |
| 30 |
</p> |
| 31 |
</d:operatorScript> |
| 32 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 33 |
<p>The test has passed if the four green rectangles each animate their height according to the following:</p> |
| 34 |
<p>The leftmost rect:</p> |
| 35 |
<ul> |
| 36 |
<li>when the animation starts the height of the green rect should make it align with the bottommost red indicator line</li> |
| 37 |
<li>after two seconds the height should jump to be 10% of the height of the gray rect it overlaps</li> |
| 38 |
<li>after four seconds the height should jump to make the green rect align with the bottommost red indicator line</li> |
| 39 |
<li>after six seconds the height should jump to its final position, 10% of the height of the gray rect</li> |
| 40 |
</ul> |
| 41 |
<p>The next to leftmost rect:</p> |
| 42 |
<ul> |
| 43 |
<li>when the animation starts the height of the green rect should be 110% of the height of the gray rect</li> |
| 44 |
<li>after two seconds the height should jump to be 20% of the height of the gray rect</li> |
| 45 |
<li>after four seconds the height should jump to be 110% of the height of the gray rect</li> |
| 46 |
<li>after six seconds the height should jump to its final position, 20% of the height of the gray rect</li> |
| 47 |
</ul> |
| 48 |
<p>The next to rightmost rect:</p> |
| 49 |
<ul> |
| 50 |
<li>when the animation starts the height of the green rect should make it align with the bottommost red indicator line</li> |
| 51 |
<li>after two seconds the height should jump to be 10% of the height of the gray rect</li> |
| 52 |
<li>after four seconds the height should jump to be 110% of the height of the gray rect</li> |
| 53 |
<li>after six seconds the height should jump to its final position, 20% of the height of the gray rect</li> |
| 54 |
</ul> |
| 55 |
<p>The rightmost rect:</p> |
| 56 |
<ul> |
| 57 |
<li>when the animation starts the height of the green rect should be 110% of the height of the gray rect</li> |
| 58 |
<li>after two seconds the height should jump to be 20% of the height of the gray rect</li> |
| 59 |
<li>after four seconds the height should jump to be 120% of the height of the gray rect</li> |
| 60 |
<li>after six seconds the height should jump to its final position, 30% of the height of the gray rect</li> |
| 61 |
</ul> |
| 62 |
</d:passCriteria> |
| 63 |
</d:SVGTestCase> |
| 64 |
<title id="test-title">$RCSfile: animate-elem-02-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 |
<g font-family="Arial" font-size="30"> |
| 74 |
<g transform="translate(0, 0)"> |
| 75 |
<rect x="60" y="20" width="50" height="200" fill="#dfdfdf" stroke="#dfdfdf" stroke-width="4"/> |
| 76 |
<line x1="40" x2="100" y1="220" y2="220" fill="none" stroke="#880000" stroke-width="4"/> |
| 77 |
<line x1="40" x2="100" y1="120" y2="120" fill="none" stroke="#880000" stroke-width="4"/> |
| 78 |
<rect x="60" y="20" width="50" height="20" fill="#0f5" stroke="#085" stroke-width="4"> |
| 79 |
<animate id="an5" attributeName="height" calcMode="discrete" additive="replace" accumulate="none" repeatCount="2" from="200" to="20" begin="0s" dur="4s" fill="freeze"/> |
| 80 |
</rect> |
| 81 |
<text x="30" y="285" fill="navy">anim.5</text> |
| 82 |
</g> |
| 83 |
<g transform="translate(110, 0)"> |
| 84 |
<rect x="60" y="20" width="50" height="200" fill="#dfdfdf" stroke="#dfdfdf" stroke-width="4"/> |
| 85 |
<line x1="40" x2="100" y1="220" y2="220" fill="none" stroke="#880000" stroke-width="4"/> |
| 86 |
<line x1="40" x2="100" y1="120" y2="120" fill="none" stroke="#880000" stroke-width="4"/> |
| 87 |
<rect x="60" y="20" width="50" height="20" fill="#0f5" stroke="#085" stroke-width="4"> |
| 88 |
<animate id="an6" attributeName="height" calcMode="discrete" additive="sum" accumulate="none" repeatCount="2" from="200" to="20" begin="0s" dur="4s" fill="freeze"/> |
| 89 |
</rect> |
| 90 |
<text x="30" y="285" fill="navy">anim.6</text> |
| 91 |
</g> |
| 92 |
<g transform="translate(220, 0)"> |
| 93 |
<rect x="60" y="20" width="50" height="200" fill="#dfdfdf" stroke="#dfdfdf" stroke-width="4"/> |
| 94 |
<line x1="40" x2="100" y1="220" y2="220" fill="none" stroke="#880000" stroke-width="4"/> |
| 95 |
<line x1="40" x2="100" y1="120" y2="120" fill="none" stroke="#880000" stroke-width="4"/> |
| 96 |
<rect x="60" y="20" width="50" height="20" fill="#0f5" stroke="#085" stroke-width="4"> |
| 97 |
<animate id="an7" attributeName="height" calcMode="discrete" additive="replace" accumulate="sum" repeatCount="2" from="200" to="20" begin="0s" dur="4s" fill="freeze"/> |
| 98 |
</rect> |
| 99 |
<text x="30" y="285" fill="navy">anim.7</text> |
| 100 |
</g> |
| 101 |
<g transform="translate(330, 0)"> |
| 102 |
<rect x="60" y="20" width="50" height="200" fill="#dfdfdf" stroke="#dfdfdf" stroke-width="4"/> |
| 103 |
<line x1="40" x2="100" y1="220" y2="220" fill="none" stroke="#880000" stroke-width="4"/> |
| 104 |
<line x1="40" x2="100" y1="120" y2="120" fill="none" stroke="#880000" stroke-width="4"/> |
| 105 |
<rect x="60" y="20" width="50" height="20" fill="#0f5" stroke="#085" stroke-width="4"> |
| 106 |
<animate id="an8" attributeName="height" calcMode="discrete" additive="sum" accumulate="sum" repeatCount="2" from="200" to="20" begin="0s" dur="4s" fill="freeze"/> |
| 107 |
</rect> |
| 108 |
<text x="30" y="285" fill="navy">anim.8</text> |
| 109 |
</g> |
| 110 |
</g> |
| 111 |
</g> |
| 112 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 113 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text> |
| 114 |
</g> |
| 115 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 116 |
<!-- comment out this watermark once the test is approved --> |
| 117 |
<!--<g id="draft-watermark"> |
| 118 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 119 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 120 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 121 |
</g>--> |
| 122 |
</svg> |