home *** CD-ROM | disk | FTP | other *** search
- program grid;
-
- uses graph,crt;
-
- var graphdriver,graphmode,errorcode,maxx,maxy,i : integer;
-
-
- begin
- graphdriver := detect;
- initgraph(graphdriver,graphmode,'');
- errorcode:=graphresult;
- if errorcode<> grok then begin
- writeln('Error ',grapherrormsg(errorcode));
- halt(1);
- end;
- maxx:=getmaxx;
- maxy:=getmaxy;
- if (maxx<> 639) or (maxy <> 479) then begin
- closegraph;
- writeln(' Wrong resolution :',maxx+1,' x ',maxy+1,', standard 640 x 480 needed');
- halt(1);
- end;
- Setbkcolor(black);
- cleardevice;
- setcolor(white);
- for i:=0 to 19 do
- line(15+i*32,0,15+i*32,maxy);
- for i:=0 to 14 do
- line(0,15+i*32,maxx,15+i*32);
- line(0,0,0,maxy);
- line(0,0,maxx,0);
- line(maxx,maxy,0,maxy);
- line(maxx,maxy,maxx,0);
- circle(319,240,48);
- circle(47,47,48);
- circle(maxx-47,47,48);
- circle(47,maxy-47,48);
- circle(maxx-47,maxy-47,48);
- repeat until keypressed;
- closegraph;
- end.