| 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="ED" author="CC" status="accepted" |
| 15 |
version="$Revision: 1.2 $" testname="$RCSfile: animate-pservers-grad-01-b.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/pservers.html#Gradients"> |
| 17 |
<p> |
| 18 |
This test shows rectangles filled with animated gradient which inherits some of their properties: stop-color, stop-opacity. |
| 19 |
</p> |
| 20 |
</d:testDescription> |
| 21 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 22 |
<p> |
| 23 |
Load the svg and wait 5 seconds for the animation to run, then compare the image to the reference. |
| 24 |
</p> |
| 25 |
</d:operatorScript> |
| 26 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 27 |
<p> |
| 28 |
The correct result should show: |
| 29 |
</p> |
| 30 |
<ul> |
| 31 |
<li>the top-left rectangle filled initially with a linear green-to-red gradient and turning into a solid green color after 5s.</li> |
| 32 |
<li>the top-right rectangle filled initially with a green gradient fully opaque on the left and half transparent on the right, but after 5s the rectangle should be filled with a fully opaque solid green.</li> |
| 33 |
<li>the bottom-left rectangle filled with a static green-to-black opaque gradient.</li> |
| 34 |
<li>the bottom-right rectangle initially filled with a green-to-yellow fully-opaque gradient animated and turning into a fully-opaque green solid color.</li> |
| 35 |
<!--<li>Animations numbered a4 to a7 should have no impact.</li>--> |
| 36 |
</ul> |
| 37 |
</d:passCriteria> |
| 38 |
</d:SVGTestCase> |
| 39 |
<title id="test-title">$RCSfile: animate-pservers-grad-01-b.svg,v $</title> |
| 40 |
<defs> |
| 41 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 42 |
<font-face-src> |
| 43 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 44 |
</font-face-src> |
| 45 |
</font-face> |
| 46 |
</defs> |
| 47 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 48 |
<defs> |
| 49 |
<g id="g0" stop-color="yellow" stop-opacity="0" color="yellow"> |
| 50 |
<animateColor id="a1" attributeName="stop-color" from="red" to="green" dur="5" fill="freeze"/> |
| 51 |
<animateColor id="a2" attributeName="color" from="yellow" to="green" dur="5" fill="freeze"/> |
| 52 |
<animate id="a3" attributeName="stop-opacity" from="0.5" to="1" dur="5" fill="freeze"/> |
| 53 |
|
| 54 |
<linearGradient id="MyGradient1" stop-color="inherit"> |
| 55 |
<stop offset="0" stop-color="green" stop-opacity="1"/> |
| 56 |
<stop offset="1" stop-color="inherit" stop-opacity="1"/> |
| 57 |
</linearGradient> |
| 58 |
<linearGradient id="MyGradient2" stop-opacity="inherit"> |
| 59 |
<stop offset="0" stop-color="green" stop-opacity="1"/> |
| 60 |
<stop offset="1" stop-color="green" stop-opacity="inherit"/> |
| 61 |
</linearGradient> |
| 62 |
|
| 63 |
<g id="g01"> |
| 64 |
<linearGradient id="MyGradient3"> |
| 65 |
<stop offset="0" stop-color="green" stop-opacity="1"/> |
| 66 |
<stop offset="1"/> |
| 67 |
</linearGradient> |
| 68 |
<linearGradient id="MyGradient4"> |
| 69 |
<stop offset="0" stop-color="green" stop-opacity="1"/> |
| 70 |
<stop offset="1" stop-color="currentColor" stop-opacity="1"/> |
| 71 |
</linearGradient> |
| 72 |
</g> |
| 73 |
</g> |
| 74 |
</defs> |
| 75 |
<g id="g1" stop-color="blue"> |
| 76 |
<animateColor id="a4" attributeName="stop-color" from="blue" to="red" dur="5" fill="freeze"/> |
| 77 |
<rect id="r1" fill="url(#MyGradient1)" width="100" height="100" x="50" y="50"/> |
| 78 |
</g> |
| 79 |
<g id="g2" stop-opacity="1"> |
| 80 |
<animate id="a5" attributeName="stop-opacity" from="1" to="0" dur="5" fill="freeze"/> |
| 81 |
<rect id="r2" fill="url(#MyGradient2)" width="100" height="100" x="200" y="50"/> |
| 82 |
</g> |
| 83 |
<g id="g3" stop-opacity="1" stop-color="blue"> |
| 84 |
<animateColor id="a6" attributeName="stop-color" from="blue" to="red" dur="5" fill="freeze"/> |
| 85 |
<animate id="a7" attributeName="stop-opacity" from="1" to="0" dur="5" fill="freeze"/> |
| 86 |
<rect id="r3" fill="url(#MyGradient3)" width="100" height="100" x="50" y="200"/> |
| 87 |
</g> |
| 88 |
<g id="g4" color="blue"> |
| 89 |
<animateColor id="a7" attributeName="color" from="blue" to="red" dur="5" fill="freeze"/> |
| 90 |
<rect id="r4" fill="url(#MyGradient4)" width="100" height="100" x="200" y="200"/> |
| 91 |
</g> |
| 92 |
</g> |
| 93 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 94 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.2 $</text> |
| 95 |
</g> |
| 96 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 97 |
<!-- comment out this watermark once the test is approved --> |
| 98 |
<!--<g id="draft-watermark"> |
| 99 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 100 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 101 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 102 |
</g>--> |
| 103 |
</svg> |