| 1 |
<svg id="svg-root" width="100%" height="100%" |
| 2 |
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 7 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 8 |
<!--= All Rights Reserved. =--> |
| 9 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 10 |
<!--======================================================================--> |
| 11 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 12 |
template-version="1.4" reviewer="[reviewer]" author="CM" status="created" |
| 13 |
version="$Revision: 1.5 $" testname="$RCSfile: animate-elem-87-t.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/animate.html#AnimateTransformElement"> |
| 15 |
<p> |
| 16 |
This tests that the underlying value of a scale transformation |
| 17 |
is 0. Since SMIL defines a <em>by animation</em> as being equivalent |
| 18 |
to an additive <em>values animation</em> where the first value is zero and |
| 19 |
the second value is the <em>by</em> value, such an animation would |
| 20 |
begin by post-multiplying a <code>scale(0)</code> transformation to |
| 21 |
the element's underlying transform list. |
| 22 |
</p> |
| 23 |
</d:testDescription> |
| 24 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 25 |
<p> |
| 26 |
The test consists of two circles: an orange circle on the left, |
| 27 |
which serves as a reference, and a blue circle on the right, |
| 28 |
whose <code>transform</code> attribute is animated. Animation of |
| 29 |
the circles begins at t=1s and lasts for 3s. |
| 30 |
</p> |
| 31 |
<p> |
| 32 |
The transform animation that applies to the blue circle is of type |
| 33 |
"scale", and specifies <code>by="1"</code>. Since the animation is |
| 34 |
considered to be equivalent to one that specifies <code>from="0" to="1"</code>, |
| 35 |
when the animation begins the circle will be scaled down to a point, |
| 36 |
and then will be scaled up until it reaches its original size at |
| 37 |
t=4s. |
| 38 |
</p> |
| 39 |
</d:operatorScript> |
| 40 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 41 |
<p> |
| 42 |
The test is passed if the blue circle on the right is always the same |
| 43 |
size as the orange circle on the left. The test runs from t=0s until |
| 44 |
t=4s. |
| 45 |
</p> |
| 46 |
</d:passCriteria> |
| 47 |
</d:SVGTestCase> |
| 48 |
<title id="test-title">$RCSfile: animate-elem-87-t.svg,v $</title> |
| 49 |
<defs> |
| 50 |
<font-face |
| 51 |
font-family="SVGFreeSansASCII" |
| 52 |
unicode-range="U+0-7F"> |
| 53 |
<font-face-src> |
| 54 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 55 |
</font-face-src> |
| 56 |
</font-face> |
| 57 |
</defs> |
| 58 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 59 |
|
| 60 |
<text x='10' y='40'>Test zero value of a scale transform animation</text> |
| 61 |
|
| 62 |
<g transform='translate(150,150)'> |
| 63 |
<circle r='80' fill='#ccc'/> |
| 64 |
<circle r='80' fill='orange'> |
| 65 |
<animate attributeName='r' values='0; 80' begin='1s' dur='3s' fill='freeze'/> |
| 66 |
</circle> |
| 67 |
<text y='100' text-anchor='middle' font-size='12'>Reference</text> |
| 68 |
</g> |
| 69 |
<g transform='translate(350,150)'> |
| 70 |
<circle r='80' fill='#ccc'/> |
| 71 |
<circle r='80' fill='blue'> |
| 72 |
<animateTransform attributeName='transform' type='scale' begin='1s' dur='3s' by='1' fill='freeze'/> |
| 73 |
</circle> |
| 74 |
<text y='100' text-anchor='middle' font-size='12'><animateTransform type='scale' by='1'/></text> |
| 75 |
</g> |
| 76 |
|
| 77 |
</g> |
| 78 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 79 |
<text id="revision" x="10" y="340" stroke="none" |
| 80 |
fill="black">$Revision: 1.5 $</text> |
| 81 |
</g> |
| 82 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 83 |
<!-- comment out this watermark once the test is approved --> |
| 84 |
<g id="draft-watermark"> |
| 85 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 86 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 87 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 88 |
</g> |
| 89 |
</svg> |