Added clear() method to erase the whole canvas.