From 39fdbecd1656ad10f76fe994824001ef94355ad4 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 2 Mar 2016 12:36:37 +0000 Subject: Finalize new implementation of Fl_Copy_Surface. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11267 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/GDI/Fl_GDI_Copy_Surface.H | 1 + src/drivers/GDI/Fl_GDI_Copy_Surface.cxx | 4 +--- src/drivers/Quartz/Fl_Quartz_Copy_Surface.H | 1 + src/drivers/Quartz/Fl_Quartz_Copy_Surface.cxx | 4 +--- src/drivers/Xlib/Fl_Xlib_Copy_Surface.H | 1 + src/drivers/Xlib/Fl_Xlib_Copy_Surface.cxx | 4 +--- 6 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/GDI/Fl_GDI_Copy_Surface.H b/src/drivers/GDI/Fl_GDI_Copy_Surface.H index 739bb4962..18b4f00f4 100644 --- a/src/drivers/GDI/Fl_GDI_Copy_Surface.H +++ b/src/drivers/GDI/Fl_GDI_Copy_Surface.H @@ -37,6 +37,7 @@ private: void untranslate(); int w() {return width;} int h() {return height;} + int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;} }; #endif /* Fl_GDI_Copy_Surface_h */ diff --git a/src/drivers/GDI/Fl_GDI_Copy_Surface.cxx b/src/drivers/GDI/Fl_GDI_Copy_Surface.cxx index bb05377ff..77203da73 100644 --- a/src/drivers/GDI/Fl_GDI_Copy_Surface.cxx +++ b/src/drivers/GDI/Fl_GDI_Copy_Surface.cxx @@ -18,9 +18,7 @@ #include "Fl_GDI_Copy_Surface.H" -Fl_Copy_Surface::Helper::Helper(int w, int h) : Fl_Widget_Surface(NULL) { - width = w; - height = h; +Fl_Copy_Surface::Helper::Helper(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) { driver(new Fl_Translated_GDI_Graphics_Driver); oldgc = (HDC)Fl_Surface_Device::surface()->driver()->gc(); // exact computation of factor from screen units to EnhMetaFile units (0.01 mm) diff --git a/src/drivers/Quartz/Fl_Quartz_Copy_Surface.H b/src/drivers/Quartz/Fl_Quartz_Copy_Surface.H index 3d7f4c6cf..45c3d4b41 100644 --- a/src/drivers/Quartz/Fl_Quartz_Copy_Surface.H +++ b/src/drivers/Quartz/Fl_Quartz_Copy_Surface.H @@ -40,6 +40,7 @@ private: void untranslate(); int w() {return width;} int h() {return height;} + int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;} }; #endif // FL_QUARTZ_COPY_SURFACE_H diff --git a/src/drivers/Quartz/Fl_Quartz_Copy_Surface.cxx b/src/drivers/Quartz/Fl_Quartz_Copy_Surface.cxx index 1606e7b2a..04b2c6def 100644 --- a/src/drivers/Quartz/Fl_Quartz_Copy_Surface.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Copy_Surface.cxx @@ -23,9 +23,7 @@ #include "Fl_Quartz_Graphics_Driver.H" #endif -Fl_Copy_Surface::Helper::Helper(int w, int h) : Fl_Widget_Surface(NULL) { - width = w; - height = h; +Fl_Copy_Surface::Helper::Helper(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) { driver(new Fl_Quartz_Graphics_Driver); prepare_copy_pdf_and_tiff(w, h); } diff --git a/src/drivers/Xlib/Fl_Xlib_Copy_Surface.H b/src/drivers/Xlib/Fl_Xlib_Copy_Surface.H index 8d0bae211..fc76c4508 100644 --- a/src/drivers/Xlib/Fl_Xlib_Copy_Surface.H +++ b/src/drivers/Xlib/Fl_Xlib_Copy_Surface.H @@ -39,6 +39,7 @@ private: void untranslate(); int w() {return width;} int h() {return height;} + int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;} }; #endif /* Fl_Xlib_Copy_Surface_h */ diff --git a/src/drivers/Xlib/Fl_Xlib_Copy_Surface.cxx b/src/drivers/Xlib/Fl_Xlib_Copy_Surface.cxx index 4d9baea83..862a9939c 100644 --- a/src/drivers/Xlib/Fl_Xlib_Copy_Surface.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Copy_Surface.cxx @@ -20,9 +20,7 @@ #include #include -Fl_Copy_Surface::Helper::Helper(int w, int h) : Fl_Widget_Surface(NULL) { - width = w; - height = h; +Fl_Copy_Surface::Helper::Helper(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) { driver(new Fl_Translated_Xlib_Graphics_Driver()); Fl::first_window()->make_current(); oldwindow = fl_xid(Fl::first_window()); -- cgit v1.2.3