Update of /cvsroot/pythoncard/PythonCard
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28944
Modified Files:
turtle.py
Log Message:
added size parameter to AbstractTurtle init
fixed _goto in AbstractTurtle, not recording distance though
Index: turtle.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/turtle.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** turtle.py 1 May 2004 17:29:13 -0000 1.15
--- turtle.py 9 May 2004 05:42:25 -0000 1.16
***************
*** 13,18 ****
class AbstractTurtle:
! def __init__(self):
""" this should be called after a subclass has done its init """
self._tracing = False
self._degrees()
--- 13,19 ----
class AbstractTurtle:
! def __init__(self, size):
""" this should be called after a subclass has done its init """
+ self.__size = size
self._tracing = False
self._degrees()
***************
*** 312,315 ****
--- 313,317 ----
#self._color = wx.Pen(wx.NamedColour("black"))
+ width, height = self.__size
self._origin = width/2.0, height/2.0
self._position = self._origin
***************
*** 352,356 ****
def _goto(self, x1, y1):
""" override """
! pass
--- 354,358 ----
def _goto(self, x1, y1):
""" override """
! self._position = (float(x1), float(y1))
***************
*** 360,364 ****
#self.dc.SetOptimization(1)
! AbstractTurtle.__init__(self)
# illegal syntax, so I used None and the if tests instead
--- 362,366 ----
#self.dc.SetOptimization(1)
! AbstractTurtle.__init__(self, canvas.size)
# illegal syntax, so I used None and the if tests instead
|