1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-01 13:22:16 -05:00

Adding TextToFontBitmap and TextToFontTPA.

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@456 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2010-01-24 00:19:27 +00:00
parent 6cf5e3e1d8
commit 778b81a9ae
5 changed files with 912 additions and 714 deletions

View File

@ -30,15 +30,15 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<Units Count="27"> <Units Count="29">
<Unit0> <Unit0>
<Filename Value="project1.lpr"/> <Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="project1"/> <UnitName Value="project1"/>
<CursorPos X="1" Y="210"/> <CursorPos X="45" Y="90"/>
<TopLine Value="184"/> <TopLine Value="72"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="74"/> <UsageCount Value="83"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
@ -46,15 +46,15 @@
<UnitName Value="CustApp"/> <UnitName Value="CustApp"/>
<CursorPos X="15" Y="51"/> <CursorPos X="15" Y="51"/>
<TopLine Value="32"/> <TopLine Value="32"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="../../Units/MMLCore/client.pas"/> <Filename Value="../../Units/MMLCore/client.pas"/>
<UnitName Value="Client"/> <UnitName Value="Client"/>
<CursorPos X="21" Y="51"/> <CursorPos X="21" Y="53"/>
<TopLine Value="35"/> <TopLine Value="35"/>
<EditorIndex Value="9"/> <EditorIndex Value="9"/>
<UsageCount Value="31"/> <UsageCount Value="36"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
@ -62,24 +62,22 @@
<UnitName Value="windowutil"/> <UnitName Value="windowutil"/>
<CursorPos X="110" Y="30"/> <CursorPos X="110" Y="30"/>
<TopLine Value="3"/> <TopLine Value="3"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="../../Units/MMLCore/window.pas"/> <Filename Value="../../Units/MMLCore/window.pas"/>
<UnitName Value="Window"/> <UnitName Value="Window"/>
<CursorPos X="55" Y="251"/> <CursorPos X="55" Y="251"/>
<TopLine Value="236"/> <TopLine Value="236"/>
<EditorIndex Value="12"/> <UsageCount Value="29"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="../../Units/MMLCore/colour_conv.pas"/> <Filename Value="../../Units/MMLCore/colour_conv.pas"/>
<UnitName Value="colour_conv"/> <UnitName Value="colour_conv"/>
<CursorPos X="18" Y="346"/> <CursorPos X="18" Y="332"/>
<TopLine Value="309"/> <TopLine Value="309"/>
<EditorIndex Value="4"/> <EditorIndex Value="4"/>
<UsageCount Value="11"/> <UsageCount Value="16"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
@ -88,7 +86,7 @@
<CursorPos X="31" Y="1907"/> <CursorPos X="31" Y="1907"/>
<TopLine Value="1890"/> <TopLine Value="1890"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="34"/> <UsageCount Value="39"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
@ -96,9 +94,7 @@
<UnitName Value="Input"/> <UnitName Value="Input"/>
<CursorPos X="56" Y="49"/> <CursorPos X="56" Y="49"/>
<TopLine Value="24"/> <TopLine Value="24"/>
<EditorIndex Value="8"/> <UsageCount Value="29"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/> <Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
@ -106,81 +102,79 @@
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="34"/> <TopLine Value="34"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<UsageCount Value="32"/> <UsageCount Value="37"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<UnitName Value="ocr"/> <UnitName Value="ocr"/>
<CursorPos X="53" Y="31"/> <CursorPos X="7" Y="729"/>
<TopLine Value="24"/> <TopLine Value="713"/>
<EditorIndex Value="10"/> <EditorIndex Value="10"/>
<UsageCount Value="31"/> <UsageCount Value="36"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="../../../Documents/fpc/rtl/objpas/sysutils/diskh.inc"/> <Filename Value="../../../Documents/fpc/rtl/objpas/sysutils/diskh.inc"/>
<CursorPos X="10" Y="18"/> <CursorPos X="10" Y="18"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
<Filename Value="../../Units/MMLCore/files.pas"/> <Filename Value="../../Units/MMLCore/files.pas"/>
<UnitName Value="files"/> <UnitName Value="files"/>
<CursorPos X="5" Y="42"/> <CursorPos X="5" Y="42"/>
<TopLine Value="27"/> <TopLine Value="27"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit11> </Unit11>
<Unit12> <Unit12>
<Filename Value="../../../Documents/lazarus/lcl/graphics.pp"/> <Filename Value="../../../Documents/lazarus/lcl/graphics.pp"/>
<UnitName Value="Graphics"/> <UnitName Value="Graphics"/>
<CursorPos X="3" Y="1426"/> <CursorPos X="3" Y="1426"/>
<TopLine Value="1411"/> <TopLine Value="1411"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<UnitName Value="bitmaps"/> <UnitName Value="bitmaps"/>
<CursorPos X="32" Y="835"/> <CursorPos X="51" Y="867"/>
<TopLine Value="850"/> <TopLine Value="1"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="29"/> <UsageCount Value="34"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
<Filename Value="../../../Documents/fpc/rtl/inc/objpash.inc"/> <Filename Value="../../../Documents/fpc/rtl/inc/objpash.inc"/>
<CursorPos X="22" Y="177"/> <CursorPos X="22" Y="177"/>
<TopLine Value="162"/> <TopLine Value="162"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit14> </Unit14>
<Unit15> <Unit15>
<Filename Value="../../../Documents/lazarus/lcl/intfgraphics.pas"/> <Filename Value="../../../Documents/lazarus/lcl/intfgraphics.pas"/>
<UnitName Value="IntfGraphics"/> <UnitName Value="IntfGraphics"/>
<CursorPos X="30" Y="2975"/> <CursorPos X="30" Y="2975"/>
<TopLine Value="2959"/> <TopLine Value="2959"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit15> </Unit15>
<Unit16> <Unit16>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/> <Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<UnitName Value="mmlpsthread"/> <UnitName Value="mmlpsthread"/>
<CursorPos X="3" Y="154"/> <CursorPos X="3" Y="154"/>
<TopLine Value="235"/> <TopLine Value="235"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit16> </Unit16>
<Unit17> <Unit17>
<Filename Value="../../../Documents/fpc/rtl/i386/mmx.pp"/> <Filename Value="../../../Documents/fpc/rtl/i386/mmx.pp"/>
<UnitName Value="mmx"/> <UnitName Value="mmx"/>
<CursorPos X="80" Y="15"/> <CursorPos X="80" Y="15"/>
<TopLine Value="71"/> <TopLine Value="71"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit17> </Unit17>
<Unit18> <Unit18>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/ocr.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/Wrappers/ocr.inc"/>
<CursorPos X="20" Y="4"/> <CursorPos X="20" Y="4"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="11"/>
<UsageCount Value="27"/> <UsageCount Value="27"/>
<Loaded Value="True"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
<Filename Value="../../Units/MMLCore/dtm.pas"/> <Filename Value="../../Units/MMLCore/dtm.pas"/>
@ -188,7 +182,7 @@
<CursorPos X="29" Y="31"/> <CursorPos X="29" Y="31"/>
<TopLine Value="411"/> <TopLine Value="411"/>
<EditorIndex Value="6"/> <EditorIndex Value="6"/>
<UsageCount Value="27"/> <UsageCount Value="32"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit19> </Unit19>
<Unit20> <Unit20>
@ -197,7 +191,7 @@
<CursorPos X="1" Y="89"/> <CursorPos X="1" Y="89"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="5"/> <EditorIndex Value="5"/>
<UsageCount Value="23"/> <UsageCount Value="28"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
@ -205,15 +199,15 @@
<UnitName Value="CustApp"/> <UnitName Value="CustApp"/>
<CursorPos X="59" Y="48"/> <CursorPos X="59" Y="48"/>
<TopLine Value="18"/> <TopLine Value="18"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit21> </Unit21>
<Unit22> <Unit22>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<UnitName Value="ocrutil"/> <UnitName Value="ocrutil"/>
<CursorPos X="48" Y="417"/> <CursorPos X="1" Y="1"/>
<TopLine Value="395"/> <TopLine Value="1"/>
<EditorIndex Value="7"/> <EditorIndex Value="7"/>
<UsageCount Value="11"/> <UsageCount Value="16"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit22> </Unit22>
<Unit23> <Unit23>
@ -221,147 +215,165 @@
<UnitName Value="colourpicker"/> <UnitName Value="colourpicker"/>
<CursorPos X="49" Y="288"/> <CursorPos X="49" Y="288"/>
<TopLine Value="265"/> <TopLine Value="265"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit23> </Unit23>
<Unit24> <Unit24>
<Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/>
<CursorPos X="116" Y="38"/> <CursorPos X="116" Y="38"/>
<TopLine Value="12"/> <TopLine Value="12"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit24> </Unit24>
<Unit25> <Unit25>
<Filename Value="../../Units/MMLAddon/PSInc/psdefines.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/psdefines.inc"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="2"/> <TopLine Value="2"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit25> </Unit25>
<Unit26> <Unit26>
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit26> </Unit26>
<Unit27>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<UnitName Value="os_linux"/>
<CursorPos X="66" Y="54"/>
<TopLine Value="24"/>
<EditorIndex Value="11"/>
<UsageCount Value="14"/>
<Loaded Value="True"/>
</Unit27>
<Unit28>
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<UnitName Value="fontloader"/>
<CursorPos X="53" Y="62"/>
<TopLine Value="34"/>
<EditorIndex Value="8"/>
<UsageCount Value="13"/>
<Loaded Value="True"/>
</Unit28>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="31" Column="54" TopLine="13"/> <Caret Line="18" Column="48" TopLine="1"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="8" Column="38" TopLine="1"/> <Caret Line="55" Column="47" TopLine="37"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="../../Units/MMLCore/colour_conv.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="47" Column="31" TopLine="27"/> <Caret Line="56" Column="74" TopLine="37"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="../../Units/MMLCore/ocr.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="31" Column="53" TopLine="24"/> <Caret Line="156" Column="24" TopLine="133"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="85" Column="74" TopLine="75"/> <Caret Line="31" Column="66" TopLine="25"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="project1.lpr"/>
<Caret Line="2027" Column="29" TopLine="2002"/> <Caret Line="89" Column="15" TopLine="67"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="2028" Column="37" TopLine="2009"/> <Caret Line="53" Column="21" TopLine="35"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="2021" Column="75" TopLine="2004"/> <Caret Line="740" Column="27" TopLine="722"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="1832" Column="28" TopLine="1827"/> <Caret Line="742" Column="39" TopLine="722"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="1822" Column="1" TopLine="1808"/> <Caret Line="713" Column="14" TopLine="708"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="project1.lpr"/>
<Caret Line="1877" Column="23" TopLine="1867"/> <Caret Line="86" Column="16" TopLine="67"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="62" Column="31" TopLine="44"/> <Caret Line="40" Column="31" TopLine="22"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="1893" Column="88" TopLine="1867"/> <Caret Line="751" Column="17" TopLine="722"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="2033" Column="30" TopLine="2002"/> <Caret Line="55" Column="23" TopLine="37"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="1934" Column="32" TopLine="1916"/> <Caret Line="761" Column="40" TopLine="702"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="2007" Column="29" TopLine="1989"/> <Caret Line="763" Column="36" TopLine="735"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="87" Column="28" TopLine="78"/> <Caret Line="737" Column="13" TopLine="724"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="2010" Column="81" TopLine="1989"/> <Caret Line="734" Column="74" TopLine="712"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="project1.lpr"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="111" Column="22" TopLine="101"/> <Caret Line="741" Column="39" TopLine="716"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="../../Units/MMLCore/dtmutil.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="31" Column="24" TopLine="12"/> <Caret Line="726" Column="62" TopLine="716"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="../../Units/MMLCore/dtmutil.pas"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="158" Column="46" TopLine="133"/> <Caret Line="741" Column="39" TopLine="723"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="../../Units/MMLCore/dtmutil.pas"/> <Filename Value="project1.lpr"/>
<Caret Line="148" Column="33" TopLine="119"/> <Caret Line="88" Column="36" TopLine="72"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="../../Units/MMLCore/dtmutil.pas"/> <Filename Value="project1.lpr"/>
<Caret Line="31" Column="30" TopLine="1"/> <Caret Line="84" Column="48" TopLine="72"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="1898" Column="99" TopLine="1878"/> <Caret Line="29" Column="12" TopLine="1"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="1902" Column="65" TopLine="1884"/> <Caret Line="67" Column="9" TopLine="49"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="project1.lpr"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="51" Column="35" TopLine="34"/> <Caret Line="68" Column="61" TopLine="49"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="../../Units/MMLCore/dtmutil.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="77" Column="5" TopLine="49"/> <Caret Line="159" Column="42" TopLine="141"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="../../Units/MMLCore/dtm.pas"/> <Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<Caret Line="31" Column="29" TopLine="1"/> <Caret Line="216" Column="25" TopLine="198"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="project1.lpr"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="128" Column="41" TopLine="109"/> <Caret Line="732" Column="24" TopLine="710"/>
</Position29> </Position29>
<Position30> <Position30>
<Filename Value="project1.lpr"/> <Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="62" Column="83" TopLine="38"/> <Caret Line="741" Column="10" TopLine="711"/>
</Position30> </Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
@ -372,9 +384,15 @@
<OtherUnitFiles Value="$(ProjPath)/../../Units/MMLCore/;$(ProjPath)/../../Units/Misc/;$(ProjPath)/../../Units/MMLAddon/;$(LazarusDir)/lcl/units/$(TargetCPU)-$(TargetOS)/$(LCLWidgetType)/;$(LazarusDir)/lcl/units/$(TargetCPU)-$(TargetOS)/;$(ProjPath)/../../Units/Linux/;$(LazarusDir)/components/mouseandkeyinput/"/> <OtherUnitFiles Value="$(ProjPath)/../../Units/MMLCore/;$(ProjPath)/../../Units/Misc/;$(ProjPath)/../../Units/MMLAddon/;$(LazarusDir)/lcl/units/$(TargetCPU)-$(TargetOS)/$(LCLWidgetType)/;$(LazarusDir)/lcl/units/$(TargetCPU)-$(TargetOS)/;$(ProjPath)/../../Units/Linux/;$(LazarusDir)/components/mouseandkeyinput/"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
<StackChecks Value="True"/>
</Checks>
<VerifyObjMethodCallValidity Value="True"/>
<Optimizations> <Optimizations>
<VariablesInRegisters Value="True"/> <VariablesInRegisters Value="True"/>
<OptimizationLevel Value="3"/>
</Optimizations> </Optimizations>
</CodeGeneration> </CodeGeneration>
<Other> <Other>

