1
%!PS-Adobe-2.0 EPSF-2.0
2
%%BoundingBox: 99 303 455 421
3
%%HiResBoundingBox: 99 303.000000 455.000000 421.000000
5
% Made in 2005 by Karl Ove Hufthammer. Placed in the Public Domain.
7
% To create PNG file, run:
8
% gs -sDEVICE=pngalpha -sOutputFile=keyboard.png -r118 -dTextAlphaBits=4
9
% -dGraphicsAlphaBits=4 -dEPSCrop -dBATCH -dNOPAUSE keyboard.eps
12
% --- Some eps-specific stuff ---
19
/setpagedevice {pop} def
24
% --- The actual program ---
26
0.7 setlinewidth % Width of outlines
27
0.2 setgray % Colour of outlines
32
/space 0.2 lengd mul def % Space between keys
33
/ark 3 def % Roundness of keys
34
/ecol { 1 setgray } bind def % Colour for normal keys
35
/entcol { .5 setgray } bind def % Colour for 'Enter' key
36
/fcol { .8 setgray } bind def % Colour for 'special' keys
41
/box % Draw a box at current position. Input: Width and height.
52
x space add 0 translate
54
/ebox { box gsave ecol fill grestore stroke } bind def % Empty box
55
/fbox { box gsave fcol fill grestore stroke } bind def % Filled box
58
% --- Start program ---
63
gsave % Not very elegant. Very bad programming practice!
64
13 { 1 1 ebox } repeat
70
0 lengd space add neg translate
73
12 { 1 1 ebox } repeat
78
0 lengd space add neg translate
81
12 { 1 1 ebox } repeat
86
0 lengd space add neg translate
89
11 { 1 1 ebox } repeat
95
0 lengd space add neg translate
97
3 { 1.3 1 fbox } repeat
99
4 { 1.3 1 fbox } repeat
104
0 2 lengd space add mul translate
105
12 1.8 add lengd mul space 13 mul add 0 translate
108
/wid 1.3 lengd mul def
109
/hei lengd lengd space add add def
110
wid 0 wid hei ark arcto
111
wid hei .4 lengd mul neg hei ark arcto
112
.35 lengd mul neg hei .4 lengd mul neg lengd space add ark arcto
113
.35 lengd mul neg lengd space add 0 lengd space add ark arcto
114
0 lengd space add 0 0 ark arcto
125
% --- Some more eps stuff ---
130
exch sub { end } repeat