From ce87babfddee0eae3e2d66f59093e985ab37a2fd Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 25 Feb 2017 15:52:51 +0100 Subject: [PATCH] RoundedBox: Fix hole size Size calculation was wrong but compensated the broken size adjustment with "outside" set. --- boxes/generators/roundedbox.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/boxes/generators/roundedbox.py b/boxes/generators/roundedbox.py index b54d1d4..798d7b4 100644 --- a/boxes/generators/roundedbox.py +++ b/boxes/generators/roundedbox.py @@ -46,8 +46,8 @@ class RoundedBox(Boxes): self.moveTo(2*t-r, 0) r = 0 - lx = x - 2*r - 6*t - ly = y - 2*r - 6*t + lx = x - 2*r - 4*t + ly = y - 2*r - 4*t self.moveTo(0, 2*t) for l in (lx, ly, lx, ly): @@ -60,9 +60,9 @@ class RoundedBox(Boxes): x, y, h, r = self.x, self.y, self.h, self.radius if self.outside: - x = self.adjustSize(x) - y = self.adjustSize(y) - h = self.adjustSize(h) + self.x = x = self.adjustSize(x) + self.y = y = self.adjustSize(y) + self.h = h = self.adjustSize(h) r = self.radius = min(r, y / 2.0)