getCenterX()
Return the object's horizontal center.
The object rotates about its center, so this is always the same as getBoundingCenterX().
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. |