summaryrefslogtreecommitdiff
path: root/grc/gui/Element.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/Element.py')
-rw-r--r--grc/gui/Element.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/grc/gui/Element.py b/grc/gui/Element.py
index 8418bef0cc..17cd6ddd92 100644
--- a/grc/gui/Element.py
+++ b/grc/gui/Element.py
@@ -168,6 +168,15 @@ class Element(object):
if x <= x1 <= x_m and y <= y1 <= y_m:
return self
+ @property
+ def extend(self):
+ x_min, y_min = x_max, y_max = self.coordinate
+ x_min += min(x for x, y in self._bounding_points)
+ y_min += min(y for x, y in self._bounding_points)
+ x_max += max(x for x, y in self._bounding_points)
+ y_max += max(y for x, y in self._bounding_points)
+ return x_min, y_min, x_max, y_max
+
def mouse_over(self):
pass