| 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 |
|
| 23 |
beginfig(1); |
| 24 |
boxit.a ("yummy"); |
| 25 |
boxit.b ("cool"); |
| 26 |
|
| 27 |
a.nw = (0,0); |
| 28 |
b.sw = a.se + (10,0); |
| 29 |
|
| 30 |
drawboxed (a, b); |
| 31 |
draw a.sw -- b.se dashed evenly withpen pencircle scaled 1.1; |
| 32 |
|
| 33 |
boxit.c ("yummy"); |
| 34 |
boxit.d ("cool"); |
| 35 |
|
| 36 |
c.nw = (0,-20); |
| 37 |
d.sw = c.se + (10,0); |
| 38 |
|
| 39 |
drawunboxed (c, d); |
| 40 |
draw c.sw -- d.se dashed evenly withpen pencircle scaled 1.1; |
| 41 |
endfig; |
| 42 |
|
| 43 |
beginfig(2); |
| 44 |
save a, b, c, d; |
| 45 |
|
| 46 |
Picture.a("yummy"); |
| 47 |
Picture.b("cool"); |
| 48 |
a.info.boxed := b.info.boxed := 1; |
| 49 |
|
| 50 |
a.nw = (0,0); |
| 51 |
b.sw = a.se + (10,0); |
| 52 |
|
| 53 |
drawObjects(a, b); |
| 54 |
draw a.sw -- b.se dashed evenly withpen pencircle scaled 1.1; |
| 55 |
|
| 56 |
Picture.c("yummy"); |
| 57 |
Picture.d("cool"); |
| 58 |
|
| 59 |
c.nw = (0,-20); |
| 60 |
d.sw = c.se + (10,0); |
| 61 |
|
| 62 |
drawObjects(c, d); |
| 63 |
draw c.sw -- d.se dashed evenly withpen pencircle scaled 1.1; |
| 64 |
endfig; |
| 65 |
|
| 66 |
beginfig(3); |
| 67 |
save a, b, c, d; |
| 68 |
|
| 69 |
iPict.ignoreNegativeBase := 1; |
| 70 |
|
| 71 |
Picture.a("yummy"); |
| 72 |
Picture.b("cool"); |
| 73 |
a.info.boxed := b.info.boxed := 1; |
| 74 |
|
| 75 |
a.nw = (0,0); |
| 76 |
b.sw = a.se + (10,0); |
| 77 |
|
| 78 |
drawObjects(a, b); |
| 79 |
draw a.sw -- b.se dashed evenly withpen pencircle scaled 1.1; |
| 80 |
|
| 81 |
Picture.c("yummy"); |
| 82 |
Picture.d("cool"); |
| 83 |
|
| 84 |
c.nw = (0,-20); |
| 85 |
d.sw = c.se + (10,0); |
| 86 |
|
| 87 |
drawObjects(c, d); |
| 88 |
draw c.sw -- d.se dashed evenly withpen pencircle scaled 1.1; |
| 89 |
endfig; |
| 90 |
|
| 91 |
|
| 92 |
end |