blob: 317165ddac7d5180e1cab275044b2b87114fb413 [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 vincent.hardy@eng.sun.com -->
<!-- @version $Id$ -->
<!-- ========================================================================= -->
<?xml-stylesheet type="text/css" href="test.css" ?>
<svg id="body" width="450" height="500" viewBox="0 0 450 500">
<title>Filter Effect: feComponentTransfer</title>
<!-- ============================================================= -->
<!-- Test content -->
<!-- ============================================================= -->
<g id="testContent">
<g>
<text x="225" y="50" class="title">
Filter Effect: feComponentTransfer
</text>
<g transform="translate(30, 62.5)">
<defs>
<filter id="turbSource" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
</filter>
<filter id="linearRed" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
<feComponentTransfer filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%" >
<feFuncR type="linear" slope="1" intercept="0" />
<feFuncG type="linear" slope="0" intercept="0" />
<feFuncB type="linear" slope="0" intercept="0" />
<feFuncA type="linear" slope="0" intercept="1" />
</feComponentTransfer>
</filter>
<filter id="linearGreen" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
<feComponentTransfer filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%" >
<feFuncR type="linear" slope="0" intercept="0" />
<feFuncG type="linear" slope="1" intercept="0" />
<feFuncB type="linear" slope="0" intercept="0" />
<feFuncA type="linear" slope="0" intercept="1" />
</feComponentTransfer>
</filter>
<filter id="linearBlue" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
<feComponentTransfer filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%" >
<feFuncR type="linear" slope="0" intercept="0" />
<feFuncG type="linear" slope="0" intercept="0" />
<feFuncB type="linear" slope="1" intercept="0" />
<feFuncA type="linear" slope="0" intercept="1" />
</feComponentTransfer>
</filter>
<filter id="linearAlpha" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
<feComponentTransfer filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%" >
<feFuncR type="linear" slope="0" intercept="0" />
<feFuncG type="linear" slope="0" intercept="0" />
<feFuncB type="linear" slope="0" intercept="0" />
<feFuncA type="linear" slope="1" intercept="0" />
</feComponentTransfer>
</filter>
<filter id="linearFiftyPercentGray" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
<feComponentTransfer filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%" >
<feFuncR type="linear" slope="0" intercept=".5" />
<feFuncG type="linear" slope="0" intercept=".5" />
<feFuncB type="linear" slope="0" intercept=".5" />
<feFuncA type="linear" slope="0" intercept="1" />
</feComponentTransfer>
</filter>
<filter id="linearBrighten" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
<feComponentTransfer filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%" >
<feFuncR type="linear" slope="1.5" intercept="0" />
<feFuncG type="linear" slope="1.5" intercept="0" />
<feFuncB type="linear" slope="1.5" intercept="0" />
<feFuncA type="linear" slope="1" intercept="0" />
</feComponentTransfer>
</filter>
<filter id="linearDarken" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
<feComponentTransfer filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%" >
<feFuncR type="linear" slope=".5" intercept="0" />
<feFuncG type="linear" slope=".5" intercept="0" />
<feFuncB type="linear" slope=".5" intercept="0" />
<feFuncA type="linear" slope="1" intercept="1" />
</feComponentTransfer>
</filter>
<filter id="linearOffsetDarken" filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%">
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
<feComponentTransfer filterUnits="objectBoundingBox"
x="0%" y="0%" width="100%" height="100%" >
<feFuncR type="linear" slope=".5" intercept="-.1" />
<feFuncG type="linear" slope=".5" intercept="-.1" />
<feFuncB type="linear" slope=".5" intercept="-.1" />
<feFuncA type="linear" slope="1" intercept="1" />
</feComponentTransfer>
</filter>
</defs>
<g class="legend">
<g id="reference_Group">
<rect x="25" y="25" width="100" height="75" style="filter:url(#turbSource)" />
<text x="75" y="117">Reference Image</text>
</g>
<g id="linearRed_Group" transform="translate(120, 0)">
<rect x="25" y="25" width="100" height="75" style="filter:url(#linearRed)" />
<text x="75" y="117">type=linear</text>
<text x="75" y="129">Red channel. Alpha 1.</text>
</g>
<g id="linearGreen_Group" transform="translate(240, 0)">
<rect x="25" y="25" width="100" height="75" style="filter:url(#linearGreen)" />
<text x="75" y="117">type=linear</text>
<text x="75" y="129">Red channel. Alpha 1.</text>
</g>
<g id="linearBlue_Group" transform="translate(0, 120)">
<rect x="25" y="25" width="100" height="75" style="filter:url(#linearBlue)" />
<text x="75" y="117">type=linear</text>
<text x="75" y="129">Blue channel. Alpha 1.</text>
</g>
<g id="linearAlpha_Group" transform="translate(120, 120)">
<rect x="25" y="25" width="100" height="75" style="filter:url(#linearAlpha)" />
<text x="75" y="117">type=linear</text>
<text x="75" y="129">Alpha Channel.</text>
</g>
<g id="linearFiftyPercentGray_Group" transform="translate(240, 120)">
<rect x="25" y="25" width="100" height="75" style="filter:url(#linearFiftyPercentGray)" />
<text x="75" y="117">type=linear</text>
<text x="75" y="129">50% gray</text>
</g>
<g id="linearBrighten_Group" transform="translate(0, 240)">
<rect x="25" y="25" width="100" height="75" style="filter:url(#linearBrighten)" />
<text x="75" y="117">type=linear</text>
<text x="75" y="129">Brighten</text>
</g>
<g id="linearDarken_Group" transform="translate(120, 240)">
<rect x="25" y="25" width="100" height="75" style="filter:url(#linearDarken)" />
<text x="75" y="117">type=linear</text>
<text x="75" y="129">Darken</text>
</g>
<g id="linearOffsetDarken_Group" transform="translate(240, 240)">
<rect x="25" y="25" width="100" height="75" style="filter:url(#linearOffsetDarken)" />
<text x="75" y="117">type=linear</text>
<text x="75" y="129">Offset</text>
</g>
</g>
</g>
</g>
</g>
<!-- ============================================================= -->
<!-- Batik sample mark -->
<!-- ============================================================= -->
<use xlink:href="../batikLogo.svg#Batik_Tag_Box" />
</svg>