Automatic Screen Scaling is one of the many great and innovative features Gideros has. It automatically scales images for different resolution and you can even set it to keep proportions using for example Letterbox scaling. Problem is, it creates unused space to keep proportion and it's usually pretty easy to cover it with background art, etc.

But what if you want to position and object, for example, control right in the corner, no matter what resolution automatic scaling is handling right now. There is an easy way to do that. Here is a snippet to position objects right into corners, ignoring automatic screen scaling:

local dx = application:getLogicalTranslateX() / application:getLogicalScaleX()
local dy = application:getLogicalTranslateY() / application:getLogicalScaleY()
 
--sample object
local bitmap = Bitmap.new(Texture.new("box.png"))
stage:addChild(bitmap)
 
--different positions
 
--top left
bitmap:setPosition(-dx, -dy)
 
--top right
bitmap:setPosition(dx+application:getContentWidth()-bitmap:getWidth(), -dy)
 
--bottom left
bitmap:setPosition(-dx, dy + application:getContentHeight()-bitmap:getHeight())
 
--bottom right
bitmap:setPosition(dx+application:getContentWidth()-bitmap:getWidth(),
dy + application:getContentHeight()-bitmap:getHeight())

Of course, in similar way, you can also position objects with offsets from corners, or to any screen side, etc.