blob: 531ca69837a8be40c84c509f99c1785e6d28c46c [file] [log] [blame]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
<!--======================================================================-->
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
<!--= Institute of Technology, Institut National de Recherche en =-->
<!--= Informatique et en Automatique, Keio University). All Rights =-->
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
<!--======================================================================-->
<!--======================================================================-->
<!-- -->
<!-- filters-blend-BE-02.svg -->
<!-- renamed to filters-blend-01-f.svg -->
<!-- renamed for 1.1 basic profile suite to filters-blend-01-b.svg -->
<!-- -->
<!-- Verify correct operation of the five compositing modes of the -->
<!-- feBlend filter primitive. -->
<!-- -->
<!-- Author : Jon Ferraiolo, 15 March 2000 -->
<!-- Revised for 1.1 : Mike Bultrowicz, 4 February 2002 -->
<!-- Modified for svg 1.1 basic profile by Luc Minnebo, 05-July-2002 -->
<!-- Further modifications, Rick Graham and Chris Lilley -->
<!--======================================================================-->
<svg id="svg-root" width="100%" height="100%" viewBox="0 0 160 120" version="1.1" baseProfile="basic" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" zoomAndPan="magnify">
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
<OperatorScript version="$Revision: 1.8 $" testname="filters-blend-01-b.svg">
<Paragraph>
Verify correct operation of the five compositing modes
of the feBlend filter primitive. Seven rectangles are
blended into a gradient, with text strings identifying
which of the the five feBlend modes were used.
</Paragraph>
<Paragraph>
All rectangles but the fourth one have a blue fill, although the
blend mode will adjust this color. The fourth has a yellow fill.
</Paragraph>
<Paragraph>
The third and fourth rectangles are grouped and the filter is applied to the group.
</Paragraph>
<Paragraph>
The rendered picture should match the reference image
exactly, except for possible variations in the
labelling text (per CSS2 rules).
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">filters-blend-01-b</title>
<desc id="test-desc">Examples of feBlend operations</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content" font-size="9">
<image x="40" y="5" width="100" height="98" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAABCAMAAAAfBfuPAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEsUExURfb/AK3/AAD/9/9sAIn/AN7/ABT/
AAB//zD/AP9GAAD/s1H/AAD/H/8AxwD/bn8A/1wA/wD/XJv/AP8Ai//MAGP/ABMA/wD/LP8A6P8K
AP8AF/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////AP8A
CuAA//8AJ24A/0sA//8AOAA0/wAK/wBF//8WAAgA/x8A///2AL//AP8AdTwA/wn/AP/bAP+AAP+U
AM//AP+nAP8AtADp/wD/o0D/AP/qAADb/wC5/wDL/wD/AAD/7QD/0gD/4CH/AABr//9ZAG2IeB4A
AABvSURBVHjaYrCyl3J0Udb2FTYP5bWQkDY1sXGQt7bVUeF3EnD2M/AS85R109dzdVdMYldTj46J
CpMzY4pLiJfhCtdS4BPUNBbnsVSK9WdL5IjgFjVkEWL0CWbVYLDzjgwQUQ0JCmRO5jTS9ZAECDAA
3aQTV3E5iioAAAAASUVORK5CYII="/>
<defs>
<filter id="BlendNormal" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feFlood in="BackgroundAlpha" flood-color="#0f0" flood-opacity="0.5" result="img1"/>
<feBlend in2="img1" in="SourceGraphic" mode="normal"/>
</filter>
<filter id="BlendMultiply" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feFlood in="SourceGraphic" flood-color="#0f0" flood-opacity="0.5" result="img2"/>
<feBlend in="SourceGraphic" in2="img2" mode="multiply"/>
</filter>
<filter id="BlendScreen" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feFlood in="SourceGraphic" flood-color="#0f0" flood-opacity="0.5" result="img2"/>
<feBlend in="SourceGraphic" in2="img2" mode="screen"/>
</filter>
<filter id="BlendDarken" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feFlood in="SourceGraphic" flood-color="#0f0" flood-opacity="0.5" result="img2"/>
<feBlend in="SourceGraphic" in2="img2" mode="darken"/>
</filter>
<filter id="BlendLighten" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
<feFlood in="SourceGraphic" flood-color="#0f0" flood-opacity="0.5" result="img2"/>
<feBlend in="SourceGraphic" in2="img2" mode="lighten"/>
</filter>
</defs>
<rect x="30" y="10" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendNormal)"/>
<rect x="30" y="23" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendMultiply)"/>
<g filter="url(#BlendMultiply)">
<rect x="30" y="36" width="120" height="10" fill="blue" opacity="0.5"/>
<rect x="30" y="49" width="120" height="10" fill="#ff0" opacity="0.5"/>
</g>
<rect x="30" y="62" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendScreen)"/>
<rect x="30" y="75" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendDarken)"/>
<rect x="30" y="88" width="120" height="10" fill="blue" opacity="0.5" filter="url(#BlendLighten)"/>
<g fill="#333" font-size="7">
<text x="5" y="17">Normal</text>
<text x="5" y="30">Multiply</text>
<text x="5" y="43">Multiply</text>
<text x="5" y="56">Multiply</text>
<text x="5" y="69">Screen</text>
<text x="5" y="82">Darken</text>
<text x="5" y="95">Lighten</text>
</g>
</g>
<text id="revision" x="3" y="112" font-size="12" stroke="none" fill="black">$Revision: 1.8 $</text>
<rect id="test-frame" x="1" y="1" width="158" height="118" fill="none" stroke="#000000" stroke-width="0.5"/>
</svg>