public static Rectangle ReduceRectBy(this Rectangle layoutSize, Insets insets) { return(new Rectangle( layoutSize.X + insets.Left, layoutSize.Y + insets.Top, Math.Max(0, layoutSize.Width - insets.Horizontal), Math.Max(0, layoutSize.Height - insets.Vertical))); }
public BoxTexture(Texture2D texture, Rectangle bounds, string name, Insets cornerArea, Insets margins) : base(texture, bounds, name) { CornerArea = cornerArea; Margins = margins; }
public BoxTexture(Texture2D texture, Insets cornerArea, Insets margins) : base(texture) { CornerArea = cornerArea; Margins = margins; }