summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost/nkarta/nkarta.mp
blob: aea674550fb59bafe3d7b03e66d4416d7b9f424f (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
%%
%% This is file `nkarta.mp',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% nkarta.dtx  (with options: `MP')
%% -------------------------------------------------------------------
%% Copyright 2002--2009, Daniel H. Luecking
%% 
%% Nkarta is in the public domain
%% 


pt#:=pt;
if (not known FontSize) or (not numeric FontSize):
  numeric FontSize;
  FontSize := 15pt#;
fi
FS# := FontSize/1000;
FS := FS#;

boolean debug; debug:=false;

path P[]; numeric P;
def setP = P[incr P] :=  enddef;

def drawthem =
if debug:                               % debug
  pickup pencircle scaled .4bp;         %
fi                                      %
  for n = 1 upto P:
if debug:                               %
    draw (P[n] scaled FS);              %
else:                                   %
    if ( turningnumber P[n] ) < 0 :
      unfill
    else :
      fill
    fi  (P[n] scaled FS);
fi                                      % debug
  endfor
enddef;


numeric w_, h_, d_;
def beginchar (expr num, wd, ht, dp) =
  beginfig (num); w_:=wd; h_:=ht; d_:=dp;
  P := 0;
enddef;

def endchar =
  drawthem;
  setbounds currentpicture to (0,-d_)--(w_,-d_)--(w_,h_)--(0,h_)--cycle;
  endfig;
enddef;

input nkchars;
end;
%%
%% End of file `nkarta.mp'.