1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-24 10:12:20 -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 // DS + .. + DS because InitOCR wants the directory of the Fonts, not UpChars
// only. // only.
C.MOCR.InitTOCR(FontPath + DS); C.MOCR.InitTOCR(FontPath + DS);
C.MOCR.SetFonts(C.MOCR.GetFonts); //C.MOCR.SetFonts(C.MOCR.GetFonts);
t:=gettickcount; t:=gettickcount;
@ -125,6 +125,7 @@ begin
Form1.Image1.Picture.SaveToFile(OCRDebugPath + 'ocrbench.bmp'); Form1.Image1.Picture.SaveToFile(OCRDebugPath + 'ocrbench.bmp');
{$ENDIF} {$ENDIF}
bmp.OnDestroy:=nil;
bmp.Free; bmp.Free;
C.Free; C.Free;
Application.ProcessMessages; Application.ProcessMessages;

View File

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

View File

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

View File

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