flash - Programatically draw a (drop)shadow -


this goes programming languages.

i use adobe flash as3 , reason boyond post, cannot use built-in dropshadow filters.

i do, however, have bitmap data available, color , alpha values.

so there should way draw own dropshadow filter.... right? existing algorithms should go , check out?

not looking as3 implementation, other example allow me convert code.

usually, dropshadows done so:

  • copy bitmap's alpha channel
  • blur copied alpha channel (a gaussian blur should fine)
  • move copied alpha channel down , right
  • use copied alpha channel darken background (that is, multiply background's rgb values inverse value alpha channel; same combining alpha channel all-black bitmap , alpha-blending on background)
  • draw original bitmap (also using alpha-blending)

Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -