yup I get
3481 and then 5.9
I think the main thing is here we need a native command?
When you try the flood fill routines they are very unstable and as you see from that a bit slow.
5.9 seconds sounds quick, but try telling that to my 3 and 6 year olds!!!!!!!!!!
They can't wait 2 secs never mind 5.9, and the crashing when clicking too quick and colouring over the same colour they throw a wobbler!!!
Heres the code again see what happens when you use it?
function floodfill(x as integer,y as integer,c as dword)
lock pixels
t=point(x,y)
if t<>c then ink c,0 : floodfill_loop(x,y,c,t)
unlock pixels
endfunction
function floodfill_loop(x as integer,y as integer,c as dword,t as dword)
l=x
while l>0
if point(l-1,y)<>t then exit
dec l
endwhile
while x<(screen width()-1)
if point(x+1,y)<>t then exit
inc x
endwhile
line l,y,x+1,y
for f=l to x
if y>0
if point(f,y-1)=t then floodfill_loop(f,y-1,c,t)
endif
if y<(screen height()-1)
if point(f,y+1)=t then floodfill_loop(f,y+1,c,t)
endif
next f
endfunction
New to DBPro comin from AMOS on the Amiga!