| 1 |
<svg version="1.1" baseProfile="basic" preserveAspectRatio="xMidYMid meet" zoomAndPan="magnify" 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="Jon Ferraiolo" status="accepted" |
| 15 |
version="$Revision: 1.9 $" testname="$RCSfile: filters-blend-01-b.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feBlendElement"> |
| 17 |
<p> |
| 18 |
Verify correct operation of the five compositing modes |
| 19 |
of the feBlend filter primitive. Seven rectangles are |
| 20 |
blended into a gradient, with text strings identifying |
| 21 |
which of the the five feBlend modes were used. |
| 22 |
</p> |
| 23 |
<p> |
| 24 |
All rectangles but the fourth one have a blue fill, although the |
| 25 |
blend mode will adjust this color. The fourth has a yellow fill. |
| 26 |
</p> |
| 27 |
<p> |
| 28 |
The third and fourth rectangles are grouped and the filter is applied to the group. |
| 29 |
</p> |
| 30 |
</d:testDescription> |
| 31 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 32 |
<p> |
| 33 |
Run the test. No interaction required. |
| 34 |
</p> |
| 35 |
</d:operatorScript> |
| 36 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 37 |
<p> |
| 38 |
The rendered picture should match the reference image |
| 39 |
exactly, except for possible variations in the |
| 40 |
labelling text (per CSS2 rules). |
| 41 |
</p> |
| 42 |
</d:passCriteria> |
| 43 |
</d:SVGTestCase> |
| 44 |
<title id="test-title">$RCSfile: filters-blend-01-b.svg,v $</title> |
| 45 |
<defs> |
| 46 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 47 |
<font-face-src> |
| 48 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 49 |
</font-face-src> |
| 50 |
</font-face> |
| 51 |
</defs> |
| 52 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 53 |
<g font-size="9" transform="scale(3)"> |
| 54 |
<image x="40" y="5" width="100" height="98" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAABCAMAAAAfBfuPAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEsUExURfb/AK3/AAD/9/9sAIn/AN7/ABT/AAB//zD/AP9GAAD/s1H/AAD/H/8AxwD/bn8A/1wA/wD/XJv/AP8Ai//MAGP/ABMA/wD/LP8A6P8KAP8AF/8A9QD/xAAA/wD1/9MA/wD/gABY/wD/Cf8ATJEA//+6AACT/wCn/+v/AAD/TAD/kf8AYKMA//8kAAAk/wAV/y0A/3b/AP80AAD/O/cA//8A/wD///8An/8A2QD/Ev8AAMQA/+0A/7MA////AP8ACuAA//8AJ24A/0sA//8AOAA0/wAK/wBF//8WAAgA/x8A///2AL//AP8AdTwA/wn/AP/bAP+AAP+UAM//AP+nAP8AtADp/wD/o0D/AP/qAADb/wC5/wDL/wD/AAD/7QD/0gD/4CH/AABr//9ZAG2IeB4AAABvSURBVHjaYrCyl3J0Udb2FTYP5bWQkDY1sXGQt7bVUeF3EnD2M/AS85R109dzdVdMYldTj46JCpMzY4pLiJfhCtdS4BPUNBbnsVSK9WdL5IjgFjVkEWL0CWbVYLDzjgwQUQ0JCmRO5jTS9ZAECDAA3aQTV3E5iioAAAAASUVORK5CYII="/> |
| 55 |
<defs> |
| 56 |
<filter id="BlendNormal" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 57 |
<feFlood in="BackgroundAlpha" flood-color="#0f0" flood-opacity="0.5" result="img1"/> |
| 58 |
<feBlend in2="img1" in="SourceGraphic" mode="normal"/> |
| 59 |
</filter> |
| 60 |
<filter id="BlendMultiply" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 61 |
<feFlood in="SourceGraphic" flood-color="#0f0" flood-opacity="0.5" result="img2"/> |
| 62 |
<feBlend in="SourceGraphic" in2="img2" mode="multiply"/> |
| 63 |
</filter> |
| 64 |
<filter id="BlendScreen" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 65 |
<feFlood in="SourceGraphic" flood-color="#0f0" flood-opacity="0.5" result="img2"/> |
| 66 |
<feBlend in="SourceGraphic" in2="img2" mode="screen"/> |
| 67 |
</filter> |
| 68 |
<filter id="BlendDarken" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 69 |
<feFlood in="SourceGraphic" flood-color="#0f0" flood-opacity="0.5" result="img2"/> |
| 70 |
<feBlend in="SourceGraphic" in2="img2" mode="darken"/> |
| 71 |
</filter> |
| 72 |
<filter id="BlendLighten" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 73 |
<feFlood in="SourceGraphic" flood-color="#0f0" flood-opacity="0.5" result="img2"/> |
| 74 |
<feBlend in="SourceGraphic" in2="img2" mode="lighten"/> |
| 75 |
</filter> |
| 76 |
</defs> |
| 77 |
<rect x="30" y="10" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendNormal)"/> |
| 78 |
<rect x="30" y="23" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendMultiply)"/> |
| 79 |
<g filter="url(#BlendMultiply)"> |
| 80 |
<rect x="30" y="36" width="120" height="10" fill="blue" opacity="0.5"/> |
| 81 |
<rect x="30" y="49" width="120" height="10" fill="#ff0" opacity="0.5"/> |
| 82 |
</g> |
| 83 |
<rect x="30" y="62" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendScreen)"/> |
| 84 |
<rect x="30" y="75" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendDarken)"/> |
| 85 |
<rect x="30" y="88" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendLighten)"/> |
| 86 |
<g fill="#333" font-size="7"> |
| 87 |
<text x="5" y="17">Normal</text> |
| 88 |
<text x="5" y="30">Multiply</text> |
| 89 |
<text x="5" y="43">Multiply</text> |
| 90 |
<text x="5" y="56">Multiply</text> |
| 91 |
<text x="5" y="69">Screen</text> |
| 92 |
<text x="5" y="82">Darken</text> |
| 93 |
<text x="5" y="95">Lighten</text> |
| 94 |
</g> |
| 95 |
</g> |
| 96 |
</g> |
| 97 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 98 |
<text id="revision" x="10" y="340" stroke="none" |
| 99 |
fill="black">$Revision: 1.9 $</text> |
| 100 |
</g> |
| 101 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 102 |
<!-- comment out this watermark once the test is approved --><!-- |
| 103 |
<g id="draft-watermark"> |
| 104 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 105 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 106 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 107 |
</g>--> |
| 108 |
</svg> |