diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-14 23:36:47 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-14 23:36:47 -0400 |
| commit | 4616fdfc5eeb29c76feb607756256ca7a7448af4 (patch) | |
| tree | 3d7c4c83238ed58346fe8192a4f2be77606463d2 /area_unix.go | |
| parent | 6cdda6ebec7338ea019403d26dfc48db93180995 (diff) | |
Actually committed the rectangle to the Area. Area drawing on GTK+ implemented!
Diffstat (limited to 'area_unix.go')
| -rw-r--r-- | area_unix.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) } |
