# add a new parameter: center def text(... center=[0,0] ...) ... return (Ele ... ).rotate(angle, center))