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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -