Exemple #1
0
 public static void DrawBackground <TFont, TGlyph>
     (this IDisplay <TFont, TGlyph> display, IGraphicsContext <TFont, TGlyph> context)
     where TFont : IFont <TGlyph>
 {
     if (display.BackColor is { } color)
     {
         context.SaveState();
         context.FillRect(display.Frame(), color);
         context.RestoreState();
     }
 }
 public virtual void FillRect(Rectangle rectangle, Color color) => GraphicsContext.FillRect(Surface, rectangle, color);