Author Topic: Shapescript and element bounds  (Read 2582 times)

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Shapescript and element bounds
« 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);
 
}

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13136
  • Karma: +547/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Shapescript and element bounds
« Reply #1 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

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: Shapescript and element bounds
« Reply #2 on: June 19, 2020, 01:44:52 am »
Marvelous - is this documented anywhere?
Thansk

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13136
  • Karma: +547/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Shapescript and element bounds
« Reply #3 on: June 19, 2020, 01:47:13 am »
Marvelous - is this documented anywhere?
Thansk
Probably, maybe :-\

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13570
  • Karma: +395/-301
  • I'm no guru at all
    • View Profile
Re: Shapescript and element bounds
« Reply #4 on: June 19, 2020, 03:40:11 am »
Hm. You can try the help of EA. Good luck with that...

q.