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 >
C/C++ Source or Header  |  1991-12-22  |  3KB  |  129 lines

  1. #include "gwin.user.h"
  2. /*******************************************************/
  3. /*                                                     */
  4. /* GRAPHICS  MAIN                                      */
  5. /*                                                     */
  6. /*******************************************************/
  7. main()
  8. {
  9.  
  10.    USTART("low1",0.,320.,0.,200.);
  11.    test1();
  12.    UEND();
  13.  
  14.    USTART("low1.backdrop",0.,320.,0.,200.);
  15.    test1();
  16.    UEND();
  17.  
  18.  
  19.    USTART("low2",0.,320.,0.,400.);
  20.    test1();
  21.    UEND();
  22.  
  23.    USTART("low2.backdrop",0.,320.,0.,400.);
  24.    test1();
  25.    UEND();
  26.  
  27.  
  28.    USTART("high1",0.,640.,0.,200.);
  29.    test1();
  30.    UEND();
  31.  
  32.    USTART("high1.backdrop",0.,640.,0.,200.);
  33.    test1();
  34.    UEND();
  35.  
  36.  
  37.    USTART("high2",0.,640.,0.,400.);
  38.    test1();
  39.    UEND();
  40.  
  41.    USTART("high2.backdrop",0.,640.,0.,400.);
  42.    test1();
  43.    UEND();
  44.  
  45.  
  46.    USTART("ham",0.,320.,0.,200.);
  47.    test1();
  48.    UEND();
  49.  
  50.    USTART("ham.backdrop",0.,320.,0.,200.);
  51.    test1();
  52.    UEND();
  53.  
  54.    exit(0);
  55.  
  56. }
  57.  
  58. /*******************************************************/
  59. /*                                                     */
  60. /* TEST1                                               */
  61. /*                                                     */
  62. /*******************************************************/
  63. test1()
  64. {
  65.  
  66. int i;
  67. float x, y;
  68.  
  69.  
  70.   uprint(G,10.,85.,"Move mouse and click left.");
  71.  
  72.   uset(G,"fill");
  73.   umove(G,50.,50.);
  74.   udraw(G,60.,60.);
  75.   udraw(G,60.,50.);
  76.   udraw(G,50.,60.);
  77.   udraw(G,50.,50.);
  78.   uset(G,"nofi");
  79.  
  80.   umove(G,25.,35.);
  81.   udraw(G,50.,55.);
  82.  
  83.   umove (G,-5000.,-5000.);
  84.   udraw (G,5000.,5000.);
  85.  
  86.   uset(G,"nofi");
  87.   ufont(G,"garnet.font",16.0);
  88.   upset(G,"fsty",1.0);
  89.  
  90.   for(i=1;i<2;i++){
  91.     upset(G,"colo",(float)i);
  92.     if(ugrin(G,&x,&y)){UEND();exit(0);};
  93.  
  94.     ufont(G,"topaz.font",11.0);
  95.     upset(G,"fsty",0.0);
  96.     uset(G,"fill");
  97.     umove(G,x-5.0,y-5.0);
  98.     udraw(G,x+5.0,y-5.0);
  99.     udraw(G,x+5.0,y+5.0);
  100.     udraw(G,x-5.0,y+5.0);
  101.     udraw(G,x-5.0,y-5.0);
  102.     uset(G,"nofi");
  103.     uprint(G,x,y+10.0,"Hello1");
  104.  
  105.     if(ugrin(G,&x,&y)){UEND();exit(0);};
  106.     ufont(G,"garnet.font",16.0);
  107.     uset(G,"fill");
  108.     umove(G,x-5.0,y-5.0);
  109.     udraw(G,x-5.0,y+5.0);
  110.     udraw(G,x+5.0,y+5.0);
  111.     udraw(G,x+5.0,y-5.0);
  112.     udraw(G,x-5.0,y-5.0);
  113.     uset(G,"nofi");
  114.     uprint(G,x,y+10.0,"Hello2");
  115.     if(ugrin(G,&x,&y)){UEND();exit(0);};
  116.     uset(G,"fill");
  117.     ucrcle(G,x,y,15.0);
  118.     uset(G,"nofi");
  119.     if(ugrin(G,&x,&y)){UEND();exit(0);};
  120.     upset(G,"colo",(float)(i+1));
  121.     uset(G,"fill");
  122.     uplygn(G,x,y,(float)i,10.0);
  123.     uset(G,"nofi");
  124.   }
  125.   return;
  126. }
  127.  
  128.  
  129.