public NotificationCanvas(int width, int height, Schedule schedule) { this.Width = width; this.Height = height; this.Image = new Bitmap(width, height); this.Padding = new ThickEdge(15); using (var graphics = Graphics.FromImage(this.Image)) { this.DrawBackground(graphics); this.DrawModernBorder(graphics); } var schedulePrinter = new SchedulePrinter(); schedulePrinter.Print(schedule, this.Image, this.Padding); }
public NotificationCanvas(int width, int height, string text = null) { this.Width = width; this.Height = height; this.Image = new Bitmap(width, height); this.Padding = new ThickEdge(); using (var graphics = Graphics.FromImage(this.Image)) { this.DrawBackground(graphics); this.DrawModernBorder(graphics); if (!string.IsNullOrWhiteSpace(text)) { this.DrawText(graphics, text); } } }