Thread View: gnu.epoch.misc
3 messages
3 total messages
Started by Eric Eide
Fri, 24 Jul 1992 17:10
Pixel Coords --> Character Coords
Author: Eric Eide
Date: Fri, 24 Jul 1992 17:10
Date: Fri, 24 Jul 1992 17:10
20 lines
1363 bytes
1363 bytes
Please forgive me a FAQ, but I couldn't find an answer in the online Epoch documentation. I have a mouse handling package that worked well under Epoch 3.2, but now it fails under Epoch 4.0. My problem is that button (and motion) events are now described with pixel coordinates rather than character coordinates. What I need is a function to convert screen pixel coordinates into screen character coordinates. Where can I find such a thing, or how can I write one well? (Alternately, I could use a function that converts a point-and-window value into screen-relative character coordinates. Epoch 4.0 provides a function to turn pixel coordinates into a point and buffer and window. But I want character coordinates!) Thanks for any help. -- ------------------------------------------------------------------------------- Eric Eide | University of Utah Department of Computer Science eeide@cs.utah.edu | Buddhist to hot dog vendor: "Make me one with everything."
Pixel Coords --> Character Coords
Author: Marc Andreessen
Date: Sun, 26 Jul 1992 03:59
Date: Sun, 26 Jul 1992 03:59
7 lines
542 bytes
542 bytes
How about: coords-to-point: Convert X Y SCREEN in pixel coordinates to a list of (POINT BUFFER WINDOW SCREEN). Marc
Re: Pixel Coords --> Character Coords
Author: Eric Eide
Date: Sun, 26 Jul 1992 14:58
Date: Sun, 26 Jul 1992 14:58
23 lines
1773 bytes
1773 bytes
In article <9207260359.AA02599@void.ncsa.uiuc.edu> Marc Andreessen writes: Marc> How about: coords-to-point: Marc> Convert X Y SCREEN in pixel coordinates to a list of Marc> (POINT BUFFER WINDOW SCREEN). I found this function, but what I want is a function that turns pixel coordinates into character coordinates, not into a buffer point value. In other words, I want a function that turns pixel coordinates into (window line, column position on that line), as Epoch 3.2 reports. If I must, I can get by with coords-to-point (I think), but it means rewriting a fair bit of my mouse-handling package. Bummer. As an aside, of what use are pixel coordinates anyway, other than that the function coords-to-point requires pixel coordinates? I suppose that it's easier for Epoch 4.0 to report pixel coordinates instead of character coordinates, but is there anything that can be done with pixel coordinates other than turning them into a (point buffer window screen) tuple? -- ------------------------------------------------------------------------------- Eric Eide | University of Utah Department of Computer Science eeide@cs.utah.edu | Buddhist to hot dog vendor: "Make me one with everything."
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads