Is the position of objects broken?

Dear everyone,

if somebody could explain to me what is happening it would be amazing.

I have

main.lua 

local field = display.newRect(0, 0, 320, 480)

and the config.lua

application = { content = { width = 320, height = 480,  scale = "letterBox", fps = 30, --[[imageSuffix = {["@2x"] = 2,},--]] }, --[[-- Push notifications notification = {iphone = {types = {"badge", "sound", "alert", "newsstand"}}},--]]     }

but the result is unexpectedly wrong

  csdkq.png

the newrect clearly not 320 x 480,

please help me with this.

Thanks in advance.

Hi @lennotoecom8,

The rectangle actually is 320x480, but its x/y location of 0,0 has positioned it so that its center point is located in the top-left corner of the content area (0,0). So, only the lower quarter of the rectangle is actually visible on screen.

If you’re new to Corona, I recommend that you become very familiar with the “content area” concept, since that will affect your development at many levels. This video tutorial should help:

Best regards,

Brent

Content Area

Thanks a lot,

appreciate it

: )

Hi @lennotoecom8,

The rectangle actually is 320x480, but its x/y location of 0,0 has positioned it so that its center point is located in the top-left corner of the content area (0,0). So, only the lower quarter of the rectangle is actually visible on screen.

If you’re new to Corona, I recommend that you become very familiar with the “content area” concept, since that will affect your development at many levels. This video tutorial should help:

Best regards,

Brent

Content Area

Thanks a lot,

appreciate it

: )