当前位置: 首页 > 文档资料 > Snap.svg 英文文档 >

Snap.filter.shadow(…)

优质
小牛编辑
129浏览
2023-12-01

Returns an SVG markup string for the shadow filter

Parameters

  1. dxnumberhorizontal shift of the shadow, in pixels
  2. dynumbervertical shift of the shadow, in pixels
  3. blurnumberamount of blur
  4. colorstringcolor of the shadow
  5. opacitynumber0..1 opacity of the shadow

or

Parameters

  1. dxnumberhorizontal shift of the shadow, in pixels
  2. dynumbervertical shift of the shadow, in pixels
  3. colorstringcolor of the shadow
  4. opacitynumber0..1 opacity of the shadow

which makes blur default to 4. Or

Parameters

  1. dxnumberhorizontal shift of the shadow, in pixels
  2. dynumbervertical shift of the shadow, in pixels
  3. opacitynumber0..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
});