#pas
function THIRunText.Argument:integer;
var dt:TData;
begin
case _prop_Kind of
0: Result := TextWidth(dt);
1: Result := TextHeigh(dt);
end;
end;
#pas
function THIRunText.TextHeigh(_Data:TData):integer;
var SizeFont: TSize;
s: string;
hOldFont: HFONT;
dt:TData;
begin
TRY
if not ImgGetDC(_Data) then exit;
s := ReadString(_Data,_data_Text,_prop_Text);
hOldFont := SelectObject(pDC, GFont.Handle);
GetTextExtentPoint32(pDC, PChar(s), Length(s), SizeFont);
SelectObject(pDC, hOldFont);
dtInteger(dt, SizeFont.cy);
FINALLY
ImgReleaseDC;
END;
Result := ToInteger(dt);
end;