home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 11
/
CD_ASCQ_11_0294.iso
/
maj
/
545
/
demo1.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-09-04
|
900b
|
33 lines
/* ************************************************************ */
/* Demo1.c For Turbo C */
/* */
/* TGCAR.XGF was created by saving the image as TP/TC (Binary) */
/* from Raster Master. */
/* ************************************************************ */
#include <stdio.h>
#include <alloc.h>
#include <graphics.h>
void main()
{
void *imgBuf;
FILE *F;
int driver = VGA;
int mode = VGALO;
unsigned int size;
F=fopen("TGCAR.XGF","rb");
size=filelength(fileno(F));
imgBuf = malloc(size);
fread(imgBuf,size,1,F);
fclose(F);
initgraph(&driver, &mode, "");
setfillstyle(SOLID_FILL,BLUE);
bar(0,0,getmaxx(),getmaxy());
putimage(0,0,imgBuf,COPY_PUT);
free(imgBuf);
getch();
closegraph();
}