1) After initiating filling with the fill(1) command, the next fill
command (e.g. fill(0)) does not cause the filling to take place.
FIlling does not occur until the next draw statement occurs.
SOLUTION:
###
At the end of the IF block in fill(), put the following lines as
delimited below with the #-- comment:
def fill(self, flag):
if self._filling:
<cut>
self._items.append(item)
#--cps Addition to force filling. Filling doesn't occur until
#--a move command is issued, so a "move" to the
#--present position is being issued to force the
#--filling to occur.
x,y=self._position
self._goto(x,y)
#--
self._path = []
###
2) The last line of the goto() (not the _goto()) function incorrectly
computes the x coordinate as x-x0. You can verify this by issuing
a goto(0,0) command as the first turtle command: the turtle
wanders off of the origin.
SOLUTION The coordinate should be computed as x0+x as shown
below (again, this is the last line of the goto() function):
self._goto(x0+x, y0-y)
/c
|