
-----------------------------------
Andy
Sat Mar 05, 2005 5:22 pm

Paint Bucket
-----------------------------------
many of you may have noticed that the turing drawfill command is very different than the paint bucket in ms paint.. a simple way to model this tool is to have a simple recursion that draws dots one by one.. but as we all know, that is very inefficient..
here is the source for the approach


setscreen ("graphics:300;300,nobuttonbar")
drawstar (0, 0, 300, 300, blue)

var mx, my, mb : int

proc fill2 (x, y, clr, oclr : int)
    if x >= 0 and y >= 0 and x 