Source position: Img32.pas line 1098
function ClosestPointOnSegment(
const pt: TPointD;
const segPt1: TPointD;
const segPt2: TPointD
):TPointD;