836 B
836 B
title | order |
---|---|
Snippet | 35 |
A snippet is a reuseable bit of markup for your pattern. They are added to the
SVG defs
section, and rendered with the SVG use
tag.
The snippet constructor takes two arguments:
def
: Thexlink:href
id that links to the relevant entry in the SVGdefs
sectionanchor
: APoint
on which to anchor the snippet
Snippet new Snippet(def, Point);
A Snippet object comes with the following properties:
def
: Thexlink:href
id that links to the relevant entry in the SVGdefs
sectionanchor
: APoint
on which to anchor the snippetattributes
: AnAttributes
instance holding the snippet's attributes
In addition, a Snippet object exposes the following methods: