Creating pixmap (GtkPixmap *pixmap)
- From: Joana Bendoraityte <mergaite_lietuvaite yahoo de>
- To: gtk-app-devel-list gnome org
- Subject: Creating pixmap (GtkPixmap *pixmap)
- Date: Tue, 2 Jul 2002 15:47:39 +0200 (CEST)
Hi,
can anybody to help?
I need create the pixmap (GtkPixmap *pixmap).
I do:
GtkWidget *myFunction(Uint8 *imgRGB, Uint32 w, Uint32
h)
{
GtkStyle *style;
GdkBitmap *bitmap;
GdkPixmap *pixmap_gdk ;
GtkWidget *drawing_area;
GtkWidget *pixmap;
if (imgRGB == NULL)
{
return NULL;
}
drawing_area = gtk_drawing_area_new();
gtk_object_set_data(GTK_OBJECT(drawing_area),
"drawing_area", drawing_area);
gtk_drawing_area_size(GTK_DRAWING_AREA(drawing_area),
300, 300);
gtk_widget_show(drawing_area);
style = gtk_widget_get_default_style();
pixmap_gdk = gdk_pixmap_create_from_xpm_d(
drawing_area->window, &bitmap,
&style->bg[GTK_STATE_NORMAL], &imgRGB );
if (pixmap_gdk == NULL)
{
printf("pixmap is empty\n");
return(NULL);
}
pixmap = gtk_pixmap_new(pixmap_gdk, bitmap);
return pixmap;
}
but pixmap_gdk is NULL... -> pixmap is NULL to.
Thanks & Regards
Joana
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Yahoo! präsentiert als offizieller Sponsor das Fußball-Highlight des
Jahres: - http://www.FIFAworldcup.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]