blob: 5d83b2a3e1c0211b300509168caea6b2da652806 [file] [log] [blame]
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--======================================================================-->
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, European Research Consortium for =-->
<!--= Informatics and Mathematics (ERCIM), Keio University). =-->
<!--= All Rights Reserved. =-->
<!--= See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
template-version="1.3" reviewer="CM" author="ED" status="accepted"
version="$Revision: 1.7 $" testname="$RCSfile: filters-turb-02-f.svg,v $">
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feTurbulenceSeedAttribute">
<p>
This tests the <a>'seed'</a> attribute on <a>'feTurbulence'</a>.
</p>
</d:testDescription>
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
<p>
Run the test. No interaction required.
</p>
</d:operatorScript>
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
<p>You should see three rectangles with black stroke. In each of these rectangles there should be
a series of numbers indicating the value for <a>'seed'</a> that was used on the small rectangle
directly above the number. The top stroked rectangle should contain 7 smaller rects that all
have a different filter applied to them, the lower two rectangles should contain 2 smaller rects
each. The filtered rectangles in each stroked rectangle should all look exactly the same.
If the filtered rectangles are red, that indicates that the test has failed.
</p>
<p>
The test has passed if:
</p>
<ul>
<li>the top stroked rectangle contains 7 smaller rectangles that are all identical</li>
<li>the lower left stroked rectangle contains 2 smaller rectangles that are identical</li>
<li>the lower right stroked rectangle contains 2 smaller rectangles that are identical</li>
<li>there's no red visible inside the stroked rectangles</li>
</ul>
</d:passCriteria>
</d:SVGTestCase>
<title id="test-title">$RCSfile: filters-turb-02-f.svg,v $</title>
<defs>
<font-face
font-family="SVGFreeSansASCII"
unicode-range="U+0-7F">
<font-face-src>
<font-face-uri xlink:href="../custom/resources/SVGFreeSans.svg#ascii"/>
</font-face-src>
</font-face>
</defs>
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
<defs>
<!-- test negative values, these two should be same as seed="0" and seed="1" -->
<filter id="turbneg1" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="-0.2" baseFrequency="0.01" type="turbulence"/>
</filter>
<filter id="turbneg2" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="-0.5" baseFrequency="0.01" type="turbulence"/>
</filter>
<filter id="turbneg3" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="-0.8" baseFrequency="0.01" type="turbulence"/>
</filter>
<!-- the reference for seed="0" -->
<filter id="turbzero" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="0" baseFrequency="0.01" type="turbulence"/>
</filter>
<!-- seed="0" is transformed by the setup_seed method to be equal to seed="1" -->
<filter id="turbpos1" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="0.2" baseFrequency="0.01" type="turbulence"/>
</filter>
<filter id="turbpos2" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="0.5" baseFrequency="0.01" type="turbulence"/>
</filter>
<filter id="turbpos3" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="1.5" baseFrequency="0.01" type="turbulence"/>
</filter>
<!-- These should be the same -->
<filter id="turbneg4" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="-1" baseFrequency="0.01" type="turbulence"/>
</filter>
<filter id="turbneg5" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="-1.5" baseFrequency="0.01" type="turbulence"/>
</filter>
<!-- These should be the same -->
<filter id="turbneg6" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="-2" baseFrequency="0.01" type="turbulence"/>
</filter>
<filter id="turbneg7" x="0" y="0" width="100%" height="100%">
<feTurbulence seed="-2.6" baseFrequency="0.01" type="turbulence"/>
</filter>
<style type="text/css">
#subtests text { fill: black }
</style>
</defs>
<text x="50%" y="2em" style="font-size:24px; text-anchor:middle">feTurbulence seed</text>
<g id="subtests" transform="translate(65 80)" text-anchor="middle" fill="red">
<rect width="50" height="50" filter="url(#turbneg3)"/>
<text x="25" y="80">-0.8</text>
<rect width="50" height="50" filter="url(#turbneg2)" transform="translate(50 0)"/>
<text x="75" y="80">-0.5</text>
<rect width="50" height="50" filter="url(#turbneg1)" transform="translate(100 0)"/>
<text x="125" y="80">-0.2</text>
<rect width="50" height="50" filter="url(#turbzero)" transform="translate(150 0)"/>
<text x="175" y="80">0</text>
<rect width="50" height="50" filter="url(#turbpos1)" transform="translate(200 0)"/>
<text x="225" y="80">0.2</text>
<rect width="50" height="50" filter="url(#turbpos2)" transform="translate(250 0)"/>
<text x="275" y="80">0.5</text>
<rect width="50" height="50" filter="url(#turbpos3)" transform="translate(300 0)"/>
<text x="325" y="80">1.5</text>
<rect x="-5" y="-5" width="360" height="100" stroke="black" fill="none"/>
<rect width="50" height="50" filter="url(#turbneg4)" transform="translate(0 120)"/>
<text x="25" y="200">-1</text>
<rect width="50" height="50" filter="url(#turbneg5)" transform="translate(50 120)"/>
<text x="75" y="200">-1.5</text>
<rect x="-5" y="115" width="110" height="100" stroke="black" fill="none"/>
<rect width="50" height="50" filter="url(#turbneg6)" transform="translate(250 120)"/>
<text x="275" y="200">-2</text>
<rect width="50" height="50" filter="url(#turbneg7)" transform="translate(300 120)"/>
<text x="325" y="200">-2.6</text>
<rect x="245" y="115" width="110" height="100" stroke="black" fill="none"/>
</g>
</g>
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
<text id="revision" x="10" y="340" stroke="none"
fill="black">$Revision: 1.7 $</text>
</g>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
<!-- comment out this watermark once the test is approved --><!--
<g id="draft-watermark">
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
</g>-->
</svg>