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