Mercurial > emacs
changeset 80555:e8b63103e36b
(XDrawLine, XCreatePixmapFromBitmapData) [USE_MAC_IMAGE_IO]:
Create bitmap context in native byte order.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Sun, 04 May 2008 00:32:13 +0000 |
parents | 831994031d63 |
children | d2d8d84b25e2 |
files | src/macterm.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macterm.c Sun May 04 00:31:59 2008 +0000 +++ b/src/macterm.c Sun May 04 00:32:13 2008 +0000 @@ -415,7 +415,11 @@ if (ximg->bits_per_pixel == 32) { color_space = mac_cg_color_space_rgb; - alpha_info = kCGImageAlphaNoneSkipFirst; + alpha_info = (kCGImageAlphaNoneSkipFirst +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + | kCGBitmapByteOrder32Host +#endif + ); } else { @@ -743,7 +747,11 @@ context = CGBitmapContextCreate (pixmap->data, width, height, 8, pixmap->bytes_per_line, mac_cg_color_space_rgb, - kCGImageAlphaNoneSkipFirst); + kCGImageAlphaNoneSkipFirst +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + | kCGBitmapByteOrder32Host +#endif + ); CG_SET_FILL_COLOR (context, fg); CGContextFillRect (context, CGRectMake (0, 0, width, height));