txtwidth.pas
Пример программы для функции TextWidth.
Код примера
{Txtwidth.PAS}
{ Пример программы для функции TextWidth }
Uses Graph;
Var Gd, Gm : Integer;
Row : Integer;
Title : String;
Size : Integer;
Begin
Gd:=Detect;
InitGraph(Gd, Gm, '');
If GraphResult <> grOk Then Halt(1);
Row:=0;
Title:='Turbo Graphics';
Size:=1;
While TextWidth(Title) < GetMaxX Do
Begin
OutTextXY(0, Row, Title);
Inc(Row, TextHeight('M'));
Inc(Size);
SetTextStyle(DefaultFont, HorizDir, Size);
End;
ReadLn;
CloseGraph;
End.
Скачать txtwidth.pas