transparent images
- From: Luca Roccia <little_rock users sourceforge net>
- To: gtk ML <gtk-app-devel-list gnome org>
- Subject: transparent images
- Date: 18 Jan 2003 19:28:54 +0100
Till 2.0.8 i was able to load and correctly diplay transparent images.
With 2.2.0 all i can see is a grey image...
Here is the code i use:
gdk_pixmap = gdk_pixmap_create_from_xpm
(window->window,&gdk_pixmap_mask,
&style->bg[GTK_STATE_NORMAL], IMAGE_ABOUT_PATH);
pixmap = gtk_pixmap_new (gdk_pixmap, gdk_pixmap_mask);
gtk_fixed_put (GTK_FIXED (fixed), pixmap, 0, 0);
gtk_widget_show (pixmap);
GLADE_HOOKUP_OBJECT (window, pixmap, "pixmap");
gtk_widget_shape_combine_mask (window, gdk_pixmap_mask, 0, 0);
gdk_drawable_unref (gdk_pixmap_mask);
gdk_drawable_unref (gdk_pixmap);
The same problem occurs with this code:
GtkWidget *
create_Logo_win (void)
{
GtkWidget *Logo_window;
GtkWidget *pixmap_wid;
Logo_window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_title (GTK_WINDOW (Logo_window), "MVideo: Logo");
gtk_window_set_wmclass (GTK_WINDOW (Logo_window), "MVideo: Logo",
"MVideo");
gtk_window_set_position (GTK_WINDOW (Logo_window),
GTK_WIN_POS_CENTER);
GLADE_HOOKUP_OBJECT_NO_REF (Logo_window, Logo_window, "Logo_window");
pixmap_wid = gtk_image_new_from_file (IMAGE_PATH);
gtk_widget_show (pixmap_wid);
gtk_container_add (GTK_CONTAINER (Logo_window), pixmap_wid);
GLADE_HOOKUP_OBJECT (Logo_window, pixmap_wid, "pixmap_wid");
return Logo_window;
}
With 2.2.0 something with image loading changed? what can i do to fix my
prob.?
--
Luca Roccia <little_rock users sourceforge net>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]