return a description of the selection size */
| 761 | |
| 762 | /* return a description of the selection size */ |
| 763 | char * |
| 764 | selection_size_description(struct selectionvar *sel, char *buf) |
| 765 | { |
| 766 | NhRect rect = cg.zeroNhRect; |
| 767 | coordxy dx, dy; |
| 768 | |
| 769 | selection_getbounds(sel, &rect); |
| 770 | dx = rect.hx - rect.lx + 1; |
| 771 | dy = rect.hy - rect.ly + 1; |
| 772 | Sprintf(buf, "%s %i by %i", |
| 773 | selection_is_irregular(sel) ? "irregularly shaped" |
| 774 | : (dx == dy) ? "square" |
| 775 | : "rectangular", |
| 776 | dx, dy); |
| 777 | return buf; |
| 778 | } |
| 779 | |
| 780 | struct selectionvar * |
| 781 | selection_from_mkroom(struct mkroom *croom) |
no test coverage detected