summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/3-5-66.mp
blob: e6f4fdc872cda77e0400183880fd8a4e67c48fad (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
31
32
33
% --- start of displayed preamble in the book ---
input metaobj
% Boxes as previously defined
% --- end of displayed preamble in the book ---

newBox.a(btex apples\strut etex);
newBox.b(btex oranges\strut etex);
newBox.c(btex bananas\strut etex);
newBox.d(btex potatoes\strut etex);
newBox.e(btex peas\strut etex);
newBox.f(btex fruits\strut etex);
newBox.v(btex vegetables\strut etex);
newBox.fo(btex food\strut etex);

defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
extendObjRight.a(3cm);extendObjRight.b(3cm);
extendObjRight.c(3cm);extendObjRight.d(3cm);
extendObjRight.e(3cm);

rebindrelativeObj(f)
  (0,0,0,-xpart(v.e-v.w-f.e+f.w));
newTree.fruits(f)(a,b,c)
  "Lalign(left)", "treemode(L)";
newTree.vegetables(v)(d,e)
  "Lalign(center)", "treemode(L)";
newTree.food(fo)(fruits,vegetables)
  "hsep(1cm)", "treemode(L)";
scaleObj(food,.7);
food.c=origin;drawObj(food);
endfig;
end;