Re: GdkPixmap
- From: Jean Bréfort <jean brefort normalesup org>
- To: abhi rocks <badsep11 yahoo com>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>, gtk-list <gtk-list gnome org>
- Subject: Re: GdkPixmap
- Date: Thu, 19 May 2005 10:16:45 +0200
Le jeudi 19 mai 2005 �9:05 +0100, abhi rocks a �it :
> 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]