Adjust the number of rows and columns on the given map window */
| 1626 | |
| 1627 | /* Adjust the number of rows and columns on the given map window */ |
| 1628 | void |
| 1629 | set_map_size(struct xwindow *wp, Dimension cols, Dimension rows) |
| 1630 | { |
| 1631 | Arg args[4]; |
| 1632 | Cardinal num_args; |
| 1633 | |
| 1634 | cols -= COL0_OFFSET; |
| 1635 | if (wp->map_information->is_tile) { |
| 1636 | wp->pixel_width = wp->map_information->tile_map.square_width * cols; |
| 1637 | wp->pixel_height = wp->map_information->tile_map.square_height * rows; |
| 1638 | } else { |
| 1639 | wp->pixel_width = wp->map_information->text_map.square_width * cols; |
| 1640 | wp->pixel_height = wp->map_information->text_map.square_height * rows; |
| 1641 | } |
| 1642 | |
| 1643 | num_args = 0; |
| 1644 | XtSetArg(args[num_args], XtNwidth, wp->pixel_width); num_args++; |
| 1645 | XtSetArg(args[num_args], XtNheight, wp->pixel_height); num_args++; |
| 1646 | XtSetValues(wp->w, args, num_args); |
| 1647 | } |
| 1648 | |
| 1649 | static void |
| 1650 | init_text(struct xwindow *wp) |
no outgoing calls
no test coverage detected