Fix swapped top and bottom

This commit is contained in:
fruchti 2023-12-17 14:09:20 +01:00
parent a8e2ec73a5
commit 1206872e92

View file

@ -75,30 +75,30 @@ class Paper:
def top_left(self, honour_margins=True):
if honour_margins:
return np.array([self.margins['left'],
self.height - self.margins['top']])
self.margins['top']])
else:
return np.array([0, self.height])
return np.array([0, 0])
def bottom_left(self, honour_margins=True):
if honour_margins:
return np.array([self.margins['left'],
self.margins['bottom']])
self.height - self.margins['bottom']])
else:
return np.array([0, 0])
return np.array([0, self.height])
def top_right(self, honour_margins=True):
if honour_margins:
return np.array([self.width - self.margins['right'],
self.height - self.margins['top']])
self.margins['top']])
else:
return np.array([self.width, self.height])
return np.array([self.width, 0])
def bottom_right(self, honour_margins=True):
if honour_margins:
return np.array([self.width - self.margins['right'],
self.margins['bottom']])
self.height - self.margins['bottom']])
else:
return np.array([self.width, 0])
return np.array([self.width, self.height])
def centre(self, honour_margins=True):
return (self.bottom_left(honour_margins)