[chronojump] CairoBars guides painted on the color of the relevant variable
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] CairoBars guides painted on the color of the relevant variable
- Date: Wed, 1 Sep 2021 10:45:25 +0000 (UTC)
commit 724e129979b789892dc40d0244be72059fed929c
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Sep 1 12:45:02 2021 +0200
CairoBars guides painted on the color of the relevant variable
src/gui/cairo/bars.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/gui/cairo/bars.cs b/src/gui/cairo/bars.cs
index 311148db9..a124e96d7 100644
--- a/src/gui/cairo/bars.cs
+++ b/src/gui/cairo/bars.cs
@@ -71,9 +71,9 @@ public abstract class CairoBars : CairoGeneric
this.cairoBarsGuideManage = cairoBarsGuideManage;
}
- protected void drawGuides ()
+ protected void drawGuides (Cairo.Color color)
{
- g.Color = black;
+ g.Color = color;
int xStart = 6;
double personMax = cairoBarsGuideManage.GetTipPersonMax();
@@ -96,13 +96,13 @@ public abstract class CairoBars : CairoGeneric
if(usePersonGuides)
{
- drawGuidesDo (xStart, "image_person_outline.png", ttp,
+ drawGuidesDo (xStart, "image_person_outline.png", ttp, color,
personMax, personAvg, personMin,
personMaxG, personAvgG, personMinG);
xStart += (24 + 6);
}
- drawGuidesDo (xStart, "image_group_outline.png", ttp,
+ drawGuidesDo (xStart, "image_group_outline.png", ttp, color,
groupMax, groupAvg, groupMin,
groupMaxG, groupAvgG, groupMinG);
@@ -150,7 +150,7 @@ public abstract class CairoBars : CairoGeneric
return textTickPos.ABSOLUTEBOTTOM;
}
- protected void drawGuidesDo (int xStart, string imageStr, textTickPos ttp,
+ protected void drawGuidesDo (int xStart, string imageStr, textTickPos ttp, Cairo.Color color,
double top, double avg, double bottom, double topG, double avgG, double bottomG)
{
Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + imageStr);
@@ -160,7 +160,7 @@ public abstract class CairoBars : CairoGeneric
if(top != bottom) // if only 1 value (top == bottom), do not draw the arrow
{
//draw arrow
- plotArrowPassingGraphPoints (g, black,
+ plotArrowPassingGraphPoints (g, color,
graphWidth -rightMargin +xStart +12,
bottomG,
graphWidth -rightMargin +xStart +12,
@@ -686,7 +686,7 @@ LogB.Information(string.Format("y: {0}, alto: {1}", y, graphHeight -y - bottomMa
//g.SetFontSize(textHeight);
if(cairoBarsGuideManage != null)
- drawGuides();
+ drawGuides(colorSerieA);
g.Color = black;
plotBars ();
@@ -844,7 +844,7 @@ public class CairoBars2HSeries : CairoBars
//g.SetFontSize(textHeight);
if(cairoBarsGuideManage != null)
- drawGuides();
+ drawGuides(colorSerieB);
g.Color = black;
plotBars();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]