Class: Pattern

fabric.Pattern

new Pattern()

Pattern class
Source:
See:

Members

crossOrigin :String

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

offsetX :Number

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

offsetY :Number

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

patternTransform :Array

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

repeat :String

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

Methods

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

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

toLive(ctx) → {CanvasPattern}

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

toObject(propertiesToIncludeopt) → {Object}

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
Source:
Returns:
Object representation of a pattern instance
Type
Object

toSVG(object) → {String}

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