I am trying to write a game.
When someone resizes the window of my game, I need all the graphics i have drawn on the screen to reposition correctly so that the ratio of the graphics' width and height remain correct and that the new position determined by x and y, have been adjusted for the new size screen.
In the following image, the top left corner is 0,0... all coordinates / widths / heights are measured from this point.
What do I need to do to x, y, width and height from the variable width and height of my screen in order to keep this aspect ratio correct?
SIDE NOTE: the aspect ratio of the screen will always be 16:9!