1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-19 14:02:20 -05:00
Simba/Tests/PS/BmpBenchmark.simba
2011-06-16 14:26:20 +02:00

26 lines
562 B
Plaintext

program new;
//http://farm4.static.flickr.com/3067/2612399892_7df428d482.jpg
{Make the above bitmap your target}
var
Bmp : integer;
x,y : integer;
w,h : integer;
t, i: integer;
begin
Bmp := createBitmap(15, 10);
FastDrawClear(bmp, clwhite);
GetClientDimensions(w,h);
setcolortolerancespeed(2);
t:=getsystemtime;
for i := 0 to 10 do
FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,500);
writeln((getsystemtime-t) / 10.0);
if FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,500) then
begin
writeln('found');
MoveMouse(x,y);
end;
end.