cellhd.c 640 B

1234567891011121314151617181920212223
  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 = Rast_northing_to_row(cellhd->north, &view->cell.head) + .5;
  8. top = row_to_view(view, row);
  9. col = Rast_easting_to_col(cellhd->west, &view->cell.head) + .5;
  10. left = col_to_view(view, col);
  11. row = Rast_northing_to_row(cellhd->south, &view->cell.head) + .5;
  12. bottom = row_to_view(view, row);
  13. col = Rast_easting_to_col(cellhd->east, &view->cell.head) + .5;
  14. right = col_to_view(view, col);
  15. Outline_box(top, bottom, left, right);
  16. return 0;
  17. }