public override void Render (ConsoleBuffer buffer) { if (Source == null) return; if (Background != null) buffer.FillBackgroundRectangle(new Rect(RenderSize), Background.Value); buffer.DrawImage(Source, new Rect(RenderSize)); }
public override void Render(ConsoleBuffer buffer) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } if (Source == null) { return; } if (Background != null) { buffer.FillBackgroundRectangle(new Rect(RenderSize), Background.Value); } buffer.DrawImage(Source, new Rect(RenderSize)); }
public static void DrawImage(this ConsoleBuffer @this, ImageSource imageSource, Rect rect) { @this.DrawImage(imageSource, rect.X, rect.Y, rect.Width, rect.Height); }