how display.viewableContentHeight and display.viewableContentWidth are calculated

Hi,

I try to understand display.viewableContentHeight and display.viewableContentWidth so I have the following in my config.lua

application = { content = { width = 320, height = 480, scale = "zoomeven" } }

I print viewableContentHeight and viewableContentWidth.

iphone 4: height = 480, width=320

iphone 5: height = 480, width=270 (480*16/9?)

ipad: height = 426 (320*4/3?) , width=320 

I wonder what is the starting point for the calculation? from width or height? I’m confused as sometime it looks it can be calculated from width and sometime from height.

Thank you.

So

Anybody explain this to me please? Thanks.

So

Hi So Lin,

Have you read the guide on Project Configuration, in specific, the section on “Content Scaling”? This explains how the content area is used on various screen aspect ratios.

http://docs.coronalabs.com/guide/basics/configSettings/index.html#contentscaling

Best regards,

Brent

Anybody explain this to me please? Thanks.

So

Hi So Lin,

Have you read the guide on Project Configuration, in specific, the section on “Content Scaling”? This explains how the content area is used on various screen aspect ratios.

http://docs.coronalabs.com/guide/basics/configSettings/index.html#contentscaling

Best regards,

Brent