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