Members
(static) reOffsetsAndBlur
Regex匹配阴影offsetX, offsetY和blur(例如:"2px 2px 10px rgba(0,0,0,0.2)", "rgb(0,255,0) 2px 2px")
affectStroke :Boolean
阴影是否应该影响笔画操作
Type:
- Boolean
blur :Number
阴影模糊
Type:
- Number
color :String
阴影颜色
Type:
- String
includeDefaultValues :Boolean
指示toObject是否应该包含默认值
Type:
- Boolean
nonScaling :Boolean
当为“false”时,阴影将随物体缩放。
当设置为“true”时,阴影的偏移量x、偏移量y和模糊将不受物体比例的影响。
默认为false
Type:
- Boolean
offsetX :Number
阴影水平偏移
Type:
- Number
offsetY :Number
阴影垂直偏移
Type:
- Number
Methods
initialize(optionsopt) → {fabric.Shadow}
构造函数
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object | String |
<optional> |
选项对象具有任何颜色,模糊,offsetX, offsetY属性或字符串(例如:"rgba(0,0,0,0.2) 2px 2px 10px") |
Returns:
thisArg
- Type
- fabric.Shadow
toObject() → {Object}
返回阴影的对象表示形式
Returns:
Object representation of a shadow instance
- Type
- Object
toString() → {String}
返回实例的字符串表示形式
Returns:
Returns CSS3 text-shadow declaration
- Type
- String
toSVG(object) → {String}
返回阴影的SVG表示形式
Parameters:
Name | Type | Description |
---|---|---|
object |
fabric.Object |
Returns:
SVG representation of a shadow
- Type
- String