1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-26 19:12:18 -05:00
Simba/trunk/Tests/PS/DeformedTest.mufa

22 lines
842 B
Plaintext

program New;
//Scar manual -> you have to pick x1,y1,x2,y2 yourself. (It's at the first bitmapa
var
Deformed ,x,y: integer;
ThaTime : integer;
i : integer;
acc : extended;
begin
Deformed := BitmapFromString(25, 24, 'beNrN1UEKwCAMBMDtb/oO' +
'r/0//U1pISCiYUnCIpU9eRgihgTg525HD6pnRKZIkKAWEYJmjXI1F' +
'VV2IhQavpzX02M3XHOdEZmSoohj5bmUW3CWMi3rkDf+k1q1AiX/QS' +
'21aqRFuRNssP2TQTv6suDmNVFcXi/8Qvf1');
//Doing this same code in scar will result in invalid results, since
//fast replacedolor didn't work alright, atleast for me.
FastReplaceColor(Deformed,clblack,clwhite);
FastReplaceColor(deformed,82647,clblack);
ThaTime := GetSystemTime;
FindDeformedBitmapToleranceIn(Deformed, x, y, 119, 538, 213, 613, 70, 10, True, acc);
Writeln(inttostr(GetSystemTime - ThaTime));
Writeln(floattostr(acc));
end.