public Rect(int x, int y, Size size) { _x1 = x; _y1 = y; _x2 = x + size.Width() - 1; _y2 = y + size.Height() - 1; }
public Rect(Position topLeft, Size size) { _x1 = topLeft.X; _y1 = topLeft.Y; _x2 = _x1 + size.Width() - 1; _y2 = _y1 + size.Height() - 1; }
public void Resize(Size size) { _x2 = _x1 + size.Width() - 1; _y2 = _y1 + size.Height() - 1; }