diff options
author | Walter Bender <walter@sugarlabs.org> | 2011-02-06 21:31:03 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2011-02-06 21:31:03 (GMT) |
commit | 738a307f3b24ee9b2de16e7e56d495a14709eef8 (patch) | |
tree | 61d2206eb188faa3f83f551a2e7a4edadab92a77 /TurtleArt/tacanvas.py | |
parent | 903a46158ea8daa17ebf9968ec6fab071345d736 (diff) |
image_to_base64 accepts pathname
Diffstat (limited to 'TurtleArt/tacanvas.py')
-rw-r--r-- | TurtleArt/tacanvas.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index f600228..8f12f61 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -28,7 +28,7 @@ import base64 from sprites import Sprite from tasprite_factory import SVG -from tautils import image_to_base64, data_to_string, round_int +from tautils import image_to_base64, get_path, data_to_string, round_int from taconstants import CANVAS_LAYER, BLACK, WHITE import logging @@ -498,7 +498,8 @@ class TurtleGraphics: if self.tw.running_sugar: # In Sugar, we need to embed the images inside the SVG self.tw.svg_string += self.svg.image(x - self.width / 2, - y, w, h, path, image_to_base64(pixbuf, self.tw.activity)) + y, w, h, path, image_to_base64(pixbuf, + get_path(self.tw.activity, 'instance'))) else: self.tw.svg_string += self.svg.image(x - self.width / 2, y, w, h, path) |