From e6f1790e6ac8a249330e534b1c62957d23908279 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 13 Feb 2010 01:21:31 +0000 Subject: skins scale properly --- (limited to 'tautils.py') diff --git a/tautils.py b/tautils.py index 4176a0b..d7cd903 100644 --- a/tautils.py +++ b/tautils.py @@ -173,3 +173,12 @@ def round_int(n): if int(float(nn)) == nn: return int(nn) return nn + +""" +Calculate the maximum size for placing an image onto a sprite. +""" +def calc_image_size(spr): + w = spr.label_safe_width() + h = spr.label_safe_height() + return w, h + -- cgit v0.9.1