Ejemplo n.º 1
0
 public static RectInt Outset(this IRectInt rect, int top, int right, int bottom, int left)
 => new RectInt(rect.X - left, rect.Y - top, rect.W + right + left, rect.H + top + bottom);
Ejemplo n.º 2
0
 public static RectInt Inset(this IRectInt rect, int top, int right, int bottom, int left)
 => new RectInt(rect.X + left, rect.Y + top, rect.W - right, rect.H - bottom);
Ejemplo n.º 3
0
 public static void Box(this IRenderer <SokobanPixel> rr, IRectInt rect, SokobanPixel[]?pixel = null)
 => RendererExt.Box <SokobanPixel>(rr, rect, pixel ?? AsciiBox);
Ejemplo n.º 4
0
 public static RectInt Outset(this IRectInt rect, int all)
 => rect.Outset(all, all, all, all);
Ejemplo n.º 5
0
 public static void TitleBox(this IRenderer <SokobanPixel> rr, IRectInt rect, string text, SokobanPixel[]?pixel = null)
 {
     pixel ??= AsciiBox;
     Box(rr, rect, pixel);
     rr.DrawText(rect.TM, $"[ {text} ]", pixel[0], TextAlign.Middle);
 }