mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-24 18:22:25 -05:00
Check out MufasaTests for ocr filter v1
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@282 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
7ae50bbc4b
commit
1c025af420
@ -11,7 +11,7 @@
|
||||
<TargetFileExt Value=""/>
|
||||
<Icon Value="0"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="6"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -30,15 +30,15 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="23">
|
||||
<Units Count="26">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="61" Y="82"/>
|
||||
<TopLine Value="63"/>
|
||||
<CursorPos X="34" Y="143"/>
|
||||
<TopLine Value="118"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="72"/>
|
||||
<UsageCount Value="96"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
@ -46,15 +46,15 @@
|
||||
<UnitName Value="CustApp"/>
|
||||
<CursorPos X="15" Y="51"/>
|
||||
<TopLine Value="32"/>
|
||||
<UsageCount Value="7"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="../../Units/MMLCore/client.pas"/>
|
||||
<UnitName Value="Client"/>
|
||||
<CursorPos X="21" Y="51"/>
|
||||
<TopLine Value="35"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="30"/>
|
||||
<CursorPos X="28" Y="50"/>
|
||||
<TopLine Value="30"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
@ -62,281 +62,302 @@
|
||||
<UnitName Value="windowutil"/>
|
||||
<CursorPos X="110" Y="30"/>
|
||||
<TopLine Value="3"/>
|
||||
<UsageCount Value="7"/>
|
||||
<UsageCount Value="4"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<UnitName Value="Window"/>
|
||||
<CursorPos X="55" Y="251"/>
|
||||
<TopLine Value="236"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="29"/>
|
||||
<EditorIndex Value="12"/>
|
||||
<UsageCount Value="41"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<UnitName Value="colour_conv"/>
|
||||
<CursorPos X="18" Y="346"/>
|
||||
<TopLine Value="309"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="10"/>
|
||||
<TopLine Value="307"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<UnitName Value="finder"/>
|
||||
<CursorPos X="41" Y="1637"/>
|
||||
<TopLine Value="1631"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="33"/>
|
||||
<CursorPos X="1" Y="1728"/>
|
||||
<TopLine Value="1701"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="45"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="../../Units/MMLCore/input.pas"/>
|
||||
<UnitName Value="Input"/>
|
||||
<CursorPos X="56" Y="49"/>
|
||||
<TopLine Value="24"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="29"/>
|
||||
<CursorPos X="72" Y="47"/>
|
||||
<TopLine Value="36"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="41"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
|
||||
<UnitName Value="MufasaTypes"/>
|
||||
<CursorPos X="1" Y="88"/>
|
||||
<CursorPos X="98" Y="92"/>
|
||||
<TopLine Value="76"/>
|
||||
<EditorIndex Value="12"/>
|
||||
<UsageCount Value="31"/>
|
||||
<EditorIndex Value="13"/>
|
||||
<UsageCount Value="43"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<UnitName Value="ocr"/>
|
||||
<CursorPos X="53" Y="31"/>
|
||||
<TopLine Value="24"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<UsageCount Value="30"/>
|
||||
<CursorPos X="69" Y="116"/>
|
||||
<TopLine Value="84"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="../../../../Documents/fpc/rtl/objpas/sysutils/diskh.inc"/>
|
||||
<CursorPos X="10" Y="18"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<UnitName Value="files"/>
|
||||
<CursorPos X="5" Y="42"/>
|
||||
<TopLine Value="27"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<CursorPos X="3" Y="1426"/>
|
||||
<TopLine Value="1411"/>
|
||||
<UsageCount Value="8"/>
|
||||
<CursorPos X="3" Y="243"/>
|
||||
<TopLine Value="223"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<UnitName Value="bitmaps"/>
|
||||
<CursorPos X="32" Y="835"/>
|
||||
<TopLine Value="850"/>
|
||||
<CursorPos X="34" Y="768"/>
|
||||
<TopLine Value="749"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="28"/>
|
||||
<UsageCount Value="40"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="../../../../Documents/fpc/rtl/inc/objpash.inc"/>
|
||||
<CursorPos X="22" Y="177"/>
|
||||
<TopLine Value="162"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="../../../../Documents/lazarus/lcl/intfgraphics.pas"/>
|
||||
<UnitName Value="IntfGraphics"/>
|
||||
<CursorPos X="30" Y="2975"/>
|
||||
<TopLine Value="2959"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<UnitName Value="mmlpsthread"/>
|
||||
<CursorPos X="3" Y="154"/>
|
||||
<TopLine Value="235"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="../../../../Documents/fpc/rtl/i386/mmx.pp"/>
|
||||
<UnitName Value="mmx"/>
|
||||
<CursorPos X="80" Y="15"/>
|
||||
<TopLine Value="71"/>
|
||||
<UsageCount Value="8"/>
|
||||
<UsageCount Value="5"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/ocr.inc"/>
|
||||
<CursorPos X="20" Y="5"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="26"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="38"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="../../Units/MMLCore/dtm.pas"/>
|
||||
<UnitName Value="dtm"/>
|
||||
<CursorPos X="92" Y="287"/>
|
||||
<TopLine Value="267"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="26"/>
|
||||
<TopLine Value="99"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="38"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="../../Units/MMLCore/dtmutil.pas"/>
|
||||
<UnitName Value="dtmutil"/>
|
||||
<CursorPos X="43" Y="218"/>
|
||||
<TopLine Value="88"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="22"/>
|
||||
<TopLine Value="49"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="34"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="../../../../Documents/fpc/packages/fcl-base/src/custapp.pp"/>
|
||||
<UnitName Value="CustApp"/>
|
||||
<CursorPos X="59" Y="48"/>
|
||||
<TopLine Value="18"/>
|
||||
<UsageCount Value="9"/>
|
||||
<CursorPos X="43" Y="287"/>
|
||||
<TopLine Value="274"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="14"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
|
||||
<UnitName Value="ocrutil"/>
|
||||
<CursorPos X="68" Y="420"/>
|
||||
<TopLine Value="395"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="10"/>
|
||||
<CursorPos X="22" Y="470"/>
|
||||
<TopLine Value="445"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="../../Units/Linux/xtest.pas"/>
|
||||
<UnitName Value="XTest"/>
|
||||
<CursorPos X="56" Y="22"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="../../../../Documents/fpc/rtl/inc/mathh.inc"/>
|
||||
<CursorPos X="58" Y="78"/>
|
||||
<TopLine Value="57"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="../../../../Documents/fpc/rtl/inc/innr.inc"/>
|
||||
<CursorPos X="4" Y="98"/>
|
||||
<TopLine Value="78"/>
|
||||
<UsageCount Value="7"/>
|
||||
</Unit25>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1893" Column="47" TopLine="1868"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="65" Column="16" TopLine="37"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1892" Column="27" TopLine="1877"/>
|
||||
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
|
||||
<Caret Line="566" Column="30" TopLine="545"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1884" Column="45" TopLine="1877"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="93" Column="88" TopLine="86"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1680" Column="83" TopLine="1669"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="762" Column="18" TopLine="748"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1892" Column="35" TopLine="1877"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="762" Column="38" TopLine="732"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1884" Column="19" TopLine="1869"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="765" Column="7" TopLine="732"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="66" Column="18" TopLine="55"/>
|
||||
<Caret Line="95" Column="4" TopLine="72"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="88" Column="43" TopLine="61"/>
|
||||
<Caret Line="114" Column="54" TopLine="85"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="82" Column="26" TopLine="62"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="108" Column="37" TopLine="82"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="84" Column="26" TopLine="62"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="106" Column="18" TopLine="82"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1586" Column="16" TopLine="1571"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="54" Column="26" TopLine="34"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1794" Column="10" TopLine="1781"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="55" Column="26" TopLine="34"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="82" Column="88" TopLine="63"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="397" Column="17" TopLine="374"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="81" Column="16" TopLine="60"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="368" Column="30" TopLine="1"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="85" Column="17" TopLine="73"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="766" Column="22" TopLine="743"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="69" Column="57" TopLine="54"/>
|
||||
<Caret Line="110" Column="7" TopLine="70"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1674" Column="10" TopLine="1656"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="86" Column="11" TopLine="73"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="39" Column="21" TopLine="24"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="93" Column="25" TopLine="85"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1693" Column="131" TopLine="1676"/>
|
||||
<Filename Value="../../../../Documents/fpc/packages/fcl-base/src/custapp.pp"/>
|
||||
<Caret Line="57" Column="28" TopLine="37"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1613" Column="26" TopLine="1608"/>
|
||||
<Filename Value="../../../../Documents/fpc/packages/fcl-base/src/custapp.pp"/>
|
||||
<Caret Line="284" Column="16" TopLine="262"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1696" Column="1" TopLine="1669"/>
|
||||
<Filename Value="../../../../Documents/fpc/packages/fcl-base/src/custapp.pp"/>
|
||||
<Caret Line="57" Column="28" TopLine="37"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1675" Column="25" TopLine="1660"/>
|
||||
<Filename Value="../../../../Documents/fpc/packages/fcl-base/src/custapp.pp"/>
|
||||
<Caret Line="282" Column="43" TopLine="262"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1696" Column="127" TopLine="1681"/>
|
||||
<Filename Value="../../../../Documents/fpc/packages/fcl-base/src/custapp.pp"/>
|
||||
<Caret Line="284" Column="25" TopLine="262"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1682" Column="1" TopLine="1671"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="93" Column="45" TopLine="85"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1618" Column="22" TopLine="1607"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="100" Column="21" TopLine="90"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1637" Column="18" TopLine="1621"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="85" Column="33" TopLine="54"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="31" Column="54" TopLine="13"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="118" Column="50" TopLine="89"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
|
||||
<Caret Line="8" Column="38" TopLine="1"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="119" Column="28" TopLine="98"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="47" Column="31" TopLine="27"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="107" Column="62" TopLine="72"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||
<Caret Line="31" Column="53" TopLine="24"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="143" Column="40" TopLine="120"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
|
@ -10,7 +10,7 @@ uses
|
||||
Forms,Interfaces,
|
||||
LCLIntf,
|
||||
Client,
|
||||
bitmaps,x ,mufasatypes,dtm,dtmutil, ocrutil
|
||||
bitmaps,x ,mufasatypes,dtm,dtmutil, ocrutil ,graphics ,colour_conv,math
|
||||
|
||||
|
||||
{ you can add units after this };
|
||||
@ -54,14 +54,21 @@ end;
|
||||
|
||||
procedure MufasaTests.DoRun;
|
||||
|
||||
const
|
||||
ocr_Limit_High = 192;
|
||||
ocr_Limit_Low = 65;
|
||||
|
||||
var
|
||||
ErrorMsg: String;
|
||||
Time: DWord;
|
||||
C: TClient;
|
||||
I: Integer;
|
||||
I, w, h,x,y: Integer;
|
||||
dtm: pdtm;
|
||||
p:tpointarray;
|
||||
bmp: TMufasaBitmap;
|
||||
bmp, bmprs: TMufasaBitmap;
|
||||
cyan, itemc:integer;
|
||||
r,g,b:integer;
|
||||
t:Dword;
|
||||
|
||||
begin
|
||||
// quick check parameters
|
||||
@ -80,53 +87,93 @@ begin
|
||||
end;
|
||||
|
||||
{ add your program here }
|
||||
cyan := rgbtocolor(0,255,255);
|
||||
|
||||
|
||||
bmprs := TMufasaBitmap.Create;
|
||||
bmprs.LoadFromFile('/home/merlijn/Programs/mufasa/pics/uptext6.bmp');
|
||||
C := TClient.Create;
|
||||
C.MWindow.SetTarget(bmprs);
|
||||
C.MWindow.GetDimensions(w, h);
|
||||
|
||||
bmp := TMufasaBitmap.Create;
|
||||
bmp.SetSize(CW,CH);
|
||||
Writeln(Format('Client W/H: %d, %d', [CW, CH]));
|
||||
FillChar(bmp.FData[0],sizeof(trgb32)*CW*CH, 0);
|
||||
Randomize;
|
||||
for i := 0 to 500 do
|
||||
bmp.fastsetpixel(random(CW), random(CH), 255);
|
||||
{ bmp.FastSetPixel(8,8,255);
|
||||
bmp.FastSetPixel(9,9,255);
|
||||
bmp.FastSetPixel(7,7,255);
|
||||
bmp.FastSetPixel(9,8,255);
|
||||
bmp.FastSetPixel(8,9,255); }
|
||||
C.MWindow.SetTarget(bmp);
|
||||
bmp.CopyClientToBitmap(C.MWindow, True, 0, 0, 450, 50);
|
||||
|
||||
t:=gettickcount;
|
||||
|
||||
for y := 0 to bmp.Height - 1 do
|
||||
for x := 0 to bmp.Width - 1 do
|
||||
begin
|
||||
colortorgb(bmp.fastgetpixel(x,y),r,g,b);
|
||||
// the abs(g-b) < 15 seems to help heaps when taking out crap points
|
||||
if (r > ocr_Limit_High) and (g > ocr_Limit_High) and (b > ocr_Limit_High) and (abs(g-b) < 15) then
|
||||
begin
|
||||
bmp.fastsetpixel(x,y,clwhite);
|
||||
continue;
|
||||
end;
|
||||
if (r < ocr_Limit_Low) and (g > ocr_Limit_High) and (b > ocr_Limit_High) then
|
||||
begin
|
||||
bmp.fastsetpixel(x,y,cyan);
|
||||
continue;
|
||||
end;
|
||||
if (r < ocr_Limit_Low) and (g > ocr_Limit_High) and (b < ocr_Limit_Low) then
|
||||
begin
|
||||
bmp.fastsetpixel(x,y,rgbtocolor(0,255,0));
|
||||
continue;
|
||||
end;
|
||||
if(r > ocr_Limit_High) and (g > 100) and (g < ocr_Limit_High) and (b > 30) and (b < 90) then
|
||||
begin
|
||||
bmp.fastsetpixel(x,y,rgbtocolor(255,127,0));
|
||||
continue;
|
||||
end;
|
||||
if(r > ocr_Limit_High) and (g > ocr_Limit_High) and (b < ocr_Limit_Low) then
|
||||
begin
|
||||
bmp.fastsetpixel(x,y,rgbtocolor(255,255,0));
|
||||
continue;
|
||||
end;
|
||||
// better use g < 40 than ocr_Limit_Low imo
|
||||
if (r > ocr_Limit_High) and (g < ocr_Limit_Low) and (b < ocr_Limit_Low) then
|
||||
begin
|
||||
bmp.fastsetpixel(x,y,rgbtocolor(255,0,0));
|
||||
continue;
|
||||
end;
|
||||
|
||||
bmp.fastsetpixel(x,y,0);
|
||||
end;
|
||||
writeln(inttostr(gettickcount-t));
|
||||
{
|
||||
bmp.Posterize(130); // ~ 3
|
||||
// bmp.Contrast(3);
|
||||
|
||||
for y := 0 to bmp.Height - 1 do
|
||||
for x := 0 to bmp.Width - 1 do
|
||||
begin
|
||||
if bmp.FastGetPixel(x, y) = clWhite then
|
||||
continue;
|
||||
//cyan
|
||||
if bmp.FastGetPixel(x, y) = rgbtocolor(0,255,255) then
|
||||
continue;
|
||||
//green
|
||||
if bmp.FastGetPixel(x, y) = rgbtocolor(0,255,0) then
|
||||
continue;
|
||||
|
||||
//item // TODO -> 5.bmp = not OK
|
||||
if bmp.FastGetPixel(x, y) = rgbtocolor(255,130,0) then
|
||||
continue;
|
||||
|
||||
//yellow, interact
|
||||
if bmp.FastGetPixel(x, y) = rgbtocolor(255,255,0) then
|
||||
continue;
|
||||
|
||||
bmp.fastsetpixel(x,y,0);
|
||||
end;
|
||||
}
|
||||
|
||||
|
||||
{ initdtm(dtm, 5);
|
||||
dtm.p[0] := Point(2, 2);
|
||||
dtm.p[1] := Point(-3, -3);
|
||||
dtm.p[2] := Point(0, 0);
|
||||
dtm.p[3] := Point(1, 1);
|
||||
dtm.p[4] := Point(3, 3);
|
||||
dtm.c[0] := 255;
|
||||
dtm.t[0] := 0;
|
||||
dtm.asz[1] := 1;
|
||||
dtm.ash[1] := dtm_Rectangle; }
|
||||
|
||||
dtm := randomdtm(20);
|
||||
|
||||
// setlength(p, 1);
|
||||
time := GetTickCount;
|
||||
C.MFinder.FindDTMs(dtm, p, 0, 0,CW-1, CH-1, 0);
|
||||
writeln(inttostr(gettickcount - time) + 'ms');
|
||||
setlength(p,0);
|
||||
|
||||
time := GetTickCount;
|
||||
C.MFinder.FindDTMs(dtm, p, 0, 0,CW-1, CH-1, 0);
|
||||
//C.MFinder.FindDTM(dtm, p[0].x, p[0].y, 0, 0,CW-1, CH-1);
|
||||
writeln(inttostr(gettickcount - time) + 'ms');
|
||||
writeln(inttostr(length(p))+ ' points found');
|
||||
|
||||
{for i := 0 to high(p) do
|
||||
writeln(format('%d: (%d, %d)', [i, p[i].x, p[i].y])); }
|
||||
|
||||
|
||||
//bmp.OnDestroy:=nil;
|
||||
bmp.SaveToFile('/tmp/output.bmp');
|
||||
//bmp.OnDestroy:=nil;
|
||||
bmp.Free;
|
||||
C.Free;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="Mufasa Stand Alone"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="5"/>
|
||||
<ActiveEditorIndexAtStart Value="11"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -42,7 +42,7 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="100" Y="21"/>
|
||||
<TopLine Value="19"/>
|
||||
<TopLine Value="6"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="205"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -259,8 +259,8 @@
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Window"/>
|
||||
<CursorPos X="32" Y="6"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="59" Y="635"/>
|
||||
<TopLine Value="605"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -278,7 +278,7 @@
|
||||
<CursorPos X="23" Y="8"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="14"/>
|
||||
<UsageCount Value="59"/>
|
||||
<UsageCount Value="61"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit31>
|
||||
<Unit32>
|
||||
@ -292,8 +292,8 @@
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="finder"/>
|
||||
<CursorPos X="97" Y="1681"/>
|
||||
<TopLine Value="1666"/>
|
||||
<CursorPos X="75" Y="1710"/>
|
||||
<TopLine Value="1653"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -386,7 +386,7 @@
|
||||
<Unit46>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/>
|
||||
<CursorPos X="117" Y="32"/>
|
||||
<TopLine Value="22"/>
|
||||
<TopLine Value="4"/>
|
||||
<EditorIndex Value="12"/>
|
||||
<UsageCount Value="100"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -407,8 +407,8 @@
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="bitmaps"/>
|
||||
<CursorPos X="6" Y="611"/>
|
||||
<TopLine Value="598"/>
|
||||
<CursorPos X="70" Y="896"/>
|
||||
<TopLine Value="882"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -712,8 +712,8 @@
|
||||
<Filename Value="../../Units/MMLCore/dtm.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="dtm"/>
|
||||
<CursorPos X="112" Y="86"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="7" Y="139"/>
|
||||
<TopLine Value="109"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -729,8 +729,8 @@
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="colourpicker"/>
|
||||
<CursorPos X="1" Y="148"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="65" Y="243"/>
|
||||
<TopLine Value="86"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -808,7 +808,7 @@
|
||||
<CursorPos X="33" Y="34"/>
|
||||
<TopLine Value="30"/>
|
||||
<EditorIndex Value="13"/>
|
||||
<UsageCount Value="18"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit107>
|
||||
<Unit108>
|
||||
@ -1002,7 +1002,7 @@
|
||||
<UnitName Value="web"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="163"/>
|
||||
<UsageCount Value="167"/>
|
||||
</Unit136>
|
||||
<Unit137>
|
||||
<Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/>
|
||||
@ -1201,7 +1201,7 @@
|
||||
<UnitName Value="framescript"/>
|
||||
<CursorPos X="106" Y="190"/>
|
||||
<TopLine Value="180"/>
|
||||
<UsageCount Value="156"/>
|
||||
<UsageCount Value="160"/>
|
||||
</Unit161>
|
||||
<Unit162>
|
||||
<Filename Value="framesynedit.lrs"/>
|
||||
@ -1513,10 +1513,10 @@
|
||||
<ComponentName Value="ColourHistoryForm"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="colourhistory"/>
|
||||
<CursorPos X="45" Y="141"/>
|
||||
<TopLine Value="115"/>
|
||||
<CursorPos X="36" Y="135"/>
|
||||
<TopLine Value="13"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="93"/>
|
||||
<UsageCount Value="97"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit208>
|
||||
<Unit209>
|
||||
@ -1767,7 +1767,7 @@
|
||||
<UnitName Value="about"/>
|
||||
<CursorPos X="44" Y="21"/>
|
||||
<TopLine Value="4"/>
|
||||
<UsageCount Value="56"/>
|
||||
<UsageCount Value="60"/>
|
||||
</Unit245>
|
||||
<Unit246>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/file.inc"/>
|
||||
@ -1781,7 +1781,7 @@
|
||||
<UnitName Value="internets"/>
|
||||
<CursorPos X="87" Y="3"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="50"/>
|
||||
<UsageCount Value="54"/>
|
||||
</Unit247>
|
||||
<Unit248>
|
||||
<Filename Value="debugimageform.pas"/>
|
||||
@ -1790,7 +1790,7 @@
|
||||
<UnitName Value="debugimageform"/>
|
||||
<CursorPos X="20" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="37"/>
|
||||
<UsageCount Value="41"/>
|
||||
</Unit248>
|
||||
<Unit249>
|
||||
<Filename Value="debugimage.pas"/>
|
||||
@ -1800,9 +1800,9 @@
|
||||
<UnitName Value="debugimage"/>
|
||||
<ComponentState Value="1"/>
|
||||
<CursorPos X="62" Y="62"/>
|
||||
<TopLine Value="54"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="36"/>
|
||||
<UsageCount Value="40"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit249>
|
||||
<Unit250>
|
||||
@ -1872,123 +1872,127 @@
|
||||
<SyntaxHighlighter Value="XML"/>
|
||||
</Unit259>
|
||||
</Units>
|
||||
<JumpHistory Count="29" HistoryIndex="28">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1616" Column="14" TopLine="1601"/>
|
||||
<Filename Value="debugimage.pas"/>
|
||||
<Caret Line="115" Column="99" TopLine="94"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="104" Column="31" TopLine="89"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1053" Column="33" TopLine="1049"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="1681" Column="96" TopLine="1662"/>
|
||||
<Filename Value="debugimage.pas"/>
|
||||
<Caret Line="81" Column="35" TopLine="78"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="137" Column="23" TopLine="121"/>
|
||||
<Filename Value="debugimage.pas"/>
|
||||
<Caret Line="71" Column="47" TopLine="59"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="40" Column="51" TopLine="40"/>
|
||||
<Caret Line="1052" Column="53" TopLine="1049"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="45" Column="51" TopLine="1"/>
|
||||
<Caret Line="993" Column="49" TopLine="736"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="379" Column="26" TopLine="359"/>
|
||||
<Caret Line="817" Column="39" TopLine="23"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="362" Column="32" TopLine="359"/>
|
||||
<Caret Line="24" Column="53" TopLine="1"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1311" Column="57" TopLine="1291"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1316" Column="57" TopLine="1291"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="10" Column="75" TopLine="1"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1311" Column="65" TopLine="1291"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="8" Column="103" TopLine="3"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="180" Column="25" TopLine="160"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1311" Column="57" TopLine="1291"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="10" Column="108" TopLine="1"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<Caret Line="104" Column="73" TopLine="73"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="165" Column="119" TopLine="160"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="38" Column="79" TopLine="5"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1129" Column="75" TopLine="1105"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="debugimage.pas"/>
|
||||
<Caret Line="115" Column="99" TopLine="94"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1053" Column="33" TopLine="1049"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="debugimage.pas"/>
|
||||
<Caret Line="81" Column="35" TopLine="78"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="debugimage.pas"/>
|
||||
<Caret Line="71" Column="47" TopLine="59"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1052" Column="53" TopLine="1049"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="993" Column="49" TopLine="736"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="817" Column="39" TopLine="23"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="24" Column="53" TopLine="1"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="colourhistory.pas"/>
|
||||
<Caret Line="7" Column="88" TopLine="1"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="162" Column="14" TopLine="132"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="47" Column="69" TopLine="36"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="51" Column="33" TopLine="36"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="153" Column="37" TopLine="133"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="111" Column="51" TopLine="92"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="180" Column="19" TopLine="160"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="182" Column="30" TopLine="160"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="179" Column="65" TopLine="152"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="180" Column="9" TopLine="152"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="182" Column="25" TopLine="152"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="183" Column="8" TopLine="152"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="184" Column="8" TopLine="152"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="202" Column="10" TopLine="182"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="240" Column="10" TopLine="220"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="376" Column="10" TopLine="358"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="49" Column="28" TopLine="29"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="376" Column="16" TopLine="356"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="389" Column="18" TopLine="356"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="396" Column="16" TopLine="376"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="408" Column="18" TopLine="376"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="448" Column="16" TopLine="428"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -121,13 +121,10 @@ end;
|
||||
{$DEFINE DTM_DEBUG}
|
||||
destructor TMDTM.Destroy;
|
||||
|
||||
{$IFDEF DTM_DEBUG}
|
||||
var
|
||||
i, j: integer;
|
||||
b:boolean;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF DTM_DEBUG}
|
||||
for i := 0 to high(DTMList) do
|
||||
begin
|
||||
b := false;
|
||||
@ -140,7 +137,6 @@ begin
|
||||
if not b then
|
||||
writeln('DTM Number ' + inttostr(i) + ' was not freed');
|
||||
end;
|
||||
{$ENDIF}
|
||||
SetLength(DTMList, 0);
|
||||
SetLength(FreeSpots, 0);
|
||||
SetLength(BufferString, 0);
|
||||
|
@ -89,6 +89,11 @@ type
|
||||
{ TODO: add cts per colour/tolerance? }
|
||||
|
||||
// TODO DTM-Not points. Not very hard really.
|
||||
|
||||
{ not points -
|
||||
add seperate tpa or boolean array for every point that is to be matched ?
|
||||
}
|
||||
|
||||
pDTM = record
|
||||
l: Integer;
|
||||
p: TPointArray;
|
||||
|
@ -432,10 +432,7 @@ begin
|
||||
Self.FreezeState:=False;
|
||||
end;
|
||||
|
||||
// Bugged. For params other than 0, 0, ClientWidth, ClientHeight
|
||||
// if other type than w_XImage
|
||||
|
||||
// Also possibly thread bugged
|
||||
//Remove?
|
||||
function TMWindow.CopyClientToBitmap(xs, ys, xe, ye: integer): TBitmap;
|
||||
var
|
||||
w,h: Integer;
|
||||
@ -518,6 +515,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// Set's input focus on Linux, does not mean the window will look `active', but
|
||||
// it surely is. Try typing something after ActivateClient.
|
||||
procedure TMWindow.ActivateClient;
|
||||
{$IFDEF LINUX}
|
||||
var
|
||||
@ -539,7 +538,7 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFDEF MSWINDOWS} //Probably need one for Linux as well
|
||||
{$IFDEF MSWINDOWS}
|
||||
function TMWindow.UpdateDrawBitmap :boolean;
|
||||
var
|
||||
w,h : integer;
|
||||
@ -555,6 +554,7 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
// Returns dimensions of the Window
|
||||
procedure TMWindow.GetDimensions(out W, H: Integer);
|
||||
{$IFDEF LINUX}
|
||||
var
|
||||
@ -616,6 +616,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// Make this use GetDimensions, ray...?
|
||||
function TMWindow.GetDimensionBox(out Box : TBox) : boolean;
|
||||
function IntToTBox(x1,y1,x2,y2 : integer) : TBox;inline;
|
||||
begin;
|
||||
@ -668,6 +669,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// Set target to X-Window
|
||||
{$IFDEF LINUX}
|
||||
function TMWindow.SetTarget(XWindow: x.TWindow): integer; overload;
|
||||
var
|
||||
@ -682,6 +684,7 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
// Set target to Windows Window
|
||||
function TMWindow.SetTarget(Window: THandle; NewType: TTargetWindowMode): integer; overload;
|
||||
begin
|
||||
if Self.Frozen then
|
||||
@ -735,9 +738,9 @@ begin
|
||||
{$IFDEF WINDOWS}
|
||||
Self.TargetHandle:= windows.GetDesktopWindow;
|
||||
{$ENDIF}
|
||||
|
||||
end;
|
||||
|
||||
// Set target to Bitmap
|
||||
function TMWindow.SetTarget(Bitmap: TMufasaBitmap): integer;
|
||||
begin
|
||||
if Self.Frozen then
|
||||
|
Loading…
Reference in New Issue
Block a user