RegionsStyle#

class movement.napari.layer_styles.RegionsStyle(name='Regions', visible=True, blending='translucent', color='red', edge_width=5.0, opacity=1.0, text=<factory>)[source]#

Bases: LayerStyle

Style properties for a napari Shapes layer containing regions.

The same color is applied to faces, edges, and text. The face color alpha is hardcoded to 0.25, while edges and text are fully opaque. Overall layer opacity is set to 1.0.

Methods

as_kwargs()

Return the style properties as a dictionary of kwargs.

set_color_all_shapes(layer)

Set colors on all existing shapes in a napari Shapes layer.

set_style_for_new_shapes(layer)

Set the style that napari will apply to newly drawn shapes.

as_kwargs()#

Return the style properties as a dictionary of kwargs.

Return type:

dict

set_color_all_shapes(layer)[source]#

Set colors on all existing shapes in a napari Shapes layer.

Return type:

None

set_style_for_new_shapes(layer)[source]#

Set the style that napari will apply to newly drawn shapes.

napari uses current_* properties to style shapes as they are drawn.

Return type:

None

property edge_and_text_color: ColorValue#

Return the opaque color for edges and text.

property face_color: ColorValue#

Return the face color with transparency applied.