Debian Codegraph @

texmf-dist/source/metafont/roex/roexsamp/es-01.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-01.MF, ``SQUARE'':
7 % A trivial example, expanding stroke applied to a square.
8 % ---
9 input mftoeps; eps_mode_setup; input roex; tracingexpanding:=1;
10 % ---
11 beginchar("0",cm#,cm#,0);
12 expand_stroke (unitsquare xscaled w yscaled h) (1mm) R;
13 % find_BB make_list(1,R.num) R;
14 find_BB R1,R2; % R.num=2
15 write_preamble jobname;
16 for i:=1 upto R.num:
17 fix_draw_cmyk if check_turn(R[i])>0: 0,1,1,0 else: 1,1,0,0 fi;
18 draw_C R[i];
19 if proofing>0:
20 for j:=0 upto length(R[i])-1:
21 makelabel(decimal(j) & "/" & decimal(i),point j of R[i]);
22 endfor
23 fi
24 endfor
25 write_postamble;
26 endchar;
27 end.
28 %%\end
29