From ba0bb325fec1190950972413122482f15ac863c9 Mon Sep 17 00:00:00 2001 From: Qermon Date: Wed, 19 Jun 2019 19:41:36 +0200 Subject: [PATCH] Add boundingBox function This function returns x, y, width and height of the last layout element --- layout.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layout.lua b/layout.lua index fd6b08c..d66ba25 100644 --- a/layout.lua +++ b/layout.lua @@ -277,6 +277,10 @@ function Layout:cols(t) function() return self._heights[#self._heights] end) -- fill height end +function Layout:boundingBox() + return self._x, self._y, self._w, self._h +end + --[[ "Tests" do