From bfedc4f163e3c26146a481dd29b45ce66266190e Mon Sep 17 00:00:00 2001 From: yatengLG <767624851@qq.com> Date: Thu, 27 Jul 2023 11:34:28 +0800 Subject: [PATCH] update --- widgets/polygon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/polygon.py b/widgets/polygon.py index 0b2173d..80e0da0 100644 --- a/widgets/polygon.py +++ b/widgets/polygon.py @@ -235,7 +235,7 @@ class Polygon(QtWidgets.QGraphicsPolygonItem): segmentation = [] for point in self.points: 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() ymin = self.boundingRect().y() + self.pos().y() xmax = xmin + self.boundingRect().width()