home *** CD-ROM | disk | FTP | other *** search
-
- USES
- crt,
- graph,
- TEGLIntr,
- FastGrph;
-
- const
- TEGLBackPattern : FillPatternType = ($AA,$55,$AA,$55,$AA,$55,$AA,$55);
-
- var
- ch : char;
- i : word;
-
- procedure waitforkey;
- begin
- while keypressed do ch:=readkey;
- while not keypressed do;
- while keypressed do ch:=readkey;
- end;
-
- procedure fastrectangle(x,y,x1,y1:word);
- var c:word;
- begin
- c := getcolor;
- fastline(x,y,x1,y,c);
- fastline(x,y,x,y1,c);
- fastline(x,y1,x1,y1,c);
- fastline(x1,y,x1,y1,c);
- end;
-
- procedure hpixline(x,y,x1:word);
- var i,c:word;
- begin
- c := getcolor;
- for i:=x to x1 do
- putpixs(i,y,c);
- end;
-
- procedure vpixline(x,y,y1:word);
- var i,c:word;
- begin
- c := getcolor;
- for i:=y to y1 do
- putpixs(x,i,c);
- end;
-
- procedure Pixrectangle(x,y,x1,y1:word);
- begin
- hpixline(x,y,x1);
- vpixline(x,y,y1);
- hpixline(x,y1,x1);
- vpixline(x1,y,y1);
- end;
-
- begin
- Herc720x348x2;
- Init_TEGLIntr;
- setmouseminmax(0,0,getmaxx,getmaxy);
-
- randomize;
-
- setcolor(white);
- pixrectangle(0,0,719,347);
- pixrectangle(5,5,714,342);
- pixrectangle(10,10,709,338);
-
- while keypressed do ch:=readkey;
- while not keypressed do
- begin
- putpixs(random(720),random(348),white);
- putpixs(random(720),random(348),black);
- end;
-
- putpixs(5,5,white);
- i := getpixs(5,5);
- if i<>1 then
- abort('The value is not 1');
-
- putpixs(5,5,black);
- i := getpixs(5,5);
- if i<>0 then
- abort('The value is not 0');
-
- showmouse;
- waitforkey;
- end.