display.contentCenterX

Type Number
Library display.*
Revision Current Public Release (2017.3068)
Keywords contentWidth, content
See also display.contentWidth
[display.contentCenter Y]api.library.display.contentCenterY

Overview

The center of the content area along the x axis. Equivalent to display.contentWidth * 0.5.

See the Project Configuration guide for details on the content area.

Example

local obj = display.newImage( "image.png" )
obj.x = display.contentCenterX
obj.y = display.contentCenterY