home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume6 / yahp2ps / part07 < prev    next >
Internet Message Format  |  1989-02-03  |  3KB

  1. Path: xanth!nic.MR.NET!csd4.milw.wisc.edu!leah!itsgw!steinmetz!uunet!allbery
  2. From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  3. Newsgroups: comp.sources.misc
  4. Subject: v06i030: HPGL to PostScript converter: missing prelude file
  5. Message-ID: <47763@uunet.UU.NET>
  6. Date: 29 Jan 89 21:30:15 GMT
  7. Sender: allbery@uunet.UU.NET
  8. Reply-To: federico@actisb.UUCP
  9. Organization: ACTIS in Berlin GmbH, W. Germany
  10. Lines: 109
  11. Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  12.  
  13. Posting-number: Volume 6, Issue 30
  14. Submitted-by: federico@actisb.UUCP
  15. Archive-name: yahp2ps/part07
  16.  
  17.   I just saw that you posted the converter - Thanks a lot! It is only a
  18. pity I forgot including the following file in the release. Would you
  19. please include it in one of the packages under the name 'yahp2ps.pre'? I
  20. don't think a repost will be needed, since I already posted this in
  21. comp.graphics and comp.lang.postscript. Thanks again
  22.  
  23. - - - - - - - - - - - - - - CUT HERE - - - - - - - - - - - - - - - - - -
  24. #! /bin/sh
  25. # This file was wrapped with "dummyshar".  "sh" this file to extract.
  26. # Contents:  yahp2ps.pre
  27. echo extracting 'yahp2ps.pre'
  28. if test -f 'yahp2ps.pre' -a -z "$1"; then echo Not overwriting 'yahp2ps.pre'; else
  29. sed 's/^X//' << \EOF > 'yahp2ps.pre'
  30. X%!
  31. X
  32. X% initialization
  33. X
  34. X.072 .072 scale
  35. X/RTM matrix currentmatrix def
  36. Xnewpath clippath pathbbox 3 1 roll pop pop translate -90 rotate
  37. Xnewpath
  38. X/NTM matrix currentmatrix def
  39. X/SM matrix currentmatrix def
  40. X1 setlinecap 1 setlinejoin
  41. Xgsave
  42. X
  43. X% procedure definition
  44. X
  45. X% shorthand notation for commonly used commands
  46. X
  47. X/A   { arc } def
  48. X/C   { closepath } def
  49. X/CD  { currentpoint lineto } def
  50. X/D   { 0 setdash } def
  51. X/G   { setgray } def
  52. X/L   { lineto } def
  53. X/M   { moveto } def
  54. X/R   { rotate } def
  55. X/S   { stroke } def
  56. X/SC  { closepath clip newpath } def
  57. X/SSM { SM setmatrix } def
  58. X/T   { pathbbox pop pop translate pathbbox newpath } def
  59. X/TB  { gsave newpath [] 0 setdash } def
  60. X/TE  { lineto stroke grestore } def
  61. X/TS  { translate scale } def
  62. X/W   { setlinewidth } def
  63. X
  64. X% Reset the clipping path
  65. X
  66. X/RC
  67. X{ currentdash
  68. X  currentlinewidth
  69. X  currentgray
  70. X  grestore
  71. X  gsave
  72. X  setgray
  73. X  setlinewidth
  74. X  setdash
  75. X} def
  76. X
  77. X% Set portrait format
  78. X
  79. X/POR
  80. X{ RTM dup /SM exch def setmatrix } def
  81. X
  82. X
  83. X% Set landscape format
  84. X
  85. X/LND
  86. X{ NTM dup /SM exch def setmatrix } def
  87. X
  88. X
  89. X% Hatch a surface.
  90. X% rubbish rubbish x y spacing cross -> H -> -
  91. X
  92. X/H
  93. X{ /cross exch def
  94. X  /spacing exch def
  95. X  /endy exch def
  96. X  /endx exch def
  97. X  pop pop
  98. X  [] 0 setdash
  99. X  0 spacing endy
  100. X  { dup 0 exch moveto
  101. X    endx exch lineto
  102. X  } for
  103. X  cross
  104. X  { 0 spacing endx
  105. X    { dup 0 moveto
  106. X      endy lineto
  107. X    } for
  108. X  } if
  109. X  stroke grestore newpath
  110. X} def
  111. EOF
  112. chars=`wc -c < 'yahp2ps.pre'`
  113. if test $chars !=     1460; then echo 'yahp2ps.pre' is $chars characters, should be     1460 characters!; fi
  114. fi
  115. exit 0
  116. - - - - - - - - - - - - - - CUT HERE - - - - - - - - - - - - - - - - - -
  117. -- 
  118.         Federico Heinz     "I can resist anything but temptation"
  119.                                         -- Oscar Wilde
  120. >From Europe:   ...!mcvax!unido!tub!actisb!federico
  121. >From elsewhere: ...!uunet!pyramid!/
  122.