#include "gwin.user.h" main() { float x,y,xold,yold,event; float c = 1.0; char key = '\0'; ustart("high2",0.,640.,0.,400.); upset("colo",1.0); uprint(10.,90.,"Press left mouse button, hold, drag, release"); uset("comp"); uset("ncli"); uset("fill"); while (1==1){ while(key != 'a'){ ugrinc(&x,&y,&event,&key); } xold = x; yold = y; urect(xold,yold,xold+5.0,yold+5.0); while(key != 'A'){ ugrinl(&x,&y,&event,&key); urect(xold,yold,xold+5.0,yold+5.0); urect(x,y,x+5.0,y+5.0); xold = x; yold = y; } uset("ncom"); urect(xold,yold,xold+5.0,yold+5.0); uset("comp"); c += 1.0; if(c > 14.0) c = 1.0; upset("colo",c); } uend(); }