Book a Demo

Author Topic: More shape script fun  (Read 3759 times)

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
More shape script fun
« on: July 10, 2008, 08:34:04 am »
As a part of creating a bunch of shapescripts to help make a structured collection of stereotypes more immediately intuitive, I created a shape script for «table» ... of course, I actually wanted it to be «oeTable» inheriting from «table», but that is another discussion.

I have realized that my shapescirpt doesn't show the columns in the way the native appearance does, so I thought I would see if I can fix that.  But, I don't see any properties which would correspond to the attributes and without some kind of looping construct, I don't know how one would do this anyway.

So, I though, let's try a difference approach.  Perhaps I can use drawnativeshape() to get all the standard stuff in there, but to precede or follow it with additional commands to get the overall effect I am looking for.

So, as a first step I did just

shape main
{
  drawnativeshape();
}

and, sure enough, that gives me everything as it would be without the shapescript.  But, then I tried:

shape main
{
  noshadow=true;
  setfillcolor(255,204,255);
  drawnativeshape();
}

The result is really quite remarkable.  The left half of the overall shape is the 255/204/255 color, but the right half is the native color except for the line containing «column» where it is native color all the way across.

I suppose that trying this out on «table» is probably worst case, but I do have to say that this is really quite bizarre.

Note that, if I modify the default color of this stereotype, I don't see anything in that color, just the standard default color.
« Last Edit: July 10, 2008, 08:37:29 am by tamhas »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: More shape script fun
« Reply #1 on: July 10, 2008, 09:12:54 am »
It appears that the drawnativeshape() command and gradient fills are in conflict. Could you send in a bug report please? Thanks.
The Sparx Team
[email protected]

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: More shape script fun
« Reply #2 on: July 10, 2008, 09:21:10 am »
Done ... now if I only had a tracking number to keep it separate from my other open (and far more important) support case! :)

Note also that I can override the default color and then use :

shape main
{
  noshadow=true;
  setpen(0,0,0,2);
  drawnativeshape();
}

and get something close to what I would want, but the gradient fill is a little off between sections.

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: More shape script fun
« Reply #3 on: July 10, 2008, 02:44:35 pm »
Just received from sparxsupport:

Thank you for your bug report. We have found and fixed the problem and
the fix should appear in build 832.

Now, that's what I call action!