delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/18/07:04:32

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <20020218120355.40210.qmail@web20801.mail.yahoo.com>
Date: Mon, 18 Feb 2002 13:03:55 +0100 (CET)
From: =?iso-8859-1?q?cesar=20tejeda?= <cesar_tejeda_her AT yahoo DOT es>
Subject: Re: Graphics
To: djgpp AT delorie DOT com
In-Reply-To: <PM.5485.1013872877@pmweb8.uk1.bibliotech.net>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

I think you should look for info about GFX and
Allegro in DJGPP's home page.
I've heard that there is a more or less automatic
conversion from TurboC to GFX.

 --- "Al E. B." <arjupt AT postmaster DOT co DOT uk> escribió: >
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 <graphics.h>
> #include <stdlib.h>
> #include <stdio.h>
> #include <conio.h>
> 
> 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;
> 
> }
> 
>  

_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger
Comunicación instantánea gratis con tu gente.
http://messenger.yahoo.es

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019