gtk pixmap help requested



someone asked me to fwd this. don't know why.

------- Forwarded Message

Date:    Fri, 17 Nov 2000 00:00:00
From:    "isiryder" <isiryder universitariosmix com>
To:      pbd op net
Subject: gtk-list help - Can you send this message?

   /* Hello. Can you send this message to the list in 
my name? I cannot do it, something is working wrong... 
*/

   Hi everyone. My name is Isaias and this is my first 
message to the list.
I have a program that loads a pixmap into memory, and 
i want to modify and save it into a file again.
What functions and structs should I use to be able to 
modify and save the pixmap?

The code I use to create the pixmap is the following:

create_pixmap (GtkWidget *widget, const gchar 
*filename)
{
GdkColormap *colormap;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
GtkWidget *pixmap;
... 
colormap = gtk_widget_get_colormap (widget);
gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, 
colormap, &mask, NULL, filename);
...
pixmap = gtk_pixmap_new (gdkpixmap, mask);
...
gdk_pixmap_unref (gdkpixmap);
gdk_bitmap_unref (mask);

return pixmap;

}

Thank you


Tu correo gratis en MixMail http://www.mixmail.com
Crea o sube tu web personal en http://espacio.ya.com


------- End of Forwarded Message





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