GraphicsWindow.Width = 1080
GraphicsWindow.Height = 607.5
gw = 1080
gh = 607.5
GraphicsWindow.Left = 0
GraphicsWindow.Top = 0
dw = Desktop.Width
dh = Desktop.Height
WidthMod = dw / gw
HeightMod = dh / gh
newWidth = 1080 * WidthMod
newHeight = 607.5 * HeightMod
distanceWidth = newWidth - gw
distanceHeight = newHeight - gh
LDGraphicsWindow.Reposition(WidthMod, HeightMod, distanceWidth / 2, distanceHeight / 1.3, 0)
The reposition
command has the syntax: reposition(scaleX, scaleY, panX, panY, angle)
.
I do not understand why dividing the distanceWidth (this is the difference between the old screen and the new screen's size) by 2 or dividing the distanceHeight by 1.3 pans the game to the topmost corner where I need it. I want to pan it so that the game has the same view only dependent on a 16:9 ratio.