1

回転タブを適用すると、タブのテキストが消えるのはなぜですか? タブと一緒に回転するように、ラベルを相対的な位置に保つ方法はありますか?

コード:

<tabs name="dentes" height="200"  width="300" x="${this.width}" y="${this.height}" rotation="90">
    <tabpane name="coroa" text="Coroa" bgcolor="blue" width="100%" height="100%"> 
        <text>Nome:</text>
    </tabpane>
    <tabpane name="raiz" text="Raiz" bgcolor="red" width="100%" height="100%"> 
        <text>Nome:</text>
    </tabpane>
    <tabpane name="canal" text="Canal" bgcolor="green" width="100%" height="100%"> 
        <text>Nome:</text>
    </tabpane>
</tabs>
4

1 に答える 1

1

これは、クライアント フォントを使用する場合の Flash/SWF ランタイムの技術的な制限です。ドキュメントにも記載されています:

OpenLaszlo 開発者ガイド、第 21 章、テキスト ビュー: 特に、SWF にコンパイルされたアプリケーションのクライアント フォントと埋め込みフォントの違いを理解する必要があります。(DHTML にコンパイルされたアプリケーションは、埋め込みフォントを使用できません)。常に同じように動作するとは限らないため (たとえば、Flash Player の制限により、クライアント フォントを回転させたり、不透明度を変更したりすることはできません)。

タグを使用し<font>て、TTF フォントをアプリケーションに埋め込みます。テキストにそのフォントを選択すると、回転は期待どおりに機能します。

<canvas width="100%" height="250">

    <!-- ATTENTION: Please download the KentucyFriedChickendFont.ttf file using
         this URL and put it in the same folder as this LZX file.
         http://svn.openlaszlo.org/openlaszlo/trunk/test/resources/ttf/KentuckyFriedChickenFont.ttf
    -->

    <font name="ChickenNoCFF" src="KentuckyFriedChickenFont.ttf" embedascff="false" />
    <font name="ChickenCFF" src="KentuckyFriedChickenFont.ttf" embedascff="true" />

    <inputtext x="100" 
               rotation="10"
               font="ChickenNoCFF" fontsize="32" 
               hasdirectionallayout="false"
               resize="true">
    Embedded font (no CFF)
    </inputtext>

    <!-- Text elements using @hasdirectionallayout="true" need to set
         @embedascff="true" for the SWF10+ runtimes -->
    <inputtext x="100" y="100"
               rotation="10" 
               font="ChickenCFF" fontsize="32" 
               hasdirectionallayout="true">
    Embedded font (embedded as CFF)
    </inputtext>

</canvas>

TTF フォントをアプリケーションに埋め込む必要があり、標準のテキスト コンポーネントを自由に回転できます。

hasdirectionallayoutSWF アプリケーションでテキスト コンポーネントのプロパティを使用する場合、embedascff="true"カスタム フォントを埋め込むときに属性を使用する必要があります。

これは、5.0 (トランク) でテストされたこのサンプル SWF10 アプリのスクリーンショットです。

ここに画像の説明を入力

于 2012-11-08T23:33:56.763 に答える