pro wrcgm,type,surf=srf @pltdat.h ; ; Remake a frame to cgm device ; (device file has been opened in cgm_event) ; if (imcon eq 0 or imcon eq 2) and type ne "vert" then begin print,'Cannot write color image to cgm (this frame NOT written to',$ ' cgm plot file)' return endif if n_elements(srf) le 0 then srf = 0 save_dev = !d.name set_plot,'cgm' print,format="('Writing cgm frame ',i3,' to file ',a,' ...')",$ ifrcgm,cgmname erase widget_control,/hourglass case type of "map": begin case map.proj of ; "GLOBAL CYLINDRICAL EQUIDISTANT": begin ; if vec.ivec ne 1 then pltce,/cgm $ ; else pltce_vec,/cgm,/backgnd ; end ; "POLAR STEREOGRAPHIC": begin ; if vec.ivec ne 1 then pltst,/cgm $ ; else pltst_vec,/cgm,/backgnd ; end "GLOBAL CYLINDRICAL EQUIDISTANT": begin if vec.ivec ne 1 then pltce,/cgm $ else begin xll = .15 & yll = .48 xur = .95 & yur = yll+.5*(xur-xll) pltce_vec,[xll,yll,xur,yur],/cgm,/backgnd endelse end "POLAR STEREOGRAPHIC": begin if vec.ivec ne 1 then pltst,/cgm $ else begin xur = .87 & yur = .89 xll = .13 & yll = .15 pltst_vec,[xll,yll,xur,yur],/cgm,/backgnd endelse end "SATELLITE VIEW": pltsv,/cgm "MOLLWEIDE": pltmw,/cgm else: begin print,'wrcgm: unknown map projection: ',map.proj return end endcase end "conimage": begin pltconimage,/cgm end else: begin print,'>>> wrcgm: unknown type=',type return end endcase set_plot,save_dev print,format="('Completed writing cgm frame ',i3,' to file ',a)",$ ifrcgm,cgmname ifrcgm = ifrcgm+1 return end