home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- access;
- symbols;
- locks; strict;
- comment @# @;
-
-
- 1.2
- date 94.04.30.12.38.46; author peteric; state Exp;
- branches;
- next 1.1;
-
- 1.1
- date 94.03.09.21.52.24; author peteric; state Exp;
- branches;
- next ;
-
-
- desc
- @PostScript procedures for use in FTree.
- @
-
-
- 1.2
- log
- @Corrections for multiple-marriage code; Ftree v0.3
- @
- text
- @%
- %
- % procset file for ftree family history program.
- % A default version of this also exists in ftree.
- %
- % (c) Copyright P. Ivimey-Cook 1994.
- %
- % Procedure printmultiple extracted from PostScript
- % Language Cokbook by Adobe.
- %
- % $Id$
- %
-
- /showcentred { % str =>
- dup stringwidth pop 2 div neg 0 rmoveto show
- } def
- /show2centred { % fdict str1 fdict str2 =>
- 4 dict begin /s2 exch def /f2 exch def /s1 exch def /f1 exch def
- f1 setfont s1 stringwidth pop
- f2 setfont s2 stringwidth pop
- add 2 div neg 0 rmoveto
- f1 setfont s1 show f2 setfont s2 show
- end } def
- /showright { % str =>
- dup stringwidth pop neg 0 rmoveto show
- } def
- /yrln { % dy x y =>
- moveto 0 exch rlineto
- } bind def
- /xrln { % dx x y =>
- moveto 0 rlineto
- } bind def
- /fsf { % name size font-id =>
- findfont exch scalefont def
- } bind def
- /printtitle { % grlev ptsiz ttl =>
- /ttl exch def /yd exch 10 add def /grlev exch def
- 0 5 rmoveto currentpoint
- /xd ttl stringwidth pop 2 div 10 add def
- xd neg 0 rlineto 0 yd neg rlineto xd 2 mul 0 rlineto 0 yd rlineto
- closepath gsave grlev setgray fill grestore stroke
- moveto 0 yd 10 sub neg rmoveto ttl showcentred
- } def
- /printmarriage { % wdt wdt-y wife wf-y { mdt } show2? mdt-y bool hdt hdt-y husb-nm husb-y xpos =>
- /xpos exch def
- personfont setfont
- xpos exch moveto showcentred
- datefont setfont
- xpos exch moveto showcentred
- xpos exch moveto
- { symfont (x) datefont 4 -1 roll show2centred }
- { symfont setfont (x) showcentred } ifelse
- personfont setfont
- xpos exch moveto showcentred
- datefont setfont
- xpos exch moveto showcentred
- } def
- /printperson { % dt-str dt-y nm-str nm-y { id-str id-y } pr-id xpos =>
- /xpos exch def
- printids { identfont setfont
- xpos exch moveto showcentred
- } if
- personfont setfont
- xpos exch moveto showcentred
- datefont setfont
- xpos exch moveto showcentred
- } def
- /cross { % dxby2 dyby2 =>
- /dby2 exch def
- dby2 0 rmoveto dby2 neg 2 mul 0 rlineto
- dby2 dy rmoveto 0 dby2 2 mul rlineto
- 0 dby2 neg rmoveto
- } def
- /cross { % dby2 =>
- /dby2 exch def
- dby2 0 rmoveto dby2 -2 mul 0 rlineto
- dby2 dby2 rmoveto 0 dby2 -2 mul rlineto
- 0 dby2 rmoveto
- } def
- /pmargins {
- 0 setlinewidth
- newpath
- 0 0 moveto 5 cross
- 0 pageheight rmoveto 5 cross
- pagewidth 0 rmoveto 5 cross
- 0 pageheight neg rmoveto 5 cross
- stroke
- } def
- /printmultiple { % x-pages y-pages =>
- /rows exch def
- /cols exch def
- /pictproc exch def
- newpath
- leftmargin botmargin moveto
- 0 pageheight rlineto
- pagewidth 0 rlineto
- 0 pageheight neg rlineto
- closepath clip
- newpath % clip doesn't do this
- leftmargin botmargin translate
- 0 1 rows 1 sub {
- /rowcount exch def
- 0 1 cols 1 sub {
- /colcount exch def
- gsave initclip pmargins grestore
- gsave
- pagewidth colcount mul neg
- pageheight rowcount mul neg
- translate
- pictproc
- gsave showpage grestore
- grestore
- } for
- } for
- } def
- %%End
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @a16 1
-
- a23 1
-
- a26 1
-
- a29 1
-
- a32 1
-
- d36 8
- a43 1
-
- a57 1
-
- d68 22
- a89 2
-
- /printmultiple {
- d98 2
- a99 1
- closepath clip newpath
- d105 1
- d116 1
- a116 1
-
- @
-