Book a Demo

Author Topic: Arc Shapescripts - Rendering Order  (Read 28059 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Arc Shapescripts - Rendering Order
« on: January 15, 2016, 11:01:23 am »
After using this product for over a decade, I've just noticed that shapescripts for arcs draw the elements ina (to me) non-intuitive way.  It appears EA will draw shapes source and target (not clear which order) and THEN shape main.

This makes it REALLY difficult to suppress the main line at either end so that it is not visible if you wish to creatre an end shape that doesn't include the line.  For example, draw a circle as either source or target and you'll see what I mean. 

Because of the order of rendering, even a fill command won't do it.

It seems to me that if the order were shape main THEN shapes source and target, we'd end up with a more flexible shape script mechanism.

I think this could be done without affecting any existing shapescripts.

What do others think?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #1 on: January 15, 2016, 12:26:12 pm »
Imagine what you could achieve if Shapescript was replaced with SVG   :D

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #2 on: January 15, 2016, 06:32:59 pm »
Imagine what you could achieve if Shapescript was replaced with SVG   :D
Man, you doin' craaaazy talk!   :o

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #3 on: January 15, 2016, 10:22:00 pm »
Imagine what you could achieve if Shapescript was replaced with SVG   :D
You would loose the ability to program conditions.

q.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #4 on: January 18, 2016, 07:21:04 am »
Crazy sweet HTML output tho.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #5 on: January 18, 2016, 09:05:56 am »
Imagine what you could achieve if Shapescript was replaced with SVG   :D
To expand on what qwerty already said, shape scripts are not just about defining an image to render.

Shape scripts are for defining a mapping between the EA object model and the EA rendering engine. They are limited in the access they provide to the metamodel, the language syntax, the rendering engine and in this case when they are called.

If you want to see how useful SVG would be, use alternate images on your elements. You won't be able to do that for connectors, but I'm sure you can work out why not and why SVG won't work there either.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #6 on: January 18, 2016, 10:47:40 am »
Imagine what you could achieve if Shapescript was replaced with SVG   :D
To expand on what qwerty already said, shape scripts are not just about defining an image to render.

Shape scripts are for defining a mapping between the EA object model and the EA rendering engine. They are limited in the access they provide to the metamodel, the language syntax, the rendering engine and in this case when they are called.

If you want to see how useful SVG would be, use alternate images on your elements. You won't be able to do that for connectors, but I'm sure you can work out why not and why SVG won't work there either.
As You would guess Simon,

I DO understand all that - but it may not be obvious to all.  MY point was that the limited access is just that; somewhat too limited.
Take my point above, the order of rendering is somewhat arbitrary and ONLY the unfortunate outcome brought it to my attention.
So, is there any point in placing a feature request/bug report to get this changed?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #7 on: January 19, 2016, 08:25:06 am »
Paolo,

I wasn't suggesting you didn't know the difference between a shape script and an SVG. I was responding to Glassboy.

As I can't demonstrate that there aren't users who want the current behavior, you chance of a change here is slim.

Does something like the following work for you?

Code: [Select]
shape source
{
    noShadow=true;
endpointx = 20;
endpointy = 0;
scalable = false;
rotatable = false;
   
    ellipse(0,-10,20,10);
}

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #8 on: January 19, 2016, 02:22:38 pm »
Paolo,

I wasn't suggesting you didn't know the difference between a shape script and an SVG. I was responding to Glassboy.
Understood.

Quote
As I can't demonstrate that there aren't users who want the current behavior, you chance of a change here is slim.
From first principles, I might argue it's isn't possible that ANYONE would want the current behaviour - given its consequences.  Can you (or anybody else) come up with a rationale for it?

Quote
Does something like the following work for you?

Code: [Select]
shape source
{
    noShadow=true;
endpointx = 20;
endpointy = 0;
scalable = false;
rotatable = false;
   
    ellipse(0,-10,20,10);
}
No, because the target shape "mysteriously" disappears when you set the source shape to that code.   :'(

I tried duplicating the code in the target and it then appears, but if I change the shape from a circle which is rotationally identical to a shape that isn't (such as a closed arrow) the the rotatable = false; "kicks in" and it looks completely wrong.  OK, so just remove the rotatable = false;...   But if you do that, the shape disappears again!  ::)

Can YOU guys get it to work?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #9 on: January 19, 2016, 03:10:17 pm »
You can argue from first principles that it's impossible for anyone to implement something like the UML nesting notation and omit a line from the script either because it was unnecessary or because two anti-aliased lines on top of each other increase the perceived width? That's just one example of a real world notation that would be broken by making the change you're proposing.

Yes, the end point can only be used on a non-rotateable end, and I think both ends need to use that style. I don't think there has been a need for anything else in the past.

The use of shape scripts like that has been working since the Information Engineering notation was added to EA.

Maybe I wasn't clear. Can you make it work for you, even if it's not ideal?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #10 on: January 19, 2016, 05:32:43 pm »
You can argue from first principles that it's impossible for anyone to implement something like the UML nesting notation and omit a line from the script either because it was unnecessary or because two anti-aliased lines on top of each other increase the perceived width? That's just one example of a real world notation that would be broken by making the change you're proposing.
Not sure I follow why it would break, but let's leave it there.  I accept it isn't going to happen.

Quote
Yes, the end point can only be used on a non-rotatable end, and I think both ends need to use that style. I don't think there has been a need for anything else in the past.
Just a point of clarification here.  Are you saying: "If one side has a non-rotatable end, then the other side must have a non-rotatable end" - by definition, by the current design or by your belief (no offence intended - use of "I think" for "I believe").

Quote
The use of shape scripts like that has been working since the Information Engineering notation was added to EA.
I wondered how you got that to work.  So now we know...

Quote
Maybe I wasn't clear. Can you make it work for you, even if it's not ideal?
If that's all that's available; then, I guess, there's not much option.  :(

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #11 on: January 20, 2016, 09:03:31 am »
Just a point of clarification here.  Are you saying: "If one side has a non-rotatable end, then the other side must have a non-rotatable end" - by definition, by the current design or by your belief (no offence intended - use of "I think" for "I believe").
Think in this context means my observation prompted a very old memory of the design.


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #12 on: January 20, 2016, 10:44:53 am »
Just a point of clarification here.  Are you saying: "If one side has a non-rotatable end, then the other side must have a non-rotatable end" - by definition, by the current design or by your belief (no offence intended - use of "I think" for "I believe").
Think in this context means my observation prompted a very old memory of the design.
Thanks, Simon,
That's what I thought, but didn't want to make any assumptions.

As per my previous question, is there any point in adding a feature request to make the rotatable optional at either end?  From what I can see of the observed behaviour with my small amount of testing, I wouldn't have expected there'd be a problem.  The original design was created for a specific use - for which I can see the rationale, but I would consider the mandatory requirement for Rotatable=false to be an unintended consequence of the design.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #13 on: January 21, 2016, 08:27:21 am »
I can't see any negative consequences for allowing an end point to be specified for rotatable ends or for allowing a single rotatable end.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Arc Shapescripts - Rendering Order
« Reply #14 on: January 21, 2016, 10:55:53 am »
I can't see any negative consequences for allowing an end point to be specified for rotatable ends or for allowing a single rotatable end.
Thanks,  reported...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!