Janilabo

Untitled

Aug 15th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.94 KB | None | 0 0
  1. function FindColorsMulti(colors: TIntegerArray; xs, ys, xe, ye: Integer): TPointArray;
  2. var
  3.   l, i: Integer;
  4.   ATPA: T2DPointArray;
  5. begin
  6.   ClearSameIntegers(colors);
  7.   l := Length(colors);
  8.   if (l < 1) then
  9.     Exit;
  10.   SetLength(ATPA, l);
  11.   for i := 0 to (l - 1) do
  12.     if ((colors[i] >= 0) and (colors[i] <= 16777215)) then
  13.       FindColors(ATPA[i], colors[i], xs, ys, xe, ye);
  14.   Result := MergeATPA(ATPA);
  15.   SetLength(ATPA, 0);
  16.   ClearSameIntegersAndTPA(colors, Result);
  17. end;
  18.  
  19. var
  20.   i: Integer;
  21.   TPA: TPointArray;
  22.   ATPA: array of TPointArray;
  23.  
  24. begin
  25.   LoadFont('RSCMainFont', False);
  26.   ClearDebug;
  27.   ActivateClient;
  28.   Wait(2000);
  29.   i := GetSystemTime;
  30.   TPA := FindColorsMulti([16776960, 4231423, 65535, 65280, 16777215], 3, 2, 311, 18);
  31.   ATPA := SplitTPAEx(TPA, 1, 10);
  32.   SetLength(TPA, 0);
  33.   try
  34.     WriteLn(GetTextATPA(ATPA, 4, 'RSCMainFont'));
  35.   except
  36.   end;
  37.   SetLength(ATPA, 0);
  38.   FreeFont('RSCMainFont');
  39. end.
Advertisement
Add Comment
Please, Sign In to add comment