Expose selection bounds to lua
This commit is contained in:
10
doc/lua.adoc
10
doc/lua.adoc
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user