diff options
| author | YAMAMOTO Mitsuharu | 2006-03-08 03:25:26 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-03-08 03:25:26 +0000 |
| commit | 4cdffedfae096a34769f29b455ecc3a78f13fa24 (patch) | |
| tree | ae721e733dbe430f0af2b203dd28bc87218702ee /src/image.c | |
| parent | 4299d849d878519b010c9a0638674673b2482538 (diff) | |
| download | emacs-4cdffedfae096a34769f29b455ecc3a78f13fa24.tar.gz emacs-4cdffedfae096a34769f29b455ecc3a78f13fa24.zip | |
[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.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c index 879bbf745a3..cbdff81eba7 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -194,7 +194,7 @@ XPutPixel (ximage, x, y, pixel) | |||
| 194 | char *base_addr = GetPixBaseAddr (pixmap); | 194 | char *base_addr = GetPixBaseAddr (pixmap); |
| 195 | short row_bytes = GetPixRowBytes (pixmap); | 195 | short row_bytes = GetPixRowBytes (pixmap); |
| 196 | 196 | ||
| 197 | ((unsigned long *) (base_addr + y * row_bytes))[x] = pixel; | 197 | ((unsigned long *) (base_addr + y * row_bytes))[x] = 0xff000000 | pixel; |
| 198 | } | 198 | } |
| 199 | else if (depth == 1) | 199 | else if (depth == 1) |
| 200 | { | 200 | { |
| @@ -238,7 +238,7 @@ XGetPixel (ximage, x, y) | |||
| 238 | char *base_addr = GetPixBaseAddr (pixmap); | 238 | char *base_addr = GetPixBaseAddr (pixmap); |
| 239 | short row_bytes = GetPixRowBytes (pixmap); | 239 | short row_bytes = GetPixRowBytes (pixmap); |
| 240 | 240 | ||
| 241 | return ((unsigned long *) (base_addr + y * row_bytes))[x]; | 241 | return ((unsigned long *) (base_addr + y * row_bytes))[x] & 0x00ffffff; |
| 242 | } | 242 | } |
| 243 | else if (depth == 1) | 243 | else if (depth == 1) |
| 244 | { | 244 | { |