Janilabo

Janilabo | CountColor(s)TPA(Tol)

Dec 15th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.90 KB | None | 0 0
  1. function CountColorTPA(Color: Integer; TPA: TPointArray): Integer;
  2. var
  3.   t: TPointArray;
  4. begin
  5.   if FindColorTPAEx(t, Color, TPA) then
  6.   begin
  7.     Result := Length(t);
  8.     SetLength(t, 0);
  9.   end;
  10. end;
  11.  
  12. function CountColorsTPA(Colors: TIntArray; TPA: TPointArray): Integer;
  13. var
  14.   t: TPointArray;
  15. begin
  16.   if FindColorsTPAEx(t, Colors, TPA) then
  17.   begin
  18.     Result := Length(t);
  19.     SetLength(t, 0);
  20.   end;  
  21. end;
  22.  
  23. function CountColorTPATol(Color: Integer; TPA: TPointArray; Tol: Integer): Integer;
  24. var
  25.   t: TPointArray;
  26. begin
  27.   if FindColorTPATolEx(t, Color, TPA, Tol) then
  28.   begin
  29.     Result := Length(t);
  30.     SetLength(t, 0);
  31.   end;
  32. end;
  33.  
  34. function CountColorsTPATol(Colors: TIntArray; TPA: TPointArray; Tol: Integer): Integer;
  35. var
  36.   t: TPointArray;
  37. begin
  38.   if FindColorsTPATolEx(t, Colors, TPA, Tol) then
  39.   begin
  40.     Result := Length(t);
  41.     SetLength(t, 0);
  42.   end;  
  43. end;
Advertisement
Add Comment
Please, Sign In to add comment