Skip to content

setCenter()

Move the object so its center sits at the given point.

NOTE: This function isn't available to Displays.

Parameters

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

item.setCenter(x, y)
Parameter Type Default Description
x int or float required The new horizontal position of the center, in pixels.
y int or float required The new vertical position of the center, in pixels.