Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tautils.py
diff options
context:
space:
mode:
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
+