我正在将一个圆角矩形绘制到BitmapData:(bg)
var bg:Shape= new Shape();
bg.graphics.beginFill(0xdddddd);
bg.graphics.drawRoundRect(0, 0, 200, 400, 20);
bg.graphics.endFill();
var imageData:BitmapData = new BitmapData(bg.width, bg.height);
image.draw(bg);
但是当我从imageData创建一个Bitmap时,位图角落并不像预期的那样透明,而是它的白色......任何想法?
答案 0 :(得分:2)
尝试:
// see the argb color value 0x00000000 -> the first two '0' after '0x' are for transparency
var imageData:BitmapData = new BitmapData( bg.width, bg.height, true, 0x00000000 );