/// <summary> /// Change Position of Rectangle /// </summary> /// <param name="r">Rectangle</param> /// <param name="offset">Position Offset</param> /// <param name="changesize">Change Size of Rectangle</param> /// <returns></returns> public static Rectangle DeltaPos(this Rectangle r, Size offset, bool changesize = false) => r.DeltaPosSize(offset, changesize ? (offset.Scale(-1)) : Size.Empty);
/// <summary> /// Increase Size of Rectangle /// </summary> /// <param name="r">Rectangle</param> /// <param name="sz">Increase Size</param> /// <param name="changepos">Change Position</param> /// <returns></returns> public static Rectangle DeltaSize(this Rectangle r, Size sz, bool changepos = false) => r.DeltaPosSize(changepos ? (sz.Scale(-1)) : Size.Empty, sz);