如何擦除画布绘制的图像?

时间:2011-05-18 05:04:09

标签: android

  @Override
  protected void onDraw(Canvas canvas) {
   // TODO Auto-generated method stub
      Log.d("dd","draw");

            mBitmap=BitmapFactory.decodeResource(this.getResources(),R.drawable.image1);

            canvas.drawBitmap(mBitmap, srcRect,dstRect,null);
            mBitmaps=BitmapFactory.decodeResource(this.getResources(),R.drawable.paintball);
              canvas.drawBitmap(mBitmaps, 180,200,null);
        }

1 个答案:

答案 0 :(得分:1)

Canvas.drawColor(Color.BLACK) 

或你的bg颜色。