6 lines
169 B
Python
6 lines
169 B
Python
def get_element_center_xy(element):
|
|
rect = element.rect
|
|
x = int(rect['x'] + (rect['width'] // 2))
|
|
y = int(rect['y'] + (rect['height'] // 2))
|
|
return x, y
|