示例#1
0
 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));
 }
示例#2
0
 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));
 }
示例#3
0
 public static void DrawImage(this ConsoleBuffer @this, ImageSource imageSource, Rect rect)
 {
     @this.DrawImage(imageSource, rect.X, rect.Y, rect.Width, rect.Height);
 }