绘制多边形偏移的函数?

I have a procedure to determine if a point is within a polygon, but id like also add a buffer around the polygon to add search results that are X out of the boundry. How would i do this?

Im programming in php. The procedure used to determine if the point is in the polygon is: http://assemblysys.com/php-point-in-polygon-algorithm/

Any help would be great. Thanks.