I am a software developer and I am tasked with displaying "boxes" on a grid. The X & Y grid are positive only. The X axis ranges from 0-100 and Y axis ranges from 0-50. On the Y axis 0-23 displays text information, and 24-50 displays the boxes. The issue is that when I am getting the coordinates in the software they start from 0,0 however to correctly display it on the screen they would need to start from 0,24. This is easy I just add 24 to every Y coordinate, however I also need to rotate it 180 degrees so that the box on the top is now on the bottom and the box on the bottom is now on the top.
Here is a pic for reference. The one labeled "ORIGINAL" is drawn with the coordinates beginning from 0,0 while the bottom one labeled "FLIPPED" is rotated and starts from 0,24 and the boxes are rotated so the box that was in the top in the original drawing is on the bottom, and the box that was on the bottom is now on top.
I have hit a roadblock and cannot figure out the math to do this. It would be easier if I was flipping over the Y axis from positive to negative but I cannot figure out how I would flip the box over in the same axis. Can anybody help me out?