def get_tr_center(self): """Return center coordinates: (xc, yc)""" return compute_center(*self.get_transformed_coords(0, 1))
def get_tr_center(self): """Return shape center coordinates after applying transform matrix""" return compute_center(*self.get_transformed_coords(0, 2))
def set_label_position(self): """Set label position, for instance based on shape position""" x1, y1, x2, y2 = self.get_rect() self.label.set_pos(*compute_center(x1, y1, x2, y2))
def get_tr_center(self): """Return center coordinates: (xc, yc)""" return compute_center(*self.get_transformed_coords(0, 1))
def get_tr_center(self): """Return shape center coordinates after applying transform matrix""" return compute_center(*self.get_transformed_coords(0, 2))
def set_label_position(self): """Set label position, for instance based on shape position""" x1, y1, x2, y2 = self.get_rect() self.label.set_pos(*compute_center(x1, y1, x2, y2))