home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d571 / gwin.lha / Gwin / Examples / clipdemo.c < prev    next >
C/C++ Source or Header  |  1991-12-22  |  626b  |  31 lines

  1. #include "gwin.user.h"
  2. main()
  3. {
  4. float x, y;
  5. int event;
  6. char key;
  7.  
  8.    USTART("high2",30.,600.,100.,300.);
  9.    upset(G,"colo",1.0);
  10.    uprint(G,5.,80.,"Place cursor in yellow area");
  11.    uprint(G,5.,75.,"and press left mouse button.");
  12.    udarea(G,50.,80.,50.,100.);
  13.    uwindo(G,0.,50.,0.,50.);
  14.    upset(G,"colo",5.0);
  15.    uset(G,"fill");
  16.    uoutln(G);
  17.    uset(G,"nofi");
  18.    upset(G,"colo",4.0);
  19.    while (1){
  20.       if(ugrin(G,&x,&y)) {UEND();exit(0);};
  21.       umove(G,x-5.0,y);
  22.       udraw(G,x+5.0,y);
  23.       umove(G,x,y-5.0);
  24.       udraw(G,x,y+5.0);
  25.       uset(G,"fill");
  26.       uplygn(G,x,y,4.0,4.0);
  27.       uset(G,"nofi");
  28.    }
  29. }
  30.  
  31.