diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-02-02 22:19:31 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-02-02 22:19:31 +0000 |
commit | a2d1299475cb8f34f99e420ef752bf9366275bf7 (patch) | |
tree | 1a7dd40f663b198d7e525ea07a6a84a63f6e783e /gdk/gdkpixbuf-drawable.c | |
parent | a1a252ce46b50ff199e5ee084036267455b9ec5b (diff) | |
download | gtk+-a2d1299475cb8f34f99e420ef752bf9366275bf7.tar.gz |
Make gdk_colormap_sync private since it was never exported in a header
Fri Feb 2 17:16:09 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c (gdk_colormap_sync): Make
gdk_colormap_sync private since it was never exported
in a header file.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_new): Fill in
colormap->colors[] for StaticGray, StaticColor colormaps.
* gdk/gdkpixbuf-drawable.c: Fix problems where image->bpp
was being used as if it was image->bits_per_pixel.
* gdk/gdkimage.h, gdk/x11/gdkimage-x11.c: Save the bits-per-pixel
for the image in the GdkImage structure since it isn't
reconstructable, and we need it to handle packed types
* gdk/win32/gdkimage-win32.c: Set image->bits_per_pixel. (I'm making
the assumption that on Win32 image->bits_per_pixel == image->depth,
always.
* gdk/linux-fb/gdkimage-fb.c: Set image->bits_per_pixel.
* gdk/gdkrgb.c (gdk_rgb_select_conv): Exit with an informative
warning message if no converter can be found.
Diffstat (limited to 'gdk/gdkpixbuf-drawable.c')
-rw-r--r-- | gdk/gdkpixbuf-drawable.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gdk/gdkpixbuf-drawable.c b/gdk/gdkpixbuf-drawable.c index 776ebe6067..97539a0e5f 100644 --- a/gdk/gdkpixbuf-drawable.c +++ b/gdk/gdkpixbuf-drawable.c @@ -1078,7 +1078,7 @@ rgbconvert (GdkImage *image, GdkVisual *v = gdk_colormap_get_visual(cmap); d(printf("masks = %x:%x:%x\n", v->red_mask, v->green_mask, v->blue_mask)); - d(printf("image depth = %d, bpp = %d\n", image->depth, image->bpp)); + d(printf("image depth = %d, bits per pixel = %d\n", image->depth, image->bits_per_pixel)); switch (v->type) { @@ -1087,13 +1087,14 @@ rgbconvert (GdkImage *image, case GDK_VISUAL_GRAYSCALE: case GDK_VISUAL_STATIC_COLOR: case GDK_VISUAL_PSEUDO_COLOR: - switch (image->bpp) + switch (image->bits_per_pixel) { case 1: bank = 0; break; case 8: - bank = 1; + if (image->depth == 8) + bank = 1; break; } break; @@ -1102,18 +1103,18 @@ rgbconvert (GdkImage *image, { case 15: if (v->red_mask == 0x7c00 && v->green_mask == 0x3e0 && v->blue_mask == 0x1f - && image->bpp == 16) + && image->bits_per_pixel == 16) bank = 2; break; case 16: if (v->red_mask == 0xf800 && v->green_mask == 0x7e0 && v->blue_mask == 0x1f - && image->bpp == 16) + && image->bits_per_pixel == 16) bank = 3; break; case 24: case 32: if (v->red_mask == 0xff0000 && v->green_mask == 0xff00 && v->blue_mask == 0xff - && image->bpp == 32) + && image->bits_per_pixel == 32) bank = 4; break; } |