Files
tux-typing-plus/original data/images/keyboard/keyboard.eps

133 lines
2.5 KiB
PostScript
Raw Normal View History

%!PS-Adobe-2.0 EPSF-2.0
%%BoundingBox: 99 303 455 421
%%HiResBoundingBox: 99 303.000000 455.000000 421.000000
% Made in 2005 by Karl Ove Hufthammer. Placed in the Public Domain.
%
% To create PNG file, run:
% gs -sDEVICE=pngalpha -sOutputFile=keyboard.png -r118 -dTextAlphaBits=4
% -dGraphicsAlphaBits=4 -dEPSCrop -dBATCH -dNOPAUSE keyboard.eps
% --- Some eps-specific stuff ---
%%BeginProlog
save
countdictstack
mark
newpath
/showpage {} def
/setpagedevice {pop} def
%%EndProlog
%%Page 1 1
% --- The actual program ---
0.7 setlinewidth % Width of outlines
0.2 setgray % Colour of outlines
% --- Variables ---
/lengd 20 def % Scale
/space 0.2 lengd mul def % Space between keys
/ark 3 def % Roundness of keys
/ecol { 1 setgray } bind def % Colour for normal keys
/entcol { .5 setgray } bind def % Colour for 'Enter' key
/fcol { .8 setgray } bind def % Colour for 'special' keys
% --- Procedures ---
/box % Draw a box at current position. Input: Width and height.
{
/y exch lengd mul def
/x exch lengd mul def
newpath
0 y 2 div moveto
0 y x y ark arcto
x y x 0 ark arcto
x 0 0 0 ark arcto
0 0 0 y ark arcto
closepath
x space add 0 translate
} bind def
/ebox { box gsave ecol fill grestore stroke } bind def % Empty box
/fbox { box gsave fcol fill grestore stroke } bind def % Filled box
% --- Start program ---
100 400 translate
% First key row.
gsave % Not very elegant. Very bad programming practice!
13 { 1 1 ebox } repeat
2.1 1 fbox
grestore
% Second row.
0 lengd space add neg translate
gsave
1.4 1 fbox
12 { 1 1 ebox } repeat
grestore
% Third row.
0 lengd space add neg translate
gsave
1.8 1 fbox
12 { 1 1 ebox } repeat
grestore
% Fourth row.
0 lengd space add neg translate
gsave
1.4 1 fbox
11 { 1 1 ebox } repeat
2.9 1 fbox
grestore
% Fifth row.
0 lengd space add neg translate
gsave
3 { 1.3 1 fbox } repeat
7.2 1 fbox
4 { 1.3 1 fbox } repeat
grestore
% The 'Enter' key.
0 2 lengd space add mul translate
12 1.8 add lengd mul space 13 mul add 0 translate
newpath
lengd 2 div 0 moveto
/wid 1.3 lengd mul def
/hei lengd lengd space add add def
wid 0 wid hei ark arcto
wid hei .4 lengd mul neg hei ark arcto
.35 lengd mul neg hei .4 lengd mul neg lengd space add ark arcto
.35 lengd mul neg lengd space add 0 lengd space add ark arcto
0 lengd space add 0 0 ark arcto
0 0 wid 0 ark arcto
closepath
gsave
entcol
fill
grestore
stroke
showpage
% --- Some more eps stuff ---
%%Trailer
cleartomark
countdictstack
exch sub { end } repeat
restore
%%EOF