- From: Lutz Spranger <Lutz.Spranger@t-online.de>
- Date: Fri, 26 Jan 2001 11:39:26 +0100
- To: <www-svg@w3.org>
Would it be nice to reverse the cliping possibility in SVG that way, that
you don't cut off the outside of the clip path rather than the inside? Did I
overlook this possibility?
I'm able to manage it with some headstands like this:
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "svg-20001102.dtd">
<svg width="500" height="500">
<defs>
<!-- To make the "inside" of a "clip path" invisible -->
<g style="clip-rule:nonzero">
<clipPath id="MyClip">
<path d="M0,0 L500,0 500,500 0,500 z M200,200 L300,200 300,300 200,300
z" style="clip-rule:evenodd"/>
</clipPath>
</g>
</defs>
<path d="M200,200 L300,200 300,300 200,300 z" style="stroke:black;
stroke-width:1; fill:none"/>
<!-- The next 2 path objects are going through the whole image but they are
invisible inside the none filled recangle -->
<path d="M0,0 L500,500" style="clip-path:url(#MyClip); stroke:black;
stroke-width:2; "/>
<path d="M0,500 L500,0" style="clip-path:url(#MyClip); stroke:black;
stroke-width:2; "/>
</svg>
This would have consequences also to the filling of areas (for example: not
inside of a rectangle with fill property but outside of this rectangle)
Lutz Spranger
Received on Friday, 26 January 2001 05:35:25 UTC