SRL Archive - Test corner

FindColorBoxesTol - Search with in boxes!


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.

Bobarkinator

2007-09-09 16:38:42

Break is already coded into SCAR so you need to change that variables name.

R0b0t1

2007-09-09 19:00:09

Ah GOD! Where did my mind go!