Book a Demo

Author Topic: getuserbordercolor... broken?/Shape Scripts  (Read 2284 times)

bbrown

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
getuserbordercolor... broken?/Shape Scripts
« on: February 02, 2007, 05:28:29 am »
Hi,
   I am using the shape script feature in order to draw custom stereotypes.  But, I have not been able to get getuserbordercolor or getuserfillcolor to work in combination with setfillcolor and setbordercolor.  From the documentation, the following script is supposed to use the   colors selected by the user in the script.

"Color queries may only be used to retrieve arguments for the SetPenColor and SetFillColor commands.  These queries may be used in place of the arguments.

getUserFillColor()
getUserBorderColor()
getUserFontColor()
getUserPenSize()

shape main
{
 setfillcolor(getuserbordercolor());
 setpencolor(getuserfillcolor());
 rectangle(0,0,100,100);
}
"

   When I run this script, the default colors are always used even though I have selected new default colors via the stereotypes screen, Settings->UML->Stereotypes.  The style column in t_stereotypes seems to have a custom value for the fill and border color.
   I am running build 6.5.797.

   Bill

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: getuserbordercolor... broken?/Shape Scripts
« Reply #1 on: February 04, 2007, 01:32:06 pm »
Hi Bill,

This is your problem:

Quote
even though I have selected new default colors via the stereotypes screen, Settings->UML->Stereotypes.

The getUserFillColor() and getUserBorderColor() functions work with the element colour as set using the right-click -> Appearance -> Configure Default Appearance command, or using the Format Tool toolbar.

HTH,

Neil
The Sparx Team
[email protected]