火花图像边界框不能缩放

时间:2013-07-08 17:09:30

标签: actionscript-3 flex flex-spark

缩放Spark Image组件时,边界框不会随之缩放。这意味着父容器(在这种情况下,Group)不完全适合图像边界。我已经多次见过这个问题了,但我从没见过有人给出答案。

目前正在使用的代码:

this.headerArea = new Group();
this.headerArea.percentWidth = 100;
this.headerArea.styleName = "pageHead";
this.scrollViewport.addElementAt( this.headerArea, 0 );

this.logo = new Image();
this.logo.source = "assets/images/logo.png";
this.logo.scaleMode = BitmapScaleMode.LETTERBOX;
this.logo.smooth = true;
this.logo.percentWidth = 75;
this.logo.horizontalCenter = 0;
this.logo.styleName = "headerLogo";
this.headerArea.addElement( this.logo );

徽标缩放到我需要的尺寸,但顶部和底部有大量填充(随着图像的percentWidth减少而增加)。

有没有解决方案?

0 个答案:

没有答案
相关问题