def _touch_point_by_orientation(self, tuple_xy): """ Convert image coordinates to physical display coordinates, the arbitrary point (origin) is upper left corner of the device physical display Args: tuple_xy: image coordinates (x, y) Returns: """ x, y = tuple_xy x, y = XYTransformer.up_2_ori( (x, y), (self.display_info["width"], self.display_info["height"]), self.display_info["orientation"]) return x, y
def transform_xy(tuple_xy, display_info): x, y = tuple_xy x, y = XYTransformer.up_2_ori( (x, y), (display_info["width"], display_info["height"]), display_info["orientation"]) return x, y