Пример #1
0
        // 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;
        }
Пример #2
0
        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;
        }
Пример #3
0
 public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint)
 {
     DrawText(pane, string.Format("Lap Time: {0:0.00}", dataPoint.LapTime));
 }
Пример #4
0
 public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint)
 {
     DrawBar(pane, dataPoint.Brake, Color.Red, string.Format("{0:0.00}", dataPoint.Brake), Orientation.BottomToTop);
 }
Пример #5
0
 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);
 }
Пример #6
0
 public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint)
 {
     DrawText(pane, "RPM: " + dataPoint.Rpm);
 }