From 9fb8ab4a2edbce70db9446df0d62eb851984ad55 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 02 Mar 2010 19:34:04 +0000 Subject: fixed SVG bound box error --- (limited to 'tasprite_factory.py') diff --git a/tasprite_factory.py b/tasprite_factory.py index df536fb..6bf54fe 100755 --- a/tasprite_factory.py +++ b/tasprite_factory.py @@ -646,16 +646,32 @@ class SVG: "stroke-linecap:round;", "stroke-opacity:1;\" />\n") - def text(self, x, y, size, string): + def text(self, x, y, size, width, string): self._x = x self._y = y self._check_min_max() + self._x = x+width + self._y = y-size + self._check_min_max() return " %s%.1f%s%s%s%.1f%s%.1f%s%.1f%s%s%s%s%s" % ( "\n ", string, "\n \n") + def image(self, x, y, w, h, path): + self._x = x + self._y = y + self._check_min_max() + self._x = x+w + self._y = y+h + self._check_min_max() + return " %s%.1f%s%.1f%s%.1f%s%.1f%s%s%s" % ( + "\n") + + def _circle(self, r, cx, cy): return "%s%s%s%s%s%f%s%f%s%f%s" % ("