In the docs, its says that a new width and height will be calculated to maintain the image's aspect ratio so it doesn't look stretched.
So does anyone know the formula AppGameKit uses to recalculates the new width and height if a -1 is used for height?
The reason I'm asking is that I have a sprite that doesn't stay in the same spot depending on the resolution. I'm using the percentage based system. So I thought I would try to write a formula but I'm having issues.
What I thought I could do is find out at what pixel the image is placed at if I gave a value of 30% on the y-axis.
So If I have a resolution of 640x960 and placed the pic at 30% down on the screen that would place the image at approximately 192 pixels down from the top.
Then I thought I could some how figure out where the bottom of the image was, but since I'm using a -1 in the SetSpriteSize function for height, it create a new width and height for that image. The original size of the image is 1024x768.
So since a new height is created, it makes it hard to figure out the formula.
I have attached some pics of the button moving based different resolutions
Joeisms
KG2Entertainment.com