611 self.__pasteRect.topLeft(), |
611 self.__pasteRect.topLeft(), |
612 self.__pasteRect.bottomRight() + QPoint(1, 1)) |
612 self.__pasteRect.bottomRight() + QPoint(1, 1)) |
613 |
613 |
614 x, y = self.__imageCoordinates(pos) |
614 x, y = self.__imageCoordinates(pos) |
615 isize = self.__image.size() |
615 isize = self.__image.size() |
616 if x + self.__clipboardSize.width() <= isize.width(): |
616 sx = ( |
617 sx = self.__clipboardSize.width() |
617 self.__clipboardSize.width() |
618 else: |
618 if x + self.__clipboardSize.width() <= isize.width() else |
619 sx = isize.width() - x |
619 isize.width() - x |
620 if y + self.__clipboardSize.height() <= isize.height(): |
620 ) |
621 sy = self.__clipboardSize.height() |
621 sy = ( |
622 else: |
622 self.__clipboardSize.height() |
623 sy = isize.height() - y |
623 if y + self.__clipboardSize.height() <= isize.height() else |
|
624 isize.height() - y |
|
625 ) |
624 |
626 |
625 self.__pasteRect = QRect(QPoint(x, y), QSize(sx - 1, sy - 1)) |
627 self.__pasteRect = QRect(QPoint(x, y), QSize(sx - 1, sy - 1)) |
626 |
628 |
627 painter = QPainter(self.__markImage) |
629 painter = QPainter(self.__markImage) |
628 painter.setPen(self.MarkColor) |
630 painter.setPen(self.MarkColor) |