Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tacanvas.py
diff options
context:
space:
mode:
authorJRG 2 <jrg2@ubuntu.(none)>2013-12-26 04:39:08 (GMT)
committer JRG 2 <jrg2@ubuntu.(none)>2013-12-26 04:39:08 (GMT)
commit07e6f33dbdea8ce247b465856bd7ecb58b5c5a91 (patch)
tree92a220b02e66a3ae6af97ab8a48917d849967227 /TurtleArt/tacanvas.py
parentd2d16bd21fbadca3cd7b4b8241082f216e87f178 (diff)
Export icon
Diffstat (limited to 'TurtleArt/tacanvas.py')
-rw-r--r--TurtleArt/tacanvas.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py
index f37a3a4..753fd32 100644
--- a/TurtleArt/tacanvas.py
+++ b/TurtleArt/tacanvas.py
@@ -128,9 +128,14 @@ class TurtleGraphics:
else:
svg_surface = cairo.SVGSurface(
TMP_SVG_PATH, self.width, self.height)
+ self.svg_surface = svg_surface
self.cr_svg = cairo.Context(svg_surface)
self.cr_svg.set_line_cap(1) # Set the line cap to be round
+ def get_square_svg_path(self):
+ return os.path.join(get_path(self.turtle_window.activity, 'instance'),
+ 'output.svg')
+
def fill_polygon(self, poly_points):
''' Draw the polygon... '''
def _fill_polygon(cr, poly_points):
@@ -416,6 +421,8 @@ class TurtleGraphics:
def svg_close(self):
''' Close current SVG graphic '''
self.cr_svg.show_page()
+ self.svg_surface.flush()
+ self.svg_surface.finish()
def svg_reset(self):
''' Reset svg flags '''