starling截屏
2017-11-23 本文已影响0人
mengyong
var rt: RenderTexture=new RenderTexture();
var matrix:Matrix=new Matrix();
matrix.scale(display.scaleX,display.scaleY);
matrix.translate(-100,-100);
rt.draw(display,matrix);
addChild(new Image(Texture.fromTexture(rt)));
Texture转BitmapData:
var bmd:BitmapData = tImage.drawToBitmapData(bmd);