Changeset 226 for trunk/SRC/ToBeReviewed/POSTSCRIPT/calibre.pro
- Timestamp:
- 03/16/07 10:22:26 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/POSTSCRIPT/calibre.pro
r222 r226 4 4 ;+ 5 5 ; @file_comments 6 ; From a rapport of aspect and values (in line of character) of different margins, 7 ; it calculate POSFENETRE and POSBAR which serve to place the drawing and the color 8 ; bar thanks to !p.position on a leaf or a screen output whose the window has the same 6 ; From a rapport of aspect and values (in line of character) of different margins, 7 ; it calculate POSFENETRE and POSBAR which serve to place the drawing and the color 8 ; bar thanks to !p.position on a leaf or a screen output whose the window has the same 9 9 ; proportion. 10 10 ; 11 ; @categories 11 ; @categories 12 12 ; Graphics 13 13 ; 14 ;15 14 ; @param RAPPORTYX {in}{required} 16 ; Scale rapport between the length of the y axis and the x one. For example, 15 ; Scale rapport between the length of the y axis and the x one. For example, 17 16 ; for an xy map: RAPPORTYX=(lat2-lat1)/(lon2-lon1) 18 17 ; 19 18 ; @param MARGE {in}{required}{type=vector} 20 ; Vector made of 4 elements containing the size of the left, right, up and 19 ; Vector made of 4 elements containing the size of the left, right, up and 21 20 ; bottom margin having to surround the graph. All is measured in lines of characters. 22 21 ; 23 22 ; @param MARGEBAR {in}{required}{type=vector} 24 ; Vector made of 4 elements containing the size of the left, right and bottom 25 ; margin and -BEWARE- the last element is this time the position of the right up 23 ; Vector made of 4 elements containing the size of the left, right and bottom 24 ; margin and -BEWARE- the last element is this time the position of the right up 26 25 ; corner, having to surround the color bar. All is measured in lines of characters. 27 26 ; 28 27 ; @param SMALLDRAW {in}{required}{type=vector} 29 28 ; 2 possibilities: 30 ; It is vector made of 4 elements giving (in portrait or landscape) the position 31 ; of the frame in which the drawing must go in. This position is given by coordinates 32 ; of the 2 corners of the frame: in the left bottom and the right up. It is always 33 ; (for a postscript or a screen output) express in cm, the origin being the 29 ; It is vector made of 4 elements giving (in portrait or landscape) the position 30 ; of the frame in which the drawing must go in. This position is given by coordinates 31 ; of the 2 corners of the frame: in the left bottom and the right up. It is always 32 ; (for a postscript or a screen output) express in cm, the origin being the 34 33 ; left bottom corner. 35 ; It is a vector made of 3 elements giving the number of column to be done in the 36 ; drawing, the number of line and the number of the case the number have to occupy 37 ; (see matlab). For example, to do 6 drawing in 3 columns and 2 lines and occupy 34 ; It is a vector made of 3 elements giving the number of column to be done in the 35 ; drawing, the number of line and the number of the case the number have to occupy 36 ; (see matlab). For example, to do 6 drawing in 3 columns and 2 lines and occupy 38 37 ; the 4th case, small=[2,3,4] 39 38 ; 40 39 ; @keyword REMPLI 41 ; Force the drawing to occupy the biggest possible place defined by 40 ; Force the drawing to occupy the biggest possible place defined by 42 41 ; SMALLDRAW without respect the rapport y on x. 43 42 ; 44 43 ; @keyword YXASPECT 45 ; Force the rapport y on x to take the value RAPPORTYX*YXASPECT. 44 ; Force the rapport y on x to take the value RAPPORTYX*YXASPECT. 46 45 ; This keyword can be used in 2 cases: 47 ; 1) YXASPECT=1 : force RAPPORTYX to be respected otherwise, Calibre take the 48 ; initiative to change it a little in the case of the aspect rapport of SMALL 49 ; is too different of the one of SMALLDRAW. 50 ; 2) YXASPECT=n : multiply by n the aspect rapport given by default. 46 ; 1) YXASPECT=1 : force RAPPORTYX to be respected otherwise, Calibre take the 47 ; initiative to change it a little in the case of the aspect rapport of SMALL 48 ; is too different of the one of SMALLDRAW. 49 ; 2) YXASPECT=n : multiply by n the aspect rapport given by default. 51 50 ; For example in plt, RAPPORTYX is calculated to the reference be orthonormal, 52 51 ; to have a reference where the y axis is 2 time bigger than the x one, YXASPECT=2. 53 52 ; 54 ; @keyword PORTRAIT 53 ; @keyword PORTRAIT 55 54 ; Force the page or the window to be in standing position. 56 ; 57 ; @keyword LANDSCAPE 55 ; 56 ; @keyword LANDSCAPE 58 57 ; Force the page or the window on the screen to be in lengthened position. 59 ; 58 ; 60 59 ; @keyword _EXTRA 61 60 ; Used to pass your keywords 62 61 ; 63 62 ; @param POSFENETRE {type=vector} 64 ; It is a vector made of 4 elements containing the position of the frame 65 ; containing captions + the graph in normalized coordinates. 66 ; Comment: to position the drawing, we have to do !p.position=POSFENETRE 63 ; It is a vector made of 4 elements containing the position of the frame 64 ; containing captions + the graph in normalized coordinates. 65 ; Comment: to position the drawing, we have to do !p.position=POSFENETRE 67 66 ; after the call of calibre. 68 67 ; 69 68 ; @param POSBAR {type=vector} 70 ; See POSFENT RE but for the color bar. Same comment to position the color bar, !p.position=POSBAR69 ; See POSFENTERE but for the color bar. Same comment to position the color bar, !p.position=POSBAR 71 70 ; 72 71 ; @uses … … 103 102 if keyword_set(landscape) then key_portrait=0 104 103 if keyword_set(yxaspect) then begin 105 rapportyx=rapportyx*yxaspect 104 rapportyx=rapportyx*yxaspect 106 105 test2=0 107 106 endif else begin … … 109 108 test2=1 110 109 ENDELSE 111 ; 110 ; 112 111 mipgsz = min(page_size, max = mapgsz) 113 112 ;------------------------------------------------------------ … … 133 132 numlig = numero/nbrecol 134 133 numcol = numero-numlig*nbrecol 135 bas = mipgsz*key_portrait+mapgsz*(1-key_portrait) 136 cote = mapgsz*key_portrait+mipgsz*(1-key_portrait) 134 bas = mipgsz*key_portrait+mapgsz*(1-key_portrait) 135 cote = mapgsz*key_portrait+mipgsz*(1-key_portrait) 137 136 poscol = page_margins[0]+findgen(nbrecol+1)*(1.*(bas-(page_margins[0]+page_margins[1]))/nbrecol) 138 137 poslig = cote-page_margins[3]-findgen(nbrelig+1)*(1.*(cote-(page_margins[2]+page_margins[3]))/nbrelig) … … 166 165 else rapportmax=1.*(small-marge[2]-marge[0])/(big-marge[3]-marge[1]) 167 166 ;------------------------------------------------------------ 168 ; If YXASPECT is not specified, we modify the value of RAPPORTYX 167 ; If YXASPECT is not specified, we modify the value of RAPPORTYX 169 168 ; to it match better with the leaf's proportions. 170 169 ;------------------------------------------------------------ … … 189 188 ; in the case where we do a Landscape: 190 189 ;------------------------------------------------------------ 191 if key_portrait eq 0 then begin 190 if key_portrait eq 0 then begin 192 191 if keyword_set(rempli) then begin 193 192 xs=big … … 220 219 ; In the case where we do a portrait: 221 220 ;------------------------------------------------------------ 222 else begin 221 else begin 223 222 if keyword_set(rempli) then begin 224 223 xs=small … … 258 257 ,-margebar[1]/bas,(-ys+margebar[3])/cote ] 259 258 ;------------------------------------------------------------ 260 if keyword_set(key_performance) THEN print, 'temps calibre', systime(1)-tempsun 259 if keyword_set(key_performance) THEN print, 'temps calibre', systime(1)-tempsun 261 260 262 261 IF NOT keyword_set(key_forgetold) THEN BEGIN 263 262 @updateold 264 ENDIF 265 263 ENDIF 264 266 265 return 267 266 end
Note: See TracChangeset
for help on using the changeset viewer.