magazinefile.py: Export thickness param and adjust canvas size

This commit is contained in:
Florian Festi 2014-03-15 10:34:26 +01:00
parent 4ce2681b32
commit be3ae6afeb
1 changed files with 3 additions and 3 deletions

View File

@ -3,10 +3,10 @@
from boxes import *
class Box(Boxes):
def __init__(self, x, y, h, h2):
def __init__(self, x, y, h, h2, thickness=4.0):
self.x, self.y, self.h, self.h2 = x, y, h, h2
Boxes.__init__(self, width=x+y+40, height=y+2*h+50,
thickness=4.0)
Boxes.__init__(self, width=x+y+8*thickness, height=x+h+h2+4*thickness,
thickness=thickness)
def side(self, w, h, h2):
r = min(h-h2, w) / 2.0