From db3316d364df0c98aaae1330c164ec8e0389375d Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sat, 7 Aug 2021 23:45:05 +0300 Subject: [PATCH] Fix boundary box. --- roentgen/ui.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/roentgen/ui.py b/roentgen/ui.py index a88ccea..d0081e6 100644 --- a/roentgen/ui.py +++ b/roentgen/ui.py @@ -261,12 +261,10 @@ class BoundaryBox: """ Round boundary box. """ - # FIXME: check negative values - - self.left = int(self.left * 1000) / 1000 - 0.001 - self.bottom = int(self.bottom * 1000) / 1000 - 0.001 - self.right = int(self.right * 1000) / 1000 + 0.002 - self.top = int(self.top * 1000) / 1000 + 0.002 + self.left = round(self.left * 1000) / 1000 - 0.001 + self.bottom = round(self.bottom * 1000) / 1000 - 0.001 + self.right = round(self.right * 1000) / 1000 + 0.001 + self.top = round(self.top * 1000) / 1000 + 0.001 return self