Re: cairo pixmap

2007-05-23 Thread control H
Ah, I just found out the solution is trivial. GdkPixmap *pixmap; /* Create a new backing pixmap of the appropriate size */ static gint configure_event (GtkWidget *widget, GdkEventConfigure *event) { cairo_t *cr; if (pixmap) gdk_pixmap_unref(pixmap); pixmap =

Re: cairo pixmap

2007-05-19 Thread Philip Withnall
Hi, On Sat, 2007-05-19 at 13:41 +0200, control H wrote: Hi, I'm planning to make my app use cairo instead of GDK based functions. I'm using a drawing area, which draws into a pixmap when the configure event is emitted, and copies the relevant part of the pixmap back on the screen on the

Re: cairo pixmap

2007-05-19 Thread control H
The signal handler for the expose event is passed some parameters specifying which part of the screen has become invalidated. If you use these in a Cairo drawing mask, then redraw your canvas, it should be quite fast, as Cairo will ignore all operations to areas outside the mask. But this

Re: cairo pixmap

2007-05-19 Thread Philip Withnall
On Sat, 2007-05-19 at 14:12 +0200, control H wrote: The signal handler for the expose event is passed some parameters specifying which part of the screen has become invalidated. If you use these in a Cairo drawing mask, then redraw your canvas, it should be quite fast, as Cairo will ignore