Re: GdkPixmap



Le jeudi 19 mai 2005 Ã 09:05 +0100, abhi rocks a Ãcrit :
hi

I have a pixbuf image from which i derive a GdkPixmap
say pix.


for(i=0;i<5;i++) {
GdkPixmap *temp_pixmap = g_object_ref(G_OBJECT(pix));
gdk_draw_rectangle(...);
...
...
g_object_unref(G_OBJECT(temp_pixmap));
}

As the pixmaps form the images are always updated
rather than the original pix.
Isnt g_object_ref suppose to create a completely new
image or does always point to the same image. Maybe
thats why the image keeps updating itself.

Could someone clarify this for me

g_object_ref returns the original object and increment its reference
counter. So pixmap and pix are pointers to the same object.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]