Expose selection bounds to lua

This commit is contained in:
Pasi Kallinen
2022-08-26 13:07:52 +03:00
parent 5e9ed7a290
commit 723ee6d1f6
3 changed files with 44 additions and 0 deletions

View File

@@ -891,6 +891,16 @@ Example:
Alias for <<_fillrect>>.
=== bounds
Get the bounding box for the selection. Returns a table with lx, ly, hx, hy integer fields.
Example:
local rect = sel:bounds();
local s = string.format("(%i,%i)-(%i,%i)", rect.lx, rect.ly, rect.hx, rect.hy));
=== circle
Example: