SVG/Attribute/mask
Aus SELFHTML-Wiki
Das mask-Präsentationsattribut verweist auf eine in einem mask-Element definierte Schablone.
erlaubte Werte |
|
---|---|
default-Wert | none |
erlaubt in | grafische Elemente, Formen |
Beispiel
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
<mask id="myMask" maskContentUnits="objectBoundingBox">
<rect fill="white" x="0" y="0" width="100%" height="100%" />
<polygon fill="black" points="0.5,0.2 0.68,0.74 0.21,0.41 0.79,0.41 0.32,0.74" />
</mask>
<!--
Punch a hole in a shape of a star inside the red circle,
revealing the yellow circle underneath
-->
<circle cx="50" cy="50" r="20" fill="yellow" />
<circle cx="50" cy="50" r="45" fill="red"
mask="url(#myMask)"/>
</svg>
Siehe auch
Weblinks
- Spezifikation (W3C): mask
Liste der SVG-Attribute
- Kernattribute
- Präsentationsattribute
- Anzeige
- Beschneidung und Masken
- Farben und Verläufe
- Filter
- Größen und Geometrie
- Schrift
- Text
- Animations-Attribute
- Filter-Attribute
- Layout-Attribute
- viewBox-Attribute
- XLink-Attribute
- weitere XML-Attribute