[chronojump] RaceAnalyzer capture tab graphs with POINTLINES
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] RaceAnalyzer capture tab graphs with POINTLINES
- Date: Thu, 6 May 2021 16:31:23 +0000 (UTC)
commit 1c2089390aeff6124d46ad4dc96419607e16501a
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu May 6 18:30:55 2021 +0200
RaceAnalyzer capture tab graphs with POINTLINES
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 | 2 +-
src/gui/cairo/xy.cs | 14 ++++++++++----
6 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/src/gui/cairo/jumpsDjOptimalFall.cs b/src/gui/cairo/jumpsDjOptimalFall.cs
index 8224ab8b..8806eff4 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(false);
+ plotRealPoints(plotTypes.POINTS);
if(coefs.Length == 3)
{
diff --git a/src/gui/cairo/jumpsRjFatigue.cs b/src/gui/cairo/jumpsRjFatigue.cs
index cd5b38fc..1b5efedc 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(true);
+ plotRealPoints(plotTypes.LINES);
writeTitle();
diff --git a/src/gui/cairo/jumpsRunsEvolution.cs b/src/gui/cairo/jumpsRunsEvolution.cs
index 77c00e33..0c0e5a89 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(false);
+ plotRealPoints(plotTypes.POINTS);
writeTitle();
diff --git a/src/gui/cairo/jumpsWeightFVProfile.cs b/src/gui/cairo/jumpsWeightFVProfile.cs
index b613a750..a7c46963 100644
--- a/src/gui/cairo/jumpsWeightFVProfile.cs
+++ b/src/gui/cairo/jumpsWeightFVProfile.cs
@@ -155,7 +155,7 @@ public class JumpsWeightFVProfileGraph : CairoXY
}
}
- plotRealPoints(false);
+ plotRealPoints(plotTypes.POINTS);
writeTitle();
diff --git a/src/gui/cairo/raceAnalyzer.cs b/src/gui/cairo/raceAnalyzer.cs
index 24bb9204..9d7bf8aa 100644
--- a/src/gui/cairo/raceAnalyzer.cs
+++ b/src/gui/cairo/raceAnalyzer.cs
@@ -104,7 +104,7 @@ public class CairoGraphRaceAnalyzer : CairoXY
(maxValuesChanged || forceRedraw || points_list.Count != points_list_painted)
)
{
- plotRealPoints(false, points_list, points_list_painted);
+ plotRealPoints(plotTypes.POINTLINES, 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 403ca8a1..98e7e73e 100644
--- a/src/gui/cairo/xy.cs
+++ b/src/gui/cairo/xy.cs
@@ -443,16 +443,18 @@ public abstract class CairoXY : CairoGeneric
g.Stroke ();
}
+ protected enum plotTypes { POINTS, LINES, POINTSLINES }
+
//called from almost all methods
- protected void plotRealPoints (bool joinByLine)
+ protected void plotRealPoints (plotTypes plotType)
{
- plotRealPoints (joinByLine, point_l, 0);
+ plotRealPoints (plotType, point_l, 0);
}
//called from raceAnalyzer (sending it own list of points)
- protected void plotRealPoints (bool joinByLine, List<PointF> points_list, int startAt)
+ protected void plotRealPoints (plotTypes plotType, List<PointF> points_list, int startAt)
{
- if(joinByLine) //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)
@@ -484,6 +486,10 @@ public abstract class CairoXY : CairoGeneric
//for(int i = start; i < points_list.Count; i ++)
*/
+
+ if(plotType == plotTypes.LINES)
+ return;
+
for(int i = startAt; i < points_list.Count; i ++)
{
PointF p = points_list[i];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]