+2001-02-23 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf):
+ return solid masks for xpms that have no transparent color.
+ This makes the ..._create_from_xpm... API backwards
+ compatible.
+
2001-02-23 Tor Lillqvist <tml@iki.fi>
* README.win32: Update. Mention the gtk-1-3-win32-production
+2001-02-23 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf):
+ return solid masks for xpms that have no transparent color.
+ This makes the ..._create_from_xpm... API backwards
+ compatible.
+
2001-02-23 Tor Lillqvist <tml@iki.fi>
* README.win32: Update. Mention the gtk-1-3-win32-production
+2001-02-23 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf):
+ return solid masks for xpms that have no transparent color.
+ This makes the ..._create_from_xpm... API backwards
+ compatible.
+
2001-02-23 Tor Lillqvist <tml@iki.fi>
* README.win32: Update. Mention the gtk-1-3-win32-production
+2001-02-23 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf):
+ return solid masks for xpms that have no transparent color.
+ This makes the ..._create_from_xpm... API backwards
+ compatible.
+
2001-02-23 Tor Lillqvist <tml@iki.fi>
* README.win32: Update. Mention the gtk-1-3-win32-production
+2001-02-23 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf):
+ return solid masks for xpms that have no transparent color.
+ This makes the ..._create_from_xpm... API backwards
+ compatible.
+
2001-02-23 Tor Lillqvist <tml@iki.fi>
* README.win32: Update. Mention the gtk-1-3-win32-production
+2001-02-23 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf):
+ return solid masks for xpms that have no transparent color.
+ This makes the ..._create_from_xpm... API backwards
+ compatible.
+
2001-02-23 Tor Lillqvist <tml@iki.fi>
* README.win32: Update. Mention the gtk-1-3-win32-production
+2001-02-23 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf):
+ return solid masks for xpms that have no transparent color.
+ This makes the ..._create_from_xpm... API backwards
+ compatible.
+
2001-02-23 Tor Lillqvist <tml@iki.fi>
* README.win32: Update. Mention the gtk-1-3-win32-production
x, y, width, height);
}
+static GdkBitmap *
+make_solid_mask (gint width, gint height)
+{
+ GdkBitmap *bitmap;
+ GdkGC *gc;
+ GdkGCValues gc_values;
+
+ bitmap = gdk_pixmap_new (NULL, width, height, 1);
+
+ gc_values.foreground.pixel = 1;
+ gc = gdk_gc_new_with_values (bitmap, &gc_values, GDK_GC_FOREGROUND);
+
+ gdk_draw_rectangle (bitmap, gc, TRUE, 0, 0, width, height);
+
+ gdk_gc_unref (gc);
+
+ return bitmap;
+}
+
#define PACKED_COLOR(c) ((((c)->red & 0xff) << 8) | ((c)->green & 0xff) | ((c)->blue >> 8))
static GdkPixmap *
if (mask)
gdk_pixbuf_render_pixmap_and_mask (pixbuf, NULL, mask, 128);
+ if (mask && !*mask)
+ *mask = make_solid_mask (gdk_pixbuf_get_width (pixbuf),
+ gdk_pixbuf_get_height (pixbuf));
+
return pixmap;
}
return NULL;
pixmap = gdk_pixmap_colormap_new_from_pixbuf (colormap, mask, transparent_color, pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ gdk_pixbuf_unref (pixbuf);
+
return pixmap;
}
return NULL;
pixmap = gdk_pixmap_colormap_new_from_pixbuf (colormap, mask, transparent_color, pixbuf);
+
gdk_pixbuf_unref (pixbuf);
return pixmap;