From a440f2e256a708c2302df0343b2433fbdecac190 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 11 May 2020 20:31:21 -0700 Subject: [PATCH] add Shape.set_layer() --- masque/shapes/shape.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/masque/shapes/shape.py b/masque/shapes/shape.py index 6a664a5..7bd02c1 100644 --- a/masque/shapes/shape.py +++ b/masque/shapes/shape.py @@ -436,6 +436,19 @@ class Shape(metaclass=ABCMeta): return manhattan_polygons + def set_layer(self: T, layer: layer_t) -> T: + """ + Chainable method for changing the layer. + + Args: + layer: new value for self.layer + + Returns: + self + """ + self.layer = layer + return self + def lock(self: T) -> T: """ Lock the Shape, disallowing further changes