/*************************************************************************** * * * INPOLY.H * * * * Copyright (C) 1995 GALACTICOMM, Inc. Freeware source code. * * * * Please feel free to use this source code for any purpose, commercial * * or otherwise, as long as you don't restrict anyone else's use of * * this source code. Please give credit where credit is due. * * * * Point-in-polygon algorithm, created especially for World-Wide Web * * servers to process image maps with mouse-clickable regions. * * * * Home for this file: ftp://gcomm.com/library/develop/inpoly.c * * * * 6/19/95 - Bob Stein & Craig Yap * * stein@gcomm.com * * craig@cse.fau.edu * * * ***************************************************************************/ int /* 1=yes, 0=no */ inpoly( /* is target point inside a 2D polygon? */ unsigned int poly[][2], /* polygon points, [0]=x, [1]=y */ int npoints, /* number of points in polygon */ unsigned int xt, /* x (horizontal) of target point */ unsigned int yt); /* y (vertical) of target point */