public Rectangle(ICellPosition upperLeft, IObjectSize size) { UpperLeft = upperLeft; Size = size; LowerRight = upperLeft.Add(Size.Subtract(new ObjectSize(1, 1))); }
public IObjectSize Add(IObjectSize other) { return(new ObjectSize(Width + other.Width, Height + other.Height)); }
public IObjectSize Subtract(IObjectSize other) { return(new ObjectSize(Width - other.Width, Height - other.Height)); }
public ICellPosition Add(IObjectSize other) { return(new CellPosition(RowIndex + other.Height, ColumnIndex + other.Width)); }