Le rendu : les marqueurs
On peut définir des marqueurs qui pourront être référencés plus tard
par un chemin ou une forme de base
Syntaxe :
<marker markerUnits="" markerWidth="longueur" markerHeight="longueur" orient="auto|
angle
" />
Propriétés :
marker-start : le marqueur au premier noeud de l'objet graphique
marker-mid : le marqueur des noeuds intermédiaires
marker-end : le marqueur de l'extrémité
Exemple :
<?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
Le langage SVG
25 Janvier 2000
52 / 74