summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/metafont/roex/roexsamp/es-01.mf
blob: c2ccc77d17ce77c1b41cbe3d3325a5a9579c626d (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
%%%%
%%%% This file belongs to the ROEX package.
%%%%
%%% draw write_preamble write_postamble find_BB set_BB fill_C draw_C
%%% draw fix_fill_cmyk fix_draw_cmyk
% ES-01.MF, ``SQUARE'':
%   A trivial example, expanding stroke applied to a square.
% ---
input mftoeps; eps_mode_setup; input roex; tracingexpanding:=1;
% ---
beginchar("0",cm#,cm#,0);
 expand_stroke (unitsquare xscaled w yscaled h) (1mm) R;
% find_BB make_list(1,R.num) R;
 find_BB R1,R2; % R.num=2
 write_preamble jobname;
 for i:=1 upto R.num:
  fix_draw_cmyk if check_turn(R[i])>0: 0,1,1,0 else: 1,1,0,0 fi; 
  draw_C R[i];
  if proofing>0:
   for j:=0 upto length(R[i])-1:
    makelabel(decimal(j) & "/" & decimal(i),point j of R[i]);
   endfor
  fi
 endfor 
 write_postamble;
endchar;
end.
%%\end