Язык:
Русский
English
{ Пример программы для процедуры ClearViewPort }
uses Graph;
var
Gd, Gm : Integer;
X0, Y0 : Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, 'X:\BP'); { Путь к BGI драйверам }
if GraphResult <> grOk then
Halt(1);
X0 := GetMaxX;
Y0 := GetMaxY;
Rectangle(19, 19, X0 - 19, Y0 - 19);
SetViewPort(20, 20, X0 - 20, Y0 - 20, ClipOn);
OutTextXY(0, 0, 'Press <ENTER> to clear current viewport.');
ReadLn;
ClearViewPort;
OutTextXY(0, 0, 'Press <ENTER> to quit.');
ReadLn;
CloseGraph;
end.
var
Gd, Gm : Integer;
X0, Y0 : Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, 'X:\BP'); { Путь к BGI драйверам }
if GraphResult <> grOk then
Halt(1);
X0 := GetMaxX;
Y0 := GetMaxY;
Rectangle(19, 19, X0 - 19, Y0 - 19);
SetViewPort(20, 20, X0 - 20, Y0 - 20, ClipOn);
OutTextXY(0, 0, 'Press <ENTER> to clear current viewport.');
ReadLn;
ClearViewPort;
OutTextXY(0, 0, 'Press <ENTER> to quit.');
ReadLn;
CloseGraph;
end.