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

All > SVG > Masking > masking-clipPath-BE-01


File: masking-clipPath-BE-01
Author: Haroon Sheikh
Origin: W3C SVG conformance suite

Rendered imageSVG source
ElementsAttributes
axlink:href |
circlecx | cy | r |
clipPathid |
defs
descid |
gid | style |
pathd | style |
rectheight | id | style | 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">masking-clipPath-BE-01</title>
     <desc id="test-desc">Test to see if the basic clipping works using the clipPath element and the clip-path property.</desc>
     <g id="test-body-content">
          <text style="font-family:Helvetica;font-size:14;" x="10" y="20">Test for clipping using clipPath element</text>
          <defs>
               <clipPath id="clip1">
                    <rect x="185" y="20" width="80" height="120"/>
               </clipPath>
               <clipPath id="clip2">
                    <circle cx="150" cy="265" r="75"/>
                    <circle cx="275" cy="265" r="65"/>
               </clipPath>
          </defs>
          <rect x="10" y="30" width="430" height="80" style="fill:red;stroke:black;stroke-width:5;clip-path:url(#clip1);"/>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="125">Red rectangle with black stroke that has been clipped to a rectangle.</text>
          <g style="clip-path:url(#clip2);">
               <rect x="100" y="220" width="225" height="40" style="fill:cyan;stroke:blue;stroke-width:5;"/>
               <rect x="100" y="270" width="225" height="40" style="fill:lime;stroke:green;stroke-width:5;"/>
               <text style="font-family:Helvetica;font-size:12;" x="100" y="210">Sample line of text that has been clipped.</text>
          </g>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="345">Group containing 2 rectangles and text clipped to 2 circles.</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-clipPath-BE-01</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