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

Home » Public Forums » archive » Object-Graphics: How to compute screen XY from model XY
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Object-Graphics: How to compute screen XY from model XY [message #75809] Sun, 01 May 2011 10:01
M. Katz is currently offline  M. Katz
Messages: 69
Registered: May 2005
Member
In an object-graphic draw window, I'm trying to figure out the on-
screen pixel location of a given coordinate in the (rotated, scaled,
and translated) model.

Working with IDLgrWindow, it's easy to do the reverse. That is, when
you know a cursor position, [event.x, event.y], you can calculate the
position within the graphics model using
result = oWindow -> PickData(oView, oModel, [event.x,event.y], XYZ)
After this command, it's contained in XYZ.

But what about the other way? Say we have an XYZ value and we want to
calculate the effective cursor position, cursor_xy, or screen
coordinate. This would be the equivalent of an [event.x, event.y].

It seems that there should be a function for this. I'm pretty sure I
can deduce the position from a few sampled points and some vector
math, but should I have to?

Thanks,
M.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Just a question about licence
Next Topic: Re: Object-Graphics: How to compute screen XY from model XY

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

Current Time: Wed Oct 08 15:12:32 PDT 2025

Total time taken to generate the page: 0.00528 seconds