/***************************************************************************
 *                                                                         *
 *   INPOLY.H                                                              *
 *                                                                         *
 *   Copyright (c) 1995-1997 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.h         *
 *                                                                         *
 *                                       6/19/95 - Bob Stein & Craig Yap   *
 *                                                                         *
 ***************************************************************************/

#ifndef __INPOLY_H
#define __INPOLY_H

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

GBOOL                              /*   TRUE=inside, FALSE=outside         */
inpoly(                            /* is target point inside a 2D polygon? */
UINT poly[][2],                    /*   polygon points, [0]=x, [1]=y       */
INT npoints,                       /*   number of points in polygon        */
UINT xt,                           /*   x (horizontal) of target point     */
UINT yt);                          /*   y (vertical) of target point       */

#ifdef __cplusplus
}; // extern "C"
#endif // __cplusplus

#endif                             /* __INPOLY_H                           */
