[chronojump] CairoBars load images with pixbuf using assemblies instead of an URL
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] CairoBars load images with pixbuf using assemblies instead of an URL
- Date: Sun, 29 Aug 2021 16:02:21 +0000 (UTC)
commit 73e87793815c7d530d67e3181f21219624816f4a
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Aug 29 18:01:44 2021 +0200
CairoBars load images with pixbuf using assemblies instead of an URL
src/gui/cairo/bars.cs | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/gui/cairo/bars.cs b/src/gui/cairo/bars.cs
index 5b1a996c1..33c1db363 100644
--- a/src/gui/cairo/bars.cs
+++ b/src/gui/cairo/bars.cs
@@ -20,6 +20,7 @@
using System;
using System.Collections.Generic; //List
+using Gdk;
using Gtk;
using Cairo;
@@ -88,10 +89,9 @@ public abstract class CairoBars : CairoGeneric
//TODO: mix both next methods, just use correct variables
protected void drawGuidesPerson (int xStart)
{
- Cairo.ImageSurface imgSurface = new Cairo.ImageSurface(
-
"/home/xavier/informatica/progs_meus/chronojump/images/md/ic_person_outline_blue_24dp_1x.png");
- g.SetSourceSurface (imgSurface, graphWidth -rightMargin +xStart,
topMargin);//Convert.ToInt32(calculatePaintY(cbg.Y))-12);
- g.Paint ();
+ Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_person_outline.png");
+ Gdk.CairoHelper.SetSourcePixbuf (g, pixbuf, graphWidth -rightMargin +xStart,
topMargin);//Convert.ToInt32(calculatePaintY(cbg.Y))-12);
+ g.Paint();
double bottom = calculatePaintY(cairoBarsGuideManage.GetTipPersonMin());
double top = calculatePaintY(cairoBarsGuideManage.GetTipPersonMax());
@@ -111,10 +111,9 @@ public abstract class CairoBars : CairoGeneric
}
protected void drawGuidesGroup (int xStart)
{
- Cairo.ImageSurface imgSurface = new Cairo.ImageSurface(
-
"/home/xavier/informatica/progs_meus/chronojump/images/md/image_group_outline.png");
- g.SetSourceSurface (imgSurface, graphWidth -rightMargin +xStart,
topMargin);//Convert.ToInt32(calculatePaintY(cbg.Y))-12);
- g.Paint ();
+ Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_group_outline.png");
+ Gdk.CairoHelper.SetSourcePixbuf (g, pixbuf, graphWidth -rightMargin +xStart,
topMargin);//Convert.ToInt32(calculatePaintY(cbg.Y))-12);
+ g.Paint();
double bottom = calculatePaintY(cairoBarsGuideManage.GetTipGroupMin());
double top = calculatePaintY(cairoBarsGuideManage.GetTipGroupMax());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]