home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8710 / 14 / dgxplt.f < prev    next >
Encoding:
Text File  |  1990-07-13  |  1.3 KB  |  60 lines

  1.     subroutine dgxplt(iac, iun, ivl, idm, xpl, ypl)
  2. c**  Purpose:    SDL -> PostScript printer interface subroutine
  3. c**
  4. c**  Author:    Rex Sanders, USGS Pacific Marine Geology, 2/87
  5.     integer    iac, iun, ivl, idm
  6.     real    xpl(idm), ypl(idm)
  7.  
  8. c**  SDL common block
  9.     common /dgsdlp/ ipentp, ipenlt, ipenbl, xold, yold, iflbld
  10.     integer        ipentp, ipenlt, ipenbl,             iflbld
  11.     real                    xold, yold
  12.  
  13. c**  ccps common block
  14.     common /cqpbnf/ xdum, ydum, fac, ires
  15.     save   /cqpbnf/
  16.     real            xdum, ydum, fac
  17.     integer                          ires
  18.  
  19. c**  Local variables
  20.     integer i
  21.  
  22. c**  Switch on input value of iac - 1..5 (6 ignored)
  23. c**  Draw regular or bold line
  24.     if (iac .eq. 1 .or. iac .eq. 2) then
  25.         if (iac .eq. 1) call newpen(ipenlt)
  26.         if (iac .eq. 2) then
  27.         if (ipenlt .ne. ipenbl) then
  28.             call newpen(ipenbl)
  29.         else
  30.             call newpen(3)
  31.         endif
  32.         endif
  33.  
  34.         call plot(xpl(1), ypl(1), 3)
  35.  
  36.         do 100 i = 2, (ivl - 1)
  37.         call pliout(nint(xpl(i)*fac*ires))
  38.         call plcout(32)
  39.         call pliout(nint(ypl(i)*fac*ires))
  40.         call plsout(" L\n")
  41. 100        continue
  42.  
  43.         call plot(xpl(ivl), ypl(ivl), 2)
  44.  
  45. c**  Initiate plotting
  46.     else if (iac .eq. 3) then
  47.         call plots(0, 0, 8)
  48.     
  49. c**  New page
  50.     else if (iac .eq. 4) then
  51.         call plsout("gsave showpage grestore\n")
  52.  
  53. c**  Terminate plotting
  54.     else if (iac .eq. 5) then
  55.         call plot(0.0, 0.0, 999)
  56.     end if
  57.  
  58.     return
  59.     end
  60.