Class: FillPattern

ol.style. FillPattern

Fill style with named pattern


new FillPattern( [options])

Parameters:
Name Type Argument Description
options olx.style.FillPatternOption <optional>
Properties
Name Type Description
image ol.style.Image | undefined

an image pattern, image must be preloaded to draw on first call

opacity number | undefined

opacity with image pattern, default:1

pattern olx.style.fillPattern

pattern name (override by image option)

color ol.color

pattern color

fill ol.style.Fill

fill color (background)

offset number

pattern offset for hash/dot/circle/cross pattern

size number

line size for hash/dot/circle/cross pattern

spacing number

spacing for hash/dot/circle/cross pattern

angle number | bool

angle for hash pattern / true for 45deg dot/circle/cross

scale number

pattern scale

Implements:
  • ol.structs.IHasChecksum

Extends

  • ol.style.Fill

Members


patterns

Patterns definitions Examples : http://seig.ensg.ign.fr/fichchap.php?NOFICHE=FP31&NOCHEM=CHEMS009&NOLISTE=1&N=8

Methods


<static> addPattern(title, options)

Static fuction to add char patterns

Parameters:
Name Type Description
title title
options olx.fillpattern.Option

size {integer} default 10 - width {integer} default 10 - height {integer} default 10 - circles {Array} - lines: {Array} - stroke {integer} - fill {bool} - char {char} - font {string} default "10px Arial"


clone()

Clones the style.

Returns:
Type
ol.style.FillPattern

getImage()

Get canvas used as pattern

Returns:
Type
canvas

getPattern_(options)

Get pattern

Parameters:
Name Type Description
options olx.style.FillPatternOption