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

dbGetShapeEffectiveColor

dbGetShapeEffectiveColor( 
l_occShape 
)
=> l_colorAndColorState / nil

Description

Implements a query for individual colored shapes. This function takes an occurrence shape (a list consisting of the absolute hierarchical path and the master shape) as an argument. It returns the color of the shape and two Boolean values that indicate whether the color state is locked and whether it was colored by hierarchical color locking.

This function cannot be used for flat (non-hierarchical) shapes. Use dbGetShapeColor and dbIsShapeColorLocked for non-hierarchical shapes.

To get a list of shapes and occurrence shapes within a given region, and the coloring information for each shape, see dbColorShapeQuery2.

Arguments

l_occShape

list(l_hierPath d_shapeId)
where,

  • l_hierPath is list((d_refId | l_mosaicElem)…) where,
    • d_refId The database ID of the non-mosaic instance or via.
    • l_mosaicElem is list(d_mosaicId x_row x_col) Represents a mosaic element in the hierarchy path. where,
      • d_mosaicId The database ID of the mosaic instance.
      • x_row Row in which d_shapeId occurs inside this mosaic instance.
      • x_col Column in which d_shapeId occurs inside this mosaic instance.
  • d_shapeId The database ID of the shape.

Value Returned

l_colorAndColorState

(t_color b_isLocked b_isHCL)
A list of elements.

where,

  • t_color Name of the color mask ("grayColor", "mask1Color", "mask2Color", "mask3Color", "mask4Color", "mask5Color", "mask6Color", "mask7Color", or "mask8Color")
  • b_isLocked A Boolean value that determines whether the color of the shape is locked.
  • b_isHCL A Boolean value that specifies whether the shape color is due to the color attribute (nil) or hierarchical color locking (t).

nil

Returned in case of failure.

Example

Prints hierarchical coloring information (color, color state, and whether coloring is from hierarchical color locking) for each shape in the row 1 and column 0 element of the mosaic M1.

cv = dbOpenCellView("lib" "top" "layout")
mosaic = dbFindMosaicByName(cv "M1")
foreach(shape mosaic->master->shapes
hierPath = list(list(mosaic 1 0))
occShape = list(hierPath shape)
colorInfo = dbGetShapeEffectiveColor(occshape)
printf("color=%s, isLocked=%L, isHCL=%L\n"
car(colorInfo) cadr(colorInfo) caddr(colorInfo)
)
)

Prints coloring information for M1 shapes on the drawing purpose. The coloring information is printed by dbGetShapeEffectiveColor for hierarchical shapes, and by dbGetShapeColor and dbIsShapeColorLocked for non-hierarchical shapes.

shapes = dbShapeQuery( deGetCellView() list("M1" "drawing") list(0:0 0:0) )
foreach( occ shapes
if( listp(occ) then
path = reverse(cdr(reverse(occ))) ; gets all elements of the list but last
shape = car(last(occ))
println(dbGetShapeEffectiveColor(list(path shape)))
else
println(list(dbGetShapeColor(occ) dbIsShapeColorLocked(occ)))
) ; if
) ; foreach


Return to top
 ⠀
X