setting canvas width or height should clear the canvas