home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1445 / rekall.card < prev    next >
Encoding:
Text File  |  1990-12-28  |  3.1 KB  |  105 lines

  1. % @(#) $Header: rekall.card,v 1.1 90/06/11 02:56:10 jef Exp $
  2. %
  3. % rekall.card - Rekall ID (from "Totall Recall")
  4. %
  5. % Copyright (C) 1990 by Jef Poskanzer.  All rights reserved.
  6.  
  7. /rekall-boxheight cardheight cardmargin 2 mul sub photoheight sub 2 div def
  8. /rekall-jobwidth 1.1 in def
  9. /rekall-namewidth cardwidth cardmargin 2 mul sub rekall-jobwidth sub def
  10.  
  11. /rekall-mottoheight 0.15 in def
  12. /rekall-logowidth cardwidth cardmargin 2.5 mul sub photowidth sub def
  13. /rekall-logoheight photoheight cardmargin 1.5 mul sub rekall-mottoheight sub 2 div def
  14. /rekall-pixelshigh 9 def
  15. /rekall-pixelheight rekall-logoheight rekall-pixelshigh div def
  16. /rekall-pixelswide rekall-logowidth rekall-pixelheight div cvi def
  17. /rekall-pixelwidth rekall-logowidth rekall-pixelswide div def
  18. /rekall-pixelfrac 0.8 def
  19. /rekall-rekallwidth rekall-logowidth def
  20. /rekall-rekallheight rekall-logoheight def
  21. /rekall-mottowidth rekall-logowidth def
  22.  
  23. /rekall-logo {
  24.     gsave
  25.     cardmargin 1.5 mul photowidth add
  26.       cardheight cardmargin sub rekall-logoheight sub
  27.       translate
  28.     0.05 setlinewidth
  29.     0 0 moveto  rekall-logowidth rekall-logoheight square
  30.     0 1 rekall-pixelshigh 1 sub {
  31.         0 1 rekall-pixelswide 1 sub {
  32.         2 copy rekall-pixelswide 2 div sub exch rekall-pixelshigh 2 div sub
  33.           dup mul exch dup mul add sqrt  rekall-pixelshigh 2 div le
  34.         {
  35.             0.15
  36.         } {
  37.             0.7
  38.         } ifelse
  39.         randuni gt {
  40.             2 copy rekall-pixelwidth mul exch rekall-pixelheight mul moveto
  41.             1 rekall-pixelfrac sub rekall-pixelwidth mul 2 div
  42.               1 rekall-pixelfrac sub rekall-pixelheight mul 2 div
  43.               rmoveto
  44.             rekall-pixelfrac rekall-pixelwidth mul
  45.               rekall-pixelfrac rekall-pixelheight mul
  46.               filledsquare
  47.         } if
  48.         pop
  49.         } for
  50.         pop
  51.     } for
  52.     grestore
  53. } def
  54.  
  55. /rekall-rekall {
  56.     gsave
  57.     cardmargin 1.5 mul photowidth add
  58.       cardheight cardmargin sub photoheight sub rekall-mottoheight add cardmargin add
  59.       translate
  60.         0 0 moveto
  61.     /Helvetica-Bold findfont 0.50 in scalefont setfont
  62.     rekall-rekallwidth rekall-rekallheight (REKALL) showboxed
  63.     grestore
  64. } def
  65.  
  66. /rekall-motto {
  67.     gsave
  68.     cardmargin 1.5 mul photowidth add
  69.       cardheight cardmargin 2 div sub photoheight sub
  70.       translate
  71.         0 0 moveto
  72.     /Helvetica-Oblique findfont 0.25 in scalefont setfont
  73.     rekall-mottowidth rekall-mottoheight ("For the memory of a lifetime.") showboxed
  74.     grestore
  75. } def
  76.  
  77. /rekall-info {
  78.     cardmargin  cardmargin rekall-boxheight add  moveto
  79.     rekall-namewidth rekall-boxheight (NAME)
  80.     FirstName: ( ) LastName: strcat strcat diagbox
  81.     cardmargin  cardmargin  moveto
  82.     rekall-namewidth rekall-boxheight (SIGNATURE) ()  diagbox
  83.     cardwidth cardmargin sub rekall-jobwidth sub
  84.       cardmargin rekall-boxheight add  moveto
  85.     rekall-jobwidth rekall-boxheight (JOB CLASS.) (Implant Tech)  diagbox
  86.     cardwidth cardmargin sub rekall-jobwidth sub cardmargin  moveto
  87.     rekall-jobwidth rekall-boxheight (EMPLOYEE NO.)  4 randdigs  diagbox
  88. } def
  89.  
  90. /rekall-card {
  91.     cardstart
  92.     black setgray
  93.     0 setlinewidth
  94.     cardticks
  95.     cardmargin  cardheight cardmargin sub photoheight sub  moveto
  96.     photowidth photoheight photo
  97.     rekall-logo
  98.     rekall-rekall
  99.     rekall-motto
  100.     rekall-info
  101.     cardend
  102. } def
  103.  
  104. rekall-card
  105.