Snap.filter.shadow(…)
优质
小牛编辑
129浏览
2023-12-01
Returns an SVG markup string for the shadow filter
Parameters
- dxnumberhorizontal shift of the shadow, in pixels
- dynumbervertical shift of the shadow, in pixels
- blurnumberamount of blur
- colorstringcolor of the shadow
- opacitynumber
0..1
opacity of the shadow
or
Parameters
- dxnumberhorizontal shift of the shadow, in pixels
- dynumbervertical shift of the shadow, in pixels
- colorstringcolor of the shadow
- opacitynumber
0..1
opacity of the shadow
which makes blur default to 4
. Or
Parameters
- dxnumberhorizontal shift of the shadow, in pixels
- dynumbervertical shift of the shadow, in pixels
- opacitynumber
0..1
opacity of the shadow
Returns: string filter representation
Usage
var f = paper.filter(Snap.filter.shadow(0, 2, .3)),
c = paper.circle(10, 10, 10).attr({
filter: f
});