Beispiel #1
0
        public SPoint MapToScreen(ICoor coor)
        {
            double realX = (coor.X - MapFrame.Start.X) * MapFrame.Scale;
            double realY = (coor.Y - MapFrame.Start.Y) * MapFrame.Scale;

            return(new SPoint((int)realX, (int)realY));
        }
Beispiel #2
0
 public Point(ICoor coor)
 {
     Coors = new List <ICoor> {
         coor
     };
     Painter = new PointPainter();
 }
Beispiel #3
0
        public void Zoom(ICoor coor, double scale)
        {
            if (scale < 0)
            {
                scale = 0.05;
            }
            ISize oldSize = (ISize)MapFrame.Size.Clone();

            MapFrame.Scale = scale;
            var Width  = (MapFrame.Size.Width - oldSize.Width) / 2;
            var Height = (MapFrame.Size.Height - oldSize.Height) / 2;

            MapFrame.Start.X -= Width;
            MapFrame.Start.Y -= Height;
        }
Beispiel #4
0
 public void Goto(ICoor coor)
 {
     MapFrame.Start = new Coor(coor.X, coor.Y);
     Refresh();
 }
Beispiel #5
0
 public Coordinata(ICoor coor)
 {
     _x = coor.X;
     _y = coor.Y;
 }