diff options
| author | YAMAMOTO Mitsuharu | 2008-05-04 00:32:24 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2008-05-04 00:32:24 +0000 |
| commit | 0e9378b39886647401ff85c0df65e95a345a4e95 (patch) | |
| tree | 87e7f1c166b65cb09b4ee39c5faf9c9687f3df6b /src/macterm.c | |
| parent | 4c756529297924c325f207cdb929056458945ae3 (diff) | |
| download | emacs-0e9378b39886647401ff85c0df65e95a345a4e95.tar.gz emacs-0e9378b39886647401ff85c0df65e95a345a4e95.zip | |
(XDrawLine, XCreatePixmapFromBitmapData) [USE_MAC_IMAGE_IO]:
Create bitmap context in native byte order.
Diffstat (limited to 'src/macterm.c')
| -rw-r--r-- | src/macterm.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/macterm.c b/src/macterm.c index 0023c8988a0..8886cdb565b 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -415,7 +415,11 @@ XDrawLine (display, p, gc, x1, y1, x2, y2) | |||
| 415 | if (ximg->bits_per_pixel == 32) | 415 | if (ximg->bits_per_pixel == 32) |
| 416 | { | 416 | { |
| 417 | color_space = mac_cg_color_space_rgb; | 417 | color_space = mac_cg_color_space_rgb; |
| 418 | alpha_info = kCGImageAlphaNoneSkipFirst; | 418 | alpha_info = (kCGImageAlphaNoneSkipFirst |
| 419 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 | ||
| 420 | | kCGBitmapByteOrder32Host | ||
| 421 | #endif | ||
| 422 | ); | ||
| 419 | } | 423 | } |
| 420 | else | 424 | else |
| 421 | { | 425 | { |
| @@ -743,7 +747,11 @@ XCreatePixmapFromBitmapData (display, w, data, width, height, fg, bg, depth) | |||
| 743 | context = CGBitmapContextCreate (pixmap->data, width, height, 8, | 747 | context = CGBitmapContextCreate (pixmap->data, width, height, 8, |
| 744 | pixmap->bytes_per_line, | 748 | pixmap->bytes_per_line, |
| 745 | mac_cg_color_space_rgb, | 749 | mac_cg_color_space_rgb, |
| 746 | kCGImageAlphaNoneSkipFirst); | 750 | kCGImageAlphaNoneSkipFirst |
| 751 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 | ||
| 752 | | kCGBitmapByteOrder32Host | ||
| 753 | #endif | ||
| 754 | ); | ||
| 747 | 755 | ||
| 748 | CG_SET_FILL_COLOR (context, fg); | 756 | CG_SET_FILL_COLOR (context, fg); |
| 749 | CGContextFillRect (context, CGRectMake (0, 0, width, height)); | 757 | CGContextFillRect (context, CGRectMake (0, 0, width, height)); |