Improved canvas rotation.
The image won't shift away anymore while rotating the canvas but rotation is a bit bumpy when rotating in small steps.