Pattern

fabric. Pattern

new Pattern()

Source:
See:
Pattern class

Members

crossOrigin :String

Source:
See:
crossOrigin value (one of "", "anonymous", "use-credentials")
Type:
  • String

offsetX :Number

Source:
Pattern horizontal offset from object's left/top corner
Type:
  • Number

offsetY :Number

Source:
Pattern vertical offset from object's left/top corner
Type:
  • Number

patternTransform :Array

Source:
transform matrix to change the pattern, imported from svgs.
Type:
  • Array

repeat :String

Source:
Default Value:
  • repeat
Repeat property of a pattern (one of repeat, repeat-x, repeat-y or no-repeat)
Type:
  • String

Methods

initialize(optionsopt, callbackopt) → {fabric.Pattern}

Source:
Constructor
Parameters:
Name Type Attributes Description
options Object <optional>
Options object
callback function <optional>
function to invoke after callback init.
Returns:
thisArg
Type
fabric.Pattern

toLive(ctx) → {CanvasPattern}

Source:
Returns an instance of CanvasPattern
Parameters:
Name Type Description
ctx CanvasRenderingContext2D Context to create pattern
Returns:
Type
CanvasPattern

toObject(propertiesToIncludeopt) → {Object}

Source:
Returns object representation of a pattern
Parameters:
Name Type Attributes Description
propertiesToInclude Array <optional>
Any properties that you might want to additionally include in the output
Returns:
Object representation of a pattern instance
Type
Object

toSVG(object) → {String}

Source:
Returns SVG representation of a pattern
Parameters:
Name Type Description
object fabric.Object
Returns:
SVG representation of a pattern
Type
String