| Re: 1)analog #define in IDL? 2) get position of a window? [message #4114 is a reply to message #4059] |
Wed, 03 May 1995 00:00   |
rep2857
Messages: 28 Registered: December 1994
|
Junior Member |
|
|
Cc'd to feigin@saturn.gas.unsw.EDU.AU
In article <3nnhvl$p8c@mirv.unsw.edu.au>,
Michael Feigin,ARC Research Fellow,AS,951231 <feigin@saturn.gas.unsw.EDU.AU> wrote:
>
> 2. According to IDL Reference Guide p.3-14 keyword GET_WINDOW_POSITION (to DEVICE proc)
> returns (X,Y) position of the current window on the screen. What does it
> mean 'current' window? Is this a window that has been constructed the last?
> Or is it an active window? To put in other way, I'd like to know a position
> of a c o n c r e t e window on the screen. How can I get it?
> Is it possible to use ID of this window in any way?
>
That would be the position of !D.Window. !D.Window can be set using the
WSet, window_id command.
IDL> window, 0 & window, 1 ; open two windows
IDL> print, !D.Window ; See which window is current
1
IDL> WSet, 0 ; set the current window to 0
IDL> print, !D.Window ; verify the current window has been reset
0
Will this next command give you an idea of how you can use it? I'm not
sure what you're trying to do, but can probably help out if given a
couple of specifics. Some ideas: destroy it and recreate it with a
different size; read the data from this window and write it to a file;
copy data from this window to another window ...
IDL> help, !D, /Struct
** Structure !DEVICE, 17 tags, length=80:
NAME STRING 'X'
X_SIZE LONG 640
Y_SIZE LONG 512
X_VSIZE LONG 640
Y_VSIZE LONG 512
X_CH_SIZE LONG 6
Y_CH_SIZE LONG 10
X_PX_CM FLOAT 40.0000
Y_PX_CM FLOAT 40.0000
N_COLORS LONG 242
TABLE_SIZE LONG 242
FILL_DIST LONG 1
WINDOW LONG 0
UNIT LONG 0
FLAGS LONG 65980
ORIGIN LONG Array(2)
ZOOM LONG Array(2)
Mike Schienle Hughes Santa Barbara Research Center
Home: mgs@visdata.com Coromar Drive, M/S B28/87
Work: rep2857@sbsun0010.sbrc.hac.com Goleta, CA 93117
Contract Employee. Will visualize data for large amounts of money.
|
|
|
|