diff options
author | culler <culler> | 2021-04-25 22:03:02 (GMT) |
---|---|---|
committer | culler <culler> | 2021-04-25 22:03:02 (GMT) |
commit | 312349dd711ba2bb4341ec16cc1b476351d6cbb9 (patch) | |
tree | 0c1c63de6ed32b185fe32997994dd35afb478714 | |
parent | 971268f241db43b649dd2387e352ec171b3e2703 (diff) | |
download | tk-312349dd711ba2bb4341ec16cc1b476351d6cbb9.zip tk-312349dd711ba2bb4341ec16cc1b476351d6cbb9.tar.gz tk-312349dd711ba2bb4341ec16cc1b476351d6cbb9.tar.bz2 |
Fix the flip transform for pixmaps. This makes bitmap buttons work again.
-rw-r--r-- | macosx/tkMacOSXDraw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index aa7523a..f642bda 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1266,6 +1266,7 @@ TkMacOSXSetupDrawingContext( Bool canDraw = true; TKContentView *view = nil; TkMacOSXDrawingContext dc = {}; + CGFloat drawingHeight; #ifdef TK_MAC_DEBUG_CG fprintf(stderr, "TkMacOSXSetupDrawingContext: %s\n", @@ -1357,11 +1358,13 @@ TkMacOSXSetupDrawingContext( * Finish configuring the drawing context. */ + drawingHeight = view ? [view bounds].size.height : + CGContextGetClipBoundingBox(dc.context).size.height; CGAffineTransform t = { .a = 1, .b = 0, .c = 0, .d = -1, .tx = 0, - .ty = [view bounds].size.height + .ty = drawingHeight }; #ifdef TK_MAC_DEBUG_CG |