Debian Codegraph @

texmf-dist/source/metafont/roex/roexsamp/es-02.mf

raw
1 %%%%
2 %%%% This file belongs to the ROEX package.
3 %%%%
4 %%% draw write_preamble write_postamble find_BB set_BB fill_C draw_C
5 %%% draw fix_fill_cmyk fix_draw_cmyk
6 % ES-02.MF, ``PARALLELOGRAM'':
7 % Another trivial example: expanding stroke applied to a parallelogram.
8 % ---
9 input mftoeps; eps_mode_setup; input roex; tracingexpanding:=1;
10 % ---
11 beginchar("0",1/10in#,in#,0);
12 path p; p=((1/2w,0)--(1/4w,1/4h)--(0,1/2h)--(1/2w,h)--(w,1/2h)--cycle);
13 miter_size:=w;
14 expand_stroke (p) (2/5w) R;
15 % change_weight (p) (2/5w) R;
16 find_BB make_list(1,R.num) R;
17 write_preamble jobname;
18 fix_draw_cmyk 0,0,0,1; draw_C p;
19 for i:=1 upto R.num:
20 fix_draw_cmyk if check_turn(R[i])>0: 0,1,1,0 else: 1,1,0,0 fi;
21 draw_C R[i];
22 if proofing>0:
23 for j:=0 upto length(R[i])-1:
24 makelabel(decimal(j) & "/" & decimal(i),point j of R[i]);
25 endfor
26 fi
27 endfor
28 write_postamble;
29 endchar;
30 end.
31 %%\end
32