use()
Produces an SVG "use"
element.
Syntax
use(
name STRING,
x DECIMAL,
y DECIMAL )
RETURNS om.DomNode
- name is the xlink:href reference (without #).
- x defines the X coordinate to place the shape.
- y defines the Y coordinate to place the shape.
Usage
This function creates a "use"
SVG DOM element from the parameters.
The "use" element can reuse an SVG shape from elsewhere in the SVG document, for example to make
several copies of shapes defined in the "defs"
element.
Example
DEFINE n1, n2 om.DomNode
LET n1 = fglsvgcanvas.use( "myshape1", 100, 100 )
LET n2 = fglsvgcanvas.use( "myshape1", 110, 110 )