Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

save_context.f

Go to the documentation of this file.
00001 c
00002 c     The following is an alphabetized list of all common blocks
00003 c     necessary for the proper functioning of mcdraw, when graphics
00004 c     are being switched (i.e. these blocks must be saved and restored
00005 c     to preserve continuity).
00006 c
00007 c     Only non-mcpak arrays are listed here.
00008 c
00009 c     NOTE: We need not store device-specific material if only a
00010 c     single instance of a given device is permitted--the info is
00011 c     saved anyway, and cannot be overwritten.
00012 c
00013 c     NOTE: Most history information will be lost when the graphics
00014 c     context changes.
00015 c
00016       subroutine save_mcdraw_context(id)
00017       save
00018 c
00019 c     Save all relevant commons in a character string.
00020 c
00021       parameter (NCMAX = 100)
00022       character*1000 save_string(NCMAX)
00023 c
00024       common/colorlimits/icmin,icmax
00025       common/compressframes/icompress
00026       common/dataoffset/delx,dely,delz,facx,facy,facz
00027       common/drawparams/roff,soff,aspect1,xlen,ylen,hs,hn,hp,
00028      $                  idevset,jbox,iorig
00029       common/fileinput/inpmode
00030       common/frameparams1/xmin,xmax,ymin,ymax,modex,modey
00031       character*80 xttl,yttl
00032       common/frameparams2/xttl,yttl
00033       common/framesize/nxpix,nx0,xfac,nypix,ny0,yfac
00034       common/initial/roff0,soff0,hn0,hs0,hp0
00035       common/inputposn/iposn,jposn
00036       common/localoffset/xoff,yoff
00037       common/mcdcolor/icolor
00038       character*80 colormapfile
00039       common /mcdraw_colormap_file/ colormapfile
00040       character*1 plot_symbol
00041       common/mcd_local/ offx,offy,offxsave,offysave,offlabel,
00042      $                  angle,anglesave,rloc,sloc,
00043      $                  iweight,iwtsto,jth,jsym,itype,
00044      $                  ibox,ierbox(0:4),plot_symbol
00045 c
00046       integer ixttl(80),iyttl(80),icmap(80)
00047 c
00048 c     Note special treatment of character strings xtty and yttl.
00049 c
00050       nxttl = 0
00051       nyttl = 0
00052       ncmap = 0
00053       do i=80,1,-1
00054           if (nxttl.eq.0.and.xttl(i:i).gt.' ') nxttl = i
00055           if (nyttl.eq.0.and.yttl(i:i).gt.' ') nyttl = i
00056           if (ncmap.eq.0.and.colormapfile(i:i).gt.' ') ncmap = i
00057       end do
00058 c
00059       write(save_string(id),*)
00060      $        offx,offy,offxsave,offysave,offlabel,
00061      $        angle,anglesave,rloc,sloc,
00062      $        iweight,iwtsto,jth,jsym,ichar(plot_symbol),itype,
00063      $        ibox,ierbox,
00064      $        icmin,icmax,icompress,delx,dely,delz,
00065      $        facx,facy,facz,roff,soff,aspect1,xlen,ylen,hs,hn,hp,
00066      $                  idevset,jbox,iorig,
00067      $        inpmode,xmin,xmax,ymin,ymax,modex,modey,
00068      $        nxpix,nx0,xfac,nypix,ny0,yfac,roff0,soff0,hn0,hs0,hp0,
00069      $        iposn,jposn,xoff,yoff,icolor,nxttl,nyttl,ncmap,
00070      $        (ichar(xttl(i:i)),i=1,nxttl),(ichar(yttl(i:i)),i=1,nyttl),
00071      $        (ichar(colormapfile(i:i)),i=1,ncmap)
00072       return
00073 c
00074       entry restore_mcdraw_context(id)
00075 c
00076 c     Restore a saved graphics context.
00077 c
00078       read(save_string(id),*)
00079      $        offx,offy,offxsave,offysave,offlabel,
00080      $        angle,anglesave,rloc,sloc,
00081      $        iweight,iwtsto,jth,jsym,jsymbol,itype,
00082      $        ibox,ierbox,
00083      $        icmin,icmax,icompress,delx,dely,delz,
00084      $        facx,facy,facz,roff,soff,aspect1,xlen,ylen,hs,hn,hp,
00085      $                  idevset,jbox,iorig,
00086      $        inpmode,xmin,xmax,ymin,ymax,modex,modey,
00087      $        nxpix,nx0,xfac,nypix,ny0,yfac,roff0,soff0,hn0,hs0,hp0,
00088      $        iposn,jposn,xoff,yoff,icolor,nxttl,nyttl,ncmap,
00089      $        (ixttl(i),i=1,nxttl),(iyttl(i),i=1,nyttl),
00090      $        (icmap(i),i=1,ncmap)
00091 c
00092 c     Reconstruct the strings.
00093 c
00094       plot_symbol = char(jsymbol)
00095       do i=1,80
00096           if (i.le.nxttl) then
00097               xttl(i:i) = char(ixttl(i))
00098           else
00099               xttl(i:i) = ' '
00100           end if
00101           if (i.le.nyttl) then
00102               yttl(i:i) = char(iyttl(i))
00103           else
00104               yttl(i:i) = ' '
00105           end if
00106           if (i.le.ncmap) then
00107               colormapfile(i:i) = char(icmap(i))
00108           else
00109               colormapfile(i:i) = ' '
00110           end if
00111       end do
00112 c
00113       end

Generated at Sun Feb 24 09:57:14 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001