Maybe this will help. First lets look at an iPhone4S which has an aspect ratio of 1:1.5 (i.e. 640x960 or scaled in our case to 320x480). 0, 0 is the top left, display.contentWidth, display.contentHeight is the bottom right. Those two values will always equal what you set in config.lua, in this case 320, 480.
Screen Shot 2019-11-17 at 1.10.42 PM.png 401.84KB
But you don't find phones today that are 1:1.5. Most are HDTV's 16:9 or 1:1.7888888 or something like that. Because you didn't tell Corona otherwise, it's going to center the content area on the screen. As a result there is area above the content area and below the content area. When this is scaled based on 320x480, this size screen is actually 320x568. You get 44 points of space above the content area and 44 points below.
Screen Shot 2019-11-17 at 1.11.12 PM.png 510.94KB
display.actualContentHeight will return 568 which is the physical screen space (480 + the extra 88 points). But 0, 0 isn't the top of the screen, it's 44 points down. This means that display.actualContentHeight is 44 points off screen at the bottom. This is where display.screenOriginY comes into play. In this setup, display.screenOriginY will be -44. So the actual bottom of the screen is: display.actualContentHeight + display.screenOriginY. The actual top of the screen is 0 + display.screenOriginY (i.e. -44)
Now lets look at the iPad. In the case of the iPad, 0 will be the actual top and 480 the actual bottom because the content area fits:
Screen Shot 2019-11-17 at 1.11.46 PM.png 110.34KB
Now the iPad is a 1.25:1 aspect ratio, meaning it's more square than a long rectangle. Now our black areas are left and right of center. After scaling, the screen is 360x480. This means that there is 20 pixels left of the content area and 20 pixels right of the content area.
display.screenOriginY is now 0, since 0, 0 is the top edge, but display.screenOriginX is now -20, representing the left edge. display.actualContentWidth will now be 360, but since 0 on the left-right axis is actually 20 pixels right of the edge, 360 is off screen by 20 pixels. To get the real physical right edge, you need display.actualContentWidth + display.screenOriginX.
You also have the ability to change where the content area starts. By default it's centered, but if you're building more of a business like app where everything is going to flow from the top of the screen, there isn't any reason why you can't align it to the top left, which will guarantee that 0, 0 will be the top left. And as a benefit, display.actualContentWidth, display.actualContentHeight will be the bottom right. But this creates a problem. Now display.contentCenterX, display.contentCenterY is no longer the center of the screen since you shifted the content area to the left and upward. So if you depend on centering things, you're going to be miserable doing this. But this can be really helpful if you're flowing things from the top.