Changeset 479 for trunk/SRC/ToBeReviewed/PLOTS
- Timestamp:
- 08/17/12 12:18:32 (12 years ago)
- Location:
- trunk/SRC/ToBeReviewed/PLOTS
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltv.pro
r378 r479 177 177 xsize = !p.position[2] - !p.position[0] 178 178 ysize = !p.position[3] - !p.position[1] 179 IF !d.name EQ 'X' THEN BEGIN179 IF !d.name EQ 'X' OR !d.name EQ 'Z' THEN BEGIN 180 180 xsize = ceil(xsize * !d.x_size) 181 181 ysize = ceil(ysize * !d.y_size) -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro
r371 r479 203 203 window, window, xsize = nx+marginpix[0]+marginpix[1] $ 204 204 , ysize = ny+marginpix[2]+marginpix[3] 205 ; for 24 bits colors, make sure that the background color is the good one...206 if !d.n_colors gt 256 then BEGIN207 device, decomposed = 1208 !p.background = 'ffffff'x209 plot, [0], [0], xstyle = 5, ystyle = 5210 device, decomposed = 0211 endif212 205 tv, arr, marginpix[0], marginpix[2], _EXTRA = ex 213 206 ; … … 245 238 ; scrolling bar window case... 246 239 ;------------------------------------------------------------ 247 ; for 24 bits colors, make sure that the background color is the good one...248 if !d.n_colors gt 256 then begin249 window, /pixmap250 device, decomposed = 1251 !p.background = 'ffffff'x252 plot, [0], [0]253 device, decomposed = 0254 endif255 240 slide_image, arr $ ; We draw it in a window with a scrolling bar 256 241 , xsize = nx, ysize = ny $ -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/givewindowsize.pro
r325 r479 6 6 ; 7 7 ; @returns 8 ; 9 ; @keyword dpi {in}{optional}{type=scalar}{default=72} 10 ; used only in z buffer. specify the number of dots per inch. 11 ; used to define the size of the virtual window activated in the Z buffer. 12 ; 13 ; @keyword _EXTRA 14 ; Used to pass keywords 8 15 ; 9 16 ; @uses … … 20 27 ; @todo seb 21 28 ;- 22 FUNCTION givewindowsize 29 FUNCTION givewindowsize, dpi = dpi, _extra = ex 23 30 ; 24 31 compile_opt idl2, strictarrsubs … … 30 37 ;------------------------------------------------------------ 31 38 ; 32 dimensions = get_screen_size(RESOLUTION=resolution) 33 coef = floor(1./resolution[0]) 39 IF !d.name EQ 'Z' THEN BEGIN 40 IF NOT keyword_set(dpi) THEN dpi = 72 41 coef = dpi/2.54 ; 1 inch = 2.54 cm 42 ENDIF ELSE BEGIN 43 dimensions = get_screen_size(RESOLUTION = resolution) 44 coef = floor(1./resolution[0]) 45 ENDELSE 34 46 if NOT keyword_set(windowsize_scale) then BEGIN 35 47 windowsize_scale = 1. -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placedessin.pro
r378 r479 240 240 keyword_set(post) AND !d.name ne 'PS':openps, _extra = ex 241 241 ; case of the first drawing on a screen 242 keyword_set(post) EQ 0 AND keyword_set(noerase) EQ 0 $ 243 AND !d.name ne 'PS' AND !d.name ne 'Z':BEGIN 244 if not keyword_set(window) then window = 0 242 keyword_set(post) EQ 0 AND keyword_set(noerase) EQ 0 AND !d.name ne 'PS':BEGIN 245 243 ; For the using of \@ps,\@oups and \@vzoom 246 244 if lmgr(/demo) EQ 0 then BEGIN ; Are we in the demo mode?? … … 253 251 journal, listecommande ; We write it in the journal 254 252 ENDIF 255 windsize = givewindowsize() 256 window, window, xsize = windsize[0], ysize = windsize[1], retain = 2, _extra = ex 257 ; When we used colors which are coded on 24bit, we can not stipulate the background color 258 ; of a window thanks to !p.background, so we have to to this: 259 ; if !d.n_colors gt 256 then begin 260 ; device, decomposed=1 261 ; !p.background='ffffff'x 262 ; plot,[0],[0], /nodata, xstyle = 4, ystyle = 4 263 ; device, decomposed=0 264 ; endif 253 windsize = givewindowsize(_extra = ex) 254 IF !d.name EQ 'Z' THEN BEGIN 255 device, set_resolution = windsize 256 erase 257 ENDIF ELSE BEGIN 258 if not keyword_set(window) then winnumb = 0 259 window, winnumb, xsize = windsize[0], ysize = windsize[1], retain = 2, _extra = ex 260 ENDELSE 265 261 END 266 262 ELSE: -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/label.pro
r369 r479 51 51 ; 52 52 @common 53 if !d.name EQ 'PS' OR !d.name EQ 'Z' then BEGIN 54 old_dname = !d.name 55 thisOS = !VERSION.OS_FAMILY 56 thisOS = STRMID(thisOS, 0, 3) 57 thisOS = STRUPCASE(thisOS) 58 CASE thisOS of 59 'MAC': SET_PLOT, thisOS 60 'WIN': SET_PLOT, thisOS 61 ELSE: SET_PLOT, 'X' 62 ENDCASE 63 !p.BACKGROUND=(!d.n_colors-1) < 255 64 !p.color=0 65 if !d.n_colors gt 256 then !p.background='ffffff'x 66 ncoul = !D.n_Colors < 256 67 set_plot,old_dname 68 ENDIF ELSE ncoul = !D.n_Colors < 256 53 ; 54 ncoul = !D.n_Colors < 256 69 55 case cas of 70 56 0: begin
Note: See TracChangeset
for help on using the changeset viewer.