summaryrefslogtreecommitdiff
path: root/src/drivers/Cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/Cocoa')
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H2
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
index 29ae7570e..d825e6580 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
+++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
@@ -94,6 +94,8 @@ public:
virtual void enable_im();
virtual void disable_im();
virtual void open_display();
+ // --- compute dimensions of an Fl_Offscreen
+ virtual void offscreen_size(Fl_Offscreen o, int &width, int &height);
};
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
index 71a64292d..8856f8cfe 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
+++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
@@ -400,6 +400,12 @@ int Fl_Cocoa_Screen_Driver::input_widget_handle_key(int key, unsigned mods, unsi
return -1;
}
+void Fl_Cocoa_Screen_Driver::offscreen_size(Fl_Offscreen off, int &width, int &height)
+{
+ width = CGBitmapContextGetWidth(off);
+ height = CGBitmapContextGetHeight(off);
+}
+
//
// End of "$Id$".
//