So to continue the example above, after running this code, we'd have:

previewWidth = 480
previewHeight = 360
previewBoxWidth = 360
previewBoxHeight = 480
dx = -60
dy = 60