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
Value Returned
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