source: trunk/essentials/sys-apps/gawk/doc/lflashlight.eps

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 4.0 KB
Line 
1%!
2%%Creator: arnold@skeeve (Aharon Robbins)
3%%Title: rflashlight.small.xpic (xpic)
4%%CreationDate: Tue Dec 12 09:51:27 2000
5%%Pages: 1
6%%BoundingBox: 0 0 72 28.8
7% (in inches) at 0 0, width 1, height 0.4
8%%EndComments
9% Prolog for xpic to PostScript converter
10% Author: Mark Moraes
11% $Header: x2ps.pro,v 1.2 88/03/19 16:50:09 moraes Exp
12% %d D - change style SOLID, DOTTED, SHORT-DASH, LONG-DASH, DOT-DASH
13% %s F - change font to fontname
14% %d S - change size (font size in points)
15% (%s) rj %d t - text right just. (%d is TOPLINE, MIDLINE, BOTLINE)
16% (%s) lj %d t - text left just. (%d is TOPLINE, MIDLINE, BOTLINE)
17% (%s) ce %d t - text centered (%d is TOPLINE, MIDLINE, BOTLINE)
18% %d %d l - lineto
19% %d %d m - moveto
20% %d %d s - spline segment
21% x - flush line, spline
22% <wid> <ht> <x> <y> b - box
23% <wid> <ht> <x> <y> e - ellipse
24% %d ss - setscale
25% %d W - change linewidth
26% getpagesize - gets the values of PAGEHEIGHT and PAGEWIDTH
27% %d %d flip - translate by %d, PAGEHEIGHT - %d (this
28% transforms to X windows coordinates)
29save 50 dict begin /xpic exch def
30/StartXpic {newpath 0 0 moveto [] 0 setdash 0 setgray 1 setlinecap} def
31% Set defaults
32/fontname /Times-Roman def
33/ptsize 12 def
34% halign has the values for MIDLINE, TOPLINE, BOTLINE
35/halign 3 array def
36/s {rcurveto} def
37/x {stroke} def
38/l {lineto} def
39/m {moveto} def
40/b {
41 /ury exch def /urx exch def /lly exch def /llx exch def
42 llx lly moveto urx lly lineto urx ury lineto
43 llx ury lineto llx lly lineto stroke
44} def
45/mtrx matrix def
46/e {
47 /yc exch def /xc exch def /yrad exch def /xrad exch def
48 xc xrad add yc moveto
49 /savematrix mtrx currentmatrix def
50 xc yc translate
51 xrad yrad scale
52 0 0 1 0 360 arc
53 savematrix setmatrix stroke
54} def
55% The next three take the text string, and moveto the right horiz. position
56% leaving the string on the stack.
57/lj {} def
58/rj {dup stringwidth pop neg 0 rmoveto} def
59/ce {dup stringwidth pop 2 div neg 0 rmoveto} def
60% And this is invoked after one of the three above, and
61% computes the vert. pos, and then displays the string.
62/t {halign exch get 0 exch rmoveto show newpath} def
63% Store an array of patterns in /styles - a pattern is an array consisting
64% of an array and an offset. Corresp to xpic patterns
65% solid, dotted, short-dashed, long-dashed, dot-dashed
66/styles [ [] 0 ] [ [1 3] 0 ] [ [4 4] 0 ] [ [8 4] 0 ] [ [1 4 4 4] 0 ]
67 5 array astore def
68% change style to arg.
69/D {stroke styles exch get aload pop setdash newpath} def
70/W {stroke 0.5 mul setlinewidth newpath} def
71% fontbox takes a fontname off the stack, and returns an array
72% containing the values of the bottom line of the bounding box, the
73% mid line of the bounding box, and the top line of the bounding box
74% of that font, taken from the baseline, scaled to a font of size 1
75/fontbox {
76 findfont dup /FontMatrix get /fm exch def /FontBBox get aload pop
77 /ytop exch def pop /ybot exch def pop
78 /ymid ytop ybot sub 2 div def
79 0 ybot fm dtransform exch pop % botline
80 dup neg exch % midline - this works better than (ytop-ybot)/2!
81 0 ytop fm dtransform exch pop exch %topline
82 % now in the order midline, topline, botline.
83 3 array astore
84} def
85% select font
86/F {
87 dup /fontname exch def fontbox
88 /thisfontbox exch def SF
89} def
90% set point size
91/S {/ptsize exch def SF} def
92% actually set font
93/SF {
94 fontname findfont ptsize curscale div scalefont setfont
95 thisfontbox aload pop
96 1 1 3 {
97 pop ptsize mul curscale div neg 3 1 roll
98 } for
99 halign astore pop
100} def
101% sets the scale to 72 / n, where n is on the stack, and stores the value
102% in curscale for font scaling
103/curscale 1 def
104/getpagesize{newpath clippath pathbbox /pageheight exch def
105 /pagewidth exch def pop pop newpath} def
106/flip{pageheight exch sub translate} def
107/ss {/curscale exch 72 exch div dup dup scale def} def
108/land {90 rotate} def
109StartXpic
110%%EndProlog
11180 ss
1120.5 W
1130 D
11480 32 m
11564 24 l
116x
11732 24 m
11856 32 l
119x
12032 8 m
12156 0 l
122x
1238 16 56 16 e
1240 24 32 8 b
12564 16 m
12680 16 l
127x
12864 8 m
12980 0 l
130x
131%%Trailer
132showpage
133% Trailer for xpic to PostScript converter
134% $Header: x2ps.tra,v 1.2 89/07/02 15:59:53 moraes Exp $
135xpic end restore
Note: See TracBrowser for help on using the repository browser.