SRL Archive - Research & Development Lounge

Inv TPA stuff...


n3ss3s

2007-12-20 08:50:56

If anyone happens to need:


Function OutLinePts: TPointArray;
Begin
FindColorsTolerance(Result, 65536, MIX1, MIY1, MIX2, MIY2, 0);
End;


Function SplitInvToOutlines: Array of TPointArray;
Begin
Result := TPAToATPAEx(OutLinePts, 42, 36);
End;


Function ItemAmount(OutlineAmount: Integer): Integer;
Var
TPAA: Array of TPointArray;
I, L: Integer;
Begin
TPAA := SplitInvToOutLines;
L := High(TPAA);
For I := 0 To L Do
If GetArrayLength(TPAA[i]) = OutLineAmount Then
Result := Result + 1;
End;


Function Items(OutlineAmount: Integer): TPointArray;
Var
TPAA: Array of TPointArray;
I, L: Integer;
Begin
TPAA := SplitInvToOutLines;
L := High(TPAA);
For I := 0 To L Do
If GetArrayLength(TPAA[i]) = OutLineAmount Then
Begin
SetArrayLength(Result, GetArrayLength(Result));
Result[High(Result)] := MiddleTPA(TPAA[i]);
End;
End;