X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: binary MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) From: "Al E. B." Subject: Re: Graphics To: djgpp AT delorie DOT com Date: Sat, 16 Feb 2002 15:21:17 +0000 X-Postmaster: Sent from Postmaster http://www.postmaster.co.uk/, the world's premier free web-based email service, based in London, England. X-Postmaster-Trace: Account name: arjupt; Local time: Sat Feb 16 15:21:17 2002; Local host: pmweb8.uk1.bibliotech.net; Remote host: 212.137.206.18; Referer site: www.postmaster.co.uk X-Complaints-To: Administrator AT postmaster DOT co DOT uk Message-Id: Reply-To: djgpp AT delorie DOT com Hi, 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; }