Function FillBill($x, $y, $f, $r)
; If pixel colour at ($x,$y) is $f replace it with colour $r
If $form.point($x, $y) = $f
$test_runs=$test_runs+1 chr(13) $test_runs
Dim $c
$c = $form.forecolor ; Save Forecolor
$Form.forecolor = $r
$form.pset($x, $y)
FillBill($x+1, $y, $f, $r)
FillBill($x-1, $y, $f, $r)
FillBill($x, $y+1, $f, $r)
FillBill($x, $y-1, $f, $r)
$form.forecolor = $c ; Restore Forecolor
Endif