Пример #1
0
        /// <summary>
        /// Clone
        /// </summary>
        /// <returns>map extent set</returns>
        public MapExtentSet Clone()
        {
            MapExtentSet aMapES = new MapExtentSet(m_minX, m_maxX, m_minY, m_maxY);

            aMapES.MinX     = m_minX;
            aMapES.MaxX     = m_maxX;
            aMapES.MinY     = m_minY;
            aMapES.MaxY     = m_maxY;
            aMapES.ScaleX   = m_scaleX;
            aMapES.m_scaleY = m_scaleY;

            return(aMapES);
        }
Пример #2
0
 /// <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,
                          MapExtentSet aLLSS)
 {
     projX = screenX / aLLSS.ScaleX + aLLSS.MinX;
     projY = aLLSS.MaxY - screenY / aLLSS.ScaleY;
 }
Пример #3
0
 /// <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, MapExtentSet aLLSS)
 {
     screenX = Convert.ToSingle((projX + LonShift - aLLSS.MinX) * aLLSS.ScaleX);
     screenY = Convert.ToSingle((aLLSS.MaxY - projY) * aLLSS.ScaleY);
 }