This commit is contained in:
yatengLG 2023-07-27 11:34:28 +08:00
parent e6a2df7484
commit bfedc4f163

View File

@ -235,7 +235,7 @@ class Polygon(QtWidgets.QGraphicsPolygonItem):
segmentation = [] segmentation = []
for point in self.points: for point in self.points:
point = point + self.pos() point = point + self.pos()
segmentation.append((round(point.x()), round(point.y()))) segmentation.append((round(point.x(), 2), round(point.y(), 2)))
xmin = self.boundingRect().x() + self.pos().x() xmin = self.boundingRect().x() + self.pos().x()
ymin = self.boundingRect().y() + self.pos().y() ymin = self.boundingRect().y() + self.pos().y()
xmax = xmin + self.boundingRect().width() xmax = xmin + self.boundingRect().width()