Pomalu sie zapentlam mam cos takiego
procedure FloodFill(P: PColor32Array;I ,Max ,Width :Integer);
var
y,yy:integer;
begin
if (I > max) or (I < 0 ) then exit;
if P[I] <> $FFFFFFFF then exit;
y:=I+Width;
yy:=I-Width;
P[I] := $FFFF00FF;
FloodFill(P,y,max,Width); // wołanie procedury dla punktu powyżej
FloodFill(P,I+1,max,Width); // dla punktu z prawej strony
FloodFill(P,yy,max,Width); // dla punktu poniżej
FloodFill(P, I-1,max,Width); // dla punktu z lewej strony
inc(count);
end;
procedure ColorSubtract1(Src: TBitmap32);
var
i,x,y: Integer;
jednostka : Single;
P: PColor32Array;
R, G, B, RO, GO, BO: Cardinal;
begin
Src.BeginUpdate;
try
P := Src.Bits;
for I := 0 to Src.Width * Src.Height - 1 do
begin
if P[I] = $FFFFFFFF then
begin
count:=0;
FloodFill(P,I,Src.Width * Src.Height - 1,Src.Width);//4294967295 then
end;
end;
finally
with Src do begin
EndUpdate;
Changed;
end;
end;
end;
i caly czas wywala mi bledy wie ktos dlaczego?