diff options
| author | Manolo Gouy <Manolo> | 2018-05-04 16:06:08 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-05-04 16:06:08 +0000 |
| commit | 733b4de91d7edff33d00fadbc7a9be78d741248f (patch) | |
| tree | 935c9a18cdcba8618d4ac41693d5c5ec53061f39 /src/Fl_Gl_Device_Plugin.cxx | |
| parent | a8054a719f27ea2a9d5fcfbdf636cedbd1862565 (diff) | |
Simplify Fl_Gl_Device_Plugin::print() using the Fl_Image::scale() member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12896 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Device_Plugin.cxx')
| -rw-r--r-- | src/Fl_Gl_Device_Plugin.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx index fd428c96f..f5e24585a 100644 --- a/src/Fl_Gl_Device_Plugin.cxx +++ b/src/Fl_Gl_Device_Plugin.cxx @@ -19,7 +19,6 @@ #include "config_lib.h" #include <FL/Fl_Gl_Window.H> #include <FL/Fl_RGB_Image.H> -#include <FL/Fl_Shared_Image.H> #include "drivers/OpenGL/Fl_OpenGL_Display_Device.H" @@ -35,10 +34,9 @@ public: Fl_Gl_Window *glw = w->as_gl_window(); if (!glw) return 0; Fl_RGB_Image *img = Fl_OpenGL_Display_Device::capture_gl_rectangle(glw, 0, 0, glw->w(), glw->h()); - Fl_Shared_Image *shared = Fl_Shared_Image::get(img); - shared->scale(glw->w(), glw->h()); - shared->draw(x, y); - shared->release(); + img->scale(glw->w(), glw->h()); + img->draw(x, y); + delete img; return 1; } virtual Fl_RGB_Image* rectangle_capture(Fl_Widget *widget, int x, int y, int w, int h) { |
