GDK to Cairo move
- From: Emmanuel Thomas-Maurin <manutm007 gmail com>
- To: GTK mailing list <gtk-app-devel-list gnome org>
- Subject: GDK to Cairo move
- Date: Fri, 13 May 2011 19:03:36 +0200
Good day list!
In my app, I'm currently replacing deprecated GDK code with Cairo code
and I have problems with the following:
(The code is inside a timeout handler and involves drawing part of a GDK
pixmap onto a drawing area.)
/* gdk code */
gdk_draw_drawable(GDK_DRAWABLE(drawing_area->window), gc, pixmap, \
x, 0, 0, 0, drw_a_width, drw_a_height);
/* cairo code */
cr = gdk_cairo_create(GDK_DRAWABLE(drawing_area->window));
gdk_cairo_set_source_pixmap(cr, pixmap, 0, 0);
cairo_rectangle(cr, x, 0, drw_a_width, drw_a_height);
cairo_fill(cr);
cairo_destroy(cr);
What am I missing?
(The Cairo doc is somewhat spartan...)
Thanks.
--
Emmanuel Thomas-Maurin <manutm007 gmail com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]