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

All > SVG > Masking > masking-mask-BE-06


File: masking-mask-BE-06
Author: Haroon Sheikh
Origin: W3C SVG conformance suite

Rendered imageSVG source
ElementsAttributes
axlink:href |
descid |
gid | style |
maskheight | id | maskContentUnits | maskUnits | width | x | y |
pathd | style |
rectheight | id | style | transform | width | x | y |
svgheight | id | width |
textstyle | x | y |
titleid |

Source

<svg id="masking-mask-BE-06" width="450" height="450" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" >
     <title id="test-title">masking-mask-BE-06</title>
     <desc id="test-desc"> Test the maskUnits attribute on mask element. </desc>
     <g id="test-body-content">
          <text style="font-family:Helvetica;font-size:14;" x="80" y="20">Test the maskUnits attribute on mask element.</text>
          <text style="font-family:Helvetica;font-size:50;fill:lime;" x="30" y="85">Background Text</text>
          <mask id="mask1" maskUnits="objectBoundingBox" maskContentUnits="userSpaceOnUse">
               <rect x="0%" y="0%" width="50%" height="50%" style="fill:white;fill-opacity:0.25;"/>
               <rect x="50%" y="0%" width="50%" height="50%" style="fill:white;fill-opacity:0.5;"/>
               <rect x="50%" y="50%" width="50%" height="50%" style="fill:white;fill-opacity:0.75;"/>
               <rect x="0%" y="50%" width="50%" height="50%" style="fill:white;fill-opacity:1;"/>
               <rect x="47.777%" y="0%" width="4.444%" height="100%" style="fill:black;"/>
          </mask>
          <rect x="125" y="35" width="200" height="60" style="fill:red;mask:url(#mask1);"/>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="110">Mask element with default attributes</text>
          <text style="font-family:Helvetica;font-size:50;fill:lime;" x="30" y="200">Background Text</text>
          <mask id="mask2" x="0" y="0" width="1" height="1" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
               <rect x="0" y="0" width=".5" height=".5" style="fill:white;fill-opacity:0.25;"/>
               <rect x=".5" y="0" width=".5" height=".5" style="fill:white;fill-opacity:0.5;"/>
               <rect x=".5" y=".5" width=".5" height=".5" style="fill:white;fill-opacity:0.75;"/>
               <rect x="0" y=".5" width=".5" height=".5" style="fill:white;fill-opacity:1;"/>
               <rect x="0.47" y="0" width="0.04444" height="1" style="fill:black;"/>
          </mask>
          <rect x="10" y="145" width="430" height="80" style="fill:red;mask:url(#mask2);"/>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="240">maskUnits=objectBoundingBox</text>
          <text style="font-family:Helvetica;font-size:50;fill:lime;" x="30" y="320">Background Text</text>
          <mask id="mask3" x="0" y="0" width="70" height="430" maskUnits="userSpaceOnUse">
               <rect x="0" y="0" width="35" height="215" style="fill:white;fill-opacity:0.25;"/>
               <rect x="35" y="0" width="35" height="215" style="fill:white;fill-opacity:0.5;"/>
               <rect x="35" y="215" width="35" height="215" style="fill:white;fill-opacity:0.75;"/>
               <rect x="0" y="215" width="35" height="215" style="fill:white;fill-opacity:1;"/>
               <rect x="30" y="0" width="10" height="430" style="fill:black;"/>
          </mask>
          <rect transform="translate(10, 340) rotate(-90)" x="0" y="0" width="70" height="430" style="fill:red;mask:url(#mask3);"/>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="355">maskUnits=userSpaceOnUse</text>
     </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">masking-mask-BE-06</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: Domain Names, VoIP Internettelefonie, DSL, SDSL, ADSL, UNLIMITED Web Hosting by HostDepartment, conference call service, answering service