Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'tawindow.py')
-rw-r--r--tawindow.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tawindow.py b/tawindow.py
index 3873042..3d62a3f 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -2162,6 +2162,16 @@ class TurtleArtWindow():
dy *= h
return(w, h, x, y, dx, dy)
+ def save_for_upload(self, _file_name):
+ """ Grab the current canvas and save it for upload """
+ if _file_name[-3:] == '.ta':
+ _file_name = _file_name[0:-3]
+ data_to_file(self.assemble_data_to_save(), _file_name + '.ta')
+ save_picture(self.canvas, _file_name + '.png')
+ ta_file = _file_name + '.ta'
+ image_file = _file_name + '.png'
+ return ta_file, image_file
+
def save_as_image(self, name="", svg=False, pixbuf=None):
""" Grab the current canvas and save it. """