1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-01-09 04:38:01 -05:00
Simba/Tests/PS/bmpbench.simba

37 lines
699 B
Plaintext
Raw Normal View History

2011-07-30 07:46:10 -04:00
program new;
2011-07-30 14:27:54 -04:00
2011-07-30 07:46:10 -04:00
var
Bmp : integer;
x,y : integer;
w,h : integer;
t, i, c: integer;
begin
Bmp := createBitmap(15, 10);
FastDrawClear(bmp, clRed);
GetClientDimensions(w,h);
writeln(w);
writeln(h);
for c := 0 to 2 do
begin
writeln('cts: ' + inttostr(c));
setcolortolerancespeed(c);
t:=getsystemtime;
2011-07-30 14:27:54 -04:00
for i := 0 to 10 do
2011-07-30 07:46:10 -04:00
findBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,10);
2011-07-30 14:27:54 -04:00
writeln((getsystemtime-t) / 10.0);
if findBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,10) then
begin
2011-07-30 07:46:10 -04:00
writeln('found');
2011-07-30 14:27:54 -04:00
movemouse(x,y);
end;
2011-07-30 07:46:10 -04:00
end;
{if FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,300) then
begin
writeln('found');
MoveMouse(x,y);
end;}
end.