PERGOLA LOGO

Patterns Library

A pattern definition is a method of the pergola.pattern object (defined in lib/patterns.js). The function first creates a unique ID based on the function name and values, taking into account the overriding values, and if it doesn't already exist in the document it creates and appends the filter element to pergola.defs. Returns the URI string.

The pattern functions expect an optional object specifying overriding properties. Some properties have arbitrary names, and some use SVG vocabulary (names containing illegal characters for JavaScript variable names are specified using the string notation, e.g. "stroke-width"). The values of the number properties represent user space units.

Properties common to all patterns

pergola.pattern

pergola.pattern.catseye([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.pattern.pirelli([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.filpatternter.line([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 1 element.

pergola.pattern.grid([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 1 elements.

pergola.pattern.bar([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.filpatternter.grille([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.pattern.pied_de_poule([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.pattern.pied_de_poule1([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.pattern.checkers([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.pattern.dot([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.pattern.hive([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 2 elements.

pergola.pattern.ring([object])

If object is specified it may define any of the common and/or these properties:

If colors is specified, it must have 3 elements.