Пример #1
0
int Outline_cellhd(View * view, struct Cell_head *cellhd)
{
    int row, col;
    int top, bottom, left, right;

    row = northing_to_row(&view->cell.head, cellhd->north) + .5;
    top = row_to_view(view, row);

    col = easting_to_col(&view->cell.head, cellhd->west) + .5;
    left = col_to_view(view, col);

    row = northing_to_row(&view->cell.head, cellhd->south) + .5;
    bottom = row_to_view(view, row);

    col = easting_to_col(&view->cell.head, cellhd->east) + .5;
    right = col_to_view(view, col);

    Outline_box(top, bottom, left, right);

    return 0;
}
Пример #2
0
int display_one_point(View * view, double east, double north)
{
    int row, col, x, y;

    row = northing_to_row(&view->cell.head, north) + .5;
    col = easting_to_col(&view->cell.head, east) + .5;
    y = row_to_view(view, row);
    x = col_to_view(view, col);
    if (In_view(view, x, y))
	dot(x, y);

    return 0;
}