From 318b75e2512815138e729ca19c4d8bcd65e513f7 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 05 Oct 2010 19:02:29 +0000 Subject: limit minimum picture size to int(1) --- (limited to 'TurtleArt/tautils.py') 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 -- cgit v0.9.1