From f26ae97c8f67a4b9c55486bdf187f6944da3a54f Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 03 Aug 2010 12:01:08 +0000 Subject: adding project upload to server (desktop version only) --- (limited to 'tawindow.py') 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. """ -- cgit v0.9.1