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

Home » Public Forums » archive » Re: the "real" screen size
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: the "real" screen size [message #73022 is a reply to message #73021] Mon, 25 October 2010 07:17 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
alx writes:

> On Linux, after the window creation, do you see only a black screen ?
> If not, as it is the case on my Windows box (I can see window frames,
> system taskbar, etc...), !D.X_SIZE and !D.Y_SIZE does not give you the
> drawing size for your image.
> alx.

I think everyone is getting a bit confused here. Let me
see if I can summarize. The problem we are trying to
solve is that we want to create a window on the display
that is as big as possible, without being obscured by
window decorations, borders, etc. The question we are
trying to ask is "How can we find the size of that
window in a machine-independent way?"

One would think that the Get_Screen_Size keyword
to the Device command would work:

IDL> Device, Get_Screen_Size=theSize
IDL> Print, thesize
1280 1024

The problem is, if you make a window of this size, it
is "too big" for the window. It is obscured.

Carsten's solution for LINUX is to make a window this
size anyway (probably as a pixmap, I would assume) and
then examine the variables !D.X_Size and !D.Y_Size. These
will contain the sizes you are looking for.

UNIX:
IDL> Window, XSIZE=theSize[0], YSIZE=theSize[1]
IDL> Print, !D.X_Size, !D.Y_Size
1278 944

Alas, this doesn't work for Windows computers:

WINDOWS:
IDL> Window, XSIZE=theSize[0], YSIZE=theSize[1]
IDL> Print, !D.X_Size, !D.Y_Size
1280 1024

So, we are still looking for a machine-independent solution.
At the moment, however, we only have to calculate fudge
factors for Windows machines, which is an improvement.
These fundge factor only depend on which version of Windows
you are using, how you have configured your machine, and
other factors too numerous to mention. :-)

Cheers,

David






--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Procedures with variable/dynamic argument list??
Next Topic: Re: Fragile IDL 8 Object Programs

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

Current Time: Fri Oct 10 15:18:07 PDT 2025

Total time taken to generate the page: 0.95907 seconds