Request for shadows for custom shapes (box language), overlapping lines in...
Draws signalling charts, block diagrams and graphs from text input.
Brought to you by:
teknos293
Hi Zoltan,
I've been making myself familiar with the new box language, and liking it so far!
I can definitely see the potential, though the Block Templates
feature eludes me still (can you maybe include an example in the documentation?)
Anyway, below is a fragment that I was experimenting with, and I'm having a few issues with it:
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]; col { *am.ac A:Application\nComponent; space; row { box B:Service 1; box C:Service 2; } } A--B; A--C;
Hi Martijn,
Thanks for pointing this out. Indeed, section 2 got closed and in general treated as a contigous surface in general. I will also add a fix to this.
I have also fixed the shadow issue.
There is a new release v6.0.1, with some yet undocumented changes to arrows. Please check out.
As for #4 on your list, templates are exactly for this. with defshape you can only define an outline, an actual shape, which then act as a single background and line. Block templates allow you to take many shapes (blocks) and arrange them in any which way using different color and line. I will return with an example.
Here is an example for templates. Apperently there is some problem with drawing order and attributes, but I will fix that.
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 two_small_boxes {
box main [text.gap.left=10, imargin=5];
box sm1 [width=20, height=main@25%, center=main@vleft, vtop=main@v20%, shadow.offset=0];
box sm2 [width=20, height=main@25%, center=main@vleft, vtop=main@v60%, shadow.offset=0];
}
col {
copy two_small_boxes as A {
update main:Application\nComponent;
update sm1 [color=red];
}
space;
row {
box B:Service 1;
box C:Service 2;
}
}
A--B;
A--C;
Wow! Thank you! I saw your replies come in this weekend, but unfortunately could not respond until now, sorry for that. I really appreciate the example and the troubleshooting that you did. I'll try the new version ASAP.
I consider this solved now.