Hi I was reading the fingerpaint example, because I'm building a signature activity, that allows the user to draw a signature on the cellphone and then save it to SD.
So far I've seen that the mPath variables holds the path that the user is currently drawing, and this path is drawn onto the screen on the onDraw(..) method by calling
canvas.drawPath(mPath, mPaint);
However on the example there is another canvas "mCanvas" that draws the path on the touch listener:
private void touch_up() {
mPath.lineTo(mX, mY);
// commit the path to our offscreen
mCanvas.drawPath(mPath, mPaint);
// kill this so we don't double draw
mPath.reset();
}
And this is what I don't get. what is exactly this mCanvas object, and why are they using it in the example, it seems that only the regular canvas from the onDraw method and the mPath variable would have been enough for doing this?