Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: GrahamL on June 19, 2020, 01:07:48 am

Title: Shapescript and element bounds
Post by: GrahamL on June 19, 2020, 01:07:48 am
Hi
When my shapescript is used on a diagram the element bounds are bigger than than the defined shape and I cant seem to fix it. My shapescript is below and any inout would be welcome - thanks
shape main
{
   noShadow=true;
   DefSize(150,70);
   setfillcolor(255,255,255); // default is white
   RoundRect(0,0,100,70,30,30);
 
}
Title: Re: Shapescript and element bounds
Post by: Geert Bellekens on June 19, 2020, 01:41:56 am
Graham,

You always write a shapescript based on a 100 x 100 square, even if you want a rectangular shape.

So you should do
RoundRect(0,0,100,100,30,30);
If you want your rounded rectangle to align with the boundaries of your shape.

Geert
Title: Re: Shapescript and element bounds
Post by: GrahamL on June 19, 2020, 01:44:52 am
Marvelous - is this documented anywhere?
Thansk
Title: Re: Shapescript and element bounds
Post by: Geert Bellekens on June 19, 2020, 01:47:13 am
Marvelous - is this documented anywhere?
Thansk
Probably, maybe :-\

Geert
Title: Re: Shapescript and element bounds
Post by: qwerty on June 19, 2020, 03:40:11 am
Hm. You can try the help of EA. Good luck with that...

q.