Fixed size bug
This commit is contained in:
parent
83f8f37447
commit
b7ede5a026
1 changed files with 4 additions and 3 deletions
|
@ -11,9 +11,10 @@ class DesignEntity (object):
|
||||||
def __init__(self, size, mask=False, invert_mask=False, color_key=False):
|
def __init__(self, size, mask=False, invert_mask=False, color_key=False):
|
||||||
self.size = size
|
self.size = size
|
||||||
# Are dimensions >= 0?
|
# Are dimensions >= 0?
|
||||||
for i in range(2):
|
if self.size[0] < 0:
|
||||||
if self.size[i] < 0:
|
self.size = (0, self.size[1])
|
||||||
self.size[i] = 0
|
if self.size[1] < 0:
|
||||||
|
self.size = (self.size[0], 0)
|
||||||
|
|
||||||
self.pos = (0, 0)
|
self.pos = (0, 0)
|
||||||
self.mask = mask
|
self.mask = mask
|
||||||
|
|
Loading…
Reference in a new issue