summaryrefslogtreecommitdiffstats
path: root/tksao
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-01-22 20:51:48 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-01-22 20:51:48 (GMT)
commit691cf36c3fd9b594e51929093d1ff0b89ac4e0e1 (patch)
tree884e282d92afa6083bd12a2fba272d21148ed239 /tksao
parent210481044a952eb6b8ad1189b82f9fc93cbd90b1 (diff)
downloadblt-691cf36c3fd9b594e51929093d1ff0b89ac4e0e1.zip
blt-691cf36c3fd9b594e51929093d1ff0b89ac4e0e1.tar.gz
blt-691cf36c3fd9b594e51929093d1ff0b89ac4e0e1.tar.bz2
fix aqua bitmap order
Diffstat (limited to 'tksao')
-rw-r--r--tksao/widget/truecolor24.C21
1 files changed, 17 insertions, 4 deletions
diff --git a/tksao/widget/truecolor24.C b/tksao/widget/truecolor24.C
index cf2fad3..9ef87f9 100644
--- a/tksao/widget/truecolor24.C
+++ b/tksao/widget/truecolor24.C
@@ -14,10 +14,23 @@ TrueColor24::TrueColor24(Visual* visual)
bx_ = visual->blue_mask;
#endif
#if MAC_OSX_TK
- ax_ = 0xFF000000;
- rx_ = 0x00FF0000;
- gx_ = 0x0000FF00;
- bx_ = 0x000000FF;
+ // major change in 8.6.9: in macos/tkMacOSXImage.c
+ if (TCL_MAJOR_VERSION == 8 &&
+ TCL_MINOR_VERSION == 6 &&
+ TCL_RELEASE_SERIAL < 9) {
+ // bitmapInfo = (image->byte_order == MSBFirst ? kCGBitmapByteOrder32Big : kCGBitmapByteOrder32Little);
+ ax_ = 0xFF000000;
+ rx_ = 0x00FF0000;
+ gx_ = 0x0000FF00;
+ bx_ = 0x000000FF;
+ }
+ else {
+ // bitmapInfo = (image->byte_order == MSBFirst ? kCGBitmapByteOrder32Little : kCGBitmapByteOrder32Big);
+ ax_ = 0xFF000000;
+ rx_ = 0x000000FF;
+ gx_ = 0x0000FF00;
+ bx_ = 0x00FF0000;
+ }
#endif
#if _WIN32
// windows masks are plain wrong