Apply transform to coordinates rather than the canvas

Credit goes to @jystic for figuring out this approach.