From 83f8f37447b34efa2f7425acc322f2062c86ac79 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 21 Apr 2020 14:00:01 +0200 Subject: [PATCH] Fixed general size bug --- Calendar/DesignEntity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Calendar/DesignEntity.py b/Calendar/DesignEntity.py index dc2f874..a766a79 100644 --- a/Calendar/DesignEntity.py +++ b/Calendar/DesignEntity.py @@ -10,6 +10,11 @@ class DesignEntity (object): def __init__(self, size, mask=False, invert_mask=False, color_key=False): self.size = size + # Are dimensions >= 0? + for i in range(2): + if self.size[i] < 0: + self.size[i] = 0 + self.pos = (0, 0) self.mask = mask self.invert_mask = invert_mask