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

  1. %ident    "@(#)draw.ps    1.2"
  2. %
  3. % Version 3.15 drawing procedures for dpost. Automatically pulled in, but only
  4. % when needed.
  5. %
  6.  
  7. /inpath false def
  8. /savematrix matrix currentmatrix def
  9.  
  10. /Dl {
  11.     inpath
  12.         {pop pop neg lineto}
  13.         {newpath neg moveto neg lineto stroke}
  14.     ifelse
  15. } bind def
  16.  
  17. /De {
  18.     /y1 exch 2 div def
  19.     /x1 exch 2 div def
  20.     neg exch x1 add exch translate
  21.     x1 y1 scale
  22.     0 0 1 0 360
  23.     inpath
  24.         {1 0 moveto arc savematrix setmatrix}
  25.         {newpath arc savematrix setmatrix stroke}
  26.     ifelse
  27. } bind def
  28.  
  29. /Da {
  30.     /dy2 exch def
  31.     /dx2 exch def
  32.     /dy1 exch def
  33.     /dx1 exch def
  34.     dy1 add neg exch dx1 add exch
  35.     dx1 dx1 mul dy1 dy1 mul add sqrt
  36.     dy1 dx1 neg atan
  37.     dy2 neg dx2 atan
  38.     inpath
  39.         {arc}
  40.         {newpath arc stroke}
  41.     ifelse
  42. } bind def
  43.  
  44. /DA {
  45.     /dy2 exch def
  46.     /dx2 exch def
  47.     /dy1 exch def
  48.     /dx1 exch def
  49.     dy1 add neg exch dx1 add exch
  50.     dx1 dx1 mul dy1 dy1 mul add sqrt
  51.     dy1 dx1 neg atan
  52.     dy2 neg dx2 atan
  53.     inpath
  54.         {arcn}
  55.         {newpath arcn stroke}
  56.     ifelse
  57. } bind def
  58.  
  59. /Ds {
  60.     /y2 exch def
  61.     /x2 exch def
  62.     /y1 exch def
  63.     /x1 exch def
  64.     /y0 exch def
  65.     /x0 exch def
  66.     x0 5 x1 mul add 6 div
  67.     y0 5 y1 mul add -6 div
  68.     x2 5 x1 mul add 6 div
  69.     y2 5 y1 mul add -6 div
  70.     x1 x2 add 2 div
  71.     y1 y2 add -2 div
  72.     inpath
  73.         {curveto}
  74.         {newpath x0 x1 add 2 div y0 y1 add -2 div moveto curveto stroke}
  75.     ifelse
  76. } bind def
  77.