Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-08-03 12:01:08 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-08-03 12:01:08 (GMT)
commitf26ae97c8f67a4b9c55486bdf187f6944da3a54f (patch)
treec3b1c2fd9db5ac2c7675eeabd7a1365d5c58fd66 /tawindow.py
parentaf7cd92174108b5136963f0be3b9a34feeafff5e (diff)
adding project upload to server (desktop version only)
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. """