def __init__(self, directory, filename): self.directory = directory self.filename = filename image = QImage(self.directory + QDir.separator() + self.filename) Rect.__init__(self, Point(), Size(image.width(), image.height())) cropped_image, x, y, width, height = self.__getCrop(image, False) self.crop = Rect(Point(x, y), Size(width, height)) self.rotated = False
def __init__(self, max_size, origin=Point()): Rect.__init__(self, origin, Size()) self.maxSize = max_size self.images = []