在 Graphic 对象上绘制不带滤镜的阴影
我有一个关于精灵或形状的复杂图形数据(无论到底是哪一个)。 但我想为一个矩形(例如 [10, 10, 240, 25])或另一条路径绘制阴影(内部也是)。
/// code before
grObj.graphics.drawRect( 10, 10, 240, 25);
/// -> draw inner shadow on this objcect somehow
/// code after
是否可以执行无过滤器?
附: http://ipicture.ru/uploads/100927/RHZF1K6Exu.png
解决:
BitmapData(*).applyFilter( *,*,*,*); // play with this function :)
也< a href="http://help.adobe.com/ru_RU/AS3LCR/Flash_10.0/flash/display/BitmapData.html#applyFilter" rel="nofollow">http://help.adobe.com/ru_RU/ AS3LCR/Flash_10.0/flash/display/BitmapData.html#applyFilter()
I have a complex graphics data on a sprite or a shape (no matter which is exactly).
But I want to draw shadow (inner too) for one Rect ( [10, 10, 240, 25] for example) or another path.
/// code before
grObj.graphics.drawRect( 10, 10, 240, 25);
/// -> draw inner shadow on this objcect somehow
/// code after
Is it possible to perform w\o filters?
ps. http://ipicture.ru/uploads/100927/RHZF1K6Exu.png
solving:
BitmapData(*).applyFilter( *,*,*,*); // play with this function :)
also http://help.adobe.com/ru_RU/AS3LCR/Flash_10.0/flash/display/BitmapData.html#applyFilter()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您不想向对象添加滤镜,因为您计划添加 colorTransform 并且不希望滤镜也改变颜色。
如果是这种情况,您可以通过创建另一个与原始精灵大小相同的精灵来分离滤镜,然后将投影滤镜添加到新精灵中,并将 hideObject 参数设置为 true。
i'm assuming you don't want to add filters to your object because you plan on adding a colorTransform and do not want the filters to also change color.
if that's the case what you can do is separate the filter by creating another sprite of the same size as the original, add a drop shadow filter to the new sprite with the hideObject parameter set to true.