Rendering : markers
Markers can be defined to be referenced later on by a path or a basic shape
Syntax :
<marker markerUnits="" markerWidth="length" markerHeight="length" orient="auto|
angle
" />
Properties :
marker-start : the marker of the first node of the object
marker-mid : the marker of intermediate nodes
marker-end : the marker of the last node of the object
Example :
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG December 1999//EN"
"http://www.w3.org/Graphics/SVG/SVG-19991203.dtd">
<svg width="4in" height="4in"
viewBox="0 0 4000 4000" >
<defs>
<marker id="Triangle"
viewBox="0 0 10 10" refX="0" refY="5"
markerWidth="1.25" markerHeight="1.75"
orient="auto">
<path d="M 0 0 L 10 5 L 0 10 z" />
</marker>
</defs>
<desc>Placing an arrowhead at the end of a path.
</desc>
<path d="M 1000 1000 L 2000 1000 L 3000 2000"
style="fill:none; stroke:black; stroke-width:100;
marker-end:url(#Triangle)" />
</svg>
Didier Courtaud
The SVG language
Novembre 2001
52 / 74