/// <summary> /// convert coordinate from screen to map /// </summary> /// <param name="projX"></param> /// <param name="projY"></param> /// <param name="screenX"></param> /// <param name="screenY"></param> /// <param name="aLLSS"></param> public void ScreenToProj(ref double projX, ref double projY, double screenX, double screenY, XYScreenSet aLLSS) { projX = (screenX - aLLSS.XLBorderSpace) / aLLSS.ScaleX + aLLSS.MinX; projY = aLLSS.MaxY - (screenY - aLLSS.YTBorderSpace) / aLLSS.ScaleY; }
/// <summary> /// Convert coordinate from map to screen /// </summary> /// <param name="projX"></param> /// <param name="projY"></param> /// <param name="screenX"></param> /// <param name="screenY"></param> /// <param name="LonShift"></param> /// <param name="aLLSS"></param> public void ProjToScreen(double projX, double projY, ref Single screenX, ref Single screenY, double LonShift, XYScreenSet aLLSS) { screenX = Convert.ToSingle((projX + LonShift - aLLSS.MinX) * aLLSS.ScaleX + aLLSS.XLBorderSpace); screenY = Convert.ToSingle((aLLSS.MaxY - projY) * aLLSS.ScaleY + aLLSS.YTBorderSpace); }