// New function public Bitmap GetFrameFor(DataHeader dataHeader, DataLine dataLine, Bitmap existingFrame) { var frame = Graphics.FromImage(existingFrame); frame.SmoothingMode = SmoothingMode.AntiAlias; frame.TextRenderingHint = TextRenderingHint.AntiAlias; foreach (var widget in widgets) { widget.DrawYourselfOnThis(frame, dataHeader, dataLine); } frame.Flush(); return existingFrame; }
public Bitmap GetFrameFor(DataHeader dataHeader, DataLine dataLine) { var frameImage = new Bitmap(420, 240); var frame = Graphics.FromImage(frameImage); frame.Clear(Color.White); frame.SmoothingMode = SmoothingMode.AntiAlias; frame.TextRenderingHint = TextRenderingHint.AntiAlias; foreach (var widget in widgets) { widget.DrawYourselfOnThis(frame, dataHeader, dataLine); } frame.Flush(); return frameImage; }
public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint) { DrawText(pane, string.Format("Lap Time: {0:0.00}", dataPoint.LapTime)); }
public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint) { DrawBar(pane, dataPoint.Brake, Color.Red, string.Format("{0:0.00}", dataPoint.Brake), Orientation.BottomToTop); }
public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint) { throw new NotImplementedException(); //pane.DrawString("RPM: " + value, GaugeDisplay.DefaultFont, new SolidBrush(Color.FromArgb(102, 102, 102)), 0, 0); }
public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint) { DrawText(pane, "RPM: " + dataPoint.Rpm); }