From ddcf13bf6c6895ffd4d07146b87ee8b1152044e6 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sun, 20 Aug 2017 19:56:33 +0200 Subject: [PATCH] svgutil: Make detection of view port a bit more robust --- boxes/svgutil.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boxes/svgutil.py b/boxes/svgutil.py index 75b64d9..528f02a 100755 --- a/boxes/svgutil.py +++ b/boxes/svgutil.py @@ -78,6 +78,12 @@ class SVGFile(object): # minx = 10*int(self.minx//10)-10 # as we don't rewrite the left border keep it as 0 + + self.minx = self.minx or 0 + self.miny = self.miny or 0 + self.maxx = self.maxx or (self.minx + 10) + self.maxy = self.maxy or (self.miny + 10) + if 0 <= self.minx <= 50: minx = 0 else: