markerUnits

  • Revision slug: SVG/Attribute/markerUnits
  • Revision title: markerUnits
  • Revision id: 52012
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 1 words added

Revision Content

« SVG Attribute reference home

The markerUnits attribute defines the coordinate system for the attributes {{ SVGAttr("markerWidth") }}, {{ SVGAttr("markerHeight") }} and the contents of the {{ SVGElement("marker") }}.

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

Usage context

Categories None
Value userSpaceOnUse | strokeWidth
Animatable Yes
Normative document SVG 1.1 (2nd Edition)
userSpaceOnUse
{{ SVGAttr("markerWidth") }}, {{ SVGAttr("markerHeight") }} and the contents of the {{ SVGElement("marker") }} represent values in the current user coordinate system in place for the graphic object referencing the marker (i.e., the user coordinate system for the element referencing the {{ SVGElement("marker") }} element via a {{ SVGAttr("marker") }}, {{ SVGAttr("marker-start") }}, {{ SVGAttr("marker-mid") }} or {{ SVGAttr("marker-end") }} property).
strokeWidth
{{ SVGAttr("markerWidth") }}, {{ SVGAttr("markerHeight") }} and the contents of the {{ SVGElement("marker") }} represent values in a coordinate system which has a single unit equal the size in user units of the current stroke width (see the {{ SVGAttr("stroke-width") }} attribute) in place for the graphic object referencing the marker.

Examples

Elements

The following elements can use the markerUnits attribute:

  • {{ SVGElement("marker") }}

Revision Source

<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG Attribute reference home</a></p>
<p>The <code>markerUnits</code> attribute defines the coordinate system for the attributes {{ SVGAttr("markerWidth") }}, {{ SVGAttr("markerHeight") }} and the contents of the {{ SVGElement("marker") }}.</p>
<p>If the <code>markerUnits</code> attribute is not specified, then the effect is as if a value of <code>strokeWidth</code> were specified.</p>
<h2 id="Usage_context">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><code>userSpaceOnUse</code> | <code><strong>strokeWidth</strong></code></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/painting.html#MarkerUnitsAttribute" title="http://www.w3.org/TR/SVG11/painting.html#MarkerUnitsAttribute">SVG 1.1 (2nd Edition)</a></td> </tr> </tbody>
</table>
<dl> <dt><code>userSpaceOnUse</code></dt> <dd>{{ SVGAttr("markerWidth") }}, {{ SVGAttr("markerHeight") }} and the contents of the {{ SVGElement("marker") }} represent values in the current user coordinate system in place for the graphic object referencing the marker (i.e., the user coordinate system for the element referencing the {{ SVGElement("marker") }} element via a {{ SVGAttr("marker") }}, {{ SVGAttr("marker-start") }}, {{ SVGAttr("marker-mid") }} or {{ SVGAttr("marker-end") }} property).</dd> <dt><code>strokeWidth</code></dt> <dd>{{ SVGAttr("markerWidth") }}, {{ SVGAttr("markerHeight") }} and the contents of the {{ SVGElement("marker") }} represent values in a coordinate system which has a single unit equal the size in user units of the current stroke width (see the {{ SVGAttr("stroke-width") }} attribute) in place for the graphic object referencing the marker.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<h2 id="Elements">Elements</h2>
<p>The following elements can use the <code>markerUnits</code> attribute:</p>
<ul> <li>{{ SVGElement("marker") }}</li>
</ul>
Revert to this revision