Re: drawing images & pixels ??



On ke, 2003-09-10 at 17:09, manu aradhya wrote:
Hi, can u tell me how can i draw  a image (gif,jpg ..
etc), or is this limited only to ppm & xpm. can i
display a set of images in a listbox kind of a thing.
& one more how can  i draw pixels on the window.

You first load in the image as GdkPixbuf (see
http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/gdk-pixbuf-file-loading.html).

Then you draw it in the widget (say, a GtkDrawingArea) of your choice
with one of the functions in
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Pixbufs.html .

-- 
http://liw.iki.fi/liw/photos/swordmaiden/



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