| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <!-- ========================================================================= --> |
| <!-- Test description here --> |
| <!-- --> |
| <!-- @author vincent.hardy@eng.sun.com --> |
| <!-- @version $Id$ --> |
| <!-- ========================================================================= --> |
| |
| <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| |
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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> |