Re: question on gdkpixbuf



-----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] <http://www.gtk.org/api/2.6/gtk/GtkImage.html>

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

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




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