1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-08-13 16:53:59 -04:00
Simba/trunk/Units/MMLAddon/PSInc/Wrappers/ocr.inc
Raymond 1fb4a6d44a Added the loaded char names as constants to the Scripting engine (dynamically).
Also replaced all the Bitmaps.Bmp[index] with bitmaps[index].
Creaded MaskFromText, named the others BitmapFromText and TPAFromText.
Added a GetFontByIndex to the FontLoader.

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@459 3f818213-9676-44b0-a9b4-5e4c4e03d09d
2010-01-24 15:04:07 +00:00

26 lines
637 B
PHP

function rs_GetUpText: String;
begin
Result := CurrThread.Client.MOCR.GetUpTextAtEx(7, 7, true);
end;
function BitmapFromText(text, font: String): integer;
var
bmp: TMufasaBitmap;
begin
writeln('BitmapFromText: ' + text + ' ' + font);
bmp := CurrThread.Client.MOCR.TextToFontBitmap(text, font);
Result := CurrThread.Client.MBitmaps.AddBMP(bmp);
end;
function MaskFromText(text, font: String): TMask;
begin
Result := CurrThread.Client.MOCR.TextToMask(text,font);
end;
function TPAFromText(text, font: String): TPointArray;
var
w,h : integer;
begin
Result := CurrThread.Client.MOCR.TextToFontTPA(text, font, w, h);
end;