Shadow

fabric. Shadow

new Shadow()

Source:
See:
Shadow class

Members

(static) reOffsetsAndBlur

Source:
Regex matching shadow offsetX, offsetY and blur (ex: "2px 2px 10px rgba(0,0,0,0.2)", "rgb(0,255,0) 2px 2px")

affectStroke :Boolean

Source:
Whether the shadow should affect stroke operations
Type:
  • Boolean

blur :Number

Source:
Shadow blur
Type:
  • Number

color :String

Source:
Default Value:
  • rgb(0,0,0)
Shadow color
Type:
  • String

includeDefaultValues :Boolean

Source:
Default Value:
  • true
Indicates whether toObject should include default values
Type:
  • Boolean

nonScaling :Boolean

Source:
When `false`, the shadow will scale with the object. When `true`, the shadow's offsetX, offsetY, and blur will not be affected by the object's scale. default to false
Type:
  • Boolean

offsetX :Number

Source:
Shadow horizontal offset
Type:
  • Number

offsetY :Number

Source:
Shadow vertical offset
Type:
  • Number

Methods

initialize(optionsopt) → {fabric.Shadow}

Source:
Constructor
Parameters:
Name Type Attributes Description
options Object | String <optional>
Options object with any of color, blur, offsetX, offsetY properties or string (e.g. "rgba(0,0,0,0.2) 2px 2px 10px")
Returns:
thisArg
Type
fabric.Shadow

toObject() → {Object}

Source:
Returns object representation of a shadow
Returns:
Object representation of a shadow instance
Type
Object

toString() → {String}

Source:
See:
Returns a string representation of an instance
Returns:
Returns CSS3 text-shadow declaration
Type
String

toSVG(object) → {String}

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