| 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.3" reviewer="CM" author="ED" status="accepted" |
| 13 |
version="$Revision: 1.7 $" testname="$RCSfile: filters-turb-02-f.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feTurbulenceSeedAttribute"> |
| 15 |
<p> |
| 16 |
This tests the <a>'seed'</a> attribute on <a>'feTurbulence'</a>. |
| 17 |
</p> |
| 18 |
</d:testDescription> |
| 19 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 20 |
<p> |
| 21 |
Run the test. No interaction required. |
| 22 |
|
| 23 |
</p> |
| 24 |
</d:operatorScript> |
| 25 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 26 |
<p>You should see three rectangles with black stroke. In each of these rectangles there should be |
| 27 |
a series of numbers indicating the value for <a>'seed'</a> that was used on the small rectangle |
| 28 |
directly above the number. The top stroked rectangle should contain 7 smaller rects that all |
| 29 |
have a different filter applied to them, the lower two rectangles should contain 2 smaller rects |
| 30 |
each. The filtered rectangles in each stroked rectangle should all look exactly the same. |
| 31 |
If the filtered rectangles are red, that indicates that the test has failed. |
| 32 |
</p> |
| 33 |
<p> |
| 34 |
The test has passed if: |
| 35 |
</p> |
| 36 |
<ul> |
| 37 |
<li>the top stroked rectangle contains 7 smaller rectangles that are all identical</li> |
| 38 |
<li>the lower left stroked rectangle contains 2 smaller rectangles that are identical</li> |
| 39 |
<li>the lower right stroked rectangle contains 2 smaller rectangles that are identical</li> |
| 40 |
<li>there's no red visible inside the stroked rectangles</li> |
| 41 |
</ul> |
| 42 |
</d:passCriteria> |
| 43 |
</d:SVGTestCase> |
| 44 |
<title id="test-title">$RCSfile: filters-turb-02-f.svg,v $</title> |
| 45 |
<defs> |
| 46 |
<font-face |
| 47 |
font-family="SVGFreeSansASCII" |
| 48 |
unicode-range="U+0-7F"> |
| 49 |
<font-face-src> |
| 50 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 51 |
</font-face-src> |
| 52 |
</font-face> |
| 53 |
</defs> |
| 54 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 55 |
<defs> |
| 56 |
<!-- test negative values, these two should be same as seed="0" and seed="1" --> |
| 57 |
<filter id="turbneg1" x="0" y="0" width="100%" height="100%"> |
| 58 |
<feTurbulence seed="-0.2" baseFrequency="0.01" type="turbulence"/> |
| 59 |
</filter> |
| 60 |
<filter id="turbneg2" x="0" y="0" width="100%" height="100%"> |
| 61 |
<feTurbulence seed="-0.5" baseFrequency="0.01" type="turbulence"/> |
| 62 |
</filter> |
| 63 |
<filter id="turbneg3" x="0" y="0" width="100%" height="100%"> |
| 64 |
<feTurbulence seed="-0.8" baseFrequency="0.01" type="turbulence"/> |
| 65 |
</filter> |
| 66 |
|
| 67 |
<!-- the reference for seed="0" --> |
| 68 |
<filter id="turbzero" x="0" y="0" width="100%" height="100%"> |
| 69 |
<feTurbulence seed="0" baseFrequency="0.01" type="turbulence"/> |
| 70 |
</filter> |
| 71 |
|
| 72 |
<!-- seed="0" is transformed by the setup_seed method to be equal to seed="1" --> |
| 73 |
<filter id="turbpos1" x="0" y="0" width="100%" height="100%"> |
| 74 |
<feTurbulence seed="0.2" baseFrequency="0.01" type="turbulence"/> |
| 75 |
</filter> |
| 76 |
<filter id="turbpos2" x="0" y="0" width="100%" height="100%"> |
| 77 |
<feTurbulence seed="0.5" baseFrequency="0.01" type="turbulence"/> |
| 78 |
</filter> |
| 79 |
<filter id="turbpos3" x="0" y="0" width="100%" height="100%"> |
| 80 |
<feTurbulence seed="1.5" baseFrequency="0.01" type="turbulence"/> |
| 81 |
</filter> |
| 82 |
|
| 83 |
<!-- These should be the same --> |
| 84 |
<filter id="turbneg4" x="0" y="0" width="100%" height="100%"> |
| 85 |
<feTurbulence seed="-1" baseFrequency="0.01" type="turbulence"/> |
| 86 |
</filter> |
| 87 |
<filter id="turbneg5" x="0" y="0" width="100%" height="100%"> |
| 88 |
<feTurbulence seed="-1.5" baseFrequency="0.01" type="turbulence"/> |
| 89 |
</filter> |
| 90 |
|
| 91 |
<!-- These should be the same --> |
| 92 |
<filter id="turbneg6" x="0" y="0" width="100%" height="100%"> |
| 93 |
<feTurbulence seed="-2" baseFrequency="0.01" type="turbulence"/> |
| 94 |
</filter> |
| 95 |
<filter id="turbneg7" x="0" y="0" width="100%" height="100%"> |
| 96 |
<feTurbulence seed="-2.6" baseFrequency="0.01" type="turbulence"/> |
| 97 |
</filter> |
| 98 |
|
| 99 |
<style type="text/css"> |
| 100 |
#subtests text { fill: black } |
| 101 |
</style> |
| 102 |
</defs> |
| 103 |
|
| 104 |
<text x="50%" y="2em" style="font-size:24px; text-anchor:middle">feTurbulence seed</text> |
| 105 |
|
| 106 |
<g id="subtests" transform="translate(65 80)" text-anchor="middle" fill="red"> |
| 107 |
<rect width="50" height="50" filter="url(#turbneg3)"/> |
| 108 |
<text x="25" y="80">-0.8</text> |
| 109 |
<rect width="50" height="50" filter="url(#turbneg2)" transform="translate(50 0)"/> |
| 110 |
<text x="75" y="80">-0.5</text> |
| 111 |
<rect width="50" height="50" filter="url(#turbneg1)" transform="translate(100 0)"/> |
| 112 |
<text x="125" y="80">-0.2</text> |
| 113 |
<rect width="50" height="50" filter="url(#turbzero)" transform="translate(150 0)"/> |
| 114 |
<text x="175" y="80">0</text> |
| 115 |
<rect width="50" height="50" filter="url(#turbpos1)" transform="translate(200 0)"/> |
| 116 |
<text x="225" y="80">0.2</text> |
| 117 |
<rect width="50" height="50" filter="url(#turbpos2)" transform="translate(250 0)"/> |
| 118 |
<text x="275" y="80">0.5</text> |
| 119 |
<rect width="50" height="50" filter="url(#turbpos3)" transform="translate(300 0)"/> |
| 120 |
<text x="325" y="80">1.5</text> |
| 121 |
<rect x="-5" y="-5" width="360" height="100" stroke="black" fill="none"/> |
| 122 |
|
| 123 |
<rect width="50" height="50" filter="url(#turbneg4)" transform="translate(0 120)"/> |
| 124 |
<text x="25" y="200">-1</text> |
| 125 |
<rect width="50" height="50" filter="url(#turbneg5)" transform="translate(50 120)"/> |
| 126 |
<text x="75" y="200">-1.5</text> |
| 127 |
<rect x="-5" y="115" width="110" height="100" stroke="black" fill="none"/> |
| 128 |
|
| 129 |
<rect width="50" height="50" filter="url(#turbneg6)" transform="translate(250 120)"/> |
| 130 |
<text x="275" y="200">-2</text> |
| 131 |
<rect width="50" height="50" filter="url(#turbneg7)" transform="translate(300 120)"/> |
| 132 |
<text x="325" y="200">-2.6</text> |
| 133 |
<rect x="245" y="115" width="110" height="100" stroke="black" fill="none"/> |
| 134 |
</g> |
| 135 |
</g> |
| 136 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 137 |
<text id="revision" x="10" y="340" stroke="none" |
| 138 |
fill="black">$Revision: 1.7 $</text> |
| 139 |
</g> |
| 140 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 141 |
<!-- comment out this watermark once the test is approved --><!-- |
| 142 |
<g id="draft-watermark"> |
| 143 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 144 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 145 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 146 |
</g>--> |
| 147 |
</svg> |