Intelligently resize the canvas.

This works with any canvas size and screen size. It scales the canvas so
it fits, and retains the correct aspect ration.