fc2ブログ

PixelText variation (5)

2007/10/01 21:00 - tweener

  1. Main.as のクラスプロパティ scale:uint
  2. Pixelize.as の createPositions メソッド内、new AqLetter() の第2引数であるオブジェクト { font:String , size:uint }

// ピクセル化する文字列
var aqLetter:AqLetter = new AqLetter(
 null ,
 { font:"_serif",size:30 }
);
aqLetter.text = dispStr;

font

size

for ( var cntx:int=0; cntx<w; cntx++ ) {
 for ( var cnty:int=0; cnty<h; cnty++ ) {
  // ピクセル ARGB 取得
  argb = bmd.getPixel32( cntx , cnty );
  // 各セルの座標計算
  if ( ((argb>>24)&0xFF) != 0 ) {
   posx = ( cntx + 0.5 ) * scale + offsetx;
   posy = ( cnty + 0.5 ) * scale + offsety;
   pos_array.push( { posx:posx , posy:posy } );
  }
 }
}

各サンプルの変数値比較
scalefontsize
最初のサンプル16"_sans"16
2番目のサンプル12"_serif"20
3番目のサンプル8"_serif"30
最後のサンプル4"_typewriter"60

にほんブログ村 IT技術ブログへ

スポンサーサイト




コメントの投稿

非公開コメント

タグクラウド

最近の記事
カテゴリ
月別アーカイブ
プロフィール

Aquioux

Author:Aquioux
日曜 Flash プログラマ。
Flash 作品は本館で展示しています。


mailto:aquioux@mail.goo.ne.jp

ブログパーツ

あわせて読みたい

フィードメーター - 閃光的網站・弛緩複合体 -Review Division-


検索/translation
Google



オススメ本

コメント
トラックバック
RSS

Add to Google

Bloglinesで閲読登録

はてなRSSに追加

Subscribe with livedoor Reader

My Yahoo!に追加

Add to Technorati Favorites!

feedpathに追加