function graphics max window size [message #93977] |
Mon, 12 December 2016 04:17 |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
Hi,
Just so that others don't lose time (30 min?) like I did.
I was trying to make a window slightly bigger than my screen and this didn't work out. Here is a short example to demonstrate what I mean:
ww768 = window(dimensions=[512,768], /no_toolbar)
ww1024 = window(dimensions=[512,1024], /no_toolbar)
ww1280 = window(dimensions=[512,1280], /no_toolbar)
print, 'window y dimension (expected: 768) = ', strtrim(ww768.DIMENSIONS[1],2)
print, 'window y dimension (expected: 1024) = ', strtrim(ww1024.DIMENSIONS[1],2)
print, 'window y dimension (expected: 1280) = ', strtrim(ww1280.DIMENSIONS[1],2)
oMonitorInfo = Obj_New('IDLsysMonitorInfo')
rects = oMonitorInfo->GetRectangles()
pmi = oMonitorInfo->GetPrimaryMonitorIndex()
obj_destroy, oMonitorInfo
print, 'screen size ', rects[[2, 3], pmi]
And I get:
window y dimension (expected: 768) = 768.000
window y dimension (expected: 1024) = 1024.00
window y dimension (expected: 1280) = 1045.00
screen size 1920 1080
So apparently I can't initialize bigger windows. I had to scratch my head for a while going through the function graphics documentation, until I found this mentioned under the IDLgrWindow properties:
http://www.harrisgeospatial.com/docs/idlgrwindow.html#object s_gr_2157407275_1018355
Cite:
Note on Window Size Limits
The OpenGL libraries IDL uses impose limits on the maximum size of a drawable area. The limits are device-dependent — they depend both on your graphics hardware and the setting of the RENDERER property. Currently, the smallest maximum drawable area on any IDL platform is 1280 x 1024 pixels; the limit on your system may be larger.
Of course using the buffer keyword solves the problem, but I would like to see the window :-)
Cheers,
Helder
|
|
|