Example #1
0
 public Point GetScreenPoint(ScreenRectangle screenView)
 {
     if (Level != screenView.Level)
     {
         screenView = new ScreenRectangle(new CoordinateRectangle(screenView.LeftTop, screenView.RightBottom), Level);
     }
     return(new Point((int)(X - screenView.Left), (int)(Y - screenView.Top)));
 }
Example #2
0
        public Rectangle GetScreenRect(ScreenRectangle screenView)
        {
            if (Level != screenView.Level)
            {
                screenView = new ScreenRectangle(
                    new CoordinateRectangle(screenView.LeftTop, screenView.RightBottom), Level);
            }

            var pt1 = LeftTop.GetScreenPoint(screenView);
            var pt2 = RightBottom.GetScreenPoint(screenView);

            return(Rectangle.FromLTRB(pt1.X, pt1.Y, pt2.X, pt2.Y));
        }