ZVON > References > Zvon Example Repository
Example repository: index | categories | search

All > SVG > Filters > filters-dispMap-BE-16


File: filters-dispMap-BE-16
Author: Peter Graffagnino
Origin: W3C SVG conformance suite

Rendered imageSVG source
ElementsAttributes
axlink:href |
defs
descid |
feDisplacementMapin | in2 | scale | xChannelSelector | yChannelSelector |
feImageresult | xlink:href |
filterfilterUnits | height | id | width | x | y |
gid | style |
pathd | style |
rectheight | id | style | transform | width | x | y |
svgheight | id | width |
textstyle | x | y |
titleid |

Source

<svg id="svg-root" width="450" height="450" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" >
     <title id="test-title">filters-dispMap-BE-16</title>
     <desc id="test-desc">Test which verifies the basic facilities of feDisplacementMap.</desc>
     <g id="test-body-content">
          <defs>
               <filter id="DispMapChecker" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
                    <feImage xlink:href="DisplaceChecker.png"/>
               </filter>
               <filter id="RotateMap" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
                    <feImage xlink:href="rotate20.png"/>
               </filter>
               <filter id="SphereMap" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
                    <feImage xlink:href="sphere.png"/>
               </filter>
               <filter id="RotateMapTest" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
                    <feImage result="Map" xlink:href="rotate20.png"/>
                    <feImage result="Texture" xlink:href="DisplaceChecker.png"/>
                    <feDisplacementMap in="Texture" in2="Map" scale="64" xChannelSelector="R" yChannelSelector="G"/>
               </filter>
               <filter id="SphereMapTest" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
                    <feImage result="Map" xlink:href="sphere.png"/>
                    <feImage result="Texture" xlink:href="DisplaceChecker.png"/>
                    <feDisplacementMap in="Texture" in2="Map" scale="64" xChannelSelector="R" yChannelSelector="G"/>
               </filter>
          </defs>
          <g style="font-size:25;font-family:Verdana;">
               <rect x="15" y="15" width="128" height="128" style="filter:url(#DispMapChecker);"/>
               <rect x="158" y="15" width="128" height="128" style="filter:url(#RotateMap);"/>
               <rect x="301" y="15" width="128" height="128" style="filter:url(#RotateMapTest);"/>
               <rect x="-1" y="-1" width="2" height="2" transform="translate(365,79) rotate(20) scale(32)" style="fill:blue;fill-opacity:0.5;"/>
               <rect x="15" y="200" width="128" height="128" style="filter:url(#DispMapChecker);"/>
               <rect x="158" y="200" width="128" height="128" style="filter:url(#SphereMap);"/>
               <rect x="301" y="200" width="128" height="128" style="filter:url(#SphereMapTest);"/>
               <text style="font-family:Helvetica;font-size:12;" x="15" y="160">Checkerboard Image</text>
               <text style="font-family:Helvetica;font-size:12;" x="15" y="345">Checkerboard Image</text>
               <text style="font-family:Helvetica;font-size:12;" x="158" y="160">Displacement Map</text>
               <text style="font-family:Helvetica;font-size:12;" x="158" y="172">(20 deg. rotation)</text>
               <text style="font-family:Helvetica;font-size:12;" x="301" y="160">Result</text>
               <text style="font-family:Helvetica;font-size:12;" x="301" y="172">(overlayed with 20 deg.</text>
               <text style="font-family:Helvetica;font-size:12;" x="301" y="184">rotated blue rectangle)</text>
               <text style="font-family:Helvetica;font-size:12;" x="158" y="345">Displacement Map</text>
               <text style="font-family:Helvetica;font-size:12;" x="158" y="357">(spherical distortion)</text>
               <text style="font-family:Helvetica;font-size:12;" x="301" y="345">Result</text>
          </g>
     </g>
     <g id="test-legend" style="fill:black;font-family:Helvetica;font-size:10;">
          <rect x="10" y="390" width="275" height="50" style="fill:none;stroke:#000000;"/>
          <path style="fill:none;stroke:#000000;" d="M10 405 h275 M205 405 v35 M10 426 h195 M205 422 h80"/>
          <text x="25" y="401">Scalable Vector Graphics (SVG) Conformance Suite</text>
          <a xlink:href="copyright-documents-19990405.html">
               <text x="12" y="437" style="fill:blue;">Copyright 2000 W3C. All Rights Reserved.</text>
          </a>
          <text style="font-size:12;" x="35" y="420">filters-dispMap-BE-16</text>
          <text style="font-size:10;" x="210" y="417">$Revision: 1.1 $</text>
          <text style="font-size:10;" x="210" y="435">Release 2.0</text>
          <rect id="test-frame" x="1" y="1" width="448" height="448" style="fill:none;stroke:#000000;"/>
     </g>
</svg>



Sponsored links: conference call service, VoIP Internettelefonie, DSL, SDSL, ADSL, answering service