/// <summary> /// Creates a point rectangle /// </summary> /// <param name="upperLeft">Upper-left corner of the rectangle</param> /// <param name="lowerRight">Lower-right corner of the rectangle</param> public SgfPointRectangle(SgfPoint upperLeft, SgfPoint lowerRight) { if (upperLeft.Row > lowerRight.Row || upperLeft.Column > lowerRight.Column) { throw new ArgumentOutOfRangeException($"SGF point rectangle points must represent a rectangle: {upperLeft}:{lowerRight}"); } UpperLeft = upperLeft; LowerRight = lowerRight; }
/// <summary> /// Creates a single point rectangle /// </summary> /// <param name="singlePoint"></param> public SgfPointRectangle(SgfPoint singlePoint) : this(singlePoint, singlePoint) { }