X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Waldemar Schultz Newsgroups: comp.os.msdos.djgpp Subject: Re: Graphics Date: Wed, 20 Feb 2002 14:51:02 +0100 Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Lines: 66 Message-ID: <3C73A9C6.834E3845@ma.tum.de> References: <20020218120355 DOT 40210 DOT qmail AT web20801 DOT mail DOT yahoo DOT com> NNTP-Posting-Host: pcritter14.mathematik.tu-muenchen.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: wsc10.lrz-muenchen.de 1014213049 6407 131.159.68.151 (20 Feb 2002 13:50:49 GMT) X-Complaints-To: news AT lrz-muenchen DOT de NNTP-Posting-Date: 20 Feb 2002 13:50:49 GMT X-Mailer: Mozilla 4.75 [de] (Win98; U) X-Accept-Language: de,en-US To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > "Al E. B." > > > This program has been written in TurboC. I've heard > > DJGPP uses different Refs. I'd be thankful, if you > > can write in DJGPP. > > Again, I'm looking forward, > > Al. > > > > > > > > > > /* Program to draw a Circle */ > > > > #include > > #include > > #include > > #include > > > > int main(void) > > { > > > > /* request auto-detection */ > > int gdriver = DETECT, gmode, errorcode; > > int midx, midy; > > int radius = 100; > > > > /* initialise graphics and local variables */ > > initgraph(&gdriver, &gmode, ""); > > > > /* read result of initialisation */ > > errorcode = graphresult(); > > if (errorcode != grOk) /* an error occurred */ > > { > > > > printf("Graphics error: %s\n", > > grapherrormsg(errorcode)); > > printf("Press any key to halt:"); > > getch(); > > exit(1); /* terminate with an error code */ > > > > } > > > > midx = getmaxx() / 2; > > midy = getmaxy() / 2; > > setcolor(getmaxcolor()); > > > > /* draw the circle */ > > circle(midx, midy, radius); > > > > /* clean up */ > > getch(); > > closegraph(); > > return 0; > > > > } > > > > you might try GRX and it's embedded BGI emulation. check the docs on http://grx.gnu.de -- Gruss Waldemar Schultz. schultz AT ma DOT tum DOT de Technische Universität München, Zentrum Mathematik M1, D 80290 München Tel: +49 (0)89 2892 8226 FAX: +49 (0)89 2892 8228