How to delete the image drawn in Canvas?
<p>How will I delete the image drawn on my canvas if my code is this? Where will I put the delete process here? I've tried using the <code>canvas.drawColor(Color.BLACK);</code> but it is not working.</p>

<pre><code>@Override
protected void onDraw(Canvas canvas) {
    canvas.drawPath(path, paint);   
}

@Override
public boolean onTouchEvent(MotionEvent event) {
    float eventX = event.getX();
    float eventY = event.getY();

    switch (event.getAction()) {
    case MotionEvent.ACTION_DOWN:
        path.moveTo(eventX, eventY);
        return true;
    case MotionEvent.ACTION_MOVE:
        path.lineTo(eventX, eventY);
        break;
    case MotionEvent.ACTION_UP:
        // nothing to do
        break;
    default:
        return false;
    }

    // Schedules a repaint.
    invalidate();
    return true;
}
}
</code></pre>
