0

SparkImageコンポーネントをスケーリングすると、バウンディング ボックスはスケーリングされません。これは、親コンテナー (この場合は a 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縮小するにつれて増加します)。

これに対する解決策はありますか?

4

0 に答える 0