summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-12-23 06:34:42 +0000
committerManolo Gouy <Manolo>2017-12-23 06:34:42 +0000
commite1893334fd1e2377635b6488945f730263b04fd9 (patch)
tree75e19f73095f39ea222d494b54a696bd89e70ea0 /src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
parentc44382e973ebb54396687892c43b92ac0655bbce (diff)
Continue support for GUI rescaling under MacOS: fix Fl_Overlay_Window.
This patch also improves by simplification the code of class Fl_Quartz_Image_Surface_Driver: because, under the driver model, there's a separate graphics content for the display and for each offscreen buffer, it's possible to reverse the drawing orientation (draw from top to bottom) once at offscreen creation. It's thus no longer necessary to reverse orientation in Fl_Quartz_Graphics_Driver::restore_clip() specifically for offscreen buffers. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12603 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
index 4bfaa39dc..2a223bb9c 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx
@@ -296,19 +296,6 @@ void Fl_Quartz_Graphics_Driver::restore_clip() {
CGContextRestoreGState(gc_);
CGContextSaveGState(gc_);
}
- // FLTK has only one global graphics state.
- // This copies the FLTK state into the current Quartz context
- if ( ! fl_window ) { // a bitmap context
- CGFloat hgt = CGBitmapContextGetHeight(gc_);
- CGAffineTransform at = CGContextGetCTM(gc_);
- CGFloat offset = 0.5;
- if (at.a != 1 && at.a == at.d && at.b == 0 && at.c == 0) { // proportional scaling, no rotation
- hgt /= at.a;
- offset /= at.a;
- }
- CGContextTranslateCTM(gc_, offset, hgt-offset);
- CGContextScaleCTM(gc_, 1.0f, -1.0f); // now 0,0 is top-left point of the context
- }
color(color());
quartz_restore_line_style();
if (r) { //apply program clip