diff --git a/swarm/manager.py b/swarm/manager.py index 2b98f62..c3a3026 100644 --- a/swarm/manager.py +++ b/swarm/manager.py @@ -69,6 +69,8 @@ class Manager: ) for avoid in settings.get("avoid", []): + if avoid["type"].startswith("~"): + continue if avoid["type"] == "rect": self.add_avoid_rect( avoid["x"], avoid["y"], avoid["w"], avoid["h"] @@ -94,6 +96,13 @@ class Manager: for elem in settings.get("elements", []): if elem["type"].startswith("~"): continue + elif elem["type"] == "rect": + with Image.new( + "LA", + (elem["w"], elem["h"]), + ((255 if elem["fill"] else 0), 255), + ) as im: + self.put_image(elem["x"], elem["y"], im) elif elem["type"] == "text": self.put_text( elem["x"],