Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do you get the coordinates of a point when you click on it?

1 view
Skip to first unread message

Vito Minerva

unread,
Feb 2, 2001, 7:01:11 AM2/2/01
to
Hi.
Here's my problem:
I'd like to get the coordinates values when I click on any point in a
figure. For instance, if I have a 100x100 figure and I click on the (42,35)
point, how do I get the coordinates of that point, that is 42 and 35? Is
there a command like "getmousepoint" or something like that?
Thank you in advance,

Vito


R Prevo

unread,
Feb 2, 2001, 8:00:31 AM2/2/01
to

ginput

--


René

Lars Gregersen

unread,
Feb 2, 2001, 8:05:35 AM2/2/01
to
On Fri, 2 Feb 2001 13:01:11 +0100, "Vito Minerva" <min...@cefriel.it>
wrote:

You need to do two things:
1) set up a callback such that something happens when you use the
mouse to click
2) get the coordinates

You'll find an example in a post I've made earlier today titled:
"mouse input for circle"

Lars

M.Sc. Chem. Engng. Lars Gregersen
Dep. Chem. Engineering, DTU, Denmark
l...@kt.dtu.dk
http://gregersen.webjump.com

0 new messages