Ad
  
現: 2015-05-23 (土) 21:01:29 njf ソース 編集
Line 1: Line 1:
 +特にモバイルなどでは、少しでも画像のメモリを削らないといけないので9スライスやタイルイメージは必須となる。
 +その使い方。
 +まずtextureを取得
 + var texture:Texture = assets.getTexture(YOUR_9_SLICE_TEXTURE_NAME);
 +assetsはAssetManager。[[StarlingのAssetManagerを使う]]を参照のこと。
 +
 +つぎにScale9Texturesを作成する。
 + var rect:Rectangle = new Rectangle( 20, 20, 165, 165 );
 + var s9texture:Scale9Textures = new Scale9Textures( texture, rect );
 +
 +ここでrectは9スライスの中心部分を表す長方形。
 +
 +最後にScale9Imageで表示。高さや幅を指定すると9スライスとしてスケールされる。
 + var img9s:Scale9Image = new Scale9Image(s9texture);
 + img9s.width = 360;
 + img9s.height = 330;
 + addChild(img9s);
 +
 +参考: http://feathersui.com/help/scale9-image.html
  

  • Starling+Feathersで9スライスを使う のバックアップ差分(No. All)
    • 現: 2015-05-23 (土) 21:01:29 njf

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード印刷に適した表示   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom Powered by xpWiki
Counter: 1972, today: 3, yesterday: 0
MenuBar
広告

ログイン

ユーザー名:


パスワード:





パスワード紛失

Portuguese | English | German | Greek | Japanese | Korean | Russian | T-Chinese top
NJF