我编写了一个使用Flex编写的图像查看器,它根据浏览器的大小来缩放当前正在查看的图像的大小。标签如下:
<mx:Image id="img"
maintainAspectRatio="true"
source="{horizontalList.selectedItem.image}-large.jpg"
height="100%"
horizontalCenter="0"
horizontalAlign="center"
top="5"
width="{horizontalList.width}"
updateComplete="onImageChange()"
click="onImgClick()"
/>
原始图像的大小总是大于浏览器的区域,不幸的是,Flex 似乎在缩小图像方面做得并不好。实际上,在 IE 中使用其图像标记时,HTML 做得更好。我是否错过了 Flex 中的比例质量设置?
谢谢。