source: trunk/SRC/ToBeReviewed/PLOTS/DIVERS/givewindowsize.pro @ 114

Last change on this file since 114 was 114, checked in by smasson, 18 years ago

new compilation options (compile_opt idl2, strictarrsubs) in each routine

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 779 bytes
Line 
1FUNCTION givewindowsize
2;
3;------------------------------------------------------------
4; include commons
5;
6  compile_opt idl2, strictarrsubs
7;
8@cm_4ps
9IF NOT keyword_set(key_forgetold) THEN BEGIN
10@updatenew
11ENDIF
12;------------------------------------------------------------
13;
14   dimensions = get_screen_size(RESOLUTION=resolution)
15   coef = floor(1./resolution[0])
16   if NOT keyword_set(windowsize_scale) then BEGIN
17     windowsize_scale = 1.
18     IF NOT keyword_set(key_forgetold) THEN BEGIN
19     @updateold
20     ENDIF
21   ENDIF
22   coef = windowsize_scale * coef
23;
24    mipgsz = min(page_size, max = mapgsz)
25;
26    xsize = coef * (mipgsz*key_portrait + mapgsz*(1-key_portrait))
27    ysize = coef * (mipgsz*(1-key_portrait) + mapgsz*key_portrait)
28;
29   return, [xsize, ysize]
30end
Note: See TracBrowser for help on using the repository browser.