Debian Codegraph @

texmf-dist/metapost/metauml/metauml_component_relations.mp

raw
1 % Copyright 2006 2015 Radu-George Radulescu, Ovidiu Gheorghies
2 % Licensed under the Apache License, Version 2.0.
3
4 if known _metauml_component_relations_mp:
5 expandafter endinput
6 fi;
7 _metauml_component_relations_mp:=1;
8
9 defaultRelationHeadWidth := 25;
10 defaultRelationHeadHeight := 10;
11 requiredInterfaceHeadWidth := 5;
12 requiredInterfaceHeadHeight := 15;
13
14 vardef requiredInterfaceInfo@# =
15 LinkInfo@#;
16
17 @#widthA = 0;
18 @#heightA = 0;
19 @#drawMethodA = "drawNothing";
20
21 @#widthB = requiredInterfaceHeadWidth;
22 @#heightB = requiredInterfaceHeadHeight;
23 @#drawMethodB = "drawSemiCircle";
24
25 @#drawMethod = "drawLine";
26 enddef;
27
28 vardef providedInterfaceInfo@# =
29 LinkInfo@#;
30
31 @#widthB = defaultRelationHeadWidth;
32 @#heightB = defaultRelationHeadHeight;
33 @#drawMethodB = "drawCircle";
34
35 @#widthA = 0;
36 @#heightA = 0;
37 @#drawMethodA = "drawNothing";
38
39 @#drawMethod = "drawLine";
40 enddef;
41
42 requiredInterfaceInfo.requiredInterface;
43 providedInterfaceInfo.providedInterface;
44
45 vardef drawRelation(text iLink)(expr myPath)=
46 link(iLink)(myPath);
47 enddef;
48
49 vardef drawLine(expr my_path) =
50 draw my_path;
51 enddef;
52
53 vardef drawNothing(text pA)(text pB)(text base) =
54 enddef;
55