1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-24 02:02:17 -05:00

Volgens mij heb ik dit gesloopt ofzo

This commit is contained in:
Raymond 2010-05-09 22:54:34 +02:00
parent 6c1ba3dc42
commit 8b7cb5ce26
4 changed files with 12 additions and 6 deletions

View File

@ -96,7 +96,7 @@ begin
// DS + .. + DS because InitOCR wants the directory of the Fonts, not UpChars
// only.
C.MOCR.InitTOCR(FontPath + DS);
C.MOCR.SetFonts(C.MOCR.GetFonts);
//C.MOCR.SetFonts(C.MOCR.GetFonts);
t:=gettickcount;
@ -125,6 +125,7 @@ begin
Form1.Image1.Picture.SaveToFile(OCRDebugPath + 'ocrbench.bmp');
{$ENDIF}
bmp.OnDestroy:=nil;
bmp.Free;
C.Free;
Application.ProcessMessages;

View File

@ -36,7 +36,7 @@ interface
implementation
uses
MufasaTypes,MufasaBase,FileUtil;
MufasaTypes,MufasaBase,FileUtil, strutils;
procedure TGenericLoader.AddPath(path: string);
var
@ -101,6 +101,8 @@ implementation
function TGenericLoader.VerifyPath(Path: string): string;
begin
if (@path = nil) or (path = '') then
exit('');
Result := Path;
if (Result[Length(Result)] <> DS) then
begin;

View File

@ -41,9 +41,6 @@ type
private
Client: TObject;
FFonts: TMFonts;
{$IFDEF OCRDEBUG}
debugbmp: TMufasaBitmap;
{$ENDIF}
function GetFonts:TMFonts;
procedure SetFonts(const NewFonts: TMFonts);
public
@ -71,6 +68,8 @@ type
property Fonts : TMFonts read GetFonts write SetFonts;
{$IFDEF OCRDEBUG}
procedure DebugToBmp(bmp: TMufasaBitmap; hmod,h: integer);
public
debugbmp: TMufasaBitmap;
{$ENDIF}
end;
@ -156,16 +155,20 @@ begin
{$ENDIF}
if FFonts.LoadFont(dirs[i], false) then
begin
{$IFDEF FONTDEBUG}
fonts_loaded := fonts_loaded + dirs[i] + ', ';
{$ENDIF}
result := true;
end;
end;
{$IFDEF FONTDEBUG}
if length(fonts_loaded) > 2 then
begin
writeln(fonts_loaded);
setlength(fonts_loaded,length(fonts_loaded)-2);
TClient(Self.Client).WriteLn('Loaded fonts: ' + fonts_loaded);
end;
{$ENDIF}
If DirectoryExists(path + 'UpChars') then
FFonts.LoadFont('UpChars', true); // shadow
end;

View File

@ -27,7 +27,7 @@ type
implementation
uses
Windows ,Messages ,CommDlg ,Graphics ,Controls ,Forms ,StdCtrls ,Dialogs;
{ Windows ,}lcltype,Messages {,CommDlg },Graphics ,Controls ,Forms ,StdCtrls ,Dialogs;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)