[chronojump] RaceAnalyzer accel/time as LINES, and more easy to change this xy param
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] RaceAnalyzer accel/time as LINES, and more easy to change this xy param
- Date: Thu, 6 May 2021 20:29:46 +0000 (UTC)
commit 95aa57aedfa89bec6a35b9b8fd3290a0a58874a6
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu May 6 22:29:19 2021 +0200
RaceAnalyzer accel/time as LINES, and more easy to change this xy param
src/gui/app1/runEncoder.cs | 9 ++++++---
src/gui/cairo/jumpsDjOptimalFall.cs | 2 +-
src/gui/cairo/jumpsRjFatigue.cs | 2 +-
src/gui/cairo/jumpsRunsEvolution.cs | 2 +-
src/gui/cairo/jumpsWeightFVProfile.cs | 2 +-
src/gui/cairo/raceAnalyzer.cs | 4 ++--
src/gui/cairo/xy.cs | 12 ++++++------
7 files changed, 18 insertions(+), 15 deletions(-)
---
diff --git a/src/gui/app1/runEncoder.cs b/src/gui/app1/runEncoder.cs
index bddf42b3..55f74fa1 100644
--- a/src/gui/app1/runEncoder.cs
+++ b/src/gui/app1/runEncoder.cs
@@ -1994,7 +1994,8 @@ public partial class ChronoJumpWindow
drawingarea_race_analyzer_capture_position_time, "title",
Catalog.GetString("Distance"), "m");
- cairoGraphRaceAnalyzer_dt.DoSendingList (preferences.fontType.ToString(),
cairoGraphRaceAnalyzerPoints_dt_l, forceRedraw);
+ cairoGraphRaceAnalyzer_dt.DoSendingList (preferences.fontType.ToString(),
+ cairoGraphRaceAnalyzerPoints_dt_l, forceRedraw,
CairoXY.PlotTypes.POINTSLINES);
}
private void updateRaceAnalyzerCaptureSpeedTime(bool forceRedraw)
{
@@ -2003,7 +2004,8 @@ public partial class ChronoJumpWindow
drawingarea_race_analyzer_capture_speed_time, "title",
Catalog.GetString("Speed"), "m/s");
- cairoGraphRaceAnalyzer_st.DoSendingList (preferences.fontType.ToString(),
cairoGraphRaceAnalyzerPoints_st_l, forceRedraw);
+ cairoGraphRaceAnalyzer_st.DoSendingList (preferences.fontType.ToString(),
+ cairoGraphRaceAnalyzerPoints_st_l, forceRedraw,
CairoXY.PlotTypes.POINTSLINES);
}
private void updateRaceAnalyzerCaptureAccelTime(bool forceRedraw)
{
@@ -2012,6 +2014,7 @@ public partial class ChronoJumpWindow
drawingarea_race_analyzer_capture_accel_time, "title",
Catalog.GetString("Accel"), "m/s");
- cairoGraphRaceAnalyzer_at.DoSendingList (preferences.fontType.ToString(),
cairoGraphRaceAnalyzerPoints_at_l, forceRedraw);
+ cairoGraphRaceAnalyzer_at.DoSendingList (preferences.fontType.ToString(),
+ cairoGraphRaceAnalyzerPoints_at_l, forceRedraw, CairoXY.PlotTypes.LINES);
}
}
diff --git a/src/gui/cairo/jumpsDjOptimalFall.cs b/src/gui/cairo/jumpsDjOptimalFall.cs
index 8806eff4..fe2f0c94 100644
--- a/src/gui/cairo/jumpsDjOptimalFall.cs
+++ b/src/gui/cairo/jumpsDjOptimalFall.cs
@@ -86,7 +86,7 @@ public class JumpsDjOptimalFallGraph : CairoXY
if(coefs.Length == 3)
plotPredictedLine(predictedLineTypes.PARABOLE, predictedLineCrossMargins.TOUCH);
- plotRealPoints(plotTypes.POINTS);
+ plotRealPoints(PlotTypes.POINTS);
if(coefs.Length == 3)
{
diff --git a/src/gui/cairo/jumpsRjFatigue.cs b/src/gui/cairo/jumpsRjFatigue.cs
index 1b5efedc..d7fce364 100644
--- a/src/gui/cairo/jumpsRjFatigue.cs
+++ b/src/gui/cairo/jumpsRjFatigue.cs
@@ -95,7 +95,7 @@ public class JumpsRjFatigueGraph : CairoXY
divideAndPlotAverage(divideIn);
g.Color = black;
- plotRealPoints(plotTypes.LINES);
+ plotRealPoints(PlotTypes.LINES);
writeTitle();
diff --git a/src/gui/cairo/jumpsRunsEvolution.cs b/src/gui/cairo/jumpsRunsEvolution.cs
index 0c0e5a89..5d2992d3 100644
--- a/src/gui/cairo/jumpsRunsEvolution.cs
+++ b/src/gui/cairo/jumpsRunsEvolution.cs
@@ -39,7 +39,7 @@ public abstract class EvolutionGraph : CairoXY
paintGridDatetime();
plotPredictedLine(predictedLineTypes.STRAIGHT, predictedLineCrossMargins.TOUCH);
- plotRealPoints(plotTypes.POINTS);
+ plotRealPoints(PlotTypes.POINTS);
writeTitle();
diff --git a/src/gui/cairo/jumpsWeightFVProfile.cs b/src/gui/cairo/jumpsWeightFVProfile.cs
index a7c46963..6f0426fe 100644
--- a/src/gui/cairo/jumpsWeightFVProfile.cs
+++ b/src/gui/cairo/jumpsWeightFVProfile.cs
@@ -155,7 +155,7 @@ public class JumpsWeightFVProfileGraph : CairoXY
}
}
- plotRealPoints(plotTypes.POINTS);
+ plotRealPoints(PlotTypes.POINTS);
writeTitle();
diff --git a/src/gui/cairo/raceAnalyzer.cs b/src/gui/cairo/raceAnalyzer.cs
index 2c68a3ff..d431a6ab 100644
--- a/src/gui/cairo/raceAnalyzer.cs
+++ b/src/gui/cairo/raceAnalyzer.cs
@@ -77,7 +77,7 @@ public class CairoGraphRaceAnalyzer : CairoXY
points_list_painted = 0;
}
- public override void DoSendingList (string font, List<PointF> points_list, bool forceRedraw)
+ public override void DoSendingList (string font, List<PointF> points_list, bool forceRedraw,
PlotTypes plotType)
{
LogB.Information("at RaceAnalyzerGraph.Do");
@@ -104,7 +104,7 @@ public class CairoGraphRaceAnalyzer : CairoXY
(maxValuesChanged || forceRedraw || points_list.Count != points_list_painted)
)
{
- plotRealPoints(plotTypes.POINTSLINES, points_list, points_list_painted);
+ plotRealPoints(plotType, points_list, points_list_painted);
points_list_painted = points_list.Count;
}
diff --git a/src/gui/cairo/xy.cs b/src/gui/cairo/xy.cs
index a2a86665..70f40cae 100644
--- a/src/gui/cairo/xy.cs
+++ b/src/gui/cairo/xy.cs
@@ -115,7 +115,7 @@ public abstract class CairoXY : CairoGeneric
public virtual void Do(string font)
{
}
- public virtual void DoSendingList(string font, List<PointF> points_list, bool forceRedraw)
+ public virtual void DoSendingList(string font, List<PointF> points_list, bool forceRedraw, PlotTypes
plotType)
{
}
@@ -448,18 +448,18 @@ public abstract class CairoXY : CairoGeneric
g.Stroke ();
}
- protected enum plotTypes { POINTS, LINES, POINTSLINES }
+ public enum PlotTypes { POINTS, LINES, POINTSLINES }
//called from almost all methods
- protected void plotRealPoints (plotTypes plotType)
+ protected void plotRealPoints (PlotTypes plotType)
{
plotRealPoints (plotType, point_l, 0);
}
//called from raceAnalyzer (sending it own list of points)
- protected void plotRealPoints (plotTypes plotType, List<PointF> points_list, int startAt)
+ protected void plotRealPoints (PlotTypes plotType, List<PointF> points_list, int startAt)
{
- if(plotType == plotTypes.LINES || plotType == plotTypes.POINTSLINES) //draw line first to not
overlap the points
+ if(plotType == PlotTypes.LINES || plotType == PlotTypes.POINTSLINES) //draw line first to not
overlap the points
{
bool firstDone = false;
//foreach(PointF p in points_list)
@@ -492,7 +492,7 @@ public abstract class CairoXY : CairoGeneric
//for(int i = start; i < points_list.Count; i ++)
*/
- if(plotType == plotTypes.LINES)
+ if(plotType == PlotTypes.LINES)
return;
for(int i = startAt; i < points_list.Count; i ++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]