Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Color Queries
In defining your shape, you might want to retain the fill, border and font colors you have already defined for the base shape. You can set the color definition using a color query to retrieve arguments for the SetPenColor and SetFillColor commands. The following queries can be used in place of arguments.
· | getUserFillColor() |
· | getUserBorderColor() |
· | getUserFontColor() |
· | getUserPenSize() |
For example:
shape main
{
setfillcolor(getuserbordercolor());
setpencolor(getuserfillcolor());
rectangle(0,0,100,100);
}
Notes
· | The user colors are those that would be set on the base object if it were not being modified by the Shape Script; they would have been defined using - in order of decreasing precedence - the Format toolbar options, the Appearance options (F4) or the Options dialog (Tools | Options) |
· | Because the user colors are those defined for an element to which the stereotype and Shape Script are subsequently applied, they cannot be depicted in the Preview panel of the Shape Editor |
Learn more
The material ("material" includes all pages, documents and on-line graphics) on this web site is protected by copyright law. (C) 1998-2015 Sparx Systems Pty Ltd.