Shadow
Defined in: src/Shadow.ts:63
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Shadow(
options?
):Shadow
Defined in: src/Shadow.ts:124
Parameters
Section titled “Parameters”options?
Section titled “options?”Partial
<TClassProperties
<Shadow
>>
Options object with any of color, blur, offsetX, offsetY properties or string (e.g. “rgba(0,0,0,0.2) 2px 2px 10px”)
Returns
Section titled “Returns”Shadow
Constructor
Section titled “Constructor”new Shadow(
svgAttribute
):Shadow
Defined in: src/Shadow.ts:125
Parameters
Section titled “Parameters”svgAttribute
Section titled “svgAttribute”string
Returns
Section titled “Returns”Shadow
Properties
Section titled “Properties”affectStroke
Section titled “affectStroke”affectStroke:
boolean
Defined in: src/Shadow.ts:96
Whether the shadow should affect stroke operations
Default
Section titled “Default”
blur:
number
Defined in: src/Shadow.ts:75
Shadow blur
color:
string
Defined in: src/Shadow.ts:69
Shadow color
Default
Section titled “Default”
id:
number
Defined in: src/Shadow.ts:114
includeDefaultValues
Section titled “includeDefaultValues”includeDefaultValues:
boolean
Defined in: src/Shadow.ts:103
Indicates whether toObject should include default values
Default
Section titled “Default”
nonScaling
Section titled “nonScaling”nonScaling:
boolean
Defined in: src/Shadow.ts:112
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
Default
Section titled “Default”
offsetX
Section titled “offsetX”offsetX:
number
Defined in: src/Shadow.ts:82
Shadow horizontal offset
Default
Section titled “Default”
offsetY
Section titled “offsetY”offsetY:
number
Defined in: src/Shadow.ts:89
Shadow vertical offset
Default
Section titled “Default”
ownDefaults
Section titled “ownDefaults”
static
ownDefaults:Partial
<TClassProperties
<Shadow
>> =shadowDefaultValues
Defined in: src/Shadow.ts:116
static
type:string
='shadow'
Defined in: src/Shadow.ts:118
Methods
Section titled “Methods”toObject()
Section titled “toObject()”toObject():
Partial
<SerializedShadowOptions
>
Defined in: src/Shadow.ts:221
Returns object representation of a shadow
Returns
Section titled “Returns”Partial
<SerializedShadowOptions
>
Object representation of a shadow instance
toString()
Section titled “toString()”toString():
string
Defined in: src/Shadow.ts:157
Returns a string representation of an instance
Returns
Section titled “Returns”string
Returns CSS3 text-shadow declaration
http://www.w3.org/TR/css-text-decor-3/#text-shadow
toSVG()
Section titled “toSVG()”toSVG(
object
):string
Defined in: src/Shadow.ts:166
Returns SVG representation of a shadow
Parameters
Section titled “Parameters”object
Section titled “object”Returns
Section titled “Returns”string
SVG representation of a shadow
fromObject()
Section titled “fromObject()”
static
fromObject(options
):Promise
<Shadow
>
Defined in: src/Shadow.ts:237
Parameters
Section titled “Parameters”options
Section titled “options”Partial
<TClassProperties
<Shadow
>>
Returns
Section titled “Returns”Promise
<Shadow
>
parseShadow()
Section titled “parseShadow()”
static
parseShadow(value
):object
Defined in: src/Shadow.ts:137
Parameters
Section titled “Parameters”string
Shadow value to parse
Returns
Section titled “Returns”object
Shadow object with color, offsetX, offsetY and blur
blur:
number
color:
string
offsetX
Section titled “offsetX”offsetX:
number
offsetY
Section titled “offsetY”offsetY:
number