| 1 |
<svg version="1.1" baseProfile="basic" 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="Chris Lilley" status="accepted" |
| 15 |
version="$Revision: 1.8 $" testname="$RCSfile: animate-elem-29-b.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 compositing of animated fill opacity. |
| 19 |
</p> |
| 20 |
</d:testDescription> |
| 21 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 22 |
<p> |
| 23 |
First click once on "fade in" and |
| 24 |
then, once the animation has completed, click once on "fade out". |
| 25 |
</p> |
| 26 |
</d:operatorScript> |
| 27 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 28 |
<p>The first time you |
| 29 |
select the link 'fade in', you should see a green square appearing, |
| 30 |
gradually and smoothly fading from zero to 100% opacity over the |
| 31 |
course of three seconds. This square is in front of and thus |
| 32 |
obscures the lower left circle, but is behind the upper right |
| 33 |
circle which is thus composited on top of the animated green |
| 34 |
square. Then, when you click on "fade out", the green square will |
| 35 |
gradually disappear, smoothly fading from 100% to zero opacity |
| 36 |
over the course of three seconds. |
| 37 |
</p> |
| 38 |
<p> |
| 39 |
The rendered picture should match the reference image, (except |
| 40 |
for possible variations in the labelling text (per CSS2 rules)) |
| 41 |
after activating the link on the fade-in button the first time |
| 42 |
and waiting three seconds for the animation to complete. The picture |
| 43 |
should remain looking the same way indefinitely, until another |
| 44 |
link is activated. |
| 45 |
</p> |
| 46 |
<!-- |
| 47 |
With a second click on "fade in", however, the behavior might |
| 48 |
be different. In the case of having a first click on "fade in", |
| 49 |
waiting three seconds, and then immediately perform a first click |
| 50 |
on "fade out", waiting three seconds, and then immediately perform |
| 51 |
a second click on "fade in", you should see the following. After |
| 52 |
the first click on "fade in", the red square goes from zero to 100% |
| 53 |
opacity. After the first click on "fade out", the red square goes |
| 54 |
from 100% to zero opacity. After the second click on "fade in", |
| 55 |
however, the red square goes from zero to 100% opacity, and then |
| 56 |
goes back from 100% to zero opacity. This is because of the |
| 57 |
hyperlinking rules as they relate to resolved start times in the |
| 58 |
SMIL Animation specification. |
| 59 |
--> |
| 60 |
</d:passCriteria> |
| 61 |
</d:SVGTestCase> |
| 62 |
<title id="test-title">$RCSfile: animate-elem-29-b.svg,v $</title> |
| 63 |
<defs> |
| 64 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 65 |
<font-face-src> |
| 66 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 67 |
</font-face-src> |
| 68 |
</font-face> |
| 69 |
</defs> |
| 70 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 71 |
<circle stroke="#666" stroke-width="30" fill="none" cx="100" cy="200" r="60"/> |
| 72 |
<rect id="pink" x="20" y="20" width="180" height="180" fill="#080" fill-opacity="0"> |
| 73 |
<animate id="fadein" attributeName="fill-opacity" attributeType="auto" from="0" to="1" begin="indefinite" dur="3s" fill="freeze"/> |
| 74 |
<animate id="fadeout" attributeName="fill-opacity" attributeType="auto" from="1" to="0" begin="indefinite" dur="3s" fill="freeze"/> |
| 75 |
</rect> |
| 76 |
<circle stroke="#666" stroke-width="20" fill="none" cx="200" cy="110" r="80"/> |
| 77 |
<g id="buttons"> |
| 78 |
<a xlink:href="#fadein"> |
| 79 |
<rect x="320" y="0" width="160" height="180" fill="green"/> |
| 80 |
<text fill="white" font-size="30" font-weight="bold" x="330" y="90">Fade in</text> |
| 81 |
</a> |
| 82 |
<a xlink:href="#fadeout"> |
| 83 |
<rect x="320" y="180" width="160" height="180" fill="maroon"/> |
| 84 |
<text fill="white" font-size="30" font-weight="bold" x="330" y="280">Fade out</text> |
| 85 |
</a> |
| 86 |
</g> |
| 87 |
</g> |
| 88 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 89 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text> |
| 90 |
</g> |
| 91 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 92 |
<!-- comment out this watermark once the test is approved --> |
| 93 |
<!--<g id="draft-watermark"> |
| 94 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 95 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 96 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 97 |
</g>--> |
| 98 |
</svg> |