3
{ Program to demonstrate static graphics mode selection }
9
TheLine = 'We are now in 640 x 480 x 256 colors!'+
10
' (press <Return> to continue)';
13
gd, gm, lo, hi, error,tw,th: integer;
17
{ We want an 8 bit mode }
21
{ Make sure you always check graphresult! }
23
if (error <> grOk) Then
25
writeln('640x480x256 is not supported!');
28
{ We are now in 640x480x256 }
30
rectangle(0,0,getmaxx,getmaxy);
31
{ Write a nice message in the center of the screen }
32
setTextStyle(defaultFont,horizDir,1);
33
tw:=TextWidth(TheLine);
34
th:=TextHeight(TheLine);
35
outTextXY((getMaxX - TW) div 2,
36
(getMaxY - TH) div 2,TheLine);