Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tautils.py
diff options
context:
space:
mode:
authorWalter 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)
commite6f1790e6ac8a249330e534b1c62957d23908279 (patch)
tree3f8f71d1e4b3cb78e8b165abf4dc028293de2a11 /tautils.py
parent9a7a61c665f717f4e22f7af71b06c0099ccd1183 (diff)
skins scale properly
Diffstat (limited to 'tautils.py')
-rw-r--r--tautils.py9
1 files changed, 9 insertions, 0 deletions
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
+