RoundedBox: Fix hole size

Size calculation was wrong but compensated the broken size adjustment with
"outside" set.
This commit is contained in:
Florian Festi 2017-02-25 15:52:51 +01:00
parent 490d089a83
commit ce87babfdd
1 changed files with 5 additions and 5 deletions

View File

@ -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)