Hidden or invisible layers are not rendered. This function unhides invisible layer so that they are rendered again.

l_layer_show(widget, layer)

Arguments

widget

widget path or layer object of class 'l_layer'

layer

layer id. If the widget argument is of class 'l_layer' then the layer argument is not used

Value

0 if success otherwise the function throws an error

Details

Visibile layers are rendered, invisible ones are not. If any ancestor of a layer is set to be invisible then the layer is not rendered either. The layer visibility flag can be checked with l_layer_isVisible and the actual visibility (i.e. are all the ancesters visibile too) can be checked with l_layer_layerVisibility.

Note that layer visibility is not a state of the layer itself, instead is information that is part of the layer collection (i.e. its parent widget).

See also

Examples

p <- l_plot() l <- l_layer_rectangle(p, x=0:1, y=0:1, color="steelblue") l_layer_hide(p, l) l_layer_show(p, l)