Reputation: 1861
I would like to apply two DropShadowFilter
to an image: white inner and black outer. Here is my code:
<s:BitmapImage>
<s:filters>
<s:DropShadowFilter angle="90" alpha="0.5" distance="2" strength="1" color="0x000000" inner="false" blurX="6" blurY="6"/>
<s:DropShadowFilter angle="90" alpha="0.5" distance="2" strength="1" inner="true" color="0xffffff" blurX="0" blurY="0"/>
</s:filters>
</s:BitmapImage>
Instead of the desired result, I'm getting white inner and white outer shadows.
Is it expected behavour? Could we mix two DropShadowFilter
in one filters
tag?
Upvotes: 0
Views: 71
Reputation: 2254
Swap the order of your filters, and you should get the effect you're looking for. Filters apply to the whole visible object, including any existing shadows, so at the moment the white "inner" shadow is falling on some of the existing black outer shadow.
Upvotes: 1