Polygon and line clipping and offsetting library (C++, C#, Delphi)
http://www.angusj.com/delphi/clipper.php