Ignore:
Timestamp:
08/17/12 12:18:32 (12 years ago)
Author:
smasson
Message:

full integration of the batch mode with Z buffer

Location:
trunk/SRC/ToBeReviewed/PLOTS
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltv.pro

    r378 r479  
    177177   xsize = !p.position[2] - !p.position[0] 
    178178   ysize = !p.position[3] - !p.position[1] 
    179    IF !d.name EQ 'X' THEN BEGIN 
     179   IF !d.name EQ 'X' OR !d.name EQ 'Z' THEN BEGIN 
    180180     xsize = ceil(xsize * !d.x_size) 
    181181     ysize = ceil(ysize * !d.y_size) 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro

    r371 r479  
    203203    window, window, xsize = nx+marginpix[0]+marginpix[1] $ 
    204204            , 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 BEGIN 
    207       device, decomposed = 1 
    208       !p.background = 'ffffff'x 
    209       plot, [0], [0], xstyle = 5, ystyle = 5 
    210       device, decomposed = 0 
    211     endif 
    212205    tv, arr, marginpix[0], marginpix[2], _EXTRA = ex 
    213206; 
     
    245238; scrolling bar window case... 
    246239;------------------------------------------------------------ 
    247 ; for 24 bits colors, make sure that the background color is the good one... 
    248     if !d.n_colors gt 256 then begin 
    249       window, /pixmap 
    250       device, decomposed = 1 
    251       !p.background = 'ffffff'x 
    252       plot, [0], [0] 
    253       device, decomposed = 0 
    254     endif 
    255240    slide_image, arr $          ; We draw it in a window with a scrolling bar 
    256241                 , xsize = nx, ysize = ny $ 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/givewindowsize.pro

    r325 r479  
    66; 
    77; @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 
    815; 
    916; @uses 
     
    2027; @todo seb 
    2128;- 
    22 FUNCTION givewindowsize 
     29FUNCTION givewindowsize, dpi = dpi, _extra = ex 
    2330; 
    2431  compile_opt idl2, strictarrsubs 
     
    3037;------------------------------------------------------------ 
    3138; 
    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 
    3446   if NOT keyword_set(windowsize_scale) then BEGIN 
    3547     windowsize_scale = 1. 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placedessin.pro

    r378 r479  
    240240    keyword_set(post) AND !d.name ne 'PS':openps, _extra = ex 
    241241; 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 
    245243; For the using of \@ps,\@oups and \@vzoom 
    246244      if lmgr(/demo) EQ 0 then BEGIN ; Are we in the demo mode?? 
     
    253251        journal, listecommande ; We write it in the journal 
    254252      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 
    265261    END 
    266262    ELSE: 
  • trunk/SRC/ToBeReviewed/PLOTS/LABEL/label.pro

    r369 r479  
    5151; 
    5252@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 
    6955   case cas of 
    7056      0: begin 
Note: See TracChangeset for help on using the changeset viewer.