summaryrefslogtreecommitdiff
path: root/src/Fl_cocoa.mm
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-02-27 13:52:27 +0000
committerManolo Gouy <Manolo>2016-02-27 13:52:27 +0000
commit0b406baa0f05d8b829d2c35b10c8450e7628be53 (patch)
tree62d91890f7194e00ea9f40e89f640c7c013c7b45 /src/Fl_cocoa.mm
parent5d24872dc40e1047cea6337d8823718ac2acd575 (diff)
Rewrite all fl_XXX_offscreen() functions so they use an Fl_Image_Surface object.
These functions become therefore platform-independent. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_cocoa.mm')
-rw-r--r--src/Fl_cocoa.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 898c68136..5b70130ad 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3309,7 +3309,7 @@ void Fl_X::q_release_context(Fl_X *x) {
if (!gc) return;
CGContextRestoreGState(gc); // match the CGContextSaveGState's of make_current
CGContextRestoreGState(gc);
- Fl_X::set_high_resolution(false);
+// Fl_X::set_high_resolution(false);
CGContextFlush(gc);
Fl_Display_Device::display_device()->driver()->gc(0);
#if defined(FLTK_USE_CAIRO)
@@ -3886,12 +3886,13 @@ static NSImage *imageFromText(const char *text, int *pwidth, int *pheight)
}
height = nl * fl_height() + 3;
width += 6;
- Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(width, height);
+ Fl_Offscreen off = fl_create_offscreen(width, height);
fl_begin_offscreen(off);
CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
fl_rectf(0,0,width,height);
fl_color(FL_BLACK);
p = text;
+ fl_font(FL_HELVETICA, 10);
int y = fl_height();
while(TRUE) {
q = strchr(p, '\n');
@@ -3922,7 +3923,7 @@ static NSImage *defaultDragImage(int *pwidth, int *pheight)
else {
width = 16; height = 16;
}
- Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(width, height);
+ Fl_Offscreen off = fl_create_offscreen(width, height);
fl_begin_offscreen(off);
if (fl_mac_os_version >= version_threshold) {
fl_font(FL_HELVETICA, 20);