# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1141788304 0 # Node ID d42b2aec70a4a1cd6ebd142d149fa7c59db6c7d5 # Parent e1685cc1a657f738280dd81b5f3c45a77b85de38 [MAC_OS] (XPutPixel): Set alpha channel bits if pixmap depth is 32. [MAC_OS] (XGetPixel): Strip off alpha channel bits if pixmap depth is 32. diff -r e1685cc1a657 -r d42b2aec70a4 src/image.c --- a/src/image.c Wed Mar 08 02:24:47 2006 +0000 +++ b/src/image.c Wed Mar 08 03:25:04 2006 +0000 @@ -194,7 +194,7 @@ char *base_addr = GetPixBaseAddr (pixmap); short row_bytes = GetPixRowBytes (pixmap); - ((unsigned long *) (base_addr + y * row_bytes))[x] = pixel; + ((unsigned long *) (base_addr + y * row_bytes))[x] = 0xff000000 | pixel; } else if (depth == 1) { @@ -238,7 +238,7 @@ char *base_addr = GetPixBaseAddr (pixmap); short row_bytes = GetPixRowBytes (pixmap); - return ((unsigned long *) (base_addr + y * row_bytes))[x]; + return ((unsigned long *) (base_addr + y * row_bytes))[x] & 0x00ffffff; } else if (depth == 1) {