From 4616fdfc5eeb29c76feb607756256ca7a7448af4 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 14 Mar 2014 23:36:47 -0400 Subject: [PATCH] Actually committed the rectangle to the Area. Area drawing on GTK+ implemented! --- area_unix.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/area_unix.go b/area_unix.go index f9c898f..e5a2bee 100644 --- a/area_unix.go +++ b/area_unix.go @@ -66,6 +66,10 @@ func our_area_draw_callback(widget *C.GtkWidget, cr *C.cairo_t, data C.gpointer) pixbuf, C.gdouble(cliprect.Min.X), C.gdouble(cliprect.Min.Y)) + // that just set the brush that cairo uses: we have to actually draw now + // (via https://developer.gnome.org/gtkmm-tutorial/stable/sec-draw-images.html.en) + C.cairo_rectangle(cr, x, y, w, h) // breaking the nrom here since we have the double data already + C.cairo_fill(cr) C.g_object_unref((C.gpointer)(unsafe.Pointer(pixbuf))) // free pixbuf return C.FALSE // signals handled without stopping the event chain (thanks to desrt again) }