R0b0t1
2007-09-09 16:09:32
Well, this just narrows it does a whole lot… Specified by Boxs, it will keep narrowing the search down… But the higher Boxs is, the bigger the first box must be.
program New;
function FindColorBoxesTol(var x, y: Integer; ThCol, Stx1, Sty1, Stx2, Sty2, Boxs, SD, Tol: Integer): Boolean;
Var
Smx1, Smby1, Smx2, Smy2, I, MidX, MidY: Integer;
BreakLoop: Boolean;
begin;
FindColorSpiralTolerance(x, y, ThCol, Stx1, Sty1, Stx2, Sty2, Tol);
For I:= 0 to Boxs do
begin;
BreakLoop:= FindColorSpiralTolerance(x, y, ThCol, Stx1+Round((SD/I)), Sty1+Round((SD/I)), Stx2-Round((SD/I)), Sty2-Round((SD/I)), Tol);
If not (BreakLoop) Then Break;
end;
If not (BreakLoop) and (I <= 0) Then
Result:= False;
else
Result:= True;
end;
begin;
end.