Loading ...
Sorry, an error occurred while loading the content.

reverse the CLIP possibility

Expand Messages
  • Lutz.Spranger@t-online.de
    Hello! Some days before I posted this message to the w3c-svg-forum and to the adobe-svg-forum also but I think as a new svg user this forum is most activ. And
    Message 1 of 1 , Jan 30, 2001
    View Source
    • 0 Attachment
      Hello!
      Some days before I posted this message to the w3c-svg-forum and to
      the adobe-svg-forum also but I think as a new svg user this forum is
      most activ. And maby here I'll find someone who tells me: "What a
      stupid question." OR is thinking about the idea.

      The real message starts here:
      -----------------------------
      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)
    Your message has been successfully submitted and would be delivered to recipients shortly.