From 8782f2f925c528d7a6cc778163b3d09611b56973 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 3 Mar 2016 19:16:22 +0000 Subject: Simpler implementation of Fl_Image_Surface. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Image_Surface.cxx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx index 728d8d5a9..f47975a4d 100644 --- a/src/Fl_Image_Surface.cxx +++ b/src/Fl_Image_Surface.cxx @@ -46,7 +46,6 @@ public: int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;} Fl_RGB_Image *image(); void end_current(); - Fl_Offscreen get_offscreen_before_delete(); }; Fl_Image_Surface::Helper::Helper(int w, int h, int high_res) : Fl_Widget_Surface(NULL), width(w), height(h) { @@ -144,7 +143,6 @@ public: Fl_RGB_Image *image(); void end_current(); int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;} - Fl_Offscreen get_offscreen_before_delete(); }; Fl_Image_Surface::Helper::Helper(int w, int h, int high_res) : Fl_Widget_Surface(NULL), width(w), height(h) { @@ -219,7 +217,6 @@ public: Fl_RGB_Image *image() {} // to implement void end_current() {} // to implement int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;} - Fl_Offscreen get_offscreen_before_delete(); }; @@ -246,7 +243,6 @@ public: int printable_rect(int *w, int *h) {*w = width; *h = height; return 0;} Fl_RGB_Image *image(); void end_current(); - Fl_Offscreen get_offscreen_before_delete(); public: }; @@ -306,11 +302,6 @@ void Fl_Image_Surface::Helper::end_current() #endif -Fl_Offscreen Fl_Image_Surface::Helper::get_offscreen_before_delete() { - Fl_Offscreen keep = offscreen; - offscreen = 0; - return keep; -} /** Constructor with optional high resolution. \param w and \param h give the size in pixels of the resulting image. @@ -381,7 +372,9 @@ Fl_Shared_Image* Fl_Image_Surface::highres_image() /** Allows to delete the Fl_Image_Surface object while keeping its underlying Fl_Offscreen */ Fl_Offscreen Fl_Image_Surface::get_offscreen_before_delete() { - return platform_surface->get_offscreen_before_delete(); + Fl_Offscreen keep = platform_surface->offscreen; + platform_surface->offscreen = 0; + return keep; } // implementation of the fl_XXX_offscreen() functions -- cgit v1.2.3