blob: 1ccce545cd1216be200577a026a921d763296b0d [file] [log] [blame]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN"
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
<!-- ========================================================================= -->
<!-- Copyright (C) The Apache Software Foundation. All rights reserved. -->
<!-- -->
<!-- This software is published under the terms of the Apache Software License -->
<!-- version 1.1, a copy of which has been included with this distribution in -->
<!-- the LICENSE file. -->
<!-- ========================================================================= -->
<!-- ========================================================================= -->
<!-- Test description here -->
<!-- -->
<!-- @author tkormann@apache.org -->
<!-- @version $Id $ -->
<!-- ========================================================================= -->
<?xml-stylesheet type="text/css" href="test.css" ?>
<svg id="body" width="450" height="500" viewBox="0 0 450 500">
<title>feComposite Test</title>
<!-- ============================================================= -->
<!-- Test content -->
<!-- ============================================================= -->
<g id="testContent">
<text x="225" y="40" class="title">
feComposite Test
</text>
<defs>
<circle id="Circle1" cx="40" cy="60" r="30" style="fill:orange" />
<circle id="Circle2" cx="80" cy="60" r="30" style="fill:blue" />
<filter id="feImage1" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1"/>
</filter>
<filter id="feImage2" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle2"/>
</filter>
<filter id="feComposite1_2" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1" result="c1" />
<feImage xlink:href="#Circle2" result="c2" />
<feComposite in="c1" in2="c2" operator="over" />
</filter>
<filter id="feComposite1_3" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1" result="c1" />
<feImage xlink:href="#Circle2" result="c2" />
<feComposite in="c1" in2="c2" operator="in" />
</filter>
<filter id="feComposite2_1" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1" result="c1" />
<feImage xlink:href="#Circle2" result="c2" />
<feComposite in="c1" in2="c2" operator="out" />
</filter>
<filter id="feComposite2_2" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1" result="c1" />
<feImage xlink:href="#Circle2" result="c2" />
<feComposite in="c1" in2="c2" operator="atop" />
</filter>
<filter id="feComposite2_3" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1" result="c1" />
<feImage xlink:href="#Circle2" result="c2" />
<feComposite in="c1" in2="c2" operator="xor" />
</filter>
<filter id="feComposite3_1" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1" result="c1" />
<feImage xlink:href="#Circle2" result="c2" />
<feComposite in="c1" in2="c2" operator="arithmetic"
k2="0.5" k3="0.5" />
</filter>
<filter id="feComposite3_2" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1" result="c1" />
<feImage xlink:href="#Circle2" result="c2" />
<feComposite in="c1" in2="c2" operator="arithmetic"
k2="0.75" k3="0.25" />
</filter>
<filter id="feComposite3_3" x="0" y="0" width="1" height="1">
<feImage xlink:href="#Circle1" result="c1" />
<feImage xlink:href="#Circle2" result="c2" />
<feComposite in="c1" in2="c2" operator="arithmetic"
k1="1" k2="0.5" k3="0.5" k4="0.2" />
</filter>
</defs>
<g transform="translate(0 40)" class="legend">
<!-- ============================================== -->
<!-- Composite_1_* -->
<!-- ============================================== -->
<g transform="translate(0 20)" class="row1" >
<g id="c1" transform="translate(20 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feImage1)"/>
<rect x="0" y="0" width="120" height="120"
style="fill:PaleVioletRed; filter:url(#feImage2); "/>
<g transform="translate(60, 130)">
<text x="0" y="0" style="text-anchor:middle">
1.1 Check FeImage
</text>
</g>
</g>
<g id="c2" transform="translate(160 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feComposite1_2)" />
<g transform="translate(60, 130)">
<text x="0" y="0" style="text-anchor:middle">
1.2 Orange over blue
</text>
</g>
</g>
<g id="c2" transform="translate(300 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feComposite1_3)" />
<g transform="translate(60, 130)">
<text x="0" y="0" style="text-anchor:middle">
1.3 Orange in blue
</text>
</g>
</g>
</g>
<!-- ============================================== -->
<!-- Composite_2_* -->
<!-- ============================================== -->
<g transform="translate(0 160)" class="row2" >
<g id="c1" transform="translate(20 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feComposite2_1)"/>
<g transform="translate(60, 130)">
<text x="0" y="0" style="text-anchor:middle">
2.1 Orange out blue
</text>
</g>
</g>
<g id="c2" transform="translate(160 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feComposite2_2)" />
<g transform="translate(60, 130)">
<text x="0" y="0" style="text-anchor:middle">
2.2 Orange atop blue
</text>
</g>
</g>
<g id="c2" transform="translate(300 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feComposite2_3)" />
<g transform="translate(60, 130)">
<text x="0" y="0" style="text-anchor:middle">
2.3 Orange xor blue
</text>
</g>
</g>
</g>
<!-- ============================================== -->
<!-- Composite_3_* -->
<!-- ============================================== -->
<g transform="translate(0 300)" class="row3" >
<g id="c1" transform="translate(20 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feComposite3_1)"/>
<text x="60" y="130" style="text-anchor:middle">
3.1 Orange arithmetic blue
</text>
<text x="60" y="140" style="text-anchor:middle">
k1=0 k2=0.5 k3=0.5 k4=0
</text>
</g>
<g id="c2" transform="translate(160 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feComposite3_2)" />
<text x="60" y="130" style="text-anchor:middle">
3.2 Orange arithmetic blue
</text>
<text x="60" y="140" style="text-anchor:middle">
k1=0 k2=0.75 k3=0.25 k4=0
</text>
</g>
<g id="c2" transform="translate(300 0)">
<rect x="0" y="0" width="120" height="120" style="fill:Beige"/>
<rect x="0" y="0" width="120" height="120"
style="fill:FireBrick; filter:url(#feComposite3_3)" />
<text x="60" y="130" style="text-anchor:middle">
3.3 Orange arithmetic blue
</text>
<text x="60" y="140" style="text-anchor:middle">
k1=1 k2=0.5 k3=0.5 k4=0.2
</text>
</g>
</g>
</g>
</g>
<!-- ============================================================= -->
<!-- Batik sample mark -->
<!-- ============================================================= -->
<use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
</svg>