public RectI(RectI clone) { _x = clone.X; _y = clone.Y; _width = clone.Width; _height = clone.Height; }
public bool Contains(RectI rect) { return (Contains(rect.TopLeft) && Contains(rect.TopRight) && Contains(rect.BottomLeft) && Contains(rect.BottomRight)); }
/// <summary> /// Create a new rectangle, inflated by <paramref name="x"/> and <paramref name="y"/>. /// </summary> public RectI Inflate(int x, int y) { var newRect = new RectI(this); newRect.Left -= x; newRect.Right += x; newRect.Top -= y; newRect.Bottom += y; return(newRect); }