2012-11-06 16:19:37 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
2012-11-06 23:14:40 -05:00
|
|
|
<title>Clipping</title>
|
2012-11-06 16:19:37 -05:00
|
|
|
<script type="text/javascript" src="../../dist/paper.js"></script>
|
|
|
|
<script type="text/paperscript" canvas="canvas">
|
2012-11-06 16:47:29 -05:00
|
|
|
project.importSvg(document.getElementById('svg'));
|
2012-11-06 16:19:37 -05:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="width:400px; height:1500px;" id="svg">
|
|
|
|
<g>
|
|
|
|
<g>
|
|
|
|
<path fill="none" stroke="#CECECE" stroke-miterlimit="10" d="M353,198c0,56.885-46.114,103-103,103c-56.885,0-103-46.115-103-103
|
|
|
|
S193.115,95,250,95C306.886,95,353,141.115,353,198z"/>
|
|
|
|
<rect x="137" y="85" fill="none" stroke="#CECECE" stroke-miterlimit="10" width="113" height="113"/>
|
|
|
|
</g>
|
|
|
|
<g>
|
|
|
|
<g>
|
|
|
|
<defs>
|
|
|
|
<clipPath id="SVGID_2_">
|
|
|
|
<rect id="SVGID_1_" x="137" y="85" width="113" height="113"/>
|
|
|
|
</clipPath>
|
|
|
|
</defs>
|
|
|
|
|
|
|
|
<circle clip-path="url(#SVGID_2_)" fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="250" cy="198" r="103"/>
|
|
|
|
</g>
|
|
|
|
</g>
|
|
|
|
</g>
|
|
|
|
<g>
|
|
|
|
<g>
|
|
|
|
<path fill="none" stroke="#CECECE" stroke-miterlimit="10" d="M353,491.911c0,56.885-46.114,103-103,103
|
|
|
|
c-56.885,0-103-46.115-103-103s46.115-103,103-103C306.886,388.911,353,435.026,353,491.911z M250,409.512
|
|
|
|
c-45.508,0-82.4,36.892-82.4,82.399s36.893,82.4,82.4,82.4c45.509,0,82.399-36.894,82.399-82.4
|
|
|
|
C332.4,446.403,295.509,409.512,250,409.512z"/>
|
|
|
|
<rect x="137" y="378.911" fill="none" stroke="#CECECE" stroke-miterlimit="10" width="113" height="113"/>
|
|
|
|
</g>
|
|
|
|
<g>
|
|
|
|
<g>
|
|
|
|
<defs>
|
|
|
|
<clipPath id="SVGID_4_">
|
|
|
|
<rect id="SVGID_3_" x="137" y="378.911" width="113" height="113"/>
|
|
|
|
</clipPath>
|
|
|
|
</defs>
|
|
|
|
<path clip-path="url(#SVGID_4_)" fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" d="M353,491.911
|
|
|
|
c0,56.885-46.114,103-103,103c-56.885,0-103-46.115-103-103s46.115-103,103-103C306.886,388.911,353,435.026,353,491.911z
|
|
|
|
M250,409.512c-45.508,0-82.4,36.892-82.4,82.399s36.893,82.4,82.4,82.4c45.509,0,82.399-36.894,82.399-82.4
|
|
|
|
C332.4,446.403,295.509,409.512,250,409.512z"/>
|
|
|
|
</g>
|
|
|
|
</g>
|
|
|
|
</g>
|
|
|
|
<g>
|
|
|
|
<g>
|
|
|
|
<path fill="none" stroke="#CECECE" stroke-miterlimit="10" d="M353,785.823c0,56.885-46.114,103-103,103
|
|
|
|
c-56.885,0-103-46.115-103-103c0-56.886,46.115-103,103-103C306.886,682.823,353,728.938,353,785.823z M250,703.423
|
|
|
|
c-45.508,0-82.4,36.892-82.4,82.4c0,45.508,36.893,82.399,82.4,82.399c45.509,0,82.399-36.893,82.399-82.399
|
|
|
|
C332.4,740.314,295.509,703.423,250,703.423z"/>
|
|
|
|
<rect x="137" y="672.822" fill="none" stroke="#CECECE" stroke-miterlimit="10" width="113" height="113.001"/>
|
|
|
|
<rect x="137" y="672.822" fill="none" stroke="#CECECE" stroke-miterlimit="10" width="113" height="113.001"/>
|
|
|
|
</g>
|
|
|
|
<g>
|
|
|
|
<g>
|
|
|
|
<defs>
|
|
|
|
<clipPath id="SVGID_6_">
|
|
|
|
<path id="SVGID_5_" d="M353,785.823c0,56.885-46.114,103-103,103c-56.885,0-103-46.115-103-103c0-56.886,46.115-103,103-103
|
|
|
|
C306.886,682.823,353,728.938,353,785.823z M250,703.423c-45.508,0-82.4,36.892-82.4,82.4c0,45.508,36.893,82.399,82.4,82.399
|
|
|
|
c45.509,0,82.399-36.893,82.399-82.399C332.4,740.314,295.509,703.423,250,703.423z"/>
|
|
|
|
</clipPath>
|
|
|
|
</defs>
|
|
|
|
|
|
|
|
<rect x="137" y="672.822" clip-path="url(#SVGID_6_)" fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" width="113" height="113.001"/>
|
|
|
|
</g>
|
|
|
|
</g>
|
|
|
|
</g>
|
|
|
|
<text transform="matrix(1 0 0 1 83.5002 68.5)" font-family="'Helvetica'" font-size="12">Clipping a path with a path:</text>
|
|
|
|
<text transform="matrix(1 0 0 1 83.5002 355.5)" font-family="'Helvetica'" font-size="12">Clipping a compound path with a path:</text>
|
|
|
|
<text transform="matrix(1 0 0 1 83.5002 650.5)" font-family="'Helvetica'" font-size="12">Clipping a path with a compound path:</text>
|
|
|
|
<text transform="matrix(1 0 0 1 83.5002 941.5)" font-family="'Helvetica'" font-size="12">Clipping a group with a path:</text>
|
|
|
|
<g>
|
|
|
|
<defs>
|
|
|
|
<clipPath id="SVGID_8_">
|
|
|
|
<rect id="SVGID_7_" x="153" y="969.998" width="113" height="113.001"/>
|
|
|
|
</clipPath>
|
|
|
|
</defs>
|
|
|
|
<g clip-path="url(#SVGID_8_)">
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="156.5" cy="965.998" r="21.5"/>
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="209.5" cy="965.998" r="21.5"/>
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="262.5" cy="965.998" r="21.5"/>
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="156.5" cy="1018.999" r="21.5"/>
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="209.5" cy="1018.999" r="21.5"/>
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="262.5" cy="1018.999" r="21.5"/>
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="156.5" cy="1072.001" r="21.5"/>
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="209.5" cy="1072.001" r="21.5"/>
|
|
|
|
<circle fill="#00FF1E" stroke="#FF0000" stroke-width="10" stroke-miterlimit="10" cx="262.5" cy="1072.001" r="21.5"/>
|
|
|
|
</g>
|
|
|
|
</g>
|
|
|
|
</svg>
|
|
|
|
<canvas id="canvas" width="400px" height="1500px"></canvas>
|
|
|
|
</body>
|
|
|
|
</html>
|