Corona的屏幕适配

  1. display.contentWidthdisplay.contentHeight的值等于config.lua中的widthheight
    content =
    {
        width = 320,
        height = 480, 
        scale = "letterBox",
        fps = 30,
    },
  1. The internal coordinate system is also dependent on the content area, with coordinates (0,0) residing in the top-left corner of the content area, not necessarily the top-left corner of the screen.

  2. The content area is defined by the width and height values in config.lua. If you omit or set either of these values to 0, content scaling will not be used.

  3. display.contentScaleXdisplay.contentScaleY:宽与高的缩放比例

  4. display.pixelWidthdisplay.pixelHeight:屏幕的真实宽、高

  5. display.screenOriginXdisplay.screenOriginY:屏幕的左上角坐标,以缩放后的内容区域的左上角为原点

例子如下:

contentWidth = 320
contentHeight = 480
actualContentWidth = 320
actualContentHeight = 568.88891601562
display.screenOriginX = -0
display.screenOriginY = -44
viewableContentWidth = 320
viewableContentHeight = 480
pixelWidth = 1080
pixelHeight = 1920
contentScaleX = 0.29629629850388
contentScaleY = 0.29629629850388
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值