module:Pattern(id, width, height)

pattern object in SVG

new module:Pattern(id, width, height)

Parameters:
Name Type Description
id string

unique id of this pattern

width number

width of one pattern tile in SVG pixels

height number

height of one pattern tile in SVG pixels

Extends

  • Tag

Methods

addChild(el)

add a child to this pattern

pattern behaves a little like Group - it contains child elements, which represent the content of one tile of the pattern and the whole package of the child elements is repeated on each tile of the pattern

Parameters:
Name Type Description
el SvgElement

element that will be added to the pattern