Commit 3e10fece authored by Martin Owens's avatar Martin Owens 🤖

Add is_visible boolean to all shape elements

parent b5c96d63
Pipeline #137370125 passed with stages
in 3 minutes and 50 seconds
......@@ -445,3 +445,11 @@ class ShapeElement(BaseElement):
if transform: # apply extra transformation
path = path.transform(transform)
return path.bounding_box()
def is_visible(self):
"""Returns false if the css says this object is invisible"""
if self.style.get('display', '') == 'none':
return False
if not float(self.style.get('opacity', 1.0)):
return False
return True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment