diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-05-25 12:49:36 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-05-25 12:49:36 (GMT) |
commit | 75f0610b8d7ff28e53e9260ac71d448111b1ab85 (patch) | |
tree | ed7bcc66ff44b11b2eb3fe3c86d8af89a0bf2947 | |
parent | 04e12a0efa42cf57a24da1a925cf882092f41847 (diff) |
group outline with fill polygon when saving as SVG
-rw-r--r-- | TurtleArt/tacanvas.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py index 0e22838..bf866fb 100644 --- a/TurtleArt/tacanvas.py +++ b/TurtleArt/tacanvas.py @@ -158,6 +158,8 @@ class TurtleGraphics: """ Start accumulating points of a polygon to fill. """ self.fill = True self.poly_points = [] + if self.tw.saving_svg: + self.tw.svg_string += '<g>' def stop_fill(self): """ Fill the polygon. """ @@ -174,6 +176,8 @@ class TurtleGraphics: shared_poly_points])) self.tw.send_event(event) self.poly_points = [] + if self.tw.saving_svg: + self.tw.svg_string += '</g>' def fill_polygon(self, poly_points): minx, miny, w, h = calc_poly_bounds(poly_points) |