/// <summary> /// Applies a set of UIEdgeInsets to a RectangleF /// </summary> /// <returns>The adjusted rectangle</returns> /// <param name="rect">The rectangle to be adjusted.</param> /// <param name="insets">The edge insets to be applied</param> public static CGRect ApplyInsets(this CGRect rect, UIEdgeInsets insets) { return new CGRect(rect.Left + insets.Left, rect.Top + insets.Top, rect.Width - insets.TotalWidth(), rect.Height- insets.TotalHeight()); }
/// <summary> /// Applies a set of UIEdgeInsets to a RectangleF /// </summary> /// <returns>The adjusted rectangle</returns> /// <param name="rect">The rectangle to be adjusted.</param> /// <param name="insets">The edge insets to be applied</param> public static RectangleF ApplyInsets(this RectangleF rect, UIEdgeInsets insets) { return new RectangleF(rect.Left + insets.Left, rect.Top + insets.Top, rect.Width - insets.TotalWidth(), rect.Height- insets.TotalHeight()); }
/// <summary> /// Applies a set of UIEdgeInsets to a RectangleF /// </summary> /// <returns>The adjusted rectangle</returns> /// <param name="rect">The rectangle to be adjusted.</param> /// <param name="insets">The edge insets to be applied</param> public static RectangleF ApplyInsets(this RectangleF rect, UIEdgeInsets insets) { return(new RectangleF(rect.Left + insets.Left, rect.Top + insets.Top, rect.Width - insets.TotalWidth(), rect.Height - insets.TotalHeight())); }
/// <summary> /// Applies a set of UIEdgeInsets to a RectangleF /// </summary> /// <returns>The adjusted rectangle</returns> /// <param name="rect">The rectangle to be adjusted.</param> /// <param name="insets">The edge insets to be applied</param> public static CGRect ApplyInsets(this CGRect rect, UIEdgeInsets insets) { return(new CGRect(rect.Left + insets.Left, rect.Top + insets.Top, rect.Width - insets.TotalWidth(), rect.Height - insets.TotalHeight())); }