Difference between revisions of "FindBitmapTolerance"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function FindBitmapTolerance(Bitmap: Integer; var x, y: Integer; Tol: Integer): Boolean; </source> ==Availability== SCAR Divi 3...")
 
 
Line 27: Line 27:
  
 
==See Also==
 
==See Also==
*[[FindBitmapTolerance]]
+
*[[FindBitmap]]
*[[FindBitmapIn]]
+
*[[FindBitmapToleranceIn]]
*[[FindTransparentBitmap]]
+
*[[FindTransparentBitmapTolerance]]
*[[FindBitmapSpiral]]
+
*[[FindBitmapSpiralTolerance]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Bitmap Functions]]
 
[[Category:Bitmap Functions]]

Latest revision as of 15:30, 6 July 2011

Definition

function FindBitmapTolerance(Bitmap: Integer; var x, y: Integer; Tol: Integer): Boolean;

Availability

SCAR Divi 3.00 > Current

Description

Searches the entire selected client window for a given bitmap associated with the index given by Bmp in the bitmap resource manager within a tolerance range specified by Tol. If the bitmap is found, the function returns true and the coordinates where it found the bitmap in x and y. If the bitmap was not found, it returns false. The active tolerance algorithm can be changed using the ColorToleranceSpeed function.

Example

var
  b, x, y: Integer;

begin
  b := BitmapFromString(1, 1, '');
  CopyClientToBitmap(b, 26, 85, 40, 100);
  FindBitmapTolerance(b, x, y, 5);
  WriteLn(IntToStr(x) + ', ' + IntToStr(y));
end.

Output:

25, 85

See Also