Book a Demo

Author Topic: Symbol preceding a label in a shapescript  (Read 5294 times)

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Symbol preceding a label in a shapescript
« on: September 22, 2010, 12:07:07 am »
Hi All

Does anyone know how a symbol can be drawn in front of the text present in a label in a shapescript?

The effect I am after is similar to the "reading direction" black triangle for an association.

There appears to be no way to affect the text position, I can get the symbol, but the text is placed on top rather than alongside

Cheers
Models are great!
Correct models are even greater!

beginner

  • Guest
Re: Symbol preceding a label in a shapescript
« Reply #1 on: September 22, 2010, 02:40:14 am »
I guess you will be out of luck as the shapes are only defined for the line and the end points (AFAIK!). There is nothing to draw label symbols.

You hear my wailing cry once again: if we only had a consistently programmable rendering machine. Why oh why do we need to have another new language? There are so many appropriate standard languages (Perl, Python, Ruby, Scheme, you name it). Giving them the full EA API. And you're done.

Transformation?

Code generation?

Hijacked?

b.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Symbol preceding a label in a shapescript
« Reply #2 on: September 22, 2010, 08:23:09 am »
Code: [Select]
shape middletoplabel
{
      print("#Name#");
      setfillcolor(0,0,0);
      startpath();
      moveto(-20,50);
      lineto(-10,0);
      lineto(-10,100);
      endpath();
      fillandstrokepath();
}

beginner

  • Guest
Re: Symbol preceding a label in a shapescript
« Reply #3 on: September 22, 2010, 04:42:23 pm »
A quick help and a salute to Sparx' support!

I'm beaten in that respect. My point is standing, still. This goes to Sparx development team anyway.

b.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Symbol preceding a label in a shapescript
« Reply #4 on: September 22, 2010, 06:30:14 pm »
Be careful though...  IIRC, the usage of label for various purposes is NOT consistent between non-reflexive and reflexive arcs.

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

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Symbol preceding a label in a shapescript
« Reply #5 on: September 23, 2010, 12:53:04 am »
Many many thanks for all the replies, most helpful!

Cheers
Models are great!
Correct models are even greater!