View File

@ -82,21 +82,26 @@ begin
end; end;
{ add your program here } { add your program here }
C := TClient.Create; C := TClient.Create('.');
C.MOCR.InitTOCR('/home/merlijn/Programs/mufasa/Fonts/');
bmp := TMufasaBitmap.Create; bmp := C.MOCR.TextToFontBitmap('Danke schon', 'SmallChars');
bmp.SaveToFile('/tmp/wat.bmp');
{ bmp := TMufasaBitmap.Create;
bmp.SetSize(CW,CH); bmp.SetSize(CW,CH);
Writeln(Format('Client W/H: %d, %d', [CW, CH])); Writeln(Format('Client W/H: %d, %d', [CW, CH]));
FillChar(bmp.FData[0],sizeof(trgb32)*CW*CH, 0); FillChar(bmp.FData[0],sizeof(trgb32)*CW*CH, 0);
Randomize; Randomize;
for i := 0 to 500 do for i := 0 to 500 do
bmp.fastsetpixel(random(CW), random(CH), 255); bmp.fastsetpixel(random(CW), random(CH), 255); }
{ bmp.FastSetPixel(8,8,255); { bmp.FastSetPixel(8,8,255);
bmp.FastSetPixel(9,9,255); bmp.FastSetPixel(9,9,255);
bmp.FastSetPixel(7,7,255); bmp.FastSetPixel(7,7,255);
bmp.FastSetPixel(9,8,255); bmp.FastSetPixel(9,8,255);
bmp.FastSetPixel(8,9,255); } bmp.FastSetPixel(8,9,255); }
C.MWindow.SetTarget(bmp); // C.MWindow.SetTarget(bmp);
{ initdtm(dtm, 5); { initdtm(dtm, 5);
@ -110,7 +115,7 @@ begin
dtm.asz[1] := 1; dtm.asz[1] := 1;
dtm.ash[1] := dtm_Rectangle; } dtm.ash[1] := dtm_Rectangle; }
dtm := randomdtm(10); { dtm := randomdtm(10);
// setlength(p, 1); // setlength(p, 1);
C.MFinder.SetToleranceSpeed(1); C.MFinder.SetToleranceSpeed(1);
@ -125,14 +130,14 @@ begin
writeln(inttostr(length(p))+ ' points found'); writeln(inttostr(length(p))+ ' points found');
setlength(p,0); setlength(p,0);
PrintpDTM(tdtmtopDTM(pDTMToTDTM(dtm))); PrintpDTM(tdtmtopDTM(pDTMToTDTM(dtm))); }
{for i := 0 to high(p) do {for i := 0 to high(p) do
writeln(format('%d: (%d, %d)', [i, p[i].x, p[i].y])); } writeln(format('%d: (%d, %d)', [i, p[i].x, p[i].y])); }
//bmp.OnDestroy:=nil; //bmp.OnDestroy:=nil;
bmp.Free; //bmp.Free;
C.Free; C.Free;
// stop program loop // stop program loop

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,11 @@ uses
procedure FilterShadowBitmap(bmp: TMufasaBitmap); procedure FilterShadowBitmap(bmp: TMufasaBitmap);
procedure FilterCharsBitmap(bmp: TMufasaBitmap); procedure FilterCharsBitmap(bmp: TMufasaBitmap);
function GetTextAt(atX, atY, font, minspacing, maxspacing, color, len: integer): string;
function TextToFontTPA(Text, font: String; var w, h: integer): TPointArray;
function TextToFontBitmap(Text, font: String): TMufasaBitmap;
{$IFDEF OCRDEBUG} {$IFDEF OCRDEBUG}
procedure DebugToBmp(bmp: TMufasaBitmap; hmod,h: integer); procedure DebugToBmp(bmp: TMufasaBitmap; hmod,h: integer);
{$ENDIF} {$ENDIF}
@ -695,5 +700,71 @@ begin
result := GetUpTextAtEx(atX, atY, false); result := GetUpTextAtEx(atX, atY, false);
end; end;
function TMOCR.GetTextAt(atX, atY, font, minspacing, maxspacing, color, len: integer): string;
begin
end;
function TMOCR.TextToFontTPA(Text, font: String; var w, h: integer): TPointArray;
var
fontD: TOcrData;
c, i, x, y, off: Integer;
d: TocrGlyphMetric;
an: integer;
begin
fontD := Fonts.GetFont(font);
c := 0;
off := 0;
setlength(result, 0);
for i := 1 to length(text) do
begin
writeln(text[i]);
an := Ord(text[i]);
if not InRange(an, 0, 255) then
begin
writeln('WARNING: Invalid character passed to TextToFontTPA');
continue;
end;
d := fontD.ascii[an];
{writeln(format('xoff, yoff: %d, %d', [d.xoff, d.yoff]));
writeln(format('bmp w,h: %d, %d', [d.width, d.height]));
writeln(format('font w,h: %d, %d', [fontD.width, fontD.height])); }
setlength(result, c+d.width*d.height);
for y := 0 to fontD.height - 1 do
for x := 0 to fontD.width - 1 do
begin
if fontD.pos[fontD.ascii[an].index][x + y * fontD.width] = 1 then
// if fontD.pos[an][x + y * fontD.width] = 1 then
begin
result[c] := Point(x + off +d.xoff, y+d.yoff);
inc(c);
end;
end;
setlength(result, c);
off := off + d.width;
end;
w := off;
h := d.height;
{ writeln('C: ' + inttostr(c)); }
end;
function TMOCR.TextToFontBitmap(Text, font: String): TMufasaBitmap;
var
TPA: TPointArray;
w,h: integer;
bmp: TMufasaBitmap;
begin
TPA := TextToFontTPA(text, font, w, h);
bmp := TMufasaBitmap.Create;
writeln(format('b: %d, %d', [w, h]));
bmp.SetSize(w, h);
bmp.DrawTPA(TPA, clWhite);
result := bmp;
end;
end. end.

View File

@ -233,7 +233,8 @@ begin
begin begin
result.pos[i][c]:= 1; result.pos[i][c]:= 1;
inc(pos); inc(pos);
end; end else
result.pos[i][c] := 0;
end; end;
end; end;
for c:= 0 to size-1 do for c:= 0 to size-1 do