flex BitmapData(位图)合并
参考网址? http://arahaya.com/canvasscript3/tests/bitmapdata_merge.html
?
?
var bitmapData:BitmapData = new BitmapData(component.width,component.height+30, true, 0x0);var matrix:Matrix = new Matrix();matrix.translate(0,30);//位图平移bitmapData.draw(component,matrix);var bitmapData2:BitmapData = new BitmapData(component.width, component.height+30, true, 0x0);bitmapData2.draw(component);//位图合并 0x80表示两张图片各取一半bitmapData2.merge(bitmapData, new Rectangle(0, 0, component.width, component.height+30), new Point(0, 0), 0x80, 0x80, 0x80, 0x80);//bitmapData2.draw(bitmapData);var image:Image = new Image();image.source = new Bitmap(bitmapData);?
?
?