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

Last change on this file since 231 was 231, checked in by pinsard, 17 years ago

improvements/corrections of some *.pro headers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 838 bytes
Line 
1;+
2; @file_comments
3;
4; @categories
5;
6; @returns
7;
8; @uses
9;
10; @restrictions
11;
12; @examples
13;
14; @history
15;
16; @version
17; $Id$
18;
19; @todo seb
20;-
21;
22FUNCTION givewindowsize
23;
24  compile_opt idl2, strictarrsubs
25;
26@cm_4ps
27IF NOT keyword_set(key_forgetold) THEN BEGIN
28@updatenew
29ENDIF
30;------------------------------------------------------------
31;
32   dimensions = get_screen_size(RESOLUTION=resolution)
33   coef = floor(1./resolution[0])
34   if NOT keyword_set(windowsize_scale) then BEGIN
35     windowsize_scale = 1.
36     IF NOT keyword_set(key_forgetold) THEN BEGIN
37     @updateold
38     ENDIF
39   ENDIF
40   coef = windowsize_scale * coef
41;
42    mipgsz = min(page_size, max = mapgsz)
43;
44    xsize = coef * (mipgsz*key_portrait + mapgsz*(1-key_portrait))
45    ysize = coef * (mipgsz*(1-key_portrait) + mapgsz*key_portrait)
46;
47   return, [xsize, ysize]
48end
Note: See TracBrowser for help on using the repository browser.