SVG clipPath clip die *äußeren* Inhalte aus

Normalerweise die <clipPath> element verbirgt sich alles, was outshide der clip-Pfad. Zu erzielen den gegenteiligen Effekt - das "cut out" etwas aus dem Bild - ich möchte zwei Pfade in der clipPath und die clip-rule="evenodd" Attribut. Im Grunde will ich "xor" die clip-Pfade.

Aber es funktioniert nicht. Es zeigt die region "ORed":

<clipPath clip-rule="evenodd" id="imageclippath" clipPathUnits = "objectBoundingBox">
        <rect clip-rule="evenodd" x="0.3" y="0.3" height="0.6" width="6" />
        <rect clip-rule="evenodd" x="0" y="0" height="0.5" width="0.5" />
    </clipPath>     

 <rect clip-path="url(#imageclippath)" x="0" y="0" height="500" width="500" fill="red"/>

EDIT:

Mein problem ist, dass AFAIK <mask> funktioniert nicht in iOS WebKit.

InformationsquelleAutor der Frage tillda | 2011-01-27

Schreibe einen Kommentar