home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turbo Toolbox
/
Turbo_Toolbox.iso
/
sonderh1
/
floodfil.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1987-04-15
|
842b
|
20 lines
(*-------------------------------------------------------------------------*)
(* FLOODFIL.PAS *)
(* Rekursiver Floodfill zum Flaechenfuellen *)
PROCEDURE Fill (x: x_Koord; y: y_Koord; SperrFarbe: Sys_Colors);
BEGIN
IF NOT GetPixel(x, y, SperrFarbe) THEN
BEGIN (* KEIN Punkt gesetzt, setzen... *)
point(x,y);
(* und in alle vier Richtungen gucken *)
Fill(Succ(x), y, SperrFarbe);
Fill(Pred(x), y, SperrFarbe);
Fill(x, Succ(y), SperrFarbe);
Fill(x, Pred(y), SperrFarbe)
END
END;
(*-------------------------------------------------------------------------*)
(* Ende FLOODFIL.PAS *)