home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / cmds / root.3 / usr / lib / lp / postscript / postplot.ps / postplot
Text File  |  1998-08-19  |  2KB  |  110 lines

  1. %ident    "@(#)postplot.ps    1.2"
  2. %
  3. % Version 3.15 prologue for Unix plot files - System V version.
  4. %
  5.  
  6. /#copies 1 store
  7. /aspectratio 1 def
  8. /font /Courier def
  9. /formsperpage 1 def
  10. /landscape false def
  11. /linewidth 0 def
  12. /magnification 1 def
  13. /margin 10 def
  14. /orientation 0 def
  15. /screenheight 4096 def
  16. /screenwidth 4096 def
  17. /size 10 def
  18. /xoffset 0 def
  19. /yoffset 0 def
  20. /xtextshift 0 def
  21. /ytextshift 0 def
  22.  
  23. /useclippath true def
  24. /pagebbox [0 0 612 792] def
  25.  
  26. /inch {72 mul} bind def
  27. /min {2 copy gt {exch} if pop} bind def
  28.  
  29. /setup {
  30.     counttomark 2 idiv {def} repeat pop
  31.  
  32.     landscape {/orientation 90 orientation add def} if
  33.  
  34.     pagedimensions
  35.     /scaling
  36.         height margin sub screenheight div
  37.         width margin sub screenwidth div
  38.     min def
  39.     xcenter ycenter translate
  40.     orientation neg rotate
  41.     xoffset inch yoffset inch translate
  42.     magnification dup aspectratio mul scale
  43.  
  44.     /height height margin sub def
  45.     /width width margin sub def
  46.     font findfont size scaling div scalefont setfont
  47.     1 setlinecap
  48.     newpath
  49. } def
  50.  
  51. /pagedimensions {
  52.     useclippath userdict /gotpagebbox known not and {
  53.         /pagebbox [clippath pathbbox newpath] def
  54.     } if
  55.     pagebbox aload pop
  56.     4 -1 roll exch 4 1 roll 4 copy
  57.     landscape {4 2 roll} if
  58.     sub /width exch def
  59.     sub /height exch def
  60.     add 2 div /xcenter exch def
  61.     add 2 div /ycenter exch def
  62.     userdict /gotpagebbox true put
  63. } def
  64.  
  65. /pagesetup {/page exch def} bind def
  66.  
  67. /space {
  68.     /screenheight exch def
  69.     /screenwidth exch def
  70. } bind def
  71.  
  72. /setupspace {
  73.     /scaling
  74.         height margin sub screenheight div
  75.         width margin sub screenwidth div
  76.     min def
  77.     scaling scaling scale
  78.     screenwidth neg 2 div screenheight neg 2 div translate
  79.     linewidth scaling div setlinewidth
  80.     font findfont size scaling div scalefont setfont
  81.     /spotsize linewidth 0 eq {.2} {linewidth 2 div} ifelse scaling div def
  82. } bind def
  83.  
  84. /f {dup {scaling div} forall counttomark -1 roll astore 0 setdash} bind def
  85. /l {moveto lineto stroke} bind def
  86. /m {newpath moveto} bind def
  87. /n /lineto load def
  88. /s /stroke load def
  89. /p {spotsize 0 360 arc fill} bind def
  90. /c {0 360 arc stroke} bind def
  91.  
  92. /a {
  93.     /dy2 exch def
  94.     /dx2 exch def
  95.     /dy1 exch def
  96.     /dx1 exch def
  97.     dx1 dx1 mul dy1 dy1 mul add sqrt
  98.     dy1 dx1 atan
  99.     dy2 dx2 atan
  100.     arc stroke
  101. } bind def
  102.  
  103. /t {
  104.     moveto
  105.     size scaling div dup xtextshift mul exch ytextshift mul rmoveto
  106.     show
  107. } bind def
  108.  
  109. /done {/lastpage where {pop lastpage} if} def
  110.