[chronojump] CairoGraphRaceAnalyzer a>minAccel shown at top (to be seen even with triggers), and triggers 1 lineW



commit 8647363f667d0e0be65335f136832635445b043f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed May 25 10:53:06 2022 +0200

    CairoGraphRaceAnalyzer a>minAccel shown at top (to be seen even with triggers), and triggers 1 lineWidth

 src/gui/cairo/raceAnalyzer.cs | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/src/gui/cairo/raceAnalyzer.cs b/src/gui/cairo/raceAnalyzer.cs
index d7a34253b..c6f09c514 100644
--- a/src/gui/cairo/raceAnalyzer.cs
+++ b/src/gui/cairo/raceAnalyzer.cs
@@ -322,19 +322,36 @@ public class CairoGraphRaceAnalyzer : CairoXY
                        if (timeAtEnoughAccelMark > 0)
                        {
                                double xTimeAtEnoughAccelMark = calculatePaintX 
(timeAtEnoughAccelMark/1000000.0);
+                               g.LineWidth = 1;
+
+                               /*
+                               //line top/bottom and text at bottom, but they are confused with triggers
                                g.SetSourceColor(red);
                                g.MoveTo (xTimeAtEnoughAccelMark, topMargin);
                                g.LineTo (xTimeAtEnoughAccelMark, graphHeight - bottomMargin);
                                g.Stroke ();
                                printText(xTimeAtEnoughAccelMark, graphHeight -bottomMargin*3/4,
                                                0, textHeight-3, string.Format("a >= {0} m/s^2", minAccel), 
g, alignTypes.LEFT);
+                                */
+                               //above the graph with short top line
+                               g.SetSourceColor(black);
+                               g.MoveTo (xTimeAtEnoughAccelMark, topMargin * 2/3);
+                               g.LineTo (xTimeAtEnoughAccelMark, topMargin);
+                               g.Stroke ();
+                               printText(xTimeAtEnoughAccelMark+2, topMargin * 3/4,
+                                               0, textHeight-3, string.Format("a >= {0} m/s^2", minAccel), 
g, alignTypes.LEFT);
                        }
                }
 
                // 5) paint triggers
                if(graphInited && triggerList != null && triggerList.Count() > 0)
+               {
+                       g.LineWidth = 1;
                        foreach(Trigger trigger in triggerList.GetList())
+                       {
                                paintVerticalTriggerLine(g, trigger, textHeight -3);
+                       }
+               }
 
                //doing = false;
                return graphInited;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]