图像和带有Flex的BitmapImage之间的区别? [英] Differences between Image and BitmapImage with Flex?
问题描述
Image
的asdoc中,我们可以看到:lockquote
包括BitmapImage类。这个类用于将图像嵌入到皮肤和FXG组件中。
但是我们也可以使用 Image
在皮肤中使用 @Embed
与图片
...
因此,我应该在何时何地使用 Image 或
BitmapImage
? b $ b
BitmapImage
。由于这样的BitmapImage更轻量级,但图像具有更多的功能。那么什么时候使用的问题可以归结为:如果BitmapImage的功能足够,使用它;否则使用Image。特别是在移动环境中,尝试使用BitmapImage。
现在有什么功能可以完全添加图像?
- 图像扩展了SkinnableComponent:这意味着您可以在整个应用程序中一直使用边框或阴影或任何您喜欢的任何图像来指定图像。
- 它还提供了一个进度指示器,可以在图像加载时显示。
- 另外一个功能是可以使用将多个图像加载到队列中。
In Image
's asdoc, we can see :
Flex also includes the BitmapImage class. This class is used for embedding images into skins and FXG components
but we can also use Image
in skins and use @Embed
with Image
...
Therefore, where and when should I use Image
or BitmapImage
please ?
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.
Now what features does Image add exactly?
- Image extends SkinnableComponent: this means you can assign your images a skin with a border or a dropshadow or whatever you like consistently throughout your application.
- It also provides a progress indicator which can be displayed while the image is loading.
- One more feature is the possibility to queue the loading of multiple images.
这篇关于图像和带有Flex的BitmapImage之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!