Mouse location input.
John Buchanan
juancho at dgp.toronto.edu
Fri Apr 14 22:29:13 AEST 1989
a window rather than in absolute screen coordinates? The code that I have
now looks like this.
switch(qread(&val))
{
case REDRAW: /* Reset window offsets */
getorigin(&xorg,&yorg);
break;
case LEFTMOUSE: /* Get the mouse in window */
X = getvaluator(MOUSEX) - xorg;
Y = getvaluator(MOUSEY) - yorg;
break;
}
I cannot even imagine the thinking which led to the line drawing occuring
in window coordinates but the mouse tracking only in screen coordinates.
John W. Buchanan Dynamic Graphics Project
Computer Systems Research Institute
University of Toronto
(416) 978-6619 Toronto, Ontario M5S 1A4
BITNET: juancho at explorer.dgp.utoronto
EAN: juancho at explorer.dgp.toronto.cdn
UUCP: ...!explorer.dgp.toronto.edu!juancho
More information about the Comp.sys.sgi
mailing list