local rect = sel:bounds(); */
| 451 | |
| 452 | /* local rect = sel:bounds(); */ |
| 453 | staticfn int |
| 454 | l_selection_getbounds(lua_State *L) |
| 455 | { |
| 456 | struct selectionvar *sel = l_selection_check(L, 1); |
| 457 | NhRect rect = cg.zeroNhRect; |
| 458 | |
| 459 | selection_getbounds(sel, &rect); |
| 460 | lua_settop(L, 0); |
| 461 | lua_newtable(L); |
| 462 | nhl_add_table_entry_int(L, "lx", rect.lx); |
| 463 | nhl_add_table_entry_int(L, "ly", rect.ly); |
| 464 | nhl_add_table_entry_int(L, "hx", rect.hx); |
| 465 | nhl_add_table_entry_int(L, "hy", rect.hy); |
| 466 | return 1; |
| 467 | } |
| 468 | |
| 469 | /* internal function to get a selection and 4 integer values from lua stack. |
| 470 | removes the integers from the stack. |
nothing calls this directly
no test coverage detected