Re: creating a pixmap from a char*



Quoted by a lot of funky dolphins
For `Rajarshi Guha <rajarshi presidency com>' 
On Monday, 02 June 2003 (21:16):


  I've been using glade to design a GUI. At one point I need to create a
pixmap. Glade gives me a create_pixmap() function but this loads a
pixmap from  a file. My program stores pixmaps in a char* and I could'nt
find any gtk/gdk functions which will let me create a pixmap from a
char*  -is there any way I can create a pixmap from a XPM stored in a
char*?


        Use gdk-pixbuf. First do a gdk_pixbuf_new_from_data(), then convert it to a
GdkPixmap with gdk_pixbuf_render_pixmap_and_mask().

-- 
 Leandro Pereira              (oO)           <leandro linuxmag com br>
 www.mindcrisis.tk            /||\                 GPG key: 0x062E7976

  Give a man a fish, and he'll eat for a day. Give a man a bible, and it'll
   probably take him a week or two to eat it all. -- anonymous at usenet.




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