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

Home » Public Forums » archive » Resizeable Graphics window
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: Resizeable Graphics window [message #75197 is a reply to message #75117] Thu, 17 February 2011 13:13 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wlandsman writes:

> Another resizeable window question:
>
> Do device coordinates make any sense in a resizeable window (when the size of your "device" is always changing)?
>
> Below I give a test program that displays error bars, but first converts the data to device units. It works fine in a normal window, but if I create a resizeable window (i.e. test,/window) the lines are plotted incorrectly.
>
> In this case, the use of device coordinates is perverse, but they are sometimes useful for "ornamental" figures. For example, setting the size of an arrow or the "hat" on an error bar to one-fiftieth of the screen size.

The problem here is that cgWindow is "hiding" itself
from the rest of IDL. That is to say, you are going
to have to go to some trouble to write into a cgWindow
graphics window accidentally. This is probably why
you can't calculate the device coordinates correctly.
The "current" graphics window is not the cgWindow
graphics window when you are doing the calculations.
(Although it probably looks like it might be.)

To do the calculations properly, you are going to have
to make the cgWindow graphics window the "current"
graphics window, do the calculations based on that
window, add your commands, etc.

cgWindow
WSet, cgQuery(/Current)
deviceCoords = Convert_Coord(dataCoords, /To_Device)
etc.

Maybe cgWindow needs a CoordConvert method. Let me give
this some thought. This would make it possible to know
where you are in the window, so we could report it. But,
again, we are going in the direction of Coyote Graphics 2.0.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Yesterday's Coyote Graphics Update
Next Topic: Re: working on multiple z buffers at once?

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

Current Time: Mon Oct 20 16:38:17 PDT 2025

Total time taken to generate the page: 2.32068 seconds