Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

dbGetShapeColor

dbGetShapeColor(
d_shapeId
)
=> t_maskColor / nil

Description

Returns the assigned color of the specified shape. By default, all newly created shapes are of the grayColor color type, which represents the currently assigned color of the shape.

Arguments

d_shapeId

ID of the shape whose color is to be returned.

To check the shape's colorability use dbIsShapeColoringAllowed.

Value Returned

t_maskColor

Returns a string representing the color of the shape. The shape color can be one of the following: "grayColor", "mask1Color", "mask2Color", "mask3Color", "mask4Color", "mask5Color", "mask6Color", "mask7Color", or "mask8Color".

nil

Returns nil if an error occurs during execution

Example

dbGetShapeColor( coloredRect ) => "mask2Color"
dbGetShapeColor( dbCreateRect( cvId "M1" "drawing" '((0 0) (100 100)) ) ) => "grayColor"   ; newly created shapes are colored in gray color.

Return to top
 ⠀
X