[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'LazRegions' (#lcl)

# IsPointInPolygon

Determines if the specified point is inside the vertices for the specified polygon.

## Declaration

Source position: lazregions.pas line 107

`function IsPointInPolygon(`
`AX: Integer;`
`AY: Integer;`
`const APolygon: array of TPoint`
`):Boolean;`

## Arguments

`AX` |  | Horizontal coordinate for the point.
`AY` |  | Vertical coordinate for the point.
`APolygon` |  | Array with the TPoint values that define the vertices for the polygon.

## Function result

True when the specified point is located within the polygon using the specified vertices.

## Description

The function will return True if the point at AX, AY is inside the specified polygon. Returns False if it is not.

Original C code: http://www.visibone.com/inpoly/inpoly.c.txt .

Translated from C to Pascal by: Felipe Monteiro de Carvalho.

## See also

TLazRegionPolygon.IsPointInPart |  | Indicates if a point with the specified coordinates is within the vertices for the polygonal region.