ó
 \c           @   s,   d  d l  m Z m Z d   Z d   Z d S(   i   (   t   _grid_points_in_polyt   _points_in_polyc         C   s   t  |  |  S(   sv  Test whether points on a specified grid are inside a polygon.

    For each ``(r, c)`` coordinate on a grid, i.e. ``(0, 0)``, ``(0, 1)`` etc.,
    test whether that point lies inside a polygon.

    Parameters
    ----------
    shape : tuple (M, N)
        Shape of the grid.
    verts : (V, 2) array
        Specify the V vertices of the polygon, sorted either clockwise
        or anti-clockwise. The first point may (but does not need to be)
        duplicated.

    See Also
    --------
    points_in_poly

    Returns
    -------
    mask : (M, N) ndarray of bool
        True where the grid falls inside the polygon.

    (   R    (   t   shapet   verts(    (    s5   lib/python2.7/site-packages/skimage/measure/pnpoly.pyt   grid_points_in_poly   s    c         C   s   t  |  |  S(   sÖ  Test whether points lie inside a polygon.

    Parameters
    ----------
    points : (N, 2) array
        Input points, ``(x, y)``.
    verts : (M, 2) array
        Vertices of the polygon, sorted either clockwise or anti-clockwise.
        The first point may (but does not need to be) duplicated.

    See Also
    --------
    grid_points_in_poly

    Returns
    -------
    mask : (N,) array of bool
        True if corresponding point is inside the polygon.

    (   R   (   t   pointsR   (    (    s5   lib/python2.7/site-packages/skimage/measure/pnpoly.pyt   points_in_poly    s    N(   t   _pnpolyR    R   R   R   (    (    (    s5   lib/python2.7/site-packages/skimage/measure/pnpoly.pyt   <module>   s   	