您当前的位置: 首页 > 

Jave.Lin

暂无认证

  • 5浏览

    0关注

    704博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

AS3 截全图

Jave.Lin 发布时间:2012-07-11 11:05:10 ,浏览量:5

源代码如下:

	//截当前场景全图
	private function drawCurStageBmp():Bitmap
	{
		try
		{
			if(stage==null)return null;
			var stageWidth:Number=stage.stageWidth;
			var stageHeight:Number=stage.stageHeight;
			
			var bmd:BitmapData=new BitmapData(stageWidth,stageHeight,true);
			bmd.draw(stage);
			
			var bmp:Bitmap=new Bitmap();
			bmp.bitmapData=bmd;
			
			return bmp;
		}
		catch(er:Error)
		{
			trace("截图失败,返回null");
			return null;
		}
		return null;
	}

关注
打赏
1664331872
查看更多评论
立即登录/注册

微信扫码登录

0.0465s