summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/3-5-60.mp
blob: f5afe81f9449105b3c023635a30f8b029b0354d6 (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
%
% This example need a fairly current version of metaobj.mp!
%
% You may need to install the latest version from CTAN
%
% --- start of displayed preamble in the book ---
input metaobj
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
numeric u;
u=1cm;
newEllipse.A(btex Ellipse etex);
newCircle.B(btex Circle etex);
scaleObj(B,2);
newBox.C(btex Box etex);
scaleObj(C,3);
newRBox.D(btex RBox etex);
A.c=origin;
B.c-A.c=(2u,0);
C.c-B.c=(0,3u);
D.c-C.c=(-u,u);
newContainer.ct(A,B,C,D)
  "framed(true)", "framecolor(blue)",
  "filled(true)","fillcolor((.8,.8,.8))",
  "dx(1mm)", "dy(1mm)";
drawObj(ct);
endfig;
end;