From 63e33b1be3e2af253cd8adf10a5eac7e72a5fc7e Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 23 Sep 2016 07:47:57 +0000 Subject: Fl_Quartz_Graphics_Driver: separate CoreText- and ATSU-based code using new, derived classes. FLTK for the Mac OS platform draws text using 2 distinct system APIs depending on the version of the running OS. Classes Fl_CoreText_Graphics_Driver and Fl_ATSU_Graphics_Driver are defined and implement the same virtual functions of class Fl_Quartz_Graphics_Driver using CoreText and ATSU, respectively. The app allocates an object of one of these derived classes according to the running OS version. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11967 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx') diff --git a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx index 59a3b5e93..fe2f3d435 100644 --- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx @@ -53,7 +53,7 @@ Fl_Quartz_Image_Surface_Driver::Fl_Quartz_Image_Surface_Driver(int w, int h, int CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB(); offscreen = CGBitmapContextCreate(calloc(W*H,4), W, H, 8, W*4, lut, kCGImageAlphaPremultipliedLast); CGColorSpaceRelease(lut); - driver(new Fl_Quartz_Graphics_Driver); + driver(Fl_Graphics_Driver::newMainGraphicsDriver()); CGContextTranslateCTM(offscreen, 0.5, -0.5); // as when drawing to a window if (high_res) { CGContextScaleCTM(offscreen, 2, 2); -- cgit v1.2.3