| 1 |
%% |
| 2 |
%% This is file `nkarta.mp', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% nkarta.dtx (with options: `MP') |
| 8 |
%% ------------------------------------------------------------------- |
| 9 |
%% Copyright 2002--2009, Daniel H. Luecking |
| 10 |
%% |
| 11 |
%% Nkarta is in the public domain |
| 12 |
%% |
| 13 |
|
| 14 |
|
| 15 |
pt#:=pt; |
| 16 |
if (not known FontSize) or (not numeric FontSize): |
| 17 |
numeric FontSize; |
| 18 |
FontSize := 15pt#; |
| 19 |
fi |
| 20 |
FS# := FontSize/1000; |
| 21 |
FS := FS#; |
| 22 |
|
| 23 |
boolean debug; debug:=false; |
| 24 |
|
| 25 |
path P[]; numeric P; |
| 26 |
def setP = P[incr P] := enddef; |
| 27 |
|
| 28 |
def drawthem = |
| 29 |
if debug: % debug |
| 30 |
pickup pencircle scaled .4bp; % |
| 31 |
fi % |
| 32 |
for n = 1 upto P: |
| 33 |
if debug: % |
| 34 |
draw (P[n] scaled FS); % |
| 35 |
else: % |
| 36 |
if ( turningnumber P[n] ) < 0 : |
| 37 |
unfill |
| 38 |
else : |
| 39 |
fill |
| 40 |
fi (P[n] scaled FS); |
| 41 |
fi % debug |
| 42 |
endfor |
| 43 |
enddef; |
| 44 |
|
| 45 |
|
| 46 |
numeric w_, h_, d_; |
| 47 |
def beginchar (expr num, wd, ht, dp) = |
| 48 |
beginfig (num); w_:=wd; h_:=ht; d_:=dp; |
| 49 |
P := 0; |
| 50 |
enddef; |
| 51 |
|
| 52 |
def endchar = |
| 53 |
drawthem; |
| 54 |
setbounds currentpicture to (0,-d_)--(w_,-d_)--(w_,h_)--(0,h_)--cycle; |
| 55 |
endfig; |
| 56 |
enddef; |
| 57 |
|
| 58 |
input nkchars; |
| 59 |
end; |
| 60 |
%% |
| 61 |
%% End of file `nkarta.mp'. |