Author Topic: Get target size in shape script.  (Read 4778 times)

Screwtape

  • EA User
  • **
  • Posts: 93
  • Karma: +4/-0
    • View Profile
Get target size in shape script.
« on: November 08, 2014, 12:48:17 am »
Hi!

I'm trying to improve on the embarrassing "cylinder" used for servicebus stereotypes.

However, having read the shapescript documentation, I can't see any way of finding out the size or aspect ratio of the object being laid-out.

You also can set scaling either on, fixed aspect, or off. I've even tried to add a sub-shape with fixed aspect, within a non-fixed main shape, but that doesn't work either.

Surely there must be a way of having a shape that is proportional to only one of the axes of the drawing, rather than both. It really makes shapescript rather inadequate if there isn't.

Please tell me I'm wrong and have missed something obvious!
Screwtape

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Get target size in shape script.
« Reply #1 on: November 08, 2014, 02:22:38 am »
Shape script simply lacks arithmetics. So you can not place a fixed size sub-shape inside a shape. It will always resize with the whole shape  :-/

q.

Screwtape

  • EA User
  • **
  • Posts: 93
  • Karma: +4/-0
    • View Profile
Re: Get target size in shape script.
« Reply #2 on: November 08, 2014, 02:29:12 am »
It's practically useless then, and rather explains the lack of a decent cylinder icon.

All it needs is to be able to identify the size and/or aspect ratio, and perform basic arithmetic, and it would be really useful.

In the mean time, my otherwise very professional looking diagrams are let down by a lousy servicebus cylinder, that only looks approximately right if you have it precisely the right aspect ratio, which it often isn't because you need to to be long for the very reason it's a service bus.

It's bizarre, EA repeatedly lets itself down with really trivial issues.
Screwtape

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Get target size in shape script.
« Reply #3 on: November 08, 2014, 02:33:10 am »
What you can do is to include a bitmap with the image command.

q.

Screwtape

  • EA User
  • **
  • Posts: 93
  • Karma: +4/-0
    • View Profile
Re: Get target size in shape script.
« Reply #4 on: November 08, 2014, 02:34:59 am »
But that won't scale correctly either... would it?

If I'm trying to do this...
   _____________________
  (                                   ( )
(                                   (   )
(                                   (   )
  (____________________( )
 
i need the curved lines to be roughly 1/4 to 1/5 the width of the overall height of the shape, regardless of the width of the overall shape. A surely bitmap either woudn't change height, or would scale in both axes independently.
« Last Edit: November 08, 2014, 02:40:01 am by Screwtape »
Screwtape

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Get target size in shape script.
« Reply #5 on: November 08, 2014, 02:39:56 am »
Ah yes. It scales the same as all the other shapes :(

You're absolute right with what you said. In Germany we say that you built something with your hands and broke it down with your ass.

q.
« Last Edit: November 08, 2014, 02:41:32 am by qwerty »