Use window size and pixel ratio to set the dimensions of the canvas