Язык:
Русский
English
{ Пример программы для функции TextHeight }
uses Graph;
const S = 'Turbo Pascal';
var
Gd, Gm : Integer;
Y, Size : Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, 'X:\BP');
if GraphResult <> grOk then
Halt(1);
Y := 0;
for Size := 1 to 5 do
begin
SetTextStyle(DefaultFont, HorizDir, Size);
OutTextXY(0, Y, S);
Inc(Y, TextHeight(S));
end;
ReadLn;
CloseGraph;
end.
const S = 'Turbo Pascal';
var
Gd, Gm : Integer;
Y, Size : Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, 'X:\BP');
if GraphResult <> grOk then
Halt(1);
Y := 0;
for Size := 1 to 5 do
begin
SetTextStyle(DefaultFont, HorizDir, Size);
OutTextXY(0, Y, S);
Inc(Y, TextHeight(S));
end;
ReadLn;
CloseGraph;
end.