Changeset 825

Show
Ignore:
Timestamp:
09/28/07 12:15:14 (11 months ago)
Author:
mankoff
Message:

Save (PNG) implemented

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • misc/clouds/xyztn.pro

    r823 r825  
    722722        RETURN 
    723723     END 
     724     'SAVE': BEGIN 
     725        objImg = sState.oWindow->Read() 
     726        objImg->getProperty, data=img 
     727        FOR d=0,2 DO img[d,*,*] = rotate(reform(img[d,*,*]),7) 
     728        saveFile = DIALOG_PICKFILE( /OVERWRITE_PROMPT, /WRITE ) 
     729        WRITE_PNG, saveFile, img, ORDER=1 
     730        OBJ_DESTROY, objImg 
     731     END 
    724732 
    725733     ELSE: MESSAGE, "UI Event with no handler", /CONT 
     
    804812  ;;  Create the menu bar. It contains the file/quit, edit/ shade-style 
    805813  wFileButton = WIDGET_BUTTON(barBase, VALUE='File', /MENU) 
     814  wSaveButton = WIDGET_BUTTON(wFileButton,VALUE='Save', UVALUE='SAVE') 
    806815  wQuitButton = WIDGET_BUTTON(wFileButton,VALUE='Quit', UVALUE='QUIT') 
    807816 
     
    878887  if( check_struct_qc((Data), meta, 'qc', 'xrange', 'yrange', 'zrange', $ 
    879888                      'nx', 'ny', 'nz', 'nbin','u', 'v', 'w', 'pc', $ 
    880                       'pc_ntot', 'ielem_drops', 'dlogr_drops', 'radius_drops', $ 
     889                      'pc_ntot', 'ielem_drops', 'dlogr_drops', 'radius_drops',$ 
    881890                      'rh','r2_drops', 'r3_drops', 'T', 'dbz') )then begin 
    882       wRow = WIDGET_BASE(wFrameBase,/ROW) 
    883       wPlaneSel = WIDGET_DROPLIST(wRow, VALUE = ['X', 'Y', 'Z'], $ 
    884                                   UVALUE='PLANES', TITLE='Select plane') 
    885       wPlnButton = WIDGET_BUTTON(wRow,VALUE='Explore Plane', UVALUE='PLANE') 
     891     wRow = WIDGET_BASE(wFrameBase,/ROW) 
     892     wPlaneSel = WIDGET_DROPLIST(wRow, VALUE = ['X', 'Y', 'Z'], $ 
     893                                 UVALUE='PLANES', TITLE='Select plane') 
     894     wPlnButton = WIDGET_BUTTON(wRow,VALUE='Explore Plane', UVALUE='PLANE') 
    886895  endif else begin 
    887       wPlaneSel = 0 
     896     wPlaneSel = 0 
    888897  endelse  
    889  
     898   
    890899 
    891900  ;; Transparency min/max (alpha channel) for Images