Image 和 BitmapImage 与 Flex 的区别? [英] Differences between Image and BitmapImage with Flex?
问题描述
在Image
的asdoc中,我们可以看到:
In Image
's asdoc, we can see :
Flex 还包括 BitmapImage 类.该类用于将图像嵌入到皮肤和 FXG 组件中
Flex also includes the BitmapImage class. This class is used for embedding images into skins and FXG components
但我们也可以在皮肤中使用 Image
并使用 @Embed
和 Image
...
but we can also use Image
in skins and use @Embed
with Image
...
因此,我应该在何时何地使用 Image
或 BitmapImage
?
Therefore, where and when should I use Image
or BitmapImage
please ?
推荐答案
Image
是包装 BitmapImage
的可换肤类.因此 BitmapImage 更轻量级,但 Image 具有更多功能.所以问题何时使用哪个归结为:
如果 BitmapImage 的特性足够,就使用它;否则使用图像.尤其是在移动环境中尽量偏向于使用 BitmapImage.
Image
is a skinnable class that wraps BitmapImage
. As such BitmapImage is more lightweight, but Image has more features. So the question when to use which boils down to this:
if the features of BitmapImage suffice, use that; otherwise use Image. Especially in mobile environments try to favor the use of BitmapImage.
现在 Image 到底添加了哪些功能?
- Image extends SkinnableComponent:这意味着您可以在整个应用程序中为图像分配带有边框或阴影或任何您喜欢的外观的外观.
- 它还提供了一个可以在图像加载时显示的进度指示器.
- 另一个功能是可以加载dc7cque1多张图片.
这篇关于Image 和 BitmapImage 与 Flex 的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!