Main Page | Report Page

 

  Computers Forum Index » Computer Languages (IDL-PVWAVE) » the "real" screen size...

Author Message
wlandsman...
Posted: Sun Oct 24, 2010 10:02 pm
 
I often like to view images as big as possible on my monitor. So
I get the screen size using device,get_screen_size=winsize, and open a
window of this size using WINDOW, XSIZE=, YSIZE=. I then CONGRID()
my (bigger) image down to this size and display it with TV.

After all these years, I now realize that this method results in
significant truncation of the image on my Linux (Redhat) box (and
smaller truncation on my Mac). Device,get_screen_size reports a
screen size of 1600 x 1200 on my LInux box, but when I open a 1200 x
1200 window, I am actually only viewing the first 1115 pixels of the
image in the Y direction, so I am missing more than 7% of the image,
presumably due to pixels taken up by the window and taskbar margins

There was a thread a while back ( http://tinyurl.com/2bssnfe ) on
using the exclude_Taskbar keyword in the IDLsysMonitorInfo object to
get the "free" screen size. But this method seem more relevant to
determining the available size for a widget GUI, and in any case, the
exclude_Taskbar keyword is only available for Windows OS.

I can always introduce a fudge factor (i.e. subtract 85 pixels from
the reported screen size) but does anyone know any IDL or X-window
settings that might help?

Thanks, --Wayne
 
David Fanning...
Posted: Mon Oct 25, 2010 4:16 am
 
Wayne Landsman writes:

Quote:
I can always introduce a fudge factor (i.e. subtract 85 pixels from
the reported screen size) but does anyone know any IDL or X-window
settings that might help?

I run into this problem over and over again. Fudge
factors are the only thing I've ever known to help.
In fact, I'm not sure you don't need different fudge
factors for different flavors of UNIX. :-(

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.")
 
David Fanning...
Posted: Mon Oct 25, 2010 8:15 pm
 
David Fanning writes:

Quote:
Why can't you use a pixmap?

Oh, never mind. I see. Darn, I hate flashing
windows about as much as I hate anything. :-(

Nothing speaks "non-commercial" more than these
kinds of solutions.

Are the LINUX and Mac numbers all over the board,
or could you do a reasonable "guess" and just
incorporate those into our ever-present fudge
factors?

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.")
 
mgalloy...
Posted: Mon Oct 25, 2010 9:32 pm
 
On 10/25/10 10:15 AM, David Fanning wrote:
Quote:
David Fanning writes:

Why can't you use a pixmap?

Oh, never mind. I see. Darn, I hate flashing
windows about as much as I hate anything. :-(

Nothing speaks "non-commercial" more than these
kinds of solutions.

Are the LINUX and Mac numbers all over the board,
or could you do a reasonable "guess" and just
incorporate those into our ever-present fudge
factors?

The EXCLUDE_TASKBAR is ignored on Macs, BUT it always returns the size
*without* the menu bar (basically its the equivalent of
EXCLUDE_TASKBAR=1 always):

For my work monitor (Mac OS X, 1680 x 1050), I get:

IDL> print, getPrimaryScreenSize()
1680 1028
IDL> print, getPrimaryScreenSize(/exclude)
1680 1028

This seems consistent from my home laptop: the menu bar is 22 pixels tall.

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
 
David Fanning...
Posted: Tue Oct 26, 2010 4:49 am
 
Ben Tupper writes:

Quote:
IDL> help, !version,/str
** Structure !VERSION, 8 tags, length=104, data length=100:
ARCH STRING 'x86_64'
OS STRING 'darwin'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'Mac OS X'
RELEASE STRING '7.1'
BUILD_DATE STRING 'Apr 21 2009'
MEMORY_BITS INT 64
FILE_OFFSET_BITS
INT 64

Thanks, Ben. :-)

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.")
 
David Fanning...
Posted: Wed Oct 27, 2010 12:03 am
 
Mike Galloy writes:

Quote:
If you want to create a maximally sized graphics window so that the
above example code works, then on Mac I think it has to use the UNIX
solution.

Well, this is *extremely* confusing, which is why I'm trying
to write it down. So, what do you think the Mac is reporting,
then, when you do Get_Screen_Size()? You think this is the
window *without* a title bar, but not taking into account the
task bar, is that right?

I'm I correct that:

Device, Get_Screen_Size=theSize

On a Mac, actually gives the screen or monitor size?

Quote:
Does this work on Windows? IDLsysMonitor::getRectangles with
EXCLUDE_TASKBAR excludes the windows menubar too?

It would appear so, yes.

Thanks for your help with this. Not having a Mac, and
not knowing all these machine-specific nuances, is what
makes writing machine independent code so very, very
difficult!

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.")
 
mgalloy...
Posted: Wed Oct 27, 2010 12:39 am
 
On 10/26/10 2:03 PM, David Fanning wrote:
Quote:
Mike Galloy writes:

If you want to create a maximally sized graphics window so that the
above example code works, then on Mac I think it has to use the UNIX
solution.

Well, this is *extremely* confusing, which is why I'm trying
to write it down. So, what do you think the Mac is reporting,
then, when you do Get_Screen_Size()? You think this is the
window *without* a title bar, but not taking into account the
task bar, is that right?

It's the window without the menubar (the top one that is always there on
Mac OS X, sort of like the Windows taskbar that is always at the
bottom), but not accounting for the menubar on individual X windows.
It's just the "usable space" for the monitor. If you could create a
graphics window without a menubar, you could use all that space.

My screen resolution is 1680 x 1050:

IDL> print, get_screen_size()
1680 1028

Quote:
I'm I correct that:

Device, Get_Screen_Size=theSize

On a Mac, actually gives the screen or monitor size?

This, as well as using IDLsysMonitorInfo::getRectangles(), returns the
same thing:

IDL> Device, Get_Screen_Size=theSize
IDL> print, thesize
1680 1028

Quote:
Does this work on Windows? IDLsysMonitor::getRectangles with
EXCLUDE_TASKBAR excludes the windows menubar too?

It would appear so, yes.

Thanks for your help with this. Not having a Mac, and
not knowing all these machine-specific nuances, is what
makes writing machine independent code so very, very
difficult!

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
 
David Fanning...
Posted: Wed Oct 27, 2010 12:41 am
 
Mike Galloy writes:

Quote:
My screen resolution is 1680 x 1050:

IDL> print, get_screen_size()
1680 1028

I'm I correct that:

Device, Get_Screen_Size=theSize

On a Mac, actually gives the screen or monitor size?

This, as well as using IDLsysMonitorInfo::getRectangles(), returns the
same thing:

IDL> Device, Get_Screen_Size=theSize
IDL> print, thesize
1680 1028

OK, thanks. Back to the drawing board. :-)

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.")
 
 
Page 1 of 1    
All times are GMT
The time now is Fri Apr 18, 2014 11:43 pm