Log in

View Full Version : FindText enhancement?



gsquare567
03-17-2007, 04:55 PM
{************************************************* ******************************
function FindText(var cx, cy: Integer; txt: String; font, xs, ys, xe, ye: Integer): Boolean;
By: Stupid3ooo
Description: Searches for text in specified box with specified font.
************************************************** *****************************}

function FindText(var cx, cy: Integer; txt: string; font, xs, ys, xe, ye:
Integer): Boolean; //by Stupid3ooo
var
S: Integer;
begin
S := CreateBitmapMaskFromText(txt, font);
if xs <= 0 then xs := 0;
if ys <= 0 then ys := 0;
Result := FindBitmapMaskTolerance(S, cx, cy, xs, ys, xe, ye, 10, 50);
FreeBitmap(S);
end;

doesnt work half the time. and whats the diff between tol and cotourtol?

Yakman
03-17-2007, 06:59 PM
Tol is the tolerance between the text and its background
Contour Tol is how much the outline can be blurred,

the procedure LoginPlayer uses it a lot, have a look at that

gsquare567
03-17-2007, 09:37 PM
ok, u answered 2/3 questions