Пример #1
0
 public Bounds(ScreenPoint position, ScreenPoint size, ScreenPoint padding)
 {
     _position = position;
     _size     = size;
     _padding  = padding;
 }
Пример #2
0
        public Bounds Grow(int x, int y)
        {
            ScreenPoint diff = ScreenPoint.FromAbsolute(x, y, Position.Screen);

            return(new Bounds(Position - diff, Size + diff * 2));
        }
Пример #3
0
 public Bounds(IScreen screen, float relX, float relY, float relWidth, float relHeight)
 {
     _position = new ScreenPoint(screen, relX, relY);
     _size     = new ScreenPoint(screen, relWidth, relHeight);
     _padding  = new ScreenPoint(screen, Vector2.Zero);
 }
Пример #4
0
 public bool Contains(ScreenPoint point)
 {
     return(Rectangle.Contains((Point)point));
 }
Пример #5
0
 public Bounds(ScreenPoint position, ScreenPoint size)
 {
     _position = position;
     _size     = size;
     _padding  = new ScreenPoint(position.Screen, Vector2.Zero);
 }