Source position: Img32.pas line 1120
function GetClosestPtOnRotatedEllipse(
const ellipseRect: TRectD;
ellipseRotation: Double;
const pt: TPointD
):TPointD;