Skip to content

getX()

Return the object's horizontal position.

If the object is a Display, this returns the display's horizontal position on the screen.

Parameters

Once an object item has been created, you can use the following function:

item.getX()

Returns

return x

Value Type Description
x int or float The horizontal position of the top-left corner, in pixels.