Debian Codegraph @

texmf-dist/doc/metapost/metauml/manual/fig/properties.mp

raw
1 % Sample MetaUML figures.
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
19 input metauml;
20
21 beginfig(1);
22 Class.Test("Test")("a1","a2","a3")("aLongMethod():void");
23
24 Test.nw = (0,0);
25 Class_draw.Test;
26
27 dotlabel.ulft(btex nw etex, Test.nw);
28 dotlabel.top(btex n etex, Test.n);
29 dotlabel.urt(btex ne etex, Test.ne);
30 dotlabel.rt(btex e etex, Test.e);
31 dotlabel.lrt(btex se etex, Test.se);
32 dotlabel.bot(btex s etex, Test.s);
33 dotlabel.llft(btex sw etex, Test.sw);
34 dotlabel.lft(btex w etex, Test.w);
35
36 dotlabel.lft(btex c etex, Test.c);
37
38 draw Test.nw - (50,0) -- Test.ne + (10,0);
39 label.urt(btex top etex, Test.nw - (50,0));
40
41 draw Test.sw - (50,0) -- Test.se + (10,0);
42 label.lrt(btex bottom etex, Test.sw - (50,0));
43
44 draw Test.nw + (0,10) -- Test.sw - (0, 50);
45 label.bot(btex left etex, Test.sw - (0,50));
46
47 draw Test.ne + (0,10) -- Test.se - (0, 50);
48 label.bot(btex right etex, Test.se - (0,50));
49
50 drawarrow Test.nw - (25,0) -- Test.sw - (25,0);
51 label.lft(btex height etex, .5[Test.nw, Test.sw] - (25,0));
52
53 drawarrow Test.sw - (0,25) -- Test.se - (0,25);
54 label.bot(btex width etex, .5[Test.sw, Test.se] - (0,25));
55 endfig;
56
57
58 end