What is a Corona unit? The documentation mention this unit , but I failed to get any information about that particular unit!
Can you give a link to the doc please?
@anon63346430 I know that article but I don’t see any definition of “Corona unit”! What am I missing?
read-only properties representing the width and height in Corona content units of the screen. The result depends on the
scale
setting mentioned above.
Let’s say that you set the content width and height in your config.lua to be 480x320 pixels and you were using letterbox scaling.
If you were to then load your app on iPhone 4S, which has a resolution of 960x640, then display.actualContentWidth
and display.actualContentHeight
would output values of 480 and 320. These two would be Corona units.
The key takeaway is that Corona units (or Solar2D units these days, I guess,) are then multiplied by the scale factor, which is also detailed in the documentation page linked above.
In the above example with 480x320 content area and 960x640 display resolution, the scale factor would be 2, so the Corona units would get multiplied by 2, i.e. if you placed an object at x = 480, it would show up at x = 960 on the screen, etc.
Could help maybe
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.