mozilla

Revision 50827 of clipPathUnits

  • Revision slug: SVG/Attribute/clipPathUnits
  • Revision title: clipPathUnits
  • Revision id: 50827
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment page created, 147 words added

Revision Content

« SVG Attribute reference home

The clipPathUnits attribute defines the coordinate system for the contents of the {{ SVGElement("clipPath") }} element.

  • If clipPathUnits="userSpaceOnUse", the contents of the {{ SVGElement("clipPath") }} element represent values in the current user coordinate system in place at the time when the {{ SVGElement("clipPath") }} element is referenced (i.e., the user coordinate system for the element referencing the {{ SVGElement("clipPath") }} element via the {{ SVGAttr("clip-path") }} attribute).
  • If clipPathUnits="objectBoundingBox", then the user coordinate system for the contents of the {{ SVGElement("clipPath") }} element is established using the bounding box of the element to which the clipping path is applied

If the clipPathUnits attribute is not specified, then the effect is as if a value of userSpaceOnUse were specified.

Usage context

Categories None
Value userSpaceOnUse | objectBoundingBox
Animatable Yes
Normative document SVG 1.1 (2nd Edition)

Example

Elements

The following elements can use the clipPathUnits attribute

  • {{ SVGElement("clipPath") }}

Revision Source

<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG Attribute reference home</a></p>
<p>The <code>clipPathUnits</code> attribute defines the coordinate system for the contents of the {{ SVGElement("clipPath") }} element.</p>
<ul> <li>If <code>clipPathUnits="userSpaceOnUse"</code>, the contents of the {{ SVGElement("clipPath") }} element represent values in the current user coordinate system in place at the time when the {{ SVGElement("clipPath") }} element is referenced (i.e., the user coordinate system for the element referencing the {{ SVGElement("clipPath") }} element via the {{ SVGAttr("clip-path") }} attribute).</li> <li>If <code>clipPathUnits="objectBoundingBox"</code>, then the user coordinate system for the contents of the {{ SVGElement("clipPath") }} element is established using the bounding box of the element to which the clipping path is applied</li>
</ul>
<p>If the <code>clipPathUnits</code> attribute is not specified, then the effect is as if a value of <code>userSpaceOnUse</code> were specified.</p>
<h2>Usage context</h2>
<table class="standard-table"> <tbody> <tr> <th scope="row">Categories</th> <td><em>None</em></td> </tr> <tr> <th scope="row">Value</th> <td><strong>userSpaceOnUse</strong> | objectBoundingBox</td> </tr> <tr> <th scope="row">Animatable</th> <td>Yes</td> </tr> <tr> <th scope="row">Normative document</th> <td><a class="external" href="http://www.w3.org/TR/SVG11/masking.html#ClipPathElementClipPathUnitsAttribute" title="http://www.w3.org/TR/SVG11/masking.html#ClipPathElementClipPathUnitsAttribute">SVG 1.1 (2nd Edition)</a></td> </tr> </tbody>
</table>
<h2>Example</h2>
<h2>Elements</h2>
<p>The following elements can use the <code>clipPathUnits</code> attribute</p>
<ul> <li>{{ SVGElement("clipPath") }}</li>
</ul>
Revert to this revision