@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); mCanvas.drawPath(mPath, mPaint); canvas.drawBitmap(bitmap, 0, 0, null); } int x = 0; int y = 0; @Override public boolean onTouchEvent(MotionEvent event) { int action = event.getAction(); int currX = (int) event.getX(); int currY = (int) event.getY(); switch(action){ case MotionEvent.ACTION_DOWN:{ mPath.reset(); x = currX; y = currY; mPath.moveTo(x, y); }break; case MotionEvent.ACTION_MOVE:{ mPath.quadTo(x, y, currX, currY); x = currX; y = currY; postInvalidate(); }break; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL:{ mPath.reset(); }break; } return true; }