File: exE1.block

package info (click to toggle)
msc-generator 8.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 180,484 kB
  • sloc: cpp: 129,931; yacc: 23,655; ansic: 7,464; sh: 5,026; makefile: 948
file content (39 lines) | stat: -rw-r--r-- 1,043 bytes parent folder | download | duplicates (3)
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
34
35
36
37
38
39
##Arrow routing
##arrow routing manhattan straight polygon procedure defproc replay curvy
##This example shows how you can select an arrow routing algorithm.##It also shows how to define and replay procedures.
defproc Blocks($num, $label) {
    col {
        row {space 30; *oval A~$num: A;}
        row {
            box {
                if $num=="1" then
                    *oval B~$num: B [];
                else
                    *oval B~$num: B [ycenter=B1];

            }
            box {
                *oval C, D;
            }
        }
        space;
        row {space 60; *oval E~$num: E;}
        text [label=$label];
    }
}
replay Blocks(0, Vertical);
replay Blocks(1, Straight);
replay Blocks(2, Manhattan);
replay Blocks(3, Polygon);
replay Blocks(4, "Polygon\nwith radius");
replay Blocks(5, Curvy);

use line.color=red;
use line.width=2;
A0->E0 [routing=vertical];
A1->E1 [routing=straight];
A2->E2 [routing=manhattan];
A3->E3 [routing=polygon];
A4->E4 [routing=polygon, line.corner=round];
A5->E5 [routing=curvy];