display.contentWidth与display.contentHeight的值等于config.lua中的width与height
content =
{
width = 320,
height = 480,
scale = "letterBox",
fps = 30,
},
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.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.display.contentScaleX与display.contentScaleY:宽与高的缩放比例display.pixelWidth与display.pixelHeight:屏幕的真实宽、高display.screenOriginX与display.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
233

被折叠的 条评论
为什么被折叠?



