Example #1
0
 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)));
 }
Example #2
0
 public BoxTexture(Texture2D texture, Rectangle bounds, string name, Insets cornerArea, Insets margins) : base(texture, bounds, name)
 {
     CornerArea = cornerArea;
     Margins    = margins;
 }
Example #3
0
 public BoxTexture(Texture2D texture, Insets cornerArea, Insets margins) : base(texture)
 {
     CornerArea = cornerArea;
     Margins    = margins;
 }