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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
defshape am.ac {
######## Foreground ########
S 2;
######## Shape cutout ########
M 0 0;
L 0 20;
L 20 20;
L 20 40;
L 0 40;
L 0 60;
L 20 60;
L 20 80;
L 0 80;
L 0 100;
L 200 100;
L 200 0;
E;
######## Small upper rectangle ########
# Issue 1: Does not work correctly and hides part of the shape
#M 20 20; L -20 20; L -20 40; L 20 40; E;
# Issue 2: Open paths seem to be closed always
#M -0.01 20.01; L -19.99 20.01; L -19.99 39.99; L -0.01 39.99;
# This is a not so elegant workaround
M 19.99 20.01; L -19.99 20.01; L -19.99 39.99; L 19.99 39.99; E;
######## Small lower rectangle ########
M 19.99 60.01; L -19.99 60.01; L -19.99 79.99; L 19.99 79.99; E;
######## Background ########
S 0;
######## Fill shape ########
M 0 0;
L 0 20;
L -20 20;
L -20 40;
L 0 40;
L 0 60;
L -20 60;
L -20 80;
L 0 80;
L 0 100;
L 200 100;
L 200 0;
E;
T 25 5 195 95;
};
defstyle block [text.color=white, shadow.offset=5, shadow.color=lgray, shadow.blur=2, fill.color="51,153,255", fill.color2="0,51,204", fill.gradient=up];
template cell a {
use label="", margin=0;
box main [text.gap.left=10, imargin=5];
box sm1 [width=20, height=main@20%, center=main@left, top=main@20%, shadow.offset=0];
box sm2 [width=20, height=main@20%, center=main@left, top=main@60%, shadow.offset=0];
join main+sm1+sm2 [line.type=, shadow.offset=5, shadow.color=lgray, shadow.blur=2];
}
col {
*am.ac A:Application\nComponent;
row {
box B:Service 1;
box C:Service 2;
}
}
A--B;
A--C;
copy a {
update main:Application\nComponent;
update sm1,sm2 [fill.color=red, fill.color2=red-50];
}
|