diff options
author | Walter Bender <walter@sugarlabs.org> | 2010-03-02 22:42:36 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2010-03-02 22:42:36 (GMT) |
commit | 94d2541eba3258ff1a65690a86dfbca85d0aeea8 (patch) | |
tree | d2027f441c8a131402ebe1ba33c948db4fa970a3 /tacanvas.py | |
parent | 9fb8ab4a2edbce70db9446df0d62eb851984ad55 (diff) |
adding image support to SVG export
Diffstat (limited to 'tacanvas.py')
-rw-r--r-- | tacanvas.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tacanvas.py b/tacanvas.py index b26d729..054f309 100644 --- a/tacanvas.py +++ b/tacanvas.py @@ -300,11 +300,13 @@ class TurtleGraphics: def setpen(self,bool): self.pendown = bool - def draw_pixbuf(self,pixbuf,a,b,x,y,w,h): + def draw_pixbuf(self, pixbuf, a, b, x, y, w, h, path): w *= self.tw.coord_scale h *= self.tw.coord_scale self.canvas.images[0].draw_pixbuf(self.gc, pixbuf, a, b, x, y) - self.invalt(x,y,w,h) + self.invalt(x, y, w, h) + if self.tw.saving_svg: + self.tw.svg_string += self.svg.image(x-self.width/2, y, w, h, path) def draw_text(self, label, x, y, size, w): w *= self.tw.coord_scale |