Source position: Img32.pas line 1096
function ClosestPointOnLine(
const pt: TPointD;
const linePt1: TPointD;
const linePt2: TPointD
):TPointD;