0x00ffffff => 0x00000000
0x00ffffff => 0x00000000
アルファ値が0だと黒にされてしまう?
♥0 |
Line 26 |
Modified 2011-06-26 07:40:45 |
MIT License
archived:2017-03-20 17:08:58
ActionScript3 source code
/**
* Copyright demouth ( http://wonderfl.net/user/demouth )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/icak
*/
/**
* アルファ値が0だと黒にされてしまう?
*
*/
package {
import flash.display.BitmapData;
import flash.text.TextField;
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var t:TextField = new TextField();
this.addChild(t);
t.width = this.stage.stageWidth;
t.height = this.stage.stageHeight;
var b:BitmapData;
b = new BitmapData(1,1,true,0xffffffff);
t.appendText( "new BitmapData(1,1,true,0xffffffff) => " );
t.appendText( b.getPixel32(0,0).toString(16) );
t.appendText( "\r\n" );
b = new BitmapData(1,1,true,0x00ffffff);
t.appendText( "new BitmapData(1,1,true,0x00ffffff) => " );
t.appendText( b.getPixel32(0,0).toString(16) );
t.appendText( "\r\n" );
b = new BitmapData(1,1,true,0x01ffffff);
t.appendText( "new BitmapData(1,1,true,0x01ffffff) => " );
t.appendText( b.getPixel32(0,0).toString(16) );
t.appendText( "\r\n" );
}
}
}