// Copyright (c) 1995, Masanao Izumo gselect_input(ButtonPressMask | ButtonReleaseMask | KeyPressMask); gopen(); while(1) { while(gpause() != ButtonPress) ; if(GEVENT_VALUE == 3) break; x0 = GPOINTERX; y0 = GPOINTERY; px = py = 0; while(gpause(0.1) != ButtonRelease) { z = gpointer(); x = real(z); y = image(z); if(px != x || py != y) { px = x; py = y; gclear(); gline(x0, y0, x, y); } } }