Caching problems with gtk and imlib
- From: Rainer Flicker <flicker atc-06 fb12 tu-berlin de>
- To: gtk-app-devel-list gnome org
- Subject: Caching problems with gtk and imlib
- Date: Tue, 5 Jun 2001 19:11:36 +0200 (CEST)
Hi,
I want to display an image, so I'm using gdk_imlib. But
this works only one time (see the sample code). What
can I do?
im = gdk_imlib_load_image (filename);
width = im->rgb_width;
height = im->rgb_height;
gdk_imlib_render (im, width, height);
pix = gdk_imlib_move_image (im);
mask = gdk_imlib_move_mask (im);
gdk_imlib_destroy_image (im);
gtk_drawing_area_size (GTK_DRAWING_AREA(d_area), width, height);
gdk_window_set_back_pixmap (d_area->window, pix, FALSE);
gdk_window_clear (d_area->window);
if (mask)
{
gdk_window_shape_combine_mask (d_area->window, mask, 0, 0);
}
gdk_imlib_free_pixmap (pix);
gdk_flush ();
Thanks,
Rainer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]