cellhd.c 621 B

123456789101112131415161718192021222324
  1. #include "globals.h"
  2. #include "local_proto.h"
  3. int Outline_cellhd(View * view, struct Cell_head *cellhd)
  4. {
  5. int row, col;
  6. int top, bottom, left, right;
  7. row = northing_to_row(&view->cell.head, cellhd->north) + .5;
  8. top = row_to_view(view, row);
  9. col = easting_to_col(&view->cell.head, cellhd->west) + .5;
  10. left = col_to_view(view, col);
  11. row = northing_to_row(&view->cell.head, cellhd->south) + .5;
  12. bottom = row_to_view(view, row);
  13. col = easting_to_col(&view->cell.head, cellhd->east) + .5;
  14. right = col_to_view(view, col);
  15. Outline_box(top, bottom, left, right);
  16. return 0;
  17. }