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.
LDGraphicsWindow.Repositiondoesn't actually move or scale the window at all, it just moves all the shapes inside the window. It's probably not what you're looking for.If you're just trying to create and center the largest GraphicsWindow for a given aspect ratio, that can easily be done with pretty standard code: