| 1 |
% Part of the MetaUML manual. |
| 2 |
% Copyright (C) 2005 Ovidiu Gheorghies |
| 3 |
% |
| 4 |
% This program is free software; you can redistribute it and/or |
| 5 |
% modify it under the terms of the GNU General Public License |
| 6 |
% as published by the Free Software Foundation; either version 2 |
| 7 |
% of the License, or (at your option) any later version. |
| 8 |
% |
| 9 |
% This program is distributed in the hope that it will be useful, |
| 10 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
% GNU General Public License for more details. |
| 13 |
% |
| 14 |
% You should have received a copy of the GNU General Public License |
| 15 |
% along with this program; if not, write to the Free Software |
| 16 |
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 |
|
| 18 |
input boxes; |
| 19 |
input util_commons; |
| 20 |
input util_object; |
| 21 |
input util_picture; |
| 22 |
input util_positioning; |
| 23 |
|
| 24 |
PictureInfoCopy.iBig(iPict); |
| 25 |
iBig.left := iBig.right := 20; |
| 26 |
iBig.top := 10; |
| 27 |
iBig.bottom := 1; |
| 28 |
iBig.boxed := 1; |
| 29 |
iBig.ignoreNegativeBase := 1; |
| 30 |
iBig.iFont.name := defaultfont; |
| 31 |
iBig.iFont.scale := 3; |
| 32 |
|
| 33 |
PictureInfoCopy.iSmall(iPict); |
| 34 |
iSmall.boxed := 1; |
| 35 |
iSmall.borderColor := green; |
| 36 |
|
| 37 |
beginfig(1); |
| 38 |
EPicture.a(iBig)("yummy"); |
| 39 |
EPicture.b(iSmall)("cool"); |
| 40 |
% you can still modify a.info |
| 41 |
% and b.info if you wish. |
| 42 |
|
| 43 |
a.nw = (0,0); |
| 44 |
b.nw = a.sw + (0,-10); |
| 45 |
|
| 46 |
drawObjects(a, b) |
| 47 |
endfig; |
| 48 |
|
| 49 |
beginfig(2); |
| 50 |
save a, b, c, myFixed; |
| 51 |
PictureInfoCopy.myFixed(iPict); |
| 52 |
myFixed.ignoreNegativeBase := 1; |
| 53 |
myFixed.fixedWidth := 15; |
| 54 |
myFixed.fixedHeight := 20; |
| 55 |
myFixed.boxed := 1; |
| 56 |
|
| 57 |
EPicture.a(myFixed)("a"); |
| 58 |
EPicture.b(myFixed)(".-."); |
| 59 |
EPicture.c(myFixed)("toolong"); |
| 60 |
|
| 61 |
leftToRight.bottom(10)(a, b, c); |
| 62 |
|
| 63 |
drawObjects(a, b, c); |
| 64 |
endfig; |
| 65 |
|
| 66 |
beginfig(3); |
| 67 |
save a, b, c, myFixed; |
| 68 |
PictureInfoCopy.myFixed(iPict); |
| 69 |
myFixed.ignoreNegativeBase := 1; |
| 70 |
myFixed.bottom := 4.5; |
| 71 |
myFixed.valign := "bottom"; |
| 72 |
myFixed.halign := "center"; |
| 73 |
myFixed.fixedWidth := 25; |
| 74 |
myFixed.fixedHeight := 15; |
| 75 |
myFixed.boxed := 1; |
| 76 |
|
| 77 |
EPicture.a(myFixed)("a"); |
| 78 |
EPicture.b(myFixed)("yum"); |
| 79 |
EPicture.c(myFixed)("b"); |
| 80 |
|
| 81 |
leftToRight.bottom(10)(a, b, c); |
| 82 |
|
| 83 |
drawObjects(a, b, c); |
| 84 |
endfig; |
| 85 |
|
| 86 |
end |