Re: question on gdkpixbuf

2007-01-19 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Jan 19, 2007 at 07:46:01PM +0530, Sudharshan S wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi everyone,
[...]
> the image is not persistent. Any idea as to  why this is happening?
> To draw the pixbuf, i use
> gdk_draw_pixbuf(GDK_DRAWABLE(drawing_area->window), NULL,
> GDK_PIXBUF(image_buffer), 0, 0, 0, 0, -1, -1, GDK_RGB_DITHER_NONE, 0, 0);

This is supposed to be that way :-)

To have a persistent image, you'll have to redraw on each expose event
(expose events tell you which area has to be redrawn). Or just use a
GtkImage widget[1], which is designed to do that for you.

Using a drawing area might be the right approach when you have special
drawing algorithms/strategies based on your own representation of
images.

[1] 

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFsObxBcgs9XrR2kYRAqtkAJ9JqL1Ufz/Cu/Z9yI67ToPDz18HVQCdF78w
pk93Gd1N7WrqJJX0gxOFQPI=
=Lotq
-END PGP SIGNATURE-

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

question on gdkpixbuf

2007-01-19 Thread Sudharshan S
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi everyone,
Novice programmer here. When i use gdkpixbuf, i find that the images
in the window in which the image is loaded, disappears when it is
moved or  when it comes under other onscreen elements. In other words,
the image is not persistent. Any idea as to  why this is happening?
To draw the pixbuf, i use
gdk_draw_pixbuf(GDK_DRAWABLE(drawing_area->window), NULL,
GDK_PIXBUF(image_buffer), 0, 0, 0, 0, -1, -1, GDK_RGB_DITHER_NONE, 0, 0);


regards
Sudharshan S
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFsNKhSsRjJNRMc4kRAqVjAJ9CixUQZw8ZYw8Eww6iAh6ChfQstgCfXtL7
8U6clJZ1VpfmJtpf2KYOA8Y=
=3azJ
-END PGP SIGNATURE-

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list