Prev | Next |
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. These queries can be used in place of arguments.
- getUserFillColor() - returns the user-selected fill color of the current element
- getUserBorderColor() - returns the user-selected border/line color of the current element
- getUserFontColor() - returns the user-selected text font color of the current element
- getUserPenSize() - returns the user-selected line thickness ofthe current element
- getDefaultFillColor() - returns the default fill color for the current element without using the colors applied to this element
- getDefaultLineColor() - returns the default line color for the current element without using the colors applied to this element
- getStatusColor() - returns the status color for the current element; if no color is defined for this status, or status colors are not displayed against this type, this query will return the same as getUserFillColor
For example:
shape main
{
setfillcolor(getuserfillcolor());
setpencolor(getuserbordercolor());
rectangle(0,0,100,100);
}
Notes
Learn more