|
From: Kevin A. <ka...@us...> - 2005-03-28 05:47:08
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12028 Modified Files: turtle.py Log Message: added explicit Update for Mac BitmapCanvas refresh Index: turtle.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/turtle.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** turtle.py 11 May 2004 14:35:16 -0000 1.20 --- turtle.py 28 Mar 2005 05:46:59 -0000 1.21 *************** *** 418,421 **** --- 418,427 ---- #self._goto(x, y) # actually this isn't equivelant + # KEA 2005-03-26 + # this is necessary to force a screen update on the Mac + if wx.Platform == '__WXMAC__' and self.canvas.autoRefresh: + #self.canvas.Refresh() + self.canvas.Update() + def line(self, x1, y1, x2, y2): """draws a line from x1, y1 to x2, y2 using the current *************** *** 427,430 **** --- 433,442 ---- self.canvas.drawLine((round(x1), round(y1)), (round(x2), round(y2))) + # KEA 2005-03-26 + # this is necessary to force a screen update on the Mac + if wx.Platform == '__WXMAC__' and self.canvas.autoRefresh: + #self.canvas.Refresh() + self.canvas.Update() + # probably replace this with a wxPython primitive for polygons # so we can support filled polys... *************** *** 457,460 **** --- 469,478 ---- self._dirty = False + # KEA 2005-03-26 + # this is necessary to force a screen update on the Mac + if wx.Platform == '__WXMAC__' and self.canvas.autoRefresh: + #self.canvas.Refresh() + self.canvas.Update() + # need to enhance this to support the various # color settings: colourName, rgb *************** *** 628,631 **** --- 646,653 ---- if not self._drawingTurtle: + # KEA 2005-03-26 + # this is necessary to force a screen update on the Mac + if wx.Platform == '__WXMAC__' and self.canvas.autoRefresh: + self.canvas.Update() if self._visible: # this is necessary to avoid an endless loop as drawTurtle uses _goto |