Skip to content

setCenterX()

Set the object's horizontal center.

NOTE: This function isn't available to Displays.

Parameters

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

item.setCenterX(x)
Parameter Type Default Description
x int or float required The new horizontal center, in pixels.