From dbf73ca7dc7677193600a9d73ce91692fc0d574a Mon Sep 17 00:00:00 2001 From: Murray Forbes Date: Mon, 8 Nov 2021 21:06:58 +1300 Subject: [PATCH] Draw the location cross with a contrasting color to suit the display mode. --- OccuRec/Helpers/OverlayManager.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/OccuRec/Helpers/OverlayManager.cs b/OccuRec/Helpers/OverlayManager.cs index f79acca..f9d942d 100644 --- a/OccuRec/Helpers/OverlayManager.cs +++ b/OccuRec/Helpers/OverlayManager.cs @@ -252,11 +252,17 @@ public void ProcessFrame(Graphics g, VideoFrameWrapper frame) m_LocationCrossPen.Dispose(); m_LocationCrossPen = new Pen(Color.FromArgb(Settings.Default.LocationCrossTransparency, 255, 0, 0)); } - g.DrawLine(m_LocationCrossPen, 0, Settings.Default.LocationCrossY, Settings.Default.LocationCrossX - 6, Settings.Default.LocationCrossY); - g.DrawLine(m_LocationCrossPen, Settings.Default.LocationCrossX, 0, Settings.Default.LocationCrossX, Settings.Default.LocationCrossY - 6); - g.DrawLine(m_LocationCrossPen, Settings.Default.LocationCrossX + 6, Settings.Default.LocationCrossY, imageWidth, Settings.Default.LocationCrossY); - g.DrawLine(m_LocationCrossPen, Settings.Default.LocationCrossX, Settings.Default.LocationCrossY + 6, Settings.Default.LocationCrossX, imageHeight); - g.DrawEllipse(m_LocationCrossPen, Settings.Default.LocationCrossX - 6, Settings.Default.LocationCrossY - 6, 12, 12); + + Pen contrastingColourPen = m_LocationCrossPen; + // lookup the display mode and change the pen colour from red to blue if in 'Hue Intensity'and not 'Inverted' as this combination has a predominantly red background. + if (Settings.Default.UseHueIntensityDisplayMode && !Settings.Default.UseInvertedDisplayMode) + contrastingColourPen = new Pen(Color.FromArgb(Settings.Default.LocationCrossTransparency, 0, 0, 255)); + + g.DrawLine(contrastingColourPen, 0, Settings.Default.LocationCrossY, Settings.Default.LocationCrossX - 6, Settings.Default.LocationCrossY); + g.DrawLine(contrastingColourPen, Settings.Default.LocationCrossX, 0, Settings.Default.LocationCrossX, Settings.Default.LocationCrossY - 6); + g.DrawLine(contrastingColourPen, Settings.Default.LocationCrossX + 6, Settings.Default.LocationCrossY, imageWidth, Settings.Default.LocationCrossY); + g.DrawLine(contrastingColourPen, Settings.Default.LocationCrossX, Settings.Default.LocationCrossY + 6, Settings.Default.LocationCrossX, imageHeight); + g.DrawEllipse(contrastingColourPen, Settings.Default.LocationCrossX - 6, Settings.Default.LocationCrossY - 6, 12, 12); } if (frame != null)