diff options
| author | Manolo Gouy <Manolo> | 2016-03-03 19:16:22 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-03 19:16:22 +0000 |
| commit | 8782f2f925c528d7a6cc778163b3d09611b56973 (patch) | |
| tree | e66aa4599038d53b3b6428a59a394a3299e97436 /src/Fl_Image_Surface.cxx | |
| parent | 8bd3ea6c8ac066002b035f10f3657449f6beadb1 (diff) | |
Simpler implementation of Fl_Image_Surface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Image_Surface.cxx')
| -rw-r--r-- | src/Fl_Image_Surface.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
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 |
