Differences between Image and BitmapImage with Fle

2019-05-28 16:30发布

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 ?

标签: flex
1条回答
兄弟一词,经得起流年.
2楼-- · 2019-05-28 16:51

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.
查看更多
登录 后发表回答