summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/latexboxes.mp
blob: bbfdc0487f66a4c648bc60438839b937fa26642e (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
% used many times in LaTeX documents (\usebox{})
% L. Nobre G. 
% 2001

beginfig(0); 						% grayrectanglebox
	numeric u, Nu;
	u = 0.5mm;
	Nu = 20;
	transform T;
	T = identity scaled (Nu*u) xscaled 1.33;
	pickup pensquare scaled u;
	draw (unitsquare transformed T) withcolor 0.7white;
endfig;

beginfig(1); 						% bigrectanglebox
	numeric u, Nu;
	u = 0.5mm;
	Nu = 70;
	transform T;
	T = identity scaled (Nu*u) xscaled 1.33;
	pickup pensquare scaled u;
	draw (unitsquare transformed T) withcolor 0.7white;
endfig;

end;