コード例 #1
0
ファイル: FrameGrabber.cs プロジェクト: JohnDRoach/racedata
        // 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
ファイル: FrameGrabber.cs プロジェクト: JohnDRoach/racedata
        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
ファイル: LapTime.cs プロジェクト: JohnDRoach/racedata
 public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint)
 {
     DrawText(pane, string.Format("Lap Time: {0:0.00}", dataPoint.LapTime));
 }
コード例 #4
0
ファイル: Brake.cs プロジェクト: JohnDRoach/racedata
 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
ファイル: TextWidget.cs プロジェクト: JohnDRoach/racedata
 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
ファイル: Rpm.cs プロジェクト: JohnDRoach/racedata
 public void DrawYourselfOnThis(Graphics pane, DataHeader header, DataLine dataPoint)
 {
     DrawText(pane, "RPM: " + dataPoint.Rpm);
 }