DisplayStyleSet

class ipkiss.visualisation.display_style.DisplayStyleSet

List of layer, DisplayStyle tuples.

The display style list defines the display settings for a given set of layers. It’s defined as part of the technology and its default location in the tree is TECH.DISPLAY.DEFAULT_DISPLAY_STYLE_SET.

The order in the list determines the order with which the layers will be rendered. Layers/display styles that come later in the list will cover those that come before.

Examples

import ipkiss3.all as i3
from ipkiss.visualisation import color, stipple
from ipkiss.visualisation.display_style import DisplayStyle, DisplayStyleSet

DISPLAY_GREEN = DisplayStyle(
    color=color.COLOR_GREEN,
    stipple=stipple.STIPPLE_FILLED,
    alpha=1.0,
    edgewidth=1.0,
)

DISPLAY_YELLOW = DisplayStyle(
    color=color.COLOR_YELLOW,
    stipple=stipple.STIPPLE_FILLED,
    alpha=0.5,
    edgewidth=1.0,
)

display_styles = DisplayStyleSet([
    (i3.TECH.PPLAYER.M1.LINE, DISPLAY_GREEN),
    (i3.TECH.PPLAYER.M2.LINE, DISPLAY_YELLOW),
])

lv = i3.LayoutCell().Layout(elements=[
    i3.Rectangle(layer=i3.TECH.PPLAYER.M1.LINE, box_size=(20, 5)),
    i3.Rectangle(layer=i3.TECH.PPLAYER.M2.LINE, box_size=(5, 20)),
])
lv.visualize(display_styles=display_styles)
../../../../_images/ipkiss-visualisation-display_style-DisplayStyleSet-1.png
to_lyp(path, layertable=None, layer_names={}, group=False)

Writes the display settings to a .lyp file

The order of the exported layers is determined by the order in the DisplayStyleSet. Note that when you group the settings by process, the exported order is decided by the process first and the purpose second.

Parameters:
layertable:

The layertable that maps Layer to gdsii numbers. If not specified the layers and gdsoutput map specified in the technology will be used.

layer_names:

Optional Layer => str map. this allows you to override the name of the layers.

group: bool

will group the display properties by process when set to True. Default is False.