Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Different aspect ratios in letterbox mode: calculate coords of screen corners? — Gideros Forum

Different aspect ratios in letterbox mode: calculate coords of screen corners?

snookssnooks Member
edited August 2017 in General questions
I am displaying a TileMap on screen and notice that with different aspect ratios than the logical dimensions that there is a bar at the left hand side of the screen. I can manually offset everything to account for this, but would like to calculate what the coordinates are for the bottom left and bottom right corners of the screen in logical pixels at runtime to do this automatically and know what the margins are and exactly what's happening on the user's screen.

I see we have:

ContentWidth
ContentHeight
LogicalWidth
LogicalHeight
DeviceWidth
DeviceHeight
LogicalScaleX
LogicalScaleY

But I'm a bit brain dead at the moment/always so can't see what the relationship is. Could anybody please provide details of how to best deal with this?

Thanks in advance!

Comments

Sign In or Register to comment.