def distort(self, board_image): l = board_image.shape[0] line_image = convert_svg_text_to_png( ARROW_CHESS_LINE % (self.x1 * l, self.y1 * l, self.x2 * l, self.y2 * l), l, l) board_image = overlay_image(board_image, line_image, 0, 0) return board_image
def distort(self, board_image): mouse_image = read_image_as_png(MOUSE_POINTER_IMG) x = self.posx * board_image.shape[0] y = self.posy * board_image.shape[1] x = int(x) y = int(y) board_image = overlay_image(board_image, mouse_image, x, y) return board_image
def distort(self, board_image): l = board_image.shape[0] cv2.line(board_image, (int(l * self.x1 + l / 2), int(l * self.y1 + l / 2)), (int(l * self.linex + l / 2), int(l * self.liney + l / 2)), (0, 168, 255), 19) line_image = convert_svg_text_to_png( ARROW_CHESS_LINE % (self.linex * l, self.liney * l, self.x2 * l, self.y2 * l), l, l) board_image = overlay_image(board_image, line_image, 0, 0) return board_image