home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d571
/
gwin.lha
/
Gwin
/
Examples
/
screentypes.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-22
|
3KB
|
129 lines
#include "gwin.user.h"
/*******************************************************/
/* */
/* GRAPHICS MAIN */
/* */
/*******************************************************/
main()
{
USTART("low1",0.,320.,0.,200.);
test1();
UEND();
USTART("low1.backdrop",0.,320.,0.,200.);
test1();
UEND();
USTART("low2",0.,320.,0.,400.);
test1();
UEND();
USTART("low2.backdrop",0.,320.,0.,400.);
test1();
UEND();
USTART("high1",0.,640.,0.,200.);
test1();
UEND();
USTART("high1.backdrop",0.,640.,0.,200.);
test1();
UEND();
USTART("high2",0.,640.,0.,400.);
test1();
UEND();
USTART("high2.backdrop",0.,640.,0.,400.);
test1();
UEND();
USTART("ham",0.,320.,0.,200.);
test1();
UEND();
USTART("ham.backdrop",0.,320.,0.,200.);
test1();
UEND();
exit(0);
}
/*******************************************************/
/* */
/* TEST1 */
/* */
/*******************************************************/
test1()
{
int i;
float x, y;
uprint(G,10.,85.,"Move mouse and click left.");
uset(G,"fill");
umove(G,50.,50.);
udraw(G,60.,60.);
udraw(G,60.,50.);
udraw(G,50.,60.);
udraw(G,50.,50.);
uset(G,"nofi");
umove(G,25.,35.);
udraw(G,50.,55.);
umove (G,-5000.,-5000.);
udraw (G,5000.,5000.);
uset(G,"nofi");
ufont(G,"garnet.font",16.0);
upset(G,"fsty",1.0);
for(i=1;i<2;i++){
upset(G,"colo",(float)i);
if(ugrin(G,&x,&y)){UEND();exit(0);};
ufont(G,"topaz.font",11.0);
upset(G,"fsty",0.0);
uset(G,"fill");
umove(G,x-5.0,y-5.0);
udraw(G,x+5.0,y-5.0);
udraw(G,x+5.0,y+5.0);
udraw(G,x-5.0,y+5.0);
udraw(G,x-5.0,y-5.0);
uset(G,"nofi");
uprint(G,x,y+10.0,"Hello1");
if(ugrin(G,&x,&y)){UEND();exit(0);};
ufont(G,"garnet.font",16.0);
uset(G,"fill");
umove(G,x-5.0,y-5.0);
udraw(G,x-5.0,y+5.0);
udraw(G,x+5.0,y+5.0);
udraw(G,x+5.0,y-5.0);
udraw(G,x-5.0,y-5.0);
uset(G,"nofi");
uprint(G,x,y+10.0,"Hello2");
if(ugrin(G,&x,&y)){UEND();exit(0);};
uset(G,"fill");
ucrcle(G,x,y,15.0);
uset(G,"nofi");
if(ugrin(G,&x,&y)){UEND();exit(0);};
upset(G,"colo",(float)(i+1));
uset(G,"fill");
uplygn(G,x,y,(float)i,10.0);
uset(G,"nofi");
}
return;
}