17 static int pnpoly(
int npol,
int *xp,
int *yp,
int x,
int y)
21 for (i = 0, j = npol - 1; i < npol; j = i++) {
22 if ((((yp[i] <= y) && (y < yp[j])) ||
23 ((yp[j] <= y) && (y < yp[i]))) &&
24 (x < (xp[j] - xp[i]) * (y - yp[i]) / (yp[j] - yp[i]) + xp[i]))
34 struct MapPoly *poly, *test_poly;
49 if (poly == test_poly) {
54 for (i = 0; i < poly->
num_pts && inside; i++) {
55 inside = pnpoly(test_poly->
num_pts,
75 fprintf(
html.
output,
"#base _base_\n#default _default_\n");
97 for (i = 0; i < poly->
num_pts; i++) {
106 for (i = 0; i < poly->
num_pts; i++) {
115 "<AREA SHAPE=\"POLY\"\n HREF=\"%s\"\n ALT=\"%s\"\n COORDS=\"",
117 for (i = 0; i < poly->
num_pts; i++) {
149 "<AREA SHAPE=\"RECT\" NOHREF COORDS=\"%d,%d %d,%d\">\n",
struct MapPoly * next_poly
void HTML_Graph_close(void)