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

Home » Public Forums » archive » Re: Getting info on the whole screen in IDL
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: Getting info on the whole screen in IDL [message #3582 is a reply to message #3573] Sun, 19 February 1995 18:15 Go to previous messageGo to previous message
landsman is currently offline  landsman
Messages: 93
Registered: August 1991
Member
In article <17FEB199512365904@sorbet.gsfc.nasa.gov>,
landsman@sorbet.gsfc.nasa.gov (Wayne Landsman (301)-286-3625) writes...
> The GET_SCREEN_SIZE keyword to the DEVICE command under X windows will give
> you the size of the entire screen in pixels. I think you still have to link
> to the C program to get the size in mm.
>

David Fanning of RSI pointed out that the !D.X_PX_CM and !D.Y_PX_CM system
variables can be used to convert the screen size to mm. Below I give
a simple program XPIXELS to return the screen size.

I note that the !D system variable contains information applicable
to all graphics devices, while the total screen size is a concept that only
makes sense for devices that support windows. I suppose this is why the
screen size information is not in the !D system variable, but must be
accessed through the DEVICE command.

--Wayne Landsman landsman@stars.gsfc.nasa.gov

pro xpixels,xpix,ypix,xmm,ymm

;Return the screen size in pixels (xpix,ypix) and mm (xmm,ymm)
;Works on devices that support windows ('X','WIN','MacOS')

device,get_screen_size = scrsz
xpix = scrsz(0) & ypix = scrsz(1)
xmm = 10.*xpix/!D.X_PX_CM
ymm = 10.*ypix/!D.Y_PX_CM

return
end
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL Windows,Buttons etc on Mac
Next Topic: Re: STRTRIM needs improvement

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

Current Time: Sun Oct 12 07:33:12 PDT 2025

Total time taken to generate the page: 1.06046 seconds