diff options
author | Walter Bender <walter@sugarlabs.org> | 2010-10-05 19:02:29 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2010-10-05 19:02:29 (GMT) |
commit | 318b75e2512815138e729ca19c4d8bcd65e513f7 (patch) | |
tree | 491c8191711889131af71b71ab48bafc7b39f1db | |
parent | d10969696a9ffdf570f1e84b051331d6be6251e8 (diff) |
limit minimum picture size to int(1)
-rw-r--r-- | TurtleArt/tautils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/TurtleArt/tautils.py b/TurtleArt/tautils.py index e251ccf..5c4614c 100644 --- a/TurtleArt/tautils.py +++ b/TurtleArt/tautils.py @@ -285,9 +285,8 @@ def round_int(num): def calc_image_size(spr): """ Calculate the maximum size for placing an image onto a sprite. """ - return spr.label_safe_width(), spr.label_safe_height() - - + return int(max(spr.label_safe_width(), 1)), \ + int(max(spr.label_safe_height(), 1)) # Collapsible stacks live between 'sandwichtop' and 'sandwichbottom' blocks |