Find the closest point out of locations to the given point on the given constraining rectangle.
locations
An x,y location in pixel values
Width/height of the bounding box, in pixels
A list of x/y logical locations, whose values are proportional lengths (anchor format).
Find the closest point out of
locations
to the given point on the given constraining rectangle.