diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2010-02-13 01:21:31 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2010-02-13 01:21:31 (GMT) |
commit | e6f1790e6ac8a249330e534b1c62957d23908279 (patch) | |
tree | 3f8f71d1e4b3cb78e8b165abf4dc028293de2a11 /tautils.py | |
parent | 9a7a61c665f717f4e22f7af71b06c0099ccd1183 (diff) |
skins scale properly
Diffstat (limited to 'tautils.py')
-rw-r--r-- | tautils.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 + |