Scale the canvas context to account for device pixel ratios that are not 1 (the value on a MacBook Pro with Retina display is 2).