getCenterX()
Return the object's horizontal center.
If the object is a Display, this returns the horizontal center of the display's canvas.
Parameters
Once an object item has been created, you can use the following function:
item.getCenterX()
Returns
return x
| Value | Type | Description |
|---|---|---|
| x | int or float |
The horizontal center, in pixels. |