[chronojump] CairoGraphRaceAnalyzer gray line on accel (to distinguish from smooth line)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] CairoGraphRaceAnalyzer gray line on accel (to distinguish from smooth line)
- Date: Tue, 10 May 2022 10:36:34 +0000 (UTC)
commit 2d73797383e0d02fc4aa59e91b307dec2f296bb0
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue May 10 12:36:01 2022 +0200
CairoGraphRaceAnalyzer gray line on accel (to distinguish from smooth line)
src/gui/app1/runEncoder.cs | 6 +++---
src/gui/cairo/raceAnalyzer.cs | 13 ++++++++++---
2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/src/gui/app1/runEncoder.cs b/src/gui/app1/runEncoder.cs
index 70445269f..881189f80 100644
--- a/src/gui/app1/runEncoder.cs
+++ b/src/gui/app1/runEncoder.cs
@@ -2298,7 +2298,7 @@ public partial class ChronoJumpWindow
cairoGraphRaceAnalyzer_dt.DoSendingList (preferences.fontType.ToString(),
cairoGraphRaceAnalyzerPoints_dt_l, triggerListRunEncoder,
- forceRedraw, CairoXY.PlotTypes.LINES,
+ forceRedraw, CairoXY.PlotTypes.LINES, true,
getSmoothFrom_gui_at_race_analyzer_capture_smooth_graphs ());
}
private void updateRaceAnalyzerCaptureSpeedTime(bool forceRedraw)
@@ -2321,7 +2321,7 @@ public partial class ChronoJumpWindow
cairoGraphRaceAnalyzer_st.DoSendingList (preferences.fontType.ToString(),
cairoGraphRaceAnalyzerPoints_st_l, triggerListRunEncoder,
- forceRedraw, CairoXY.PlotTypes.LINES,
+ forceRedraw, CairoXY.PlotTypes.LINES, true,
getSmoothFrom_gui_at_race_analyzer_capture_smooth_graphs ());
}
private void updateRaceAnalyzerCaptureAccelTime(bool forceRedraw)
@@ -2347,7 +2347,7 @@ public partial class ChronoJumpWindow
cairoGraphRaceAnalyzer_at.DoSendingList (preferences.fontType.ToString(),
cairoGraphRaceAnalyzerPoints_at_l, triggerListRunEncoder,
- forceRedraw, CairoXY.PlotTypes.LINES,
+ forceRedraw, CairoXY.PlotTypes.LINES, false,
getSmoothFrom_gui_at_race_analyzer_capture_smooth_graphs ());
}
diff --git a/src/gui/cairo/raceAnalyzer.cs b/src/gui/cairo/raceAnalyzer.cs
index d7d614446..e65e27a42 100644
--- a/src/gui/cairo/raceAnalyzer.cs
+++ b/src/gui/cairo/raceAnalyzer.cs
@@ -77,14 +77,14 @@ public class CairoGraphRaceAnalyzer : CairoXY
}
//separated in two methods to ensure endGraphDisposing on any return of the other method
- public void DoSendingList (string font, List<PointF> points_list, TriggerList triggerList, bool
forceRedraw, PlotTypes plotType, int smoothLineWindow)
+ public void DoSendingList (string font, List<PointF> points_list, TriggerList triggerList, bool
forceRedraw, PlotTypes plotType, bool blackLine, int smoothLineWindow)
{
- if(doSendingList (font, points_list, triggerList, forceRedraw, plotType, smoothLineWindow))
+ if(doSendingList (font, points_list, triggerList, forceRedraw, plotType, blackLine,
smoothLineWindow))
endGraphDisposing(g, surface, area.GdkWindow);
}
//return true if graph is inited (to dispose it)
- private bool doSendingList (string font, List<PointF> points_list, TriggerList triggerList, bool
forceRedraw, PlotTypes plotType, int smoothLineWindow)
+ private bool doSendingList (string font, List<PointF> points_list, TriggerList triggerList, bool
forceRedraw, PlotTypes plotType, bool blackLine, int smoothLineWindow)
{
// 1) init graph
@@ -229,7 +229,14 @@ public class CairoGraphRaceAnalyzer : CairoXY
(maxValuesChanged || forceRedraw || points_list.Count != points_list_painted)
)
{
// 3.a) paint points
+ if(! blackLine)
+ g.SetSourceColor (gray99);
+
plotRealPoints(plotType, points_list, points_list_painted, false); //not fast. TODO:
maybe use fast if is really faster
+
+ if(! blackLine)
+ g.SetSourceRGB (0,0,0);
+
points_list_painted = points_list.Count;
// 3.b) paint smooth line
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]