From 312349dd711ba2bb4341ec16cc1b476351d6cbb9 Mon Sep 17 00:00:00 2001 From: culler Date: Sun, 25 Apr 2021 22:03:02 +0000 Subject: Fix the flip transform for pixmaps. This makes bitmap buttons work again. --- macosx/tkMacOSXDraw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v0.12