Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Thomas H. on November 21, 2008, 05:42:11 am
-
I am trying to create a "half circle" shape for the end of a connector as follows:
shape main
{
// draw a dashed line
noshadow=true;
setlinestyle("SOLID");
moveto(0,0);
lineto(100,0);
}
shape target
{
startpath();
setfillcolor(0,0,0);
setpencolor(0,0,0);
moveto(0,0);
arc(-8, 8, 8, -8, 0, 8, 0, -8);
endpath();
fillandstrokepath();
}
I expected that the half circle rotates as it is done for example with the normal arrows, but the half circle does not.
Has anyone an idea how this can be done?
-
I gave your shape script a go, and the result really wasn't what I was expecting. Without looking at the source (I probably wouldn't understand it if I did) I suspect that the arc() function uses absolute positioning and can't take into account the direction of the line.
Can you Report the Bug (http://www.sparxsystems.com/support/bug_report.html) to Sparx support please. At the very least we should be able to provide "sourceedge" and "targetedge" properties to allow you to test whether the line attaches to the left, right, top or bottom edge, so you can change the arc parameters accordingly.