summaryrefslogtreecommitdiff
path: root/src/drivers/X11/Fl_X11_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-12-14 18:54:12 +0000
committerManolo Gouy <Manolo>2016-12-14 18:54:12 +0000
commit1fc01c7cbb23fe21b1cf07261659badfb1dd3fb9 (patch)
treec6ed6b19fe8f6ecd47f057d8a1eba115a2f4d180 /src/drivers/X11/Fl_X11_Screen_Driver.cxx
parent6645a6b225b165b740edd71dbc3a3b67dd0bbb63 (diff)
Implement a platform-independent version of Fl_Graphics_Driver::copy_offscreen() usable when drawing to PostScript.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/X11/Fl_X11_Screen_Driver.cxx')
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
index d28859949..7095ea948 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -1143,6 +1143,17 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(uchar *p, int X, int Y, i
return rgb;
}
+
+void Fl_X11_Screen_Driver::offscreen_size(Fl_Offscreen off, int &width, int &height)
+{
+ int px, py;
+ unsigned w, h, b, d;
+ Window root;
+ XGetGeometry(fl_display, off, &root, &px, &py, &w, &h, &b, &d);
+ width = (int)w;
+ height = (int)h;
+}
+
//
// End of "$Id$".
//