cpw.qulogic.cairo: 4e44fc43: Replace GdkGC with cairo calls in marker...

qulogic at pidgin.im qulogic at pidgin.im
Wed Jul 28 00:59:23 EDT 2010


----------------------------------------------------------------------
Revision: 4e44fc436fc4acb2854f44ba9151711f31f0f701
Parent:   9d595f880c678cec5d1337783f6c0c2b0ac53677
Author:   qulogic at pidgin.im
Date:     07/28/10 00:15:35
Branch:   im.pidgin.cpw.qulogic.cairo
URL: http://d.pidgin.im/viewmtn/revision/info/4e44fc436fc4acb2854f44ba9151711f31f0f701

Changelog: 

Replace GdkGC with cairo calls in markerline.

Changes against parent 9d595f880c678cec5d1337783f6c0c2b0ac53677

  patched  pidgin/plugins/markerline.c

-------------- next part --------------
============================================================
--- pidgin/plugins/markerline.c	0a283ea65f5ace9944d9a6a1b7091350404f99a1
+++ pidgin/plugins/markerline.c	f63149a27a8d80b0deb03288b7a4082b044f2bda
@@ -79,12 +79,14 @@ imhtml_expose_cb(GtkWidget *widget, GdkE
 	if (y >= event->area.y)
 	{
 		GdkColor red = {0, 0xffff, 0, 0};
-		GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(event->window));
+		cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(event->window));
 
-		gdk_gc_set_rgb_fg_color(gc, &red);
-		gdk_draw_line(event->window, gc,
-					0, y, visible_rect.width, y);
-		g_object_unref(G_OBJECT(gc));
+		gdk_cairo_set_source_color(cr, &red);
+		cairo_move_to(cr, 0.0, y + 0.5);
+		cairo_rel_line_to(cr, visible_rect.width, 0.0);
+		cairo_set_line_width(cr, 1.0);
+		cairo_stroke(cr);
+		cairo_destroy(cr);
 	}
 	return FALSE;
 }


More information about the Commits mailing list