comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: convert_coord problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: convert_coord problem [message #20867] Thu, 27 July 2000 00:00 Go to previous message
Bernard Puc is currently offline  Bernard Puc
Messages: 65
Registered: January 1998
Member
I suspect that your problem lies with the fact that you have several
graphics windows. The convert_coord function uses the current output
device parameters to do the conversion to/from device or data
coordinates. The straightforward solution is to store the following
system variables !P, !X, !Y, !Z after you have generated your graphics
plot from which you are getting the mouse position. Then, copy the
stored variables back to the system variables whenever you need to
convert the mouse pointer again.

This may not be especially clear explanation - perhaps one of the more
eloquent readers of the group can clarify, if needed.

Klaus Scipal wrote:
>
> Hi
>
> I have a widget with several graphic windows. On of it returns the
> co-ordinates of the mouse button if pressed. These co-ordinates are then
> converted from device to data (longitude, latitude) using the convert_coord
> routine, and some data is plotted in the other windows. Now comes my
> problem: the convert_coord routine gives the correct co-ordinates only in
> its first call. when I try to convert another pair of co-ordinates the
> result is flawed. What can be wrong???
>
> Klaus
>
> p.s.: I use IDL 5.2 under Windows NT

--
-Bernard Puc
AETC,INC. (http://www.aetc.com)
1225 Jefferson Davis Hwy, Suite 800
Arlington, VA 22202
(703) 413-0500
[Message index]
 
Read Message
Read Message
Previous Topic: cursor return in graphics window
Next Topic: convert_coord problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:10:29 PDT 2025

Total time taken to generate the page: 0.00491 seconds