local s = selection.line(sel, x1,y1, x2,y2); */ local s = selection.line(x1,y1, x2,y2); */ s:line(x1,y1, x2,y2); */
| 506 | /* local s = selection.line(x1,y1, x2,y2); */ |
| 507 | /* s:line(x1,y1, x2,y2); */ |
| 508 | staticfn int |
| 509 | l_selection_line(lua_State *L) |
| 510 | { |
| 511 | struct selectionvar *sel = NULL; |
| 512 | coordxy x1, y1, x2, y2; |
| 513 | |
| 514 | if (!params_sel_2coords(L, &sel, &x1, &y1, &x2, &y2)) { |
| 515 | nhl_error(L, "selection.line: illegal arguments"); |
| 516 | } |
| 517 | |
| 518 | get_location_coord(&x1, &y1, ANY_LOC, gc.coder ? gc.coder->croom : NULL, |
| 519 | SP_COORD_PACK(x1, y1)); |
| 520 | get_location_coord(&x2, &y2, ANY_LOC, gc.coder ? gc.coder->croom : NULL, |
| 521 | SP_COORD_PACK(x2, y2)); |
| 522 | |
| 523 | (void) l_selection_clone(L); |
| 524 | sel = l_selection_check(L, 2); |
| 525 | selection_do_line(x1,y1,x2,y2, sel); |
| 526 | return 1; |
| 527 | } |
| 528 | |
| 529 | /* local s = selection.rect(sel, x1,y1, x2,y2); */ |
| 530 | staticfn int |
nothing calls this directly
no test coverage detected