android获取当前Canvas位图代码

阅读更多

//获取位图代码
public Bitmap getCanvasBmp()
  {
    int w = CDisplay.getCurScreenWid();
    int h = CDisplay.getCurScreenHei();
    Bitmap canvasBmp = Bitmap.createBitmap( w, h, Config.ARGB_8888 );
    Canvas cn = new Canvas(canvasBmp);
    doDraw(cn);   
    cn.save(Canvas.ALL_SAVE_FLAG);
    cn.restore();
    return canvasBmp;
}
 

你可能感兴趣的:(android获取当前Canvas位图代码)