diff options
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 66830ab54..938771ea4 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3310,10 +3310,14 @@ extern void fl_quartz_restore_line_style_(); void Fl_X::q_fill_context() { if (!fl_gc) return; if ( ! fl_window) { // a bitmap context - size_t hgt = CGBitmapContextGetHeight(fl_gc); + CGFloat hgt = CGBitmapContextGetHeight(fl_gc); + CGAffineTransform at = CGContextGetCTM(fl_gc); + if (at.a != 1 && at.a == at.d && at.b == 0 && at.c == 0) { // proportional scaling, no rotation + hgt /= at.a; + } CGContextTranslateCTM(fl_gc, 0.5, hgt-0.5f); CGContextScaleCTM(fl_gc, 1.0f, -1.0f); // now 0,0 is top-left point of the context - } + } fl_color(fl_graphics_driver->color()); fl_quartz_restore_line_style_(); } |